← Back to team overview

kicad-doc-devs team mailing list archive

Re: [PATCH] KiCadDocumentation.cmake: fix install target for HTML docu

 

I'm going to defer this to my documentation and package devs.  Does this
patch make sense?  I understand why we would want to do this I'm just
not willing to commit this in case break things pm other platforms.
Once I have some feedback and this is a workable solution for all
parties involved, then I would be willing to merge this patch.

Cheers,

Wayne

On 9/24/2016 4:01 AM, c.schoenert@xxxxxxxxxxx wrote:
> From: Carsten Schoenert <c.schoenert@xxxxxxxxxxx>
> 
> 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()
>  
>  
> 



Follow ups

References