From: Carsten Schoenert <c.schoen...@t-online.de> The current default behaviour while installing the generated HTML content is to install the whole images/$LANG folders into every generated language. This produces a lot of useless duplicated data. This commit fix this partially by only copying the needed language folder and the english folder instead defaulting every folder under images.
A better approach would be to have the default images under /share/doc/kicad/help/$LANG/images and the language specific images in /share/doc/kicad/help/$LANG/images/$LANG. By this the Linux distributions can link all the default images to one single place. By this a real dedup could be reached. Or if this not possible or wanted every language uses only the folder /share/doc/kicad/help/$LANG/images So the default images would be need to overriden by the translator if wanted. --- CMakeModules/KiCadDocumentation.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeModules/KiCadDocumentation.cmake b/CMakeModules/KiCadDocumentation.cmake index e4c91e4..a6fc337 100644 --- a/CMakeModules/KiCadDocumentation.cmake +++ b/CMakeModules/KiCadDocumentation.cmake @@ -136,7 +136,11 @@ macro( KiCadDocumentation DOCNAME ) add_dependencies( ${DOCNAME} ${DOCNAME}_html_${LANGUAGE} ) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGE}/${DOCNAME}.html DESTINATION ${KICAD_DOC_PATH}/${LANGUAGE} COMPONENT html-${LANGUAGE} ) - install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGE}/images/ DESTINATION ${KICAD_DOC_PATH}/${LANGUAGE}/images COMPONENT html-${LANGUAGE} OPTIONAL PATTERN "*.png") + # install the images/en/ folder if not already done, the folder contains the default images + if( NOT "${KICAD_DOC_PATH}/${LANGUAGE}/images/en" EQUAL "-1" ) + install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGE}/images/en DESTINATION ${KICAD_DOC_PATH}/${LANGUAGE}/images COMPONENT html-${LANGUAGE} OPTIONAL PATTERN "*.png") + endif() + install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGE}/images/${LANGUAGE} DESTINATION ${KICAD_DOC_PATH}/${LANGUAGE}/images COMPONENT html-${LANGUAGE} OPTIONAL PATTERN "*.png") endif() -- 2.9.3 -- Mailing list: https://launchpad.net/~kicad-doc-devs Post to : kicad-doc-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-doc-devs More help : https://help.launchpad.net/ListHelp