Add continuous deployment to Linux using linuxdeployqt
MODIFY
.travis.yml
.travis.yml
+language: cpp
+compiler: gcc
+sudo: require
+dist: trusty
before_install:
- sudo add-apt-repository --yes ppa:beineri/opt-qt593-trusty
@@ -7,6 +11,9 @@ before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
+install:
+ - source /opt/qt*/bin/qt*-env.sh
+
script:
# C++14
- sudo apt-get install -qq g++-6
@@ -15,5 +22,21 @@ script:
- source /opt/qt59/bin/qt59-env.sh
- qmake --version
# build
- - qmake Ripes.pro
- - make
+ - qmake CONFIG+=release PREFIX=/usr
+ - make -j$(nproc)
+ - make INSTALL_ROOT=appdir -j$(nproc) install ; find appdir/
+ - wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
+ - chmod a+x linuxdeployqt-continuous-x86_64.AppImage
+ - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
+ - export VERSION=$(git rev-parse --short HEAD) # linuxdeployqt uses this for naming the file
+ - ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage
+
+after_success:
+ - find appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
+ - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
+ - bash upload.sh Ripes*.AppImage*
+
+branches:
+ except:
+ - # Do not build tags that we create when we upload to GitHub Releases
+ - /^(?i:continuous)/

MODIFY
Ripes.pro
Ripes.pro
@@ -147,3 +147,24 @@ COPYEXAMPLES{
CONFIG += COPIED
}
}
+
+unix {
+ isEmpty(PREFIX) {
+ PREFIX = /usr
+ }
+ target.path = $$PREFIX/bin
+
+ desktop.path = $$PREFIX/share/applications/
+ desktop.files += Ripes.desktop
+
+ icon512.path = $$PREFIX/share/icons/hicolor/512x512/apps
+ icon512.files += Ripes.png
+
+ icon256.path = $$PREFIX/share/icons/hicolor/256x256/apps
+ icon256.files += Ripes.png
+
+ INSTALLS += icon512
+ INSTALLS += icon256
+ INSTALLS += desktop
+ INSTALLS += target
+}

ADD
appdir/usr/share/applications/Ripes.desktop
+[Desktop Entry]
+Type=Application
+Name=Ripes
+Comment=Ripes simulator
+Exec=Ripes
+Icon=Ripes
\ No newline at end of file

ADD
appdir/usr/share/icons/hicolor/256x256/apps/Ripes.png
appdir/usr/share/icons/hicolor/256x256/apps/Ripes.png
Binary files /dev/null and b/appdir/usr/share/icons/hicolor/256x256/apps/Ripes.png differ

ADD
appdir/usr/share/icons/hicolor/512x512/apps/Ripes.png
appdir/usr/share/icons/hicolor/512x512/apps/Ripes.png
Binary files /dev/null and b/appdir/usr/share/icons/hicolor/512x512/apps/Ripes.png differ

Add continuous deployment to Linux using linuxdeployqt