From 4ceec0055620d22eb7049a4aeae8f0bcbb5be39a Mon Sep 17 00:00:00 2001 From: Nicolas Roduit Date: Fri, 13 Sep 2024 10:44:31 +0200 Subject: [PATCH] Separate dock icon on Ubuntu #588 --- .../script/resources/linux/Weasis.desktop | 1 + .../script/resources/linux/postinst | 2 +- .../script/resources/linux/postrm | 2 +- .../script/resources/linux/preinst | 5 +++-- weasis-distributions/script/resources/linux/prerm | 4 ++-- .../script/resources/linux/weasis.spec | 15 ++++++++++----- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/weasis-distributions/script/resources/linux/Weasis.desktop b/weasis-distributions/script/resources/linux/Weasis.desktop index 510222052..e7b4b31fa 100755 --- a/weasis-distributions/script/resources/linux/Weasis.desktop +++ b/weasis-distributions/script/resources/linux/Weasis.desktop @@ -3,6 +3,7 @@ Version=1.0 Name=APPLICATION_NAME Comment=Medical DICOM viewer Exec=APPLICATION_LAUNCHER %U +StartupWMClass=org-weasis-launcher-AppLauncher Icon=APPLICATION_ICON Terminal=false Type=Application diff --git a/weasis-distributions/script/resources/linux/postinst b/weasis-distributions/script/resources/linux/postinst index 30bfb9588..311b2f6cc 100755 --- a/weasis-distributions/script/resources/linux/postinst +++ b/weasis-distributions/script/resources/linux/postinst @@ -41,4 +41,4 @@ cp /etc/opt/chrome/policies/managed/weasis.json /etc/chromium/policies/managed/w ;; esac -exit 0 +exit 0 \ No newline at end of file diff --git a/weasis-distributions/script/resources/linux/postrm b/weasis-distributions/script/resources/linux/postrm index b74cb2e74..cc862524a 100755 --- a/weasis-distributions/script/resources/linux/postrm +++ b/weasis-distributions/script/resources/linux/postrm @@ -28,4 +28,4 @@ case "$1" in ;; esac -exit 0 +exit 0 \ No newline at end of file diff --git a/weasis-distributions/script/resources/linux/preinst b/weasis-distributions/script/resources/linux/preinst index 16288e4f3..d6936f86a 100755 --- a/weasis-distributions/script/resources/linux/preinst +++ b/weasis-distributions/script/resources/linux/preinst @@ -14,12 +14,13 @@ set -e # the debian-policy package package_type=deb +COMMON_SCRIPTS LAUNCHER_AS_SERVICE_SCRIPTS case "$1" in install|upgrade) if [ -n "$2" ]; then - true; LAUNCHER_AS_SERVICE_COMMANDS_UNINSTALL + :; LAUNCHER_AS_SERVICE_COMMANDS_UNINSTALL fi ;; @@ -32,4 +33,4 @@ fi ;; esac -exit 0 +exit 0 \ No newline at end of file diff --git a/weasis-distributions/script/resources/linux/prerm b/weasis-distributions/script/resources/linux/prerm index 3f4bd063e..ed1eebf29 100755 --- a/weasis-distributions/script/resources/linux/prerm +++ b/weasis-distributions/script/resources/linux/prerm @@ -18,6 +18,7 @@ set -e package_type=deb +COMMON_SCRIPTS DESKTOP_SCRIPTS LAUNCHER_AS_SERVICE_SCRIPTS @@ -39,5 +40,4 @@ rm -f /etc/chromium/policies/managed/weasis.json ;; esac -exit 0 - +exit 0 \ No newline at end of file diff --git a/weasis-distributions/script/resources/linux/weasis.spec b/weasis-distributions/script/resources/linux/weasis.spec index 3c63b467f..a98fa21f6 100755 --- a/weasis-distributions/script/resources/linux/weasis.spec +++ b/weasis-distributions/script/resources/linux/weasis.spec @@ -30,9 +30,12 @@ Requires: PACKAGE_DEFAULT_DEPENDENCIES PACKAGE_CUSTOM_DEPENDENCIES #build time will substantially increase and it may require unpack200/system java to install %define __jar_repack %{nil} -%define package_filelist %{_tmppath}/%{name}.files -%define app_filelist %{_tmppath}/%{name}.app.files -%define filesystem_filelist %{_tmppath}/%{name}.filesystem.files +# on RHEL we got unwanted improved debugging enhancements +%define _build_id_links none + +%define package_filelist %{_builddir}/%{name}.files +%define app_filelist %{_builddir}/%{name}.app.files +%define filesystem_filelist %{_builddir}/%{name}.filesystem.files %define default_filesystem / /opt /usr /usr/bin /usr/lib /usr/local /usr/local/bin /usr/local/lib @@ -80,9 +83,10 @@ LAUNCHER_AS_SERVICE_COMMANDS_INSTALL %pre package_type=rpm +COMMON_SCRIPTS LAUNCHER_AS_SERVICE_SCRIPTS -if [ "$1" = 2 ]; then - true; LAUNCHER_AS_SERVICE_COMMANDS_UNINSTALL +if [ "$1" -gt 1 ]; then + :; LAUNCHER_AS_SERVICE_COMMANDS_UNINSTALL fi mkdir -p /etc/opt/chrome/policies/managed/ @@ -94,6 +98,7 @@ cp /etc/opt/chrome/policies/managed/weasis.json /etc/chromium/policies/managed/w %preun package_type=rpm +COMMON_SCRIPTS DESKTOP_SCRIPTS LAUNCHER_AS_SERVICE_SCRIPTS DESKTOP_COMMANDS_UNINSTALL