diff --git a/CMakeLists.txt b/CMakeLists.txt index 536fe814a..a6afd9888 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -238,7 +238,11 @@ file(COPY ${locales} DESTINATION bin/locales) install(FILES ${locales} DESTINATION share/musikcube/locales) if (CMAKE_SYSTEM_NAME MATCHES "Linux") - file(GLOB linux_share_applications "src/musikcube/data/linux/share/applications/*") + if (${ENABLE_SNAP} MATCHES "true") + file(GLOB linux_share_applications "src/musikcube/data/linux/share/applications/musikcube.desktop") + else() + file(GLOB linux_share_applications "src/musikcube/data/linux/share/applications/musikcube.snap.desktop") + endif() install(FILES ${linux_share_applications} DESTINATION share/applications/) file(GLOB linux_share_icons_48 "src/musikcube/data/linux/share/icons/hicolor/48x48/apps/*") install(FILES ${linux_share_icons_48} DESTINATION share/icons/hicolor/48x48/apps/) diff --git a/share/applications/musikcube.desktop b/share/applications/musikcube.desktop index 651e030b9..7981c9658 100644 --- a/share/applications/musikcube.desktop +++ b/share/applications/musikcube.desktop @@ -4,9 +4,9 @@ Type=Application Name=musikcube GenericName=musikcube Comment=terminal-based music player -Exec=musikcube %U -TryExec=musikcube -Icon=musikcube +Exec=musikcube.app %U +TryExec=/snap/bin/musikcube.app +Icon=${SNAP}/usr/share/icons/hicolor/128x128/apps/musikcube.png Terminal=true Categories=AudioVideo;Player;Audio; StartupNotify=false diff --git a/src/musikcube/data/linux/share/applications/musikcube.snap.desktop b/src/musikcube/data/linux/share/applications/musikcube.snap.desktop new file mode 100644 index 000000000..7981c9658 --- /dev/null +++ b/src/musikcube/data/linux/share/applications/musikcube.snap.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=musikcube +GenericName=musikcube +Comment=terminal-based music player +Exec=musikcube.app %U +TryExec=/snap/bin/musikcube.app +Icon=${SNAP}/usr/share/icons/hicolor/128x128/apps/musikcube.png +Terminal=true +Categories=AudioVideo;Player;Audio; +StartupNotify=false +StartupWMClass=musikcube