Skip to content

Commit

Permalink
remove desktop file during uninstall
Browse files Browse the repository at this point in the history
fix startup wm class
  • Loading branch information
cube committed Jul 23, 2024
1 parent d9a402a commit 64b83c8
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/jpackage/resources-linux/prerm
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/sh
# prerm script for APPLICATION_PACKAGE
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package


echo $0 called with $*

package_type=deb
#COMMON_SCRIPTS
DESKTOP_SCRIPTS
LAUNCHER_AS_SERVICE_SCRIPTS

case "$1" in
remove|upgrade|deconfigure)
xdg-desktop-menu uninstall /opt/APPLICATION_PACKAGE/lib/APPLICATION_PACKAGE-APPLICATION_PACKAGE.desktop
DESKTOP_COMMANDS_UNINSTALL
LAUNCHER_AS_SERVICE_COMMANDS_UNINSTALL
;;

failed-upgrade)
;;

*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac

exit 0
10 changes: 10 additions & 0 deletions src/jpackage/resources-linux/template.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Name=APPLICATION_NAME
Comment=APPLICATION_DESCRIPTION
Exec=APPLICATION_LAUNCHER
Icon=APPLICATION_ICON
Terminal=false
Type=Application
Categories=DEPLOY_BUNDLE_CATEGORY
StartupWMClass=oolite-starter-MainFrame
DESKTOP_MIMES

0 comments on commit 64b83c8

Please sign in to comment.