Fix the application icon on KDE Plasma Wayland (#1531)

* Fix the application icon on KDE Plasma Wayland

This fixes the application icon on KDE Plasma Wayland (tested on Plasma
6) and possibly other Wayland compositors too.

The desktop filename was chosen because this is the identifier that the
Hydrus Flatpak application uses.

Distribution packagers should make sure that this name matches with the
desktop file that they install (for example, Gentoo installs a
/usr/share/applications/hydrus-client-hydrus.desktop file).

It is strongly suggested that distributions install their Hydrus
.desktop file at
/usr/share/applications/io.github.hydrusnetwork.hydrus.desktop to avoid
needing to apply extra patches, etc.

* Rename .desktop file and update setup_desktop.sh
This commit is contained in:
Aidan Harris 2024-03-30 18:43:16 +00:00 committed by GitHub
parent fc0487e537
commit a99ab83ecb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 5 deletions

View File

@ -169,7 +169,7 @@ There are three special external libraries. You just have to get them and put th
If you get an error about the venv failing to activate during `setup_venv.sh`, you may need to install venv especially for your system. The specific error message should help you out, but you'll be looking at something along the lines of `apt install python3.10-venv`.
If you like, you can run the `setup_desktop.sh` file to install a hydrus.desktop file to your applications folder. (Or check the template in `install_dir/static/hydrus.desktop` and do it yourself!)
If you like, you can run the `setup_desktop.sh` file to install an io.github.hydrusnetwork.hydrus.desktop file to your applications folder. (Or check the template in `install_dir/static/io.github.hydrusnetwork.hydrus.desktop` and do it yourself!)
=== "macOS"

View File

@ -105,6 +105,7 @@ class App( QW.QApplication ):
self._pubsub = pubsub
self.setApplicationName( 'Hydrus Client' )
self.setDesktopFileName( 'io.github.hydrusnetwork.hydrus' )
self.setApplicationVersion( str( HC.SOFTWARE_VERSION ) )

View File

@ -3,8 +3,8 @@
pushd "$(dirname "$0")" || exit 1
INSTALL_DIR="$(readlink -f .)"
DESKTOP_SOURCE_PATH=$INSTALL_DIR/static/hydrus.desktop
DESKTOP_DEST_PATH=$HOME/.local/share/applications/hydrus.desktop
DESKTOP_SOURCE_PATH=$INSTALL_DIR/static/io.github.hydrusnetwork.hydrus.desktop
DESKTOP_DEST_PATH=$HOME/.local/share/applications/io.github.hydrusnetwork.hydrus.desktop
echo "Install folder appears to be $INSTALL_DIR"
@ -16,11 +16,11 @@ fi
if [ -f "$DESKTOP_DEST_PATH" ]; then
echo "You already have a hydrus.desktop file at $DESKTOP_DEST_PATH. Would you like to overwrite it? y/n "
echo "You already have an io.github.hydrusnetwork.hydrus.desktop file at $DESKTOP_DEST_PATH. Would you like to overwrite it? y/n "
else
echo "Create a hydrus.desktop file at $DESKTOP_DEST_PATH? y/n "
echo "Create an io.github.hydrusnetwork.hydrus.desktop file at $DESKTOP_DEST_PATH? y/n "
fi