Add deploy.sh script to generate Linux AppImage

To be run after starndard Linux build
This commit is contained in:
Ale Martinez
2018-04-18 16:15:31 -03:00
parent 8a9b775ff7
commit 1cc8f15dba
2 changed files with 44 additions and 0 deletions

1
.gitignore vendored
View File

@@ -13,6 +13,7 @@ Makefile
*.prl
*.swp
*.user
*.AppImage
# osx noise
.DS_Store

43
travis/linux/deploy.sh Normal file
View File

@@ -0,0 +1,43 @@
#!/bin/sh
### This script should be run from GoldenCheetah root directory after build
if [ ! -x src/GoldenCheetah ]
then echo "Build GoldenCheetah and execute from distribution root"; exit 1
fi
### Create AppDir and start populating
mkdir -p appdir
# Executable
cp src/GoldenCheetah appdir
# Desktop file
cat >appdir/GoldenCheetah.desktop <<EOF
[Desktop Entry]
Version=1.0
Type=Application
Name=GoldenCheetah
Comment=Cycling Power Analysis Software.
Exec=GoldenCheetah
Icon=gc
EOF
# Icon
cp ./src/Resources/images/gc.png appdir/
### Download current version of linuxdeployqt
wget -c https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
### Deploy to AppDir and generate AppImage
# -qmake=path-to-qmake-used-for-build option is necessary if the right qmakei
# version is not first in PATH, check using qmake --version
./linuxdeployqt-continuous-x86_64.AppImage appdir/GoldenCheetah -verbose=2 -bundle-non-qt-libs -exclude-libs=libqsqlmysql,libqsqlpsql,libnss3,libnssutil3 -appimage
### Cleanup
rm linuxdeployqt-continuous-x86_64.AppImage
rm -rf appdir
### Minimum Test - Result is ./GoldenCheetah-x86_64.AppImage
if [ ! -x ./GoldenCheetah-x86_64.AppImage ]
then echo "AppImage not generated, check the errors"; exit 1
fi
./GoldenCheetah-x86_64.AppImage --version
exit