Rearrange linux resources and translate MIME files
3
.gitignore
vendored
@ -116,3 +116,6 @@ CMakeSettings.json
|
||||
*.mo
|
||||
i18n_status.svg
|
||||
i18n_status.csv
|
||||
|
||||
# Don't actually ignore any of these files, since we need them in the tree
|
||||
!resources/linux/icons/hicolor/**/**/*
|
||||
|
@ -185,14 +185,14 @@ macro( linux_metadata_translation SRC_FILE OUT_FILE PO_DIR )
|
||||
${OPT_TYPE} --template=${SRC_FILE}
|
||||
-d ${PO_DIR}
|
||||
-o ${OUT_FILE}
|
||||
COMMENT "Translating ${OUT_FNAME}"
|
||||
COMMENT "Translating file ${OUT_FNAME}"
|
||||
)
|
||||
else()
|
||||
add_custom_command(
|
||||
OUTPUT ${OUT_FILE}
|
||||
DEPENDS ${SRC_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${SRC_FILE}" "${OUT_FILE}"
|
||||
COMMENT "Copying ${OUT_FNAME}"
|
||||
COMMENT "Copying file ${OUT_FNAME}"
|
||||
)
|
||||
endif()
|
||||
endmacro()
|
||||
|
@ -47,6 +47,15 @@ elseif( UNIX )
|
||||
${PROJECT_BINARY_DIR}/resources/linux/launchers/pcbnew.desktop
|
||||
${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
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/resources/linux/appdata/kicad.appdata.xml
|
||||
${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/pcbcalculator.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( DIRECTORY ${UNIX_ICON_FILES}
|
||||
# Install icons
|
||||
install( DIRECTORY ${PROJECT_SOURCE_DIR}/resources/linux/icons
|
||||
TYPE DATA
|
||||
COMPONENT resources
|
||||
)
|
||||
|
||||
# Install Icons
|
||||
install( DIRECTORY ${UNIX_MIME_FILES}/
|
||||
# Install MIME type files
|
||||
install( DIRECTORY ${PROJECT_BINARY_DIR}/resources/linux/mime/
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages
|
||||
COMPONENT resources
|
||||
)
|
||||
|
Before ![]() (image error) Size: 2.6 KiB After ![]() (image error) Size: 2.6 KiB ![]() ![]() |
Before ![]() (image error) Size: 2.7 KiB After ![]() (image error) Size: 2.7 KiB ![]() ![]() |
Before ![]() (image error) Size: 1.4 KiB After ![]() (image error) Size: 1.4 KiB ![]() ![]() |
Before ![]() (image error) Size: 10 KiB After ![]() (image error) Size: 10 KiB ![]() ![]() |
Before ![]() (image error) Size: 1.6 KiB After ![]() (image error) Size: 1.6 KiB ![]() ![]() |
Before ![]() (image error) Size: 3.7 KiB After ![]() (image error) Size: 3.7 KiB ![]() ![]() |
Before ![]() (image error) Size: 3.7 KiB After ![]() (image error) Size: 3.7 KiB ![]() ![]() |
Before ![]() (image error) Size: 10 KiB After ![]() (image error) Size: 10 KiB ![]() ![]() |
Before ![]() (image error) Size: 2.7 KiB After ![]() (image error) Size: 2.7 KiB ![]() ![]() |
Before ![]() (image error) Size: 387 B After ![]() (image error) Size: 387 B ![]() ![]() |
Before ![]() (image error) Size: 337 B After ![]() (image error) Size: 337 B ![]() ![]() |
Before ![]() (image error) Size: 274 B After ![]() (image error) Size: 274 B ![]() ![]() |
Before ![]() (image error) Size: 708 B After ![]() (image error) Size: 708 B ![]() ![]() |
Before ![]() (image error) Size: 224 B After ![]() (image error) Size: 224 B ![]() ![]() |
Before ![]() (image error) Size: 447 B After ![]() (image error) Size: 447 B ![]() ![]() |
Before ![]() (image error) Size: 447 B After ![]() (image error) Size: 447 B ![]() ![]() |
Before ![]() (image error) Size: 708 B After ![]() (image error) Size: 708 B ![]() ![]() |
Before ![]() (image error) Size: 337 B After ![]() (image error) Size: 337 B ![]() ![]() |
Before ![]() (image error) Size: 674 B After ![]() (image error) Size: 674 B ![]() ![]() |
Before ![]() (image error) Size: 476 B After ![]() (image error) Size: 476 B ![]() ![]() |
Before ![]() (image error) Size: 364 B After ![]() (image error) Size: 364 B ![]() ![]() |
Before ![]() (image error) Size: 1.2 KiB After ![]() (image error) Size: 1.2 KiB ![]() ![]() |