From 7ae80e608b7c4bbfca10818114713cca4acf82d7 Mon Sep 17 00:00:00 2001 From: nephros Date: Tue, 28 May 2024 17:24:53 +0200 Subject: [PATCH 1/7] Just use SAILFISH_SVG2PNG for theme icons --- src/icons/icons.pro | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/src/icons/icons.pro b/src/icons/icons.pro index 7ff03bd8..449dcef9 100644 --- a/src/icons/icons.pro +++ b/src/icons/icons.pro @@ -1,29 +1,7 @@ TEMPLATE = aux + # Configures svg to png THEMENAME=sailfish-default -load(sailfish-svg2png-sizes) - -theme.path = /usr/share/themes/$${THEMENAME}/ -themeDirectory.path = /usr/share/themes/$${THEMENAME}/meegotouch -themeDirectory.files += $${OUT_PWD}/icons - -for(profile, SAILFISH_SVG2PNG.profiles) { - # a work-around for installing directories that do not exist yet - system(mkdir -p $${OUT_PWD}/z$${profile}) - - exists( $${OUT_PWD}/symlinks ): svg2png.commands += cp -r symlinks/icons z$${profile} && - - svg2png.commands += /usr/bin/sailfish_svg2png \ - -z $$eval(SAILFISH_SVG2PNG.scales.$${profile}) \ - $$eval(SAILFISH_SVG2PNG.extra.$${profile}) \ - $${_PRO_FILE_PWD_}/svgs \ - z$${profile}/icons && - - svg2png.files += $${OUT_PWD}/z$${profile} -} - -svg2png.commands += true -svg2png.path = $${themeDirectory.path} +CONFIG += sailfish-svg2png -INSTALLS += svg2png theme themeDirectory From 5e762358886128ce8669384164eaed917d5dc714 Mon Sep 17 00:00:00 2001 From: nephros Date: Tue, 28 May 2024 20:50:56 +0200 Subject: [PATCH 2/7] Package any theme location --- rpm/patchmanager.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/patchmanager.spec b/rpm/patchmanager.spec index 8a709ef6..ee9b38e2 100644 --- a/rpm/patchmanager.spec +++ b/rpm/patchmanager.spec @@ -291,7 +291,7 @@ exit 0 %{_datadir}/jolla-settings/entries/%{name}.json %{_datadir}/%{name}/icons/icon-m-patchmanager.png -%{_datadir}/themes/%{theme}/meegotouch/*/icons/*.png +%{_datadir}/themes/%{theme}/*/*/icons/*.png %changelog * Thu Sep 9 1999 SailfishOS Patches - 99.99.99 From 0f19fc69400249c79627732589b8ca0196b41609 Mon Sep 17 00:00:00 2001 From: nephros Date: Tue, 28 May 2024 22:48:51 +0200 Subject: [PATCH 3/7] Hardlink the icon source, add README --- src/icons/README.md | 12 + .../icons-monochrome/icon-m-patchmanager2.svg | 215 ++++++++++++++++++ src/icons/svgs/icons/icon-m-patchmanager2.svg | 215 ++++++++++++++++++ 3 files changed, 442 insertions(+) create mode 100644 src/icons/README.md create mode 100644 src/icons/svgs/icons-monochrome/icon-m-patchmanager2.svg create mode 100644 src/icons/svgs/icons/icon-m-patchmanager2.svg diff --git a/src/icons/README.md b/src/icons/README.md new file mode 100644 index 00000000..34a0725f --- /dev/null +++ b/src/icons/README.md @@ -0,0 +1,12 @@ +sailfish-svg2png: + +For all SailfishOS versions up to v4.6 (and possible also Meego): + + - svg files must be in svgs/ + - png files will be in /usr/share/sailfishdefault/meegotouch/zX.Y/icons + +For SailishOS 4.6 and higher + + - svg files must be in svgs/icons and svgs/icons-monochrome + - png files will be in /usr/share/sailfishdefault/silica/zX.Y/icons + diff --git a/src/icons/svgs/icons-monochrome/icon-m-patchmanager2.svg b/src/icons/svgs/icons-monochrome/icon-m-patchmanager2.svg new file mode 100644 index 00000000..f123437a --- /dev/null +++ b/src/icons/svgs/icons-monochrome/icon-m-patchmanager2.svg @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/src/icons/svgs/icons/icon-m-patchmanager2.svg b/src/icons/svgs/icons/icon-m-patchmanager2.svg new file mode 100644 index 00000000..f123437a --- /dev/null +++ b/src/icons/svgs/icons/icon-m-patchmanager2.svg @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + From babfb887e406b6211d3ca842d6fe21c981060c35 Mon Sep 17 00:00:00 2001 From: nephros Date: Tue, 28 May 2024 21:22:47 +0200 Subject: [PATCH 4/7] Add svg to installs --- src/icons/icons.pro | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/icons/icons.pro b/src/icons/icons.pro index 449dcef9..40feb8c9 100644 --- a/src/icons/icons.pro +++ b/src/icons/icons.pro @@ -5,3 +5,7 @@ THEMENAME=sailfish-default CONFIG += sailfish-svg2png +# also install SVG: +svg.path = /usr/share/icons/hicolor/scalable/apps +svg.files = svgs/icon-m-patchmanager2.svg +INSTALLS += svg From e549d5888ed27df53f64971c3665e7d03160172e Mon Sep 17 00:00:00 2001 From: nephros Date: Tue, 28 May 2024 21:25:10 +0200 Subject: [PATCH 5/7] Fix packaging --- rpm/patchmanager.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rpm/patchmanager.spec b/rpm/patchmanager.spec index ee9b38e2..ba04e0d0 100644 --- a/rpm/patchmanager.spec +++ b/rpm/patchmanager.spec @@ -1,4 +1,3 @@ -%global theme sailfish-default # These macros should already be defined in the RPMbuild environment, see: rpm --showrc %{!?qtc_qmake5:%define qtc_qmake5 %qmake5} @@ -291,7 +290,13 @@ exit 0 %{_datadir}/jolla-settings/entries/%{name}.json %{_datadir}/%{name}/icons/icon-m-patchmanager.png -%{_datadir}/themes/%{theme}/*/*/icons/*.png +# pre 4.6: +# /usr/share/themes/sailfish-default/meegotouch/zX.Y/icons/*.png +# 4.6 and higher: +# /usr/share/themes/sailfish-default/silica/zX.Y/icons/*.png +# /usr/share/themes/sailfish-default/silica/zX.Y/icons-monochrome/*.png +%{_datadir}/themes/sailfish-default/*/*/*/*.png +%{_datadir}/icons/hicolor/scalable/apps/*.svg %changelog * Thu Sep 9 1999 SailfishOS Patches - 99.99.99 From 2fa7bb67c0e18b6d5a4e6cd3b5069b5d7e3cb0b8 Mon Sep 17 00:00:00 2001 From: nephros Date: Tue, 28 May 2024 23:06:59 +0200 Subject: [PATCH 6/7] fixup! Hardlink the icon source, add README --- src/icons/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/icons/README.md b/src/icons/README.md index 34a0725f..a14acdba 100644 --- a/src/icons/README.md +++ b/src/icons/README.md @@ -3,10 +3,10 @@ sailfish-svg2png: For all SailfishOS versions up to v4.6 (and possible also Meego): - svg files must be in svgs/ - - png files will be in /usr/share/sailfishdefault/meegotouch/zX.Y/icons + - png files will be in /usr/share/sailfish-default/meegotouch/zX.Y/icons For SailishOS 4.6 and higher - svg files must be in svgs/icons and svgs/icons-monochrome - - png files will be in /usr/share/sailfishdefault/silica/zX.Y/icons + - png files will be in /usr/share/sailfish-default/silica/zX.Y/icons From 81e56778e03b6de8d1bd92272a33df26d5358b42 Mon Sep 17 00:00:00 2001 From: nephros Date: Sun, 2 Jun 2024 22:04:41 +0200 Subject: [PATCH 7/7] Update README --- src/icons/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/icons/README.md b/src/icons/README.md index a14acdba..55d48b02 100644 --- a/src/icons/README.md +++ b/src/icons/README.md @@ -8,5 +8,5 @@ For all SailfishOS versions up to v4.6 (and possible also Meego): For SailishOS 4.6 and higher - svg files must be in svgs/icons and svgs/icons-monochrome - - png files will be in /usr/share/sailfish-default/silica/zX.Y/icons + - png files will be in /usr/share/sailfish-default/silica/zX.Y/icons and /usr/share/sailfish-default/silica/zX.Y/icons-monochrome