From c4412e8b688896e0fc9f7c6b9a0f37eec46787d1 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sun, 26 Nov 2017 21:32:18 +0200 Subject: [PATCH] Add desktop icons on the AppImage --- .ci/linux/deploy.sh | 26 ++++++++++++++++++++------ .gitignore | 4 ++++ Makefile | 3 +++ resources/nheko.desktop | 1 - 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.ci/linux/deploy.sh b/.ci/linux/deploy.sh index 78245322..42f06628 100755 --- a/.ci/linux/deploy.sh +++ b/.ci/linux/deploy.sh @@ -2,10 +2,22 @@ set -e -mkdir -p appdir -cp build/nheko appdir/ -cp resources/nheko.desktop appdir/ -cp resources/nheko*.png appdir/ +APP=nheko +DIR=${APP}.AppDir + +# Set up AppImage structure. +mkdir -p ${DIR}/usr/{bin,share/pixmaps,share/applications} + +# Copy resources. +cp build/nheko ${DIR}/usr/bin +cp resources/nheko.desktop ${DIR}/usr/share/applications/nheko.desktop +cp resources/nheko.png ${DIR}/usr/share/pixmaps/nheko.png + +for iconSize in 16 32 48 64 128 256 512; do + IconDir=${DIR}/usr/share/icons/hicolor/${iconSize}x${iconSize}/apps + mkdir -p ${IconDir} + cp resources/nheko-${iconSize}.png ${IconDir}/nheko.png +done wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" chmod a+x linuxdeployqt*.AppImage @@ -14,7 +26,9 @@ unset QTDIR unset QT_PLUGIN_PATH unset LD_LIBRARY_PATH -./linuxdeployqt*.AppImage ./appdir/*.desktop -bundle-non-qt-libs -./linuxdeployqt*.AppImage ./appdir/*.desktop -appimage +./linuxdeployqt*.AppImage \ + ${DIR}/usr/share/applications/nheko.desktop \ + -bundle-non-qt-libs\ + -appimage chmod +x nheko-x86_64.AppImage diff --git a/.gitignore b/.gitignore index 591744d7..96ace50f 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,7 @@ result *.dmg dist/MacOS/nheko.app/Contents/MacOS/nheko .clang + +# AppImage +*.AppImage +*.AppDir diff --git a/Makefile b/Makefile index cb0e6d1b..1a23d6b2 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,9 @@ test: linux-appimage: @./.ci/linux/deploy.sh +linux-install: + cp -f nheko*.AppImage ~/.local/bin + macos-app: release-debug @./.ci/macos/deploy.sh diff --git a/resources/nheko.desktop b/resources/nheko.desktop index aa8de57d..16e04926 100644 --- a/resources/nheko.desktop +++ b/resources/nheko.desktop @@ -6,6 +6,5 @@ Exec=nheko Icon=nheko Type=Application Categories=Network;InstantMessaging;Qt; -Encoding=UTF-8 StartupWMClass=nheko Terminal=false