From 4fc41627e9a0b81d96b49157ccae7b9a826ec2b8 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Sun, 21 Mar 2021 14:26:05 +0000 Subject: [PATCH] Update and modernize linux metadata files * Switch to using org.kicad.kicad as the main app ID * Move the appstream file to a metainfo file * Rename all metadata files to use the reverse DNS scheme * Add header matching to mime type files where possible * Add a mime type for gerber job files * Add a QA test that verifies all the linux metadata files and run it in CI * Update the visible names in the launcher entries to be more consistent with the internal visible names * Update various strings and items in the metainfo file so they are more descriptive and easier to read --- .gitlab-ci.yml | 1 + .gitlab/linux-metadata-validate.yml | 43 +++ .../WritePlatformMetadata_linux.cmake | 12 +- .../gerbers/drillFiles/drillFile.drl | 10 + .../gerbers/drillFiles/drillFileNoExt | 10 + .../mimeFiles/gerbers/gerberFiles/gerber.gbr | 5 + .../mimeFiles/gerbers/gerberFiles/gerber.gts | 8 + .../gerbers/gerberFiles/gerberCommentNoExt | 5 + .../gerbers/gerberFiles/gerberFSLANoExt | 5 + .../gerbers/gerberFiles/gerberG75NoExt | 7 + .../gerbers/gerberFiles/gerberMONoExt | 5 + .../gerbers/gerberFiles/gerberTFNoExt | 15 + .../linux/mimeFiles/kicad/boardFiles/brd.brd | 19 ++ .../linux/mimeFiles/kicad/boardFiles/brdNoExt | 19 ++ .../kicad/boardFiles/kicadpcb.kicad_pcb | 10 + .../mimeFiles/kicad/boardFiles/kicadpcbNoExt | 10 + .../kicad/projectFiles/kicadpro.kicad_pro | 22 ++ .../mimeFiles/kicad/projectFiles/pro.pro | 7 + .../kicad/schematicFiles/kicadsch.kicad_sch | 10 + .../kicad/schematicFiles/kicadschNoExt | 10 + .../mimeFiles/kicad/schematicFiles/sch.sch | 14 + .../mimeFiles/kicad/schematicFiles/schNoExt | 14 + qa/resources/linux/verifyMetadataFiles.sh | 303 ++++++++++++++++++ resources/CMakeLists.txt | 56 ++-- resources/linux/appdata/kicad.appdata.xml.in | 80 ----- ... => org.kicad.bitmap2component.desktop.in} | 3 +- ...sktop.in => org.kicad.eeschema.desktop.in} | 7 +- ...sktop.in => org.kicad.gerbview.desktop.in} | 5 +- ....desktop.in => org.kicad.kicad.desktop.in} | 2 +- ....in => org.kicad.pcbcalculator.desktop.in} | 2 +- ...desktop.in => org.kicad.pcbnew.desktop.in} | 7 +- .../metainfo/org.kicad.kicad.metainfo.xml.in | 91 ++++++ resources/linux/mime/kicad-gerbers.xml.in | 43 ++- resources/linux/mime/kicad-kicad.xml.in | 46 ++- translation/POTDIRS | 2 +- 35 files changed, 752 insertions(+), 156 deletions(-) create mode 100644 .gitlab/linux-metadata-validate.yml create mode 100644 qa/resources/linux/mimeFiles/gerbers/drillFiles/drillFile.drl create mode 100644 qa/resources/linux/mimeFiles/gerbers/drillFiles/drillFileNoExt create mode 100644 qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerber.gbr create mode 100644 qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerber.gts create mode 100644 qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberCommentNoExt create mode 100644 qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberFSLANoExt create mode 100644 qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberG75NoExt create mode 100644 qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberMONoExt create mode 100644 qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberTFNoExt create mode 100644 qa/resources/linux/mimeFiles/kicad/boardFiles/brd.brd create mode 100644 qa/resources/linux/mimeFiles/kicad/boardFiles/brdNoExt create mode 100644 qa/resources/linux/mimeFiles/kicad/boardFiles/kicadpcb.kicad_pcb create mode 100644 qa/resources/linux/mimeFiles/kicad/boardFiles/kicadpcbNoExt create mode 100644 qa/resources/linux/mimeFiles/kicad/projectFiles/kicadpro.kicad_pro create mode 100644 qa/resources/linux/mimeFiles/kicad/projectFiles/pro.pro create mode 100644 qa/resources/linux/mimeFiles/kicad/schematicFiles/kicadsch.kicad_sch create mode 100644 qa/resources/linux/mimeFiles/kicad/schematicFiles/kicadschNoExt create mode 100644 qa/resources/linux/mimeFiles/kicad/schematicFiles/sch.sch create mode 100644 qa/resources/linux/mimeFiles/kicad/schematicFiles/schNoExt create mode 100755 qa/resources/linux/verifyMetadataFiles.sh delete mode 100644 resources/linux/appdata/kicad.appdata.xml.in rename resources/linux/launchers/{bitmap2component.desktop.in => org.kicad.bitmap2component.desktop.in} (81%) rename resources/linux/launchers/{eeschema.desktop.in => org.kicad.eeschema.desktop.in} (51%) rename resources/linux/launchers/{gerbview.desktop.in => org.kicad.gerbview.desktop.in} (59%) rename resources/linux/launchers/{kicad.desktop.in => org.kicad.kicad.desktop.in} (76%) rename resources/linux/launchers/{pcbcalculator.desktop.in => org.kicad.pcbcalculator.desktop.in} (89%) rename resources/linux/launchers/{pcbnew.desktop.in => org.kicad.pcbnew.desktop.in} (52%) create mode 100644 resources/linux/metainfo/org.kicad.kicad.metainfo.xml.in diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb82b816a8..5eb2b54dc7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,3 +40,4 @@ include: - local: '/.gitlab/Ubuntu-20.04-CI.yml' - local: '/.gitlab/Windows-CI.yml' - local: '/.gitlab/coverity.yml' + - local: '/.gitlab/linux-metadata-validate.yml' diff --git a/.gitlab/linux-metadata-validate.yml b/.gitlab/linux-metadata-validate.yml new file mode 100644 index 0000000000..00197856df --- /dev/null +++ b/.gitlab/linux-metadata-validate.yml @@ -0,0 +1,43 @@ +########################################################################## +# Run a validation of the metadata files for Linux +########################################################################## +validate_linux_metadata: + stage: test + needs: [] + interruptible: false + # This is the only CI image with the utilities needed for this test + image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:33 + only: + refs: + - master + - branches + - merge_requests + - pushes + changes: + # Only run if the resources, its tests, or the translations are updated + - resources/linux/**/* + - qa/resources/linux/**/* + - translation/**/* + except: + - schedules + # Only build the metadata files in this CI job + script: + - mkdir -p build/linux + - cd build/linux + - cmake + -DCMAKE_BUILD_TYPE=Debug + -DKICAD_STDLIB_LIGHT_DEBUG=ON + -DKICAD_SCRIPTING=ON + -DKICAD_SCRIPTING_MODULES=ON + -DKICAD_SCRIPTING_PYTHON3=ON + -DKICAD_SCRIPTING_WXPYTHON=ON + -DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON + -DKICAD_SCRIPTING_ACTION_MENU=ON + -DKICAD_USE_OCE=OFF + -DKICAD_USE_OCC=ON + -DKICAD_SPICE=ON + -DKICAD_BUILD_I18N=ON + ../../ + - make metadata + - cd ../../ + - ./qa/resources/linux/verifyMetadataFiles.sh ./ ./build/linux diff --git a/CMakeModules/BuildSteps/WritePlatformMetadata_linux.cmake b/CMakeModules/BuildSteps/WritePlatformMetadata_linux.cmake index 686925d329..fa9051e8f5 100644 --- a/CMakeModules/BuildSteps/WritePlatformMetadata_linux.cmake +++ b/CMakeModules/BuildSteps/WritePlatformMetadata_linux.cmake @@ -22,7 +22,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # -# This file will configure the linux appdata.xml file to include the version +# This file will configure the linux metainfo.xml file to include the version # and build date. # It requires the following variables to be defined before its call: @@ -38,12 +38,12 @@ include( ${CMAKE_MODULE_PATH}/KiCadFullVersion.cmake ) # Create the date of the configure string( TIMESTAMP KICAD_CONFIG_TIMESTAMP "%Y-%m-%d" ) -# Configure the KiCad appdata file -configure_file( ${SRC_PATH}/resources/linux/appdata/kicad.appdata.xml.in - ${BUILD_PATH}/resources/linux/appdata/kicad.appdata.xml.in +# Configure the KiCad metainfo file +configure_file( ${SRC_PATH}/resources/linux/metainfo/org.kicad.kicad.metainfo.xml.in + ${BUILD_PATH}/resources/linux/metainfo/org.kicad.kicad.metainfo.xml.in @ONLY ) # Ensure the file was configured successfully -if( NOT EXISTS ${BUILD_PATH}/resources/linux/appdata/kicad.appdata.xml.in ) - message( FATAL_ERROR "Configuration failed to write file kicad.appdata.xml.in" ) +if( NOT EXISTS ${BUILD_PATH}/resources/linux/metainfo/org.kicad.kicad.metainfo.xml.in ) + message( FATAL_ERROR "Configuration failed to write file org.kicad.kicad.metainfo.xml.in" ) endif() diff --git a/qa/resources/linux/mimeFiles/gerbers/drillFiles/drillFile.drl b/qa/resources/linux/mimeFiles/gerbers/drillFiles/drillFile.drl new file mode 100644 index 0000000000..85110e7fbc --- /dev/null +++ b/qa/resources/linux/mimeFiles/gerbers/drillFiles/drillFile.drl @@ -0,0 +1,10 @@ +M48 +;DRILL file {Pcbnew (2013-june-11)-stable} date Sun 22 Dec 2013 07:48:59 PM CST +;FORMAT={-:-/ absolute / inch / decimal} +FMAT,2 +INCH,TZ +T1C0.025 +T2C0.032 +T3C0.032 +T4C0.120 +T5C0.126 diff --git a/qa/resources/linux/mimeFiles/gerbers/drillFiles/drillFileNoExt b/qa/resources/linux/mimeFiles/gerbers/drillFiles/drillFileNoExt new file mode 100644 index 0000000000..85110e7fbc --- /dev/null +++ b/qa/resources/linux/mimeFiles/gerbers/drillFiles/drillFileNoExt @@ -0,0 +1,10 @@ +M48 +;DRILL file {Pcbnew (2013-june-11)-stable} date Sun 22 Dec 2013 07:48:59 PM CST +;FORMAT={-:-/ absolute / inch / decimal} +FMAT,2 +INCH,TZ +T1C0.025 +T2C0.032 +T3C0.032 +T4C0.120 +T5C0.126 diff --git a/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerber.gbr b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerber.gbr new file mode 100644 index 0000000000..3045ff1525 --- /dev/null +++ b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerber.gbr @@ -0,0 +1,5 @@ +G04 (created by PCBNEW (2013-june-11)-stable) date Sun 22 Dec 2013 07:48:57 PM CST* +%MOIN*% +G04 Gerber Fmt 3.4, Leading zero omitted, Abs format* +%FSLAX34Y34*% +G01* diff --git a/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerber.gts b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerber.gts new file mode 100644 index 0000000000..5c9fd0b5c2 --- /dev/null +++ b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerber.gts @@ -0,0 +1,8 @@ +G04 (created by PCBNEW (2013-june-11)-stable) date Sun 22 Dec 2013 07:48:57 PM CST* +%MOIN*% +G04 Gerber Fmt 3.4, Leading zero omitted, Abs format* +%FSLAX34Y34*% +G01* +G70* +G90* +G04 APERTURE LIST* diff --git a/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberCommentNoExt b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberCommentNoExt new file mode 100644 index 0000000000..3045ff1525 --- /dev/null +++ b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberCommentNoExt @@ -0,0 +1,5 @@ +G04 (created by PCBNEW (2013-june-11)-stable) date Sun 22 Dec 2013 07:48:57 PM CST* +%MOIN*% +G04 Gerber Fmt 3.4, Leading zero omitted, Abs format* +%FSLAX34Y34*% +G01* diff --git a/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberFSLANoExt b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberFSLANoExt new file mode 100644 index 0000000000..be237651d5 --- /dev/null +++ b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberFSLANoExt @@ -0,0 +1,5 @@ +%FSLAX34Y34*% +G04 (created by PCBNEW (2013-june-11)-stable) date Sun 22 Dec 2013 07:48:57 PM CST* +%MOIN*% +G04 Gerber Fmt 3.4, Leading zero omitted, Abs format* +G01* diff --git a/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberG75NoExt b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberG75NoExt new file mode 100644 index 0000000000..3b819a6097 --- /dev/null +++ b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberG75NoExt @@ -0,0 +1,7 @@ +G75* +G70* +%OFA0B0*% +%FSLAX24Y24*% +%IPPOS*% +%LPD*% +%AMOC8* diff --git a/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberMONoExt b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberMONoExt new file mode 100644 index 0000000000..5b36cb817e --- /dev/null +++ b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberMONoExt @@ -0,0 +1,5 @@ +%MOIN*% +%FSLAX34Y34*% +G04 (created by PCBNEW (2013-june-11)-stable) date Sun 22 Dec 2013 07:48:57 PM CST* +G04 Gerber Fmt 3.4, Leading zero omitted, Abs format* +G01* diff --git a/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberTFNoExt b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberTFNoExt new file mode 100644 index 0000000000..d7f1a9372c --- /dev/null +++ b/qa/resources/linux/mimeFiles/gerbers/gerberFiles/gerberTFNoExt @@ -0,0 +1,15 @@ +%TF.GenerationSoftware,KiCad,Pcbnew,(5.99.0-9879-gcc9787e47a)*% +%TF.CreationDate,2021-03-20T01:50:30+00:00*% +%TF.ProjectId,pic_programmer,7069635f-7072-46f6-9772-616d6d65722e,rev?*% +%TF.SameCoordinates,Original*% +%TF.FileFunction,Copper,L2,Bot*% +%TF.FilePolarity,Positive*% +%FSLAX46Y46*% +G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* +G04 Created by KiCad (PCBNEW (5.99.0-9879-gcc9787e47a)) date 2021-03-20 01:50:30* +%MOMM*% +%LPD*% +G01* +G04 APERTURE LIST* +G04 Aperture macros list* +%AMRoundRect* diff --git a/qa/resources/linux/mimeFiles/kicad/boardFiles/brd.brd b/qa/resources/linux/mimeFiles/kicad/boardFiles/brd.brd new file mode 100644 index 0000000000..addcf308fc --- /dev/null +++ b/qa/resources/linux/mimeFiles/kicad/boardFiles/brd.brd @@ -0,0 +1,19 @@ +PCBNEW-BOARD Version 2 date Sun 22 Dec 2013 07:55:02 PM CST + +# Created by Pcbnew(2013-june-11)-stable + +$GENERAL +encoding utf-8 +Units mm +LayerCount 2 +EnabledLayers 1FFF8001 +Links 102 +NoConn 0 +Di 68.381879 43.454319 158.927801 139.715241 +Ndraw 169 +Ntrack 481 +Nzone 0 +BoardThickness 1.6002 +Nmodule 45 +Nnets 46 +$EndGENERAL diff --git a/qa/resources/linux/mimeFiles/kicad/boardFiles/brdNoExt b/qa/resources/linux/mimeFiles/kicad/boardFiles/brdNoExt new file mode 100644 index 0000000000..addcf308fc --- /dev/null +++ b/qa/resources/linux/mimeFiles/kicad/boardFiles/brdNoExt @@ -0,0 +1,19 @@ +PCBNEW-BOARD Version 2 date Sun 22 Dec 2013 07:55:02 PM CST + +# Created by Pcbnew(2013-june-11)-stable + +$GENERAL +encoding utf-8 +Units mm +LayerCount 2 +EnabledLayers 1FFF8001 +Links 102 +NoConn 0 +Di 68.381879 43.454319 158.927801 139.715241 +Ndraw 169 +Ntrack 481 +Nzone 0 +BoardThickness 1.6002 +Nmodule 45 +Nnets 46 +$EndGENERAL diff --git a/qa/resources/linux/mimeFiles/kicad/boardFiles/kicadpcb.kicad_pcb b/qa/resources/linux/mimeFiles/kicad/boardFiles/kicadpcb.kicad_pcb new file mode 100644 index 0000000000..21a6549a72 --- /dev/null +++ b/qa/resources/linux/mimeFiles/kicad/boardFiles/kicadpcb.kicad_pcb @@ -0,0 +1,10 @@ +(kicad_pcb (version 20210228) (generator pcbnew) + + (general + (thickness 1.6) + ) + + (paper "A4") + (title_block + (title "SERIAL PIC PROGRAMMER") + ) diff --git a/qa/resources/linux/mimeFiles/kicad/boardFiles/kicadpcbNoExt b/qa/resources/linux/mimeFiles/kicad/boardFiles/kicadpcbNoExt new file mode 100644 index 0000000000..21a6549a72 --- /dev/null +++ b/qa/resources/linux/mimeFiles/kicad/boardFiles/kicadpcbNoExt @@ -0,0 +1,10 @@ +(kicad_pcb (version 20210228) (generator pcbnew) + + (general + (thickness 1.6) + ) + + (paper "A4") + (title_block + (title "SERIAL PIC PROGRAMMER") + ) diff --git a/qa/resources/linux/mimeFiles/kicad/projectFiles/kicadpro.kicad_pro b/qa/resources/linux/mimeFiles/kicad/projectFiles/kicadpro.kicad_pro new file mode 100644 index 0000000000..90d7baf8f0 --- /dev/null +++ b/qa/resources/linux/mimeFiles/kicad/projectFiles/kicadpro.kicad_pro @@ -0,0 +1,22 @@ +{ + "board": { + "design_settings": { + "defaults": { + "board_outline_line_width": 0.381, + "copper_line_width": 0.381, + "copper_text_italic": false, + "copper_text_size_h": 1.524, + "copper_text_size_v": 2.032, + "copper_text_thickness": 0.30479999999999996, + "copper_text_upright": true, + "courtyard_line_width": 0.049999999999999996, + "dimension_precision": 1, + "dimension_units": 0, + "dimensions": { + "arrow_length": 1270000, + "extension_offset": 500000, + "keep_text_aligned": true, + "suppress_zeroes": false, + "text_position": 0, + "units_format": 1 + }, diff --git a/qa/resources/linux/mimeFiles/kicad/projectFiles/pro.pro b/qa/resources/linux/mimeFiles/kicad/projectFiles/pro.pro new file mode 100644 index 0000000000..b4851b9d90 --- /dev/null +++ b/qa/resources/linux/mimeFiles/kicad/projectFiles/pro.pro @@ -0,0 +1,7 @@ +update=21/11/2017 21:19:54 +version=1 +last_client=kicad +[cvpcb] +version=1 +NetIExt=net +[cvpcb/libraries] diff --git a/qa/resources/linux/mimeFiles/kicad/schematicFiles/kicadsch.kicad_sch b/qa/resources/linux/mimeFiles/kicad/schematicFiles/kicadsch.kicad_sch new file mode 100644 index 0000000000..e535150651 --- /dev/null +++ b/qa/resources/linux/mimeFiles/kicad/schematicFiles/kicadsch.kicad_sch @@ -0,0 +1,10 @@ +(kicad_sch (version 20210126) (generator eeschema) + + (paper "A4") + + (title_block + (title "JDM - COM84 PIC Programmer with 13V DC/DC converter") + (date "Sun 22 Mar 2015") + (rev "3") + (company "KiCad") + ) diff --git a/qa/resources/linux/mimeFiles/kicad/schematicFiles/kicadschNoExt b/qa/resources/linux/mimeFiles/kicad/schematicFiles/kicadschNoExt new file mode 100644 index 0000000000..e535150651 --- /dev/null +++ b/qa/resources/linux/mimeFiles/kicad/schematicFiles/kicadschNoExt @@ -0,0 +1,10 @@ +(kicad_sch (version 20210126) (generator eeschema) + + (paper "A4") + + (title_block + (title "JDM - COM84 PIC Programmer with 13V DC/DC converter") + (date "Sun 22 Mar 2015") + (rev "3") + (company "KiCad") + ) diff --git a/qa/resources/linux/mimeFiles/kicad/schematicFiles/sch.sch b/qa/resources/linux/mimeFiles/kicad/schematicFiles/sch.sch new file mode 100644 index 0000000000..859548af0d --- /dev/null +++ b/qa/resources/linux/mimeFiles/kicad/schematicFiles/sch.sch @@ -0,0 +1,14 @@ +EESchema Schematic File Version 2 +LIBS:power +LIBS:device +LIBS:transistors +LIBS:conn +LIBS:linear +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:special +LIBS:microcontrollers diff --git a/qa/resources/linux/mimeFiles/kicad/schematicFiles/schNoExt b/qa/resources/linux/mimeFiles/kicad/schematicFiles/schNoExt new file mode 100644 index 0000000000..859548af0d --- /dev/null +++ b/qa/resources/linux/mimeFiles/kicad/schematicFiles/schNoExt @@ -0,0 +1,14 @@ +EESchema Schematic File Version 2 +LIBS:power +LIBS:device +LIBS:transistors +LIBS:conn +LIBS:linear +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:special +LIBS:microcontrollers diff --git a/qa/resources/linux/verifyMetadataFiles.sh b/qa/resources/linux/verifyMetadataFiles.sh new file mode 100755 index 0000000000..8c87ecc162 --- /dev/null +++ b/qa/resources/linux/verifyMetadataFiles.sh @@ -0,0 +1,303 @@ +#!/bin/bash +# WARNING: This script will modify file assocations and MIME types on the system it +# runs on. Use at your own risk! + +# The root of the code directory is the first argument +KICAD_CODE_DIR=$1 + +# The root of the build directory is the second argument +KICAD_BUILD_DIR=$2 + +KICAD_LAUNCHER_DIR=$KICAD_BUILD_DIR/resources/linux/launchers +KICAD_METAINFO_DIR=$KICAD_BUILD_DIR/resources/linux/metainfo +KICAD_MIME_DIR=$KICAD_BUILD_DIR/resources/linux/mime +KICAD_ICON_DIR=$KICAD_CODE_DIR/resources/linux/icons/hicolor + +KICAD_MIME_TEST_FILES=$KICAD_CODE_DIR/qa/resources/linux/mimeFiles + +################################################################### +# Verify the metainfo file +# There are two different checkers we can use, and each distro perfers +# different ones - so lets just test using them both and make them both +# happy. +################################################################### +METAINFO_VALID=1 +echo "Validating metainfo files" + +# Test using appstreamcli to see its errors +appstreamcli validate --explain --pedantic $KICAD_METAINFO_DIR/org.kicad.kicad.metainfo.xml +[ $? -ne 0 ] && METAINFO_VALID=0 + +# Test using the appstream-util package to see its errors +appstream-util validate-strict $KICAD_METAINFO_DIR/org.kicad.kicad.metainfo.xml +[ $? -ne 0 ] && METAINFO_VALID=0 + +if [ $METAINFO_VALID -eq 1 ] +then + echo "Metainfo files passed both checkers successfully" +fi + + +################################################################### +# Verify the launcher files +################################################################### +LAUNCHERS_VALID=1 + +echo "" +echo "Validating desktop launcher files" + +# Bitmap2component +desktop-file-validate $KICAD_LAUNCHER_DIR/org.kicad.bitmap2component.desktop +[ $? -ne 0 ] && LAUNCHERS_VALID=0 + +# Eeschema standalone +desktop-file-validate $KICAD_LAUNCHER_DIR/org.kicad.eeschema.desktop +[ $? -ne 0 ] && LAUNCHERS_VALID=0 + +# GerbView +desktop-file-validate $KICAD_LAUNCHER_DIR/org.kicad.gerbview.desktop +[ $? -ne 0 ] && LAUNCHERS_VALID=0 + +# Main KiCad application +desktop-file-validate $KICAD_LAUNCHER_DIR/org.kicad.kicad.desktop +[ $? -ne 0 ] && LAUNCHERS_VALID=0 + +# PCB calculator +desktop-file-validate $KICAD_LAUNCHER_DIR/org.kicad.pcbcalculator.desktop +[ $? -ne 0 ] && LAUNCHERS_VALID=0 + +# Pcbnew standalond +desktop-file-validate $KICAD_LAUNCHER_DIR/org.kicad.pcbnew.desktop +[ $? -ne 0 ] && LAUNCHERS_VALID=0 + +if [ $LAUNCHERS_VALID -eq 1 ] +then + echo "All launcher files valid" +else + echo "Errors with launcher files" +fi + + +################################################################### +# Install the desktop and MIME-type files and update the databases +################################################################### + +GERBER_MIME_INSTALLED=0 +KICAD_MIME_INSTALLED=0 + +echo "" +echo "Installing MIME type files for testing" + +mkdir -p ~/.local/share/mime + +xdg-mime install --mode user $KICAD_MIME_DIR/kicad-gerbers.xml +[ $? -eq 0 ] && GERBER_MIME_INSTALLED=1 + +xdg-icon-resource install --mode user --context mimetypes --size 128 $KICAD_ICON_DIR/128x128/mimetypes/application-x-kicad-pcb.png +xdg-icon-resource install --mode user --context mimetypes --size 128 $KICAD_ICON_DIR/128x128/mimetypes/application-x-kicad-project.png +xdg-icon-resource install --mode user --context mimetypes --size 128 $KICAD_ICON_DIR/128x128/mimetypes/application-x-kicad-schematic.png + +xdg-mime install --mode user $KICAD_MIME_DIR/kicad-kicad.xml +[ $? -eq 0 ] && KICAD_MIME_INSTALLED=1 + +# Install the desktop files +echo "" +echo "Installing desktop files for testing" + +# Ensure the directory exists (it might not in the CI image) +mkdir -p ~/.local/share/applications + +# For some reason, desktop-file-install doesn't seem to actually install it properly, so just copy them +cp $KICAD_LAUNCHER_DIR/org.kicad.bitmap2component.desktop ~/.local/share/applications/ +cp $KICAD_LAUNCHER_DIR/org.kicad.eeschema.desktop ~/.local/share/applications/ +cp $KICAD_LAUNCHER_DIR/org.kicad.gerbview.desktop ~/.local/share/applications/ +cp $KICAD_LAUNCHER_DIR/org.kicad.kicad.desktop ~/.local/share/applications/ +cp $KICAD_LAUNCHER_DIR/org.kicad.pcbcalculator.desktop ~/.local/share/applications/ +cp $KICAD_LAUNCHER_DIR/org.kicad.pcbnew.desktop ~/.local/share/applications/ + +# Force a database update to get the desktop files and MIME types associated +update-desktop-database ~/.local/share/applications/ +update-mime-database ~/.local/share/mime/ + + +################################################################### +# Validate the MIME types +################################################################### +KICAD_MIME_VALID=1 +GERBER_MIME_VALID=1 + +# Fake a Gnome desktop environment to force xdg-mime to query using gio and ensure the MIME types are installed +# for a desktop environment. Otherwise it fallsback to using the "file --mime-type" command, which has prebuilt +# magic files from https://github.com/file/file/blob/master/magic/Magdir/kicad and isn't affected by the MIME +# type files we just installed. +export DE=gnome + +# Test install the gerber MIME file to test with it +echo "" + +if [ $GERBER_MIME_INSTALLED -eq 1 ] +then + echo "Validating Gerber MIME-type" + + # Test the drl extension default + OUT_STR=$(xdg-mime query default application/x-excellon 2>&1) + printf " Testing drill file default application: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "org.kicad.gerbview.desktop" ]] && echo " ERROR" && GERBER_MIME_VALID=0 + + # Test the gerber extension default + OUT_STR=$(xdg-mime query default application/x-gerber 2>&1) + printf " Testing gerber file default application: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "org.kicad.gerbview.desktop" ]] && echo " ERROR" && GERBER_MIME_VALID=0 + + # Test the drl extension + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/gerbers/drillFiles/drillFile.drl 2>&1) + printf " Testing drill file with extension drl: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-excellon" ]] && echo " ERROR" && GERBER_MIME_VALID=0 + + # Test the parsing of the header for M48 + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/gerbers/drillFiles/drillFileNoExt 2>&1) + printf " Testing drill file header M48 check: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-excellon" ]] && echo " ERROR" && GERBER_MIME_VALID=0 + + # Test the official gbr extension + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/gerbers/gerberFiles/gerber.gbr 2>&1) + printf " Testing gerber file with gbr extension: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-gerber" ]] && echo " ERROR" && GERBER_MIME_VALID=0 + + # Test the parsing of the header for a comment (G04) + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/gerbers/gerberFiles/gerberCommentNoExt 2>&1) + printf " Testing gerber file header G04 check: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-gerber" ]] && echo " ERROR" && GERBER_MIME_VALID=0 + + # Test the parsing of the header for %FSLA + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/gerbers/gerberFiles/gerberFSLANoExt 2>&1) + printf " Testing gerber file header %%FLSA check: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-gerber" ]] && echo " ERROR" && GERBER_MIME_VALID=0 + + # Test the parsing of the header for %MO + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/gerbers/gerberFiles/gerberMONoExt 2>&1) + printf " Testing gerber file header %%MO check: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-gerber" ]] && echo " ERROR" && GERBER_MIME_VALID=0 + + # Test the parsing of the header for %TF. + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/gerbers/gerberFiles/gerberTFNoExt 2>&1) + printf " Testing gerber file header %%TF. check: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-gerber" ]] && echo " ERROR" && GERBER_MIME_VALID=0 + + # Test the parsing of the header for G75*. + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/gerbers/gerberFiles/gerberG75NoExt 2>&1) + printf " Testing gerber file header G75* check: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-gerber" ]] && echo " ERROR" && GERBER_MIME_VALID=0 + + # Test parsing another popular gerber extension (will require a lookup) + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/gerbers/gerberFiles/gerber.gts 2>&1) + printf " Testing gerber file with gts extension (not glob'd): %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-gerber" ]] && echo " ERROR" && GERBER_MIME_VALID=0 + + if [ $GERBER_MIME_VALID -eq 1 ] + then + echo "All Gerber MIME-type files valid" + else + echo "Errors with Gerber MIME-type files" + fi +else + echo "Gerber MIME type files not installed, skipping validation" + GERBER_MIME_VALID=0 +fi + + +# Test install the KiCad MIME file to test with it +echo "" + +if [ $KICAD_MIME_INSTALLED -eq 1 ] +then + echo "Validating KiCad MIME-type" + + # Test the KiCad project file extension default + OUT_STR=$(xdg-mime query default application/x-kicad-project 2>&1) + printf " Testing KiCad project file default application: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "org.kicad.kicad.desktop" ]] && echo " ERROR" && KICAD_MIME_VALID=0 + + # Test the KiCad schematic file extension default + OUT_STR=$(xdg-mime query default application/x-kicad-schematic 2>&1) + printf " Testing KiCad schematic file default application: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "org.kicad.eeschema.desktop" ]] && echo " ERROR" && KICAD_MIME_VALID=0 + + # Test the KiCad project file extension default + OUT_STR=$(xdg-mime query default application/x-kicad-pcb 2>&1) + printf " Testing KiCad board file default application: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "org.kicad.pcbnew.desktop" ]] && echo " ERROR" && KICAD_MIME_VALID=0 + + # Test the old pcbnew board file extension (brd) - (will cause lookup since not glob'd) + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/kicad/boardFiles/brd.brd 2>&1) + printf " Testing old Pcbnew board file with extension brd: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-kicad-pcb" ]] && echo " ERROR" && KICAD_MIME_VALID=0 + + # Test the old pcbnew board file with header check + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/kicad/boardFiles/brdNoExt 2>&1) + printf " Testing old Pcbnew board file header: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-kicad-pcb" ]] && echo " ERROR" && KICAD_MIME_VALID=0 + + # Test the new pcbnew board file extension (kicad_pcb) + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/kicad/boardFiles/kicadpcb.kicad_pcb 2>&1) + printf " Testing new Pcbnew board file with extension kicad_pcb: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-kicad-pcb" ]] && echo " ERROR" && KICAD_MIME_VALID=0 + + # Test the new pcbnew board file with header check + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/kicad/boardFiles/kicadpcbNoExt 2>&1) + printf " Testing new Pcbnew board file header: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-kicad-pcb" ]] && echo " ERROR" && KICAD_MIME_VALID=0 + + + # Test the old eeschema schematic file extension (sch) + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/kicad/schematicFiles/sch.sch 2>&1) + printf " Testing old Eeschema schematic file with extension sch: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-kicad-schematic" ]] && echo " ERROR" && KICAD_MIME_VALID=0 + + # Test the brd extension + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/kicad/schematicFiles/schNoExt 2>&1) + printf " Testing old Eeschema schematic file header: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-kicad-schematic" ]] && echo " ERROR" && KICAD_MIME_VALID=0 + + # Test the new Eeschema schematic file extension (kicad_sch) + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/kicad/schematicFiles/kicadsch.kicad_sch 2>&1) + printf " Testing new Eeschema schematic file with extension kicad_sch: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-kicad-schematic" ]] && echo " ERROR" && KICAD_MIME_VALID=0 + + # Test the new Eeschema board file with header check + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/kicad/schematicFiles/kicadschNoExt 2>&1) + printf " Testing new Eeschema schematic file header: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-kicad-schematic" ]] && echo " ERROR" && KICAD_MIME_VALID=0 + + + # Test the old project file extension (pro) + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/kicad/projectFiles/pro.pro 2>&1) + printf " Testing old KiCad project file with extension pro: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-kicad-project" ]] && echo " ERROR" && KICAD_MIME_VALID=0 + + # Test the new project file extension (kicad_pro) + OUT_STR=$(xdg-mime query filetype $KICAD_MIME_TEST_FILES/kicad/projectFiles/kicadpro.kicad_pro 2>&1) + printf " Testing new KiCad project file with extension kicad_pro: %s\n" "$OUT_STR" + [[ "$OUT_STR" != "application/x-kicad-project" ]] && echo " ERROR" && KICAD_MIME_VALID=0 + + if [ $KICAD_MIME_VALID -eq 1 ] + then + echo "All KiCad MIME-type files valid" + else + echo "Errors with KiCad MIME-type files" + fi +else + echo "KiCad MIME type files not installed, skipping validation" + KICAD_MIME_VALID=0 +fi + + +################################################################### +# Process return codes to flag errors for CI +################################################################### +[ $METAINFO_VALID -ne 0 ] && exit 1 +[ $LAUNCHERS_VALID -ne 0 ] && exit 1 +[ $KICAD_MIME_VALID -ne 0 ] && exit 1 +[ $GERBER_MIME_VALID -ne 0 ] && exit 1 + +exit 0 diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index d5406f27d6..01b959debb 100644 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -5,47 +5,47 @@ if( APPLE ) #TODO Generate this at runtime as well include( ${CMAKE_MODULE_PATH}/WritePlatformMetadata_macos.cmake ) elseif( UNIX ) - # Add the command to configure the linux appdata file with the version information + # Add the command to configure the linux metainfo file with the version information add_custom_command( - OUTPUT ${PROJECT_BINARY_DIR}/resources/linux/appdata/kicad.appdata.xml.in + OUTPUT ${PROJECT_BINARY_DIR}/resources/linux/metainfo/org.kicad.kicad.metainfo.xml.in COMMAND ${CMAKE_COMMAND} -DSRC_PATH=${PROJECT_SOURCE_DIR} -DBUILD_PATH=${PROJECT_BINARY_DIR} -DCMAKE_MODULE_PATH=${PROJECT_SOURCE_DIR}/CMakeModules -P ${CMAKE_MODULE_PATH}/BuildSteps/WritePlatformMetadata_linux.cmake DEPENDS ${CMAKE_MODULE_PATH}/BuildSteps/WritePlatformMetadata_linux.cmake - COMMENT "Configuring Linux appdata" + COMMENT "Configuring Linux metainfo" ) - # Read the appdata from the binary directory because it has been configured by Cmake already + # Read the metainfo from the binary directory because it has been configured by Cmake already # to have the version string in it - linux_metadata_translation( ${PROJECT_BINARY_DIR}/resources/linux/appdata/kicad.appdata.xml.in - ${PROJECT_BINARY_DIR}/resources/linux/appdata/kicad.appdata.xml + linux_metadata_translation( ${PROJECT_BINARY_DIR}/resources/linux/metainfo/org.kicad.kicad.metainfo.xml.in + ${PROJECT_BINARY_DIR}/resources/linux/metainfo/org.kicad.kicad.metainfo.xml ${PROJECT_SOURCE_DIR}/translation/pofiles ) # All the desktop files are read from the source directory - linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/launchers/bitmap2component.desktop.in - ${PROJECT_BINARY_DIR}/resources/linux/launchers/bitmap2component.desktop + linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/launchers/org.kicad.bitmap2component.desktop.in + ${PROJECT_BINARY_DIR}/resources/linux/launchers/org.kicad.bitmap2component.desktop ${PROJECT_SOURCE_DIR}/translation/pofiles ) - linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/launchers/eeschema.desktop.in - ${PROJECT_BINARY_DIR}/resources/linux/launchers/eeschema.desktop + linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/launchers/org.kicad.eeschema.desktop.in + ${PROJECT_BINARY_DIR}/resources/linux/launchers/org.kicad.eeschema.desktop ${PROJECT_SOURCE_DIR}/translation/pofiles ) - linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/launchers/gerbview.desktop.in - ${PROJECT_BINARY_DIR}/resources/linux/launchers/gerbview.desktop + linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/launchers/org.kicad.gerbview.desktop.in + ${PROJECT_BINARY_DIR}/resources/linux/launchers/org.kicad.gerbview.desktop ${PROJECT_SOURCE_DIR}/translation/pofiles ) - linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/launchers/kicad.desktop.in - ${PROJECT_BINARY_DIR}/resources/linux/launchers/kicad.desktop + linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/launchers/org.kicad.kicad.desktop.in + ${PROJECT_BINARY_DIR}/resources/linux/launchers/org.kicad.kicad.desktop ${PROJECT_SOURCE_DIR}/translation/pofiles ) - linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/launchers/pcbcalculator.desktop.in - ${PROJECT_BINARY_DIR}/resources/linux/launchers/pcbcalculator.desktop + linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/launchers/org.kicad.pcbcalculator.desktop.in + ${PROJECT_BINARY_DIR}/resources/linux/launchers/org.kicad.pcbcalculator.desktop ${PROJECT_SOURCE_DIR}/translation/pofiles ) - linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/launchers/pcbnew.desktop.in - ${PROJECT_BINARY_DIR}/resources/linux/launchers/pcbnew.desktop + linux_metadata_translation( ${PROJECT_SOURCE_DIR}/resources/linux/launchers/org.kicad.pcbnew.desktop.in + ${PROJECT_BINARY_DIR}/resources/linux/launchers/org.kicad.pcbnew.desktop ${PROJECT_SOURCE_DIR}/translation/pofiles ) # Translate the MIME info, which are read from the source directory @@ -58,13 +58,13 @@ elseif( UNIX ) ${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 - ${PROJECT_BINARY_DIR}/resources/linux/launchers/eeschema.desktop - ${PROJECT_BINARY_DIR}/resources/linux/launchers/gerbview.desktop - ${PROJECT_BINARY_DIR}/resources/linux/launchers/kicad.desktop - ${PROJECT_BINARY_DIR}/resources/linux/launchers/pcbcalculator.desktop - ${PROJECT_BINARY_DIR}/resources/linux/launchers/pcbnew.desktop + DEPENDS ${PROJECT_BINARY_DIR}/resources/linux/metainfo/org.kicad.kicad.metainfo.xml + ${PROJECT_BINARY_DIR}/resources/linux/launchers/org.kicad.bitmap2component.desktop + ${PROJECT_BINARY_DIR}/resources/linux/launchers/org.kicad.eeschema.desktop + ${PROJECT_BINARY_DIR}/resources/linux/launchers/org.kicad.gerbview.desktop + ${PROJECT_BINARY_DIR}/resources/linux/launchers/org.kicad.kicad.desktop + ${PROJECT_BINARY_DIR}/resources/linux/launchers/org.kicad.pcbcalculator.desktop + ${PROJECT_BINARY_DIR}/resources/linux/launchers/org.kicad.pcbnew.desktop ${PROJECT_BINARY_DIR}/resources/linux/mime/kicad-gerbers.xml ${PROJECT_BINARY_DIR}/resources/linux/mime/kicad-kicad.xml ) @@ -95,11 +95,11 @@ elseif( UNIX ) ) # Install appstream metadata (app store entry) - install( DIRECTORY ${PROJECT_BINARY_DIR}/resources/linux/appdata/ - DESTINATION ${CMAKE_INSTALL_DATADIR}/appdata + install( DIRECTORY ${PROJECT_BINARY_DIR}/resources/linux/metainfo/ + DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo COMPONENT resources FILES_MATCHING - PATTERN "*appdata.xml" + PATTERN "*metainfo.xml" PATTERN "*.in" EXCLUDE ) endif() diff --git a/resources/linux/appdata/kicad.appdata.xml.in b/resources/linux/appdata/kicad.appdata.xml.in deleted file mode 100644 index 434e3cb2cc..0000000000 --- a/resources/linux/appdata/kicad.appdata.xml.in +++ /dev/null @@ -1,80 +0,0 @@ - - - - - org.kicad_pcb.kicad - KiCad - - kicad.desktop - - GPL-3.0-or-later - CC-BY-SA-4.0 - - EDA Suite - - - kicad - eeschema - pcbnew - gerbview - pl_editor - bitmap2component - pcb_calculator - - - kicad - - - KiCad - EDA - PCB - Schema - PcbNew - Eeschema - - - -

- KiCad is a Cross Platform and Open Source Electronics Design Automation Suite. - The programs handle Schematic Capture, and PCB Layout with Gerber output. -

-
- - - - https://kicad.org/img/screenshots/appstream/kicad_6.png - - - - Eeschema Schematic Editor - https://kicad.org/img/screenshots/appstream/eeschema_6.png - - - - PcbNew PCB Layout - https://kicad.org/img/screenshots/appstream/pcbnew_6.png - - - - PcbNew 3D Viewer - https://kicad.org/img/screenshots/appstream/3dviewer_6.png - - - - https://kicad.org/ - https://kicad.org/help/report-a-bug/ - https://docs.kicad.org/ - https://go.kicad.org/donate - https://hosted.weblate.org/projects/kicad/ - - kicad-developers@lists.launchpad.net - The KiCad Developers - - - - - - - - -
diff --git a/resources/linux/launchers/bitmap2component.desktop.in b/resources/linux/launchers/org.kicad.bitmap2component.desktop.in similarity index 81% rename from resources/linux/launchers/bitmap2component.desktop.in rename to resources/linux/launchers/org.kicad.bitmap2component.desktop.in index 8f1e1b6d47..d8f551af51 100644 --- a/resources/linux/launchers/bitmap2component.desktop.in +++ b/resources/linux/launchers/org.kicad.bitmap2component.desktop.in @@ -5,6 +5,7 @@ Icon=bitmap2component Type=Application Categories=Science;Electronics; Exec=bitmap2component -Name=Bitmap to Component Converter +Name=KiCad Image Converter GenericName=Bitmap to Component Converter Comment=Create a component from a bitmap for use with KiCad +Keywords=bitmap2component diff --git a/resources/linux/launchers/eeschema.desktop.in b/resources/linux/launchers/org.kicad.eeschema.desktop.in similarity index 51% rename from resources/linux/launchers/eeschema.desktop.in rename to resources/linux/launchers/org.kicad.eeschema.desktop.in index f94f9d01f2..b448f03042 100644 --- a/resources/linux/launchers/eeschema.desktop.in +++ b/resources/linux/launchers/org.kicad.eeschema.desktop.in @@ -6,6 +6,7 @@ Type=Application Categories=Science;Electronics; Exec=eeschema %f MimeType=application/x-kicad-schematic; -Name=Eeschema (Standalone) -GenericName=Electronic schematic capture -Comment=KiCad electronic schematic design (standalone) +Name=KiCad Schematic Editor (Standalone) +GenericName=Schematic Capture Tool +Comment=Standalone schematic editor for KiCad schematics +Keywords=eeschema diff --git a/resources/linux/launchers/gerbview.desktop.in b/resources/linux/launchers/org.kicad.gerbview.desktop.in similarity index 59% rename from resources/linux/launchers/gerbview.desktop.in rename to resources/linux/launchers/org.kicad.gerbview.desktop.in index 5730b49e92..bf5b798e98 100644 --- a/resources/linux/launchers/gerbview.desktop.in +++ b/resources/linux/launchers/org.kicad.gerbview.desktop.in @@ -5,7 +5,8 @@ Icon=gerbview Type=Application Categories=Science;Electronics; Exec=gerbview -MimeType=application/x-gerber;application/x-excellon -Name=GerbView +MimeType=application/x-gerber;application/x-excellon;application/x-gerber-job +Name=KiCad Gerber Viewer GenericName=Gerber File Viewer Comment=View Gerber files +Keywords=gerbview diff --git a/resources/linux/launchers/kicad.desktop.in b/resources/linux/launchers/org.kicad.kicad.desktop.in similarity index 76% rename from resources/linux/launchers/kicad.desktop.in rename to resources/linux/launchers/org.kicad.kicad.desktop.in index 4433583491..cadf381887 100644 --- a/resources/linux/launchers/kicad.desktop.in +++ b/resources/linux/launchers/org.kicad.kicad.desktop.in @@ -8,5 +8,5 @@ Exec=kicad %f MimeType=application/x-kicad-project; Name=KiCad GenericName=EDA Suite -Comment=Electronic Design Automation suite +Comment=Suite of tools for schematic design and circuit board layout X-Desktop-File-Install-Version=0.22 diff --git a/resources/linux/launchers/pcbcalculator.desktop.in b/resources/linux/launchers/org.kicad.pcbcalculator.desktop.in similarity index 89% rename from resources/linux/launchers/pcbcalculator.desktop.in rename to resources/linux/launchers/org.kicad.pcbcalculator.desktop.in index 4501fbf216..a3181383ad 100644 --- a/resources/linux/launchers/pcbcalculator.desktop.in +++ b/resources/linux/launchers/org.kicad.pcbcalculator.desktop.in @@ -5,6 +5,6 @@ Icon=pcbcalculator Type=Application Categories=Science;Electronics; Exec=pcb_calculator -Name=PCB Calculator +Name=KiCad PCB Calculator GenericName=PCB Calculator Comment=Calculator for various electronics-related computations diff --git a/resources/linux/launchers/pcbnew.desktop.in b/resources/linux/launchers/org.kicad.pcbnew.desktop.in similarity index 52% rename from resources/linux/launchers/pcbnew.desktop.in rename to resources/linux/launchers/org.kicad.pcbnew.desktop.in index d1dd2aa1ef..f78fc125b7 100644 --- a/resources/linux/launchers/pcbnew.desktop.in +++ b/resources/linux/launchers/org.kicad.pcbnew.desktop.in @@ -6,6 +6,7 @@ Type=Application Categories=Science;Electronics; Exec=pcbnew %f MimeType=application/x-kicad-pcb; -Name=Pcbnew (Standalone) -GenericName=PCB layout -Comment=KiCad printed circuit board layout (standalone) +Name=KiCad PCB Editor (Standalone) +GenericName=PCB layout editor +Comment=Standalone circuit board editor for KiCad boards +Keywords=pcbnew diff --git a/resources/linux/metainfo/org.kicad.kicad.metainfo.xml.in b/resources/linux/metainfo/org.kicad.kicad.metainfo.xml.in new file mode 100644 index 0000000000..57b662374f --- /dev/null +++ b/resources/linux/metainfo/org.kicad.kicad.metainfo.xml.in @@ -0,0 +1,91 @@ + + + + + org.kicad.kicad + KiCad + + org.kicad.kicad.desktop + + GPL-3.0-or-later + CC-BY-SA-4.0 + + An EDA suite for schematic and circuit board design + + + kicad + eeschema + pcbnew + gerbview + pl_editor + bitmap2component + pcb_calculator + application/x-gerber + application/x-excellon + application/x-kicad-project + application/x-kicad-schematic + application/x-kicad-pcb + + + kicad + + + KiCad + EDA + PCB + Schema + PcbNew + Eeschema + Gerber + + + + Electronics + Engineering + Science + Electricity + + + +

+ KiCad is a free and open-source electronics design automation (EDA) suite. It features schematic capture, integrated circuit simulation, printed circuit board (PCB) layout, 3D rendering, and plotting/data export to numerous formats. KiCad also includes a high-quality component library featuring thousands of symbols, footprints, and 3D models. KiCad has minimal system requirements and runs on Linux, Windows, and macOS. +

+
+ + + + https://kicad.org/img/screenshots/appstream/kicad_6.png + + + + KiCad Schematic Editor + https://kicad.org/img/screenshots/appstream/eeschema_6.png + + + + KiCad PCB Layout Editor + https://kicad.org/img/screenshots/appstream/pcbnew_6.png + + + + KiCad 3D Viewer + https://kicad.org/img/screenshots/appstream/3dviewer_6.png + + + + https://kicad.org/ + https://kicad.org/help/report-an-issue/ + https://docs.kicad.org/ + https://go.kicad.org/donate + https://hosted.weblate.org/projects/kicad/ + + kicad-developers@lists.launchpad.net + The KiCad Developers + + + + + + + +
diff --git a/resources/linux/mime/kicad-gerbers.xml.in b/resources/linux/mime/kicad-gerbers.xml.in index 49453ba1f2..ee36ef5ec3 100644 --- a/resources/linux/mime/kicad-gerbers.xml.in +++ b/resources/linux/mime/kicad-gerbers.xml.in @@ -1,16 +1,33 @@ - - - Gerber File - - - - - Excellon drill file - - - - - + + + Gerber file + + + + + + + + + + + + + + + + Gerber job file + + + + + Excellon drill file + + + + + + diff --git a/resources/linux/mime/kicad-kicad.xml.in b/resources/linux/mime/kicad-kicad.xml.in index 35243865db..a824579191 100644 --- a/resources/linux/mime/kicad-kicad.xml.in +++ b/resources/linux/mime/kicad-kicad.xml.in @@ -1,20 +1,32 @@ - - - KiCad Project - - - - - - KiCad Schematic - - - - - - KiCad Printed Circuit Board - - + + + KiCad Project + + + + + + KiCad Schematic + + + + + + + + + + + + KiCad Printed Circuit Board + + + + + + + + diff --git a/translation/POTDIRS b/translation/POTDIRS index 424df10f3b..40b7423a48 100644 --- a/translation/POTDIRS +++ b/translation/POTDIRS @@ -12,6 +12,6 @@ pcb_calculator pcbnew plugins tools -resources/linux/appdata resources/linux/launchers +resources/linux/metainfo resources/linux/mime