From f9f6918af3063e340f272fc9ca49d110b2f71c6f Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sun, 22 Nov 2020 00:49:46 +0100 Subject: [PATCH 1/4] Organize PNG app/mime icons by size & role Reorganize the way the application and MIME icons are stored: - create subdirectories for each size - create per-size subdirectories according to the role ("apps" or "mimetypes") - move the icons by size in the proper subdirectory - rename the application icons as "leocad" - rename the MIME icons as "application-vnd.leocad" This is done in preparation for installing all these icons: since qmake does not support renaming files when installing them, then place them in subdirectories so they are in the right directory structure of the hicolor icon theme. The name of the MIME icons follows the name of the MIME type they refer to. --- .../{leocad-128.png => 128x128/apps/leocad.png} | Bin .../mimetypes/application-vnd.leocad.png} | Bin tools/icon/{leocad-16.png => 16x16/apps/leocad.png} | Bin .../mimetypes/application-vnd.leocad.png} | Bin tools/icon/{leocad-24.png => 24x24/apps/leocad.png} | Bin .../{leocad-256.png => 256x256/apps/leocad.png} | Bin .../mimetypes/application-vnd.leocad.png} | Bin tools/icon/{leocad-32.png => 32x32/apps/leocad.png} | Bin .../mimetypes/application-vnd.leocad.png} | Bin tools/icon/{leocad-48.png => 48x48/apps/leocad.png} | Bin .../{leocad-512.png => 512x512/apps/leocad.png} | Bin .../mimetypes/application-vnd.leocad.png} | Bin tools/icon/{leocad-64.png => 64x64/apps/leocad.png} | Bin .../mimetypes/application-vnd.leocad.png} | Bin 14 files changed, 0 insertions(+), 0 deletions(-) rename tools/icon/{leocad-128.png => 128x128/apps/leocad.png} (100%) rename tools/icon/{document-128.png => 128x128/mimetypes/application-vnd.leocad.png} (100%) rename tools/icon/{leocad-16.png => 16x16/apps/leocad.png} (100%) rename tools/icon/{document-16.png => 16x16/mimetypes/application-vnd.leocad.png} (100%) rename tools/icon/{leocad-24.png => 24x24/apps/leocad.png} (100%) rename tools/icon/{leocad-256.png => 256x256/apps/leocad.png} (100%) rename tools/icon/{document-256.png => 256x256/mimetypes/application-vnd.leocad.png} (100%) rename tools/icon/{leocad-32.png => 32x32/apps/leocad.png} (100%) rename tools/icon/{document-32.png => 32x32/mimetypes/application-vnd.leocad.png} (100%) rename tools/icon/{leocad-48.png => 48x48/apps/leocad.png} (100%) rename tools/icon/{leocad-512.png => 512x512/apps/leocad.png} (100%) rename tools/icon/{document-512.png => 512x512/mimetypes/application-vnd.leocad.png} (100%) rename tools/icon/{leocad-64.png => 64x64/apps/leocad.png} (100%) rename tools/icon/{document-64.png => 64x64/mimetypes/application-vnd.leocad.png} (100%) diff --git a/tools/icon/leocad-128.png b/tools/icon/128x128/apps/leocad.png similarity index 100% rename from tools/icon/leocad-128.png rename to tools/icon/128x128/apps/leocad.png diff --git a/tools/icon/document-128.png b/tools/icon/128x128/mimetypes/application-vnd.leocad.png similarity index 100% rename from tools/icon/document-128.png rename to tools/icon/128x128/mimetypes/application-vnd.leocad.png diff --git a/tools/icon/leocad-16.png b/tools/icon/16x16/apps/leocad.png similarity index 100% rename from tools/icon/leocad-16.png rename to tools/icon/16x16/apps/leocad.png diff --git a/tools/icon/document-16.png b/tools/icon/16x16/mimetypes/application-vnd.leocad.png similarity index 100% rename from tools/icon/document-16.png rename to tools/icon/16x16/mimetypes/application-vnd.leocad.png diff --git a/tools/icon/leocad-24.png b/tools/icon/24x24/apps/leocad.png similarity index 100% rename from tools/icon/leocad-24.png rename to tools/icon/24x24/apps/leocad.png diff --git a/tools/icon/leocad-256.png b/tools/icon/256x256/apps/leocad.png similarity index 100% rename from tools/icon/leocad-256.png rename to tools/icon/256x256/apps/leocad.png diff --git a/tools/icon/document-256.png b/tools/icon/256x256/mimetypes/application-vnd.leocad.png similarity index 100% rename from tools/icon/document-256.png rename to tools/icon/256x256/mimetypes/application-vnd.leocad.png diff --git a/tools/icon/leocad-32.png b/tools/icon/32x32/apps/leocad.png similarity index 100% rename from tools/icon/leocad-32.png rename to tools/icon/32x32/apps/leocad.png diff --git a/tools/icon/document-32.png b/tools/icon/32x32/mimetypes/application-vnd.leocad.png similarity index 100% rename from tools/icon/document-32.png rename to tools/icon/32x32/mimetypes/application-vnd.leocad.png diff --git a/tools/icon/leocad-48.png b/tools/icon/48x48/apps/leocad.png similarity index 100% rename from tools/icon/leocad-48.png rename to tools/icon/48x48/apps/leocad.png diff --git a/tools/icon/leocad-512.png b/tools/icon/512x512/apps/leocad.png similarity index 100% rename from tools/icon/leocad-512.png rename to tools/icon/512x512/apps/leocad.png diff --git a/tools/icon/document-512.png b/tools/icon/512x512/mimetypes/application-vnd.leocad.png similarity index 100% rename from tools/icon/document-512.png rename to tools/icon/512x512/mimetypes/application-vnd.leocad.png diff --git a/tools/icon/leocad-64.png b/tools/icon/64x64/apps/leocad.png similarity index 100% rename from tools/icon/leocad-64.png rename to tools/icon/64x64/apps/leocad.png diff --git a/tools/icon/document-64.png b/tools/icon/64x64/mimetypes/application-vnd.leocad.png similarity index 100% rename from tools/icon/document-64.png rename to tools/icon/64x64/mimetypes/application-vnd.leocad.png From 01277875d29b73556b8ca1a502f2bbbb86f1e4c4 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sun, 22 Nov 2020 01:01:41 +0100 Subject: [PATCH 2/4] Move SVG app/MIME icons together with PNGs Move the SVG application and MIME icons in the same location of their PNG versions, using an aptly-named subdirectory. --- leocad.pro | 2 +- {resources => tools/icon/scalable/apps}/leocad.svg | 0 .../icon/scalable/mimetypes}/application-vnd.leocad.svg | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename {resources => tools/icon/scalable/apps}/leocad.svg (100%) rename {resources => tools/icon/scalable/mimetypes}/application-vnd.leocad.svg (100%) diff --git a/leocad.pro b/leocad.pro index fd2fd4e6..e2b4c275 100644 --- a/leocad.pro +++ b/leocad.pro @@ -135,7 +135,7 @@ unix:!macx { mime.path = $$MIME_DIR mime.files = qt/leocad.xml mime_icon.path = $$MIME_ICON_DIR - mime_icon.files = resources/application-vnd.leocad.svg + mime_icon.files = tools/icon/scalable/mimetypes/application-vnd.leocad.svg appdata.path = $$APPDATA_DIR appdata.files = tools/setup/leocad.appdata.xml diff --git a/resources/leocad.svg b/tools/icon/scalable/apps/leocad.svg similarity index 100% rename from resources/leocad.svg rename to tools/icon/scalable/apps/leocad.svg diff --git a/resources/application-vnd.leocad.svg b/tools/icon/scalable/mimetypes/application-vnd.leocad.svg similarity index 100% rename from resources/application-vnd.leocad.svg rename to tools/icon/scalable/mimetypes/application-vnd.leocad.svg From 9fcb492953ae00dd35881eb91ea22a90bbafb16d Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sun, 22 Nov 2020 01:22:56 +0100 Subject: [PATCH 3/4] Remove duplicate app icon Use the 64px application icon available in tools/icon instead of the copy in resources. Adapt the Qt resource file to use the new path, keeping the old name for compatibility. --- leocad.pro | 2 +- leocad.qrc | 2 +- resources/leocad.png | Bin 5549 -> 0 bytes 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 resources/leocad.png diff --git a/leocad.pro b/leocad.pro index e2b4c275..4c337b84 100644 --- a/leocad.pro +++ b/leocad.pro @@ -131,7 +131,7 @@ unix:!macx { desktop.path = $$DESKTOP_DIR desktop.files = qt/leocad.desktop icon.path = $$ICON_DIR - icon.files = resources/leocad.png + icon.files = tools/icon/64x64/apps/leocad.png mime.path = $$MIME_DIR mime.files = qt/leocad.xml mime_icon.path = $$MIME_ICON_DIR diff --git a/leocad.qrc b/leocad.qrc index 490f9281..354a7fd0 100644 --- a/leocad.qrc +++ b/leocad.qrc @@ -78,7 +78,7 @@ resources/time_next.png resources/time_previous.png resources/time_stop.png - resources/leocad.png + tools/icon/64x64/apps/leocad.png resources/help_homepage.png resources/view_zoomextents.png resources/view_split_horizontal.png diff --git a/resources/leocad.png b/resources/leocad.png deleted file mode 100644 index a4ab755af5fbca4fdef9d33178427349382c29ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5549 zcmV;e6;kSnP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x6vRnHK~#9!&6{0}B-eG{f9Kp={WY_*yWHi{Bt=uQWZ4lz z$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y|EQt6prQF#=57Ljc7#WO=J0gyllR^IYa`^}-Wdn#sZ2qTUWlRa z>_H%gC~EGivZxWwA*Rr51^>@U$qNocubpSB^4V*tSE-hGO4*Y*E+Q%CT)Ml47!OiP z6Sx0(@!ICc8l{PFq#iqtsapWRp98-D@gh{8+ueWqz5T%-s_;XDSp2AnYWAvfM_r@1 z<(hkQH&tolzc)L?b<;$6K4mtk4<5HFpP~NSf!s2m+*PHtOlg)p#OSKJQ>D*euc{CJ z+1B=F8r&jvigMGH_M6?1Sul&=J9p2AHU|D%=fd!Zl4S}{RS}D#uIHS`p>%J}yRKs)pi zkj5cOBGWp>D+TMPW2Jq(f zduY7f-aW|$v-sV&{J>A0lJGk}5c}^;UYkWE#Hda{391rA_>2oRaxnlRYNf~XFpfJ`Si8TUjrr_YU^$Lqe=MQO<>vZm%z?Ldi)L@Ks)q8eInjKJ%L&{~xOyC(vg)`H}zt03~!qSaf7zbY(hY za%Ew3WdJfTF*z+TGA%MVR539+F*!OiFe@-IIxsMR61bND001R)MObuXVRU6WZEs|0 vW_bWIFflnTFfuJNI8-q)Ix#sqGB7JJF*-0X@lOCN00000NkvXXu0mjfsaVwo From 9f6da48aa985e139045eecb7edd2148654741be9 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sun, 22 Nov 2020 01:28:18 +0100 Subject: [PATCH 4/4] Improve app/MIME icons installation Install the whole tree of hicolor application and MIME icons to the hicolor icon theme. This also stops using the legacy pixmaps location for the application icon. --- leocad.pro | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/leocad.pro b/leocad.pro index 4c337b84..52068f0e 100644 --- a/leocad.pro +++ b/leocad.pro @@ -116,11 +116,10 @@ unix:!macx { isEmpty(INSTALL_PREFIX):INSTALL_PREFIX = /usr isEmpty(BIN_DIR):BIN_DIR = $$INSTALL_PREFIX/bin isEmpty(DOCS_DIR):DOCS_DIR = $$INSTALL_PREFIX/share/doc/leocad - isEmpty(ICON_DIR):ICON_DIR = $$INSTALL_PREFIX/share/pixmaps + isEmpty(ICON_DIR):ICON_DIR = $$INSTALL_PREFIX/share/icons isEmpty(MAN_DIR):MAN_DIR = $$INSTALL_PREFIX/share/man/man1 isEmpty(DESKTOP_DIR):DESKTOP_DIR = $$INSTALL_PREFIX/share/applications isEmpty(MIME_DIR):MIME_DIR = $$INSTALL_PREFIX/share/mime/packages - isEmpty(MIME_ICON_DIR):MIME_ICON_DIR = $$INSTALL_PREFIX/share/icons/hicolor/scalable/mimetypes isEmpty(APPDATA_DIR):APPDATA_DIR = $$INSTALL_PREFIX/share/metainfo target.path = $$BIN_DIR @@ -130,16 +129,22 @@ unix:!macx { man.files = docs/leocad.1 desktop.path = $$DESKTOP_DIR desktop.files = qt/leocad.desktop - icon.path = $$ICON_DIR - icon.files = tools/icon/64x64/apps/leocad.png + icons.path = $$ICON_DIR/hicolor + icons.files += tools/icon/128x128 + icons.files += tools/icon/16x16 + icons.files += tools/icon/24x24 + icons.files += tools/icon/256x256 + icons.files += tools/icon/32x32 + icons.files += tools/icon/48x48 + icons.files += tools/icon/512x512 + icons.files += tools/icon/64x64 + icons.files += tools/icon/scalable mime.path = $$MIME_DIR mime.files = qt/leocad.xml - mime_icon.path = $$MIME_ICON_DIR - mime_icon.files = tools/icon/scalable/mimetypes/application-vnd.leocad.svg appdata.path = $$APPDATA_DIR appdata.files = tools/setup/leocad.appdata.xml - INSTALLS += target docs man desktop icon mime mime_icon appdata + INSTALLS += target docs man desktop icons mime appdata !isEmpty(DISABLE_UPDATE_CHECK) { DEFINES += LC_DISABLE_UPDATE_CHECK=$$DISABLE_UPDATE_CHECK