Add desktop icons on the AppImage

This commit is contained in:
Konstantinos Sideris 2017-11-26 21:32:18 +02:00
parent e4c8a555d6
commit c4412e8b68
4 changed files with 27 additions and 7 deletions

View file

@ -2,10 +2,22 @@
set -e set -e
mkdir -p appdir APP=nheko
cp build/nheko appdir/ DIR=${APP}.AppDir
cp resources/nheko.desktop appdir/
cp resources/nheko*.png 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" wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt*.AppImage chmod a+x linuxdeployqt*.AppImage
@ -14,7 +26,9 @@ unset QTDIR
unset QT_PLUGIN_PATH unset QT_PLUGIN_PATH
unset LD_LIBRARY_PATH unset LD_LIBRARY_PATH
./linuxdeployqt*.AppImage ./appdir/*.desktop -bundle-non-qt-libs ./linuxdeployqt*.AppImage \
./linuxdeployqt*.AppImage ./appdir/*.desktop -appimage ${DIR}/usr/share/applications/nheko.desktop \
-bundle-non-qt-libs\
-appimage
chmod +x nheko-x86_64.AppImage chmod +x nheko-x86_64.AppImage

4
.gitignore vendored
View file

@ -78,3 +78,7 @@ result
*.dmg *.dmg
dist/MacOS/nheko.app/Contents/MacOS/nheko dist/MacOS/nheko.app/Contents/MacOS/nheko
.clang .clang
# AppImage
*.AppImage
*.AppDir

View file

@ -15,6 +15,9 @@ test:
linux-appimage: linux-appimage:
@./.ci/linux/deploy.sh @./.ci/linux/deploy.sh
linux-install:
cp -f nheko*.AppImage ~/.local/bin
macos-app: release-debug macos-app: release-debug
@./.ci/macos/deploy.sh @./.ci/macos/deploy.sh

View file

@ -6,6 +6,5 @@ Exec=nheko
Icon=nheko Icon=nheko
Type=Application Type=Application
Categories=Network;InstantMessaging;Qt; Categories=Network;InstantMessaging;Qt;
Encoding=UTF-8
StartupWMClass=nheko StartupWMClass=nheko
Terminal=false Terminal=false