Rearrange linux resources and translate MIME files

This commit is contained in:
Ian McInerney 2021-01-16 19:15:12 +00:00
parent 43baf2e3f2
commit 2aff8822d6
68 changed files with 20 additions and 13 deletions

3
.gitignore vendored
View File

@ -116,3 +116,6 @@ CMakeSettings.json
*.mo *.mo
i18n_status.svg i18n_status.svg
i18n_status.csv i18n_status.csv
# Don't actually ignore any of these files, since we need them in the tree
!resources/linux/icons/hicolor/**/**/*

View File

@ -185,14 +185,14 @@ macro( linux_metadata_translation SRC_FILE OUT_FILE PO_DIR )
${OPT_TYPE} --template=${SRC_FILE} ${OPT_TYPE} --template=${SRC_FILE}
-d ${PO_DIR} -d ${PO_DIR}
-o ${OUT_FILE} -o ${OUT_FILE}
COMMENT "Translating ${OUT_FNAME}" COMMENT "Translating file ${OUT_FNAME}"
) )
else() else()
add_custom_command( add_custom_command(
OUTPUT ${OUT_FILE} OUTPUT ${OUT_FILE}
DEPENDS ${SRC_FILE} DEPENDS ${SRC_FILE}
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${SRC_FILE}" "${OUT_FILE}" COMMAND ${CMAKE_COMMAND} -E copy_if_different "${SRC_FILE}" "${OUT_FILE}"
COMMENT "Copying ${OUT_FNAME}" COMMENT "Copying file ${OUT_FNAME}"
) )
endif() endif()
endmacro() endmacro()

View File

@ -47,6 +47,15 @@ elseif( UNIX )
${PROJECT_BINARY_DIR}/resources/linux/launchers/pcbnew.desktop ${PROJECT_BINARY_DIR}/resources/linux/launchers/pcbnew.desktop
${PROJECT_SOURCE_DIR}/translation/pofiles ) ${PROJECT_SOURCE_DIR}/translation/pofiles )
# Translate the MIME info, which are read from the source directory
linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/mime/kicad-gerbers.xml.in
${PROJECT_BINARY_DIR}/resources/linux/mime/kicad-gerbers.xml
${PROJECT_SOURCE_DIR}/translation/pofiles )
linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/mime/kicad-kicad.xml.in
${PROJECT_BINARY_DIR}/resources/linux/mime/kicad-kicad.xml
${PROJECT_SOURCE_DIR}/translation/pofiles )
add_custom_target( metadata ALL add_custom_target( metadata ALL
DEPENDS ${PROJECT_BINARY_DIR}/resources/linux/appdata/kicad.appdata.xml DEPENDS ${PROJECT_BINARY_DIR}/resources/linux/appdata/kicad.appdata.xml
${PROJECT_BINARY_DIR}/resources/linux/launchers/bitmap2component.desktop ${PROJECT_BINARY_DIR}/resources/linux/launchers/bitmap2component.desktop
@ -55,21 +64,19 @@ elseif( UNIX )
${PROJECT_BINARY_DIR}/resources/linux/launchers/kicad.desktop ${PROJECT_BINARY_DIR}/resources/linux/launchers/kicad.desktop
${PROJECT_BINARY_DIR}/resources/linux/launchers/pcbcalculator.desktop ${PROJECT_BINARY_DIR}/resources/linux/launchers/pcbcalculator.desktop
${PROJECT_BINARY_DIR}/resources/linux/launchers/pcbnew.desktop ${PROJECT_BINARY_DIR}/resources/linux/launchers/pcbnew.desktop
${PROJECT_BINARY_DIR}/resources/linux/mime/kicad-gerbers.xml
${PROJECT_BINARY_DIR}/resources/linux/mime/kicad-kicad.xml
) )
# Set paths
set( UNIX_MIME_DIR linux/mime )
set( UNIX_MIME_FILES ${UNIX_MIME_DIR}/mime )
set( UNIX_ICON_FILES ${UNIX_MIME_DIR}/icons )
# Install Mime directory # Install icons
install( DIRECTORY ${UNIX_ICON_FILES} install( DIRECTORY ${PROJECT_SOURCE_DIR}/resources/linux/icons
TYPE DATA TYPE DATA
COMPONENT resources COMPONENT resources
) )
# Install Icons # Install MIME type files
install( DIRECTORY ${UNIX_MIME_FILES}/ install( DIRECTORY ${PROJECT_BINARY_DIR}/resources/linux/mime/
DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages
COMPONENT resources COMPONENT resources
) )

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 387 B

View File

Before

Width:  |  Height:  |  Size: 337 B

After

Width:  |  Height:  |  Size: 337 B

View File

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 274 B

View File

Before

Width:  |  Height:  |  Size: 708 B

After

Width:  |  Height:  |  Size: 708 B

View File

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 224 B

View File

Before

Width:  |  Height:  |  Size: 447 B

After

Width:  |  Height:  |  Size: 447 B

View File

Before

Width:  |  Height:  |  Size: 674 B

After

Width:  |  Height:  |  Size: 674 B

View File

Before

Width:  |  Height:  |  Size: 476 B

After

Width:  |  Height:  |  Size: 476 B

View File

Before

Width:  |  Height:  |  Size: 364 B

After

Width:  |  Height:  |  Size: 364 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 257 B

View File

Before

Width:  |  Height:  |  Size: 694 B

After

Width:  |  Height:  |  Size: 694 B

View File

Before

Width:  |  Height:  |  Size: 619 B

After

Width:  |  Height:  |  Size: 619 B

View File

Before

Width:  |  Height:  |  Size: 687 B

After

Width:  |  Height:  |  Size: 687 B

View File

Before

Width:  |  Height:  |  Size: 458 B

After

Width:  |  Height:  |  Size: 458 B

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 487 B

After

Width:  |  Height:  |  Size: 487 B

View File

Before

Width:  |  Height:  |  Size: 829 B

After

Width:  |  Height:  |  Size: 829 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 954 B

After

Width:  |  Height:  |  Size: 954 B

View File

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 550 B

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 517 B

After

Width:  |  Height:  |  Size: 517 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 825 B

After

Width:  |  Height:  |  Size: 825 B

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 888 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 164 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -3,21 +3,18 @@
<mime-type type="application/x-kicad-project"> <mime-type type="application/x-kicad-project">
<sub-class-of type="text/plain"/> <sub-class-of type="text/plain"/>
<comment>KiCad Project</comment> <comment>KiCad Project</comment>
<comment xml:lang="fr">Projet KiCad</comment>
<glob pattern="*.pro"/> <glob pattern="*.pro"/>
<glob pattern="*.kicad_pro"/> <glob pattern="*.kicad_pro"/>
</mime-type> </mime-type>
<mime-type type="application/x-kicad-schematic"> <mime-type type="application/x-kicad-schematic">
<sub-class-of type="text/plain"/> <sub-class-of type="text/plain"/>
<comment>KiCad Schematic</comment> <comment>KiCad Schematic</comment>
<comment xml:lang="fr">Schéma électronique KiCad</comment>
<glob pattern="*.sch"/> <glob pattern="*.sch"/>
<glob pattern="*.kicad_sch"/> <glob pattern="*.kicad_sch"/>
</mime-type> </mime-type>
<mime-type type="application/x-kicad-pcb"> <mime-type type="application/x-kicad-pcb">
<sub-class-of type="text/plain"/> <sub-class-of type="text/plain"/>
<comment>KiCad Printed Circuit Board</comment> <comment>KiCad Printed Circuit Board</comment>
<comment xml:lang="fr">Circuit imprimé KiCad</comment>
<glob pattern="*.kicad_pcb"/> <glob pattern="*.kicad_pcb"/>
</mime-type> </mime-type>
</mime-info> </mime-info>