From db06a89c9a1fb26091b173fb080c079ec02dee51 Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 11 Dec 2018 01:55:50 +0000 Subject: [PATCH] AppImage --- .travis.yml | 36 ++++- qgit.desktop | 5 +- src/resources/qgit.svg | 321 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 351 insertions(+), 11 deletions(-) create mode 100644 src/resources/qgit.svg diff --git a/.travis.yml b/.travis.yml index de182cc0..2ee2509f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,16 +9,36 @@ env: matrix: - META_MAKE="cmake" - META_MAKE="qmake" - - META_MAKE="qmake-qt4" +# - META_MAKE="qmake-qt4" install: # Use this to install any prerequisites or dependencies necessary to run the build - - sudo apt-get -qq install qt5-default libqt4-dev qt4-qmake + - sudo apt-get -y install qt5-default # libqt4-dev qt4-qmake -before_script: # build +script: # build - mkdir build; cd build - - $META_MAKE .. - - make - - sudo make install + - if [ "$META_MAKE" != "qmake" ] ; then $META_MAKE .. ; fi + - if [ "$META_MAKE" != "qmake" ] ; then make -j$(nproc) ; fi + - | + if [ "$META_MAKE" == "qmake" ] ; then + qmake .. CONFIG+=release PREFIX=/usr + make -j$(nproc) + # FIXME: The following 3 lines should go away, https://github.com/probonopd/linuxdeployqt#fix-for-make-nothing-to-be-done-for-install + mkdir -p appdir/usr/bin ; cp ./bin/qgit appdir/usr/bin/ # FIXME + mkdir -p appdir/usr/share/applications ; cp ../qgit.desktop appdir/usr/share/applications/ # FIXME + mkdir -p appdir/usr/share/icons/hicolor/scalable/apps ; cp ../src/resources/qgit.svg appdir/usr/share/icons/hicolor/scalable/apps/ # FIXME + 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 + find appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq + # curl --upload-file QGit*.AppImage https://transfer.sh/QGit-git.$(git rev-parse --short HEAD)-x86_64.AppImage + wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh + bash upload.sh QGit*.AppImage* + fi -script: # run tests - - echo "No tests yet." \ No newline at end of file +branches: + except: + - # Do not build tags that we create when we upload to GitHub Releases + - /^(?i:continuous)/ diff --git a/qgit.desktop b/qgit.desktop index 536ecf2d..63006fab 100755 --- a/qgit.desktop +++ b/qgit.desktop @@ -1,9 +1,8 @@ [Desktop Entry] Type=Application -Name=qgit -GenericName=QGit +Name=QGit Comment=A git GUI viewer Exec=qgit Icon=qgit -Categories=Development;RevisionControl;Qt +Categories=Development;RevisionControl;Qt; Terminal=false diff --git a/src/resources/qgit.svg b/src/resources/qgit.svg new file mode 100644 index 00000000..b935190c --- /dev/null +++ b/src/resources/qgit.svg @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + +