Commit 1e86f3ab70ad20971a800089ec531f567dcc58da
1 parent
356e7152
Complete .travis.yml and AppImage support (fixes #160, #161)
Showing
7 changed files
with
41 additions
and
21 deletions
.gitignore
.travis.yml
| @@ -4,28 +4,10 @@ sudo: require | @@ -4,28 +4,10 @@ sudo: require | ||
| 4 | dist: trusty | 4 | dist: trusty |
| 5 | 5 | ||
| 6 | script: | 6 | script: |
| 7 | - - ./autogen.sh | ||
| 8 | - - ./configure --prefix=/usr | ||
| 9 | - - make -j$(nproc) | ||
| 10 | - - make check | ||
| 11 | - - make install DESTDIR=$(readlink -f appdir) ; find appdir/ | ||
| 12 | - - rm -rf appdir/usr/include/ appdir/usr/lib/pkgconfig/ appdir/usr/lib/*.{a,la} # Don't bundle developer stuff | ||
| 13 | - - sudo mv appdir/usr/lib/* /usr/local/lib/ # Workaround for https://github.com/probonopd/linuxdeployqt/issues/160 | ||
| 14 | - - mkdir -p appdir/usr/share/icons/hicolor/128x128/apps ; cp dist/qpdf.png appdir/usr/share/icons/hicolor/128x128/apps/ | ||
| 15 | - - mkdir -p appdir/usr/share/applications ; cp dist/qpdf.desktop appdir/usr/share/applications/ | ||
| 16 | - - wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" | ||
| 17 | - - chmod a+x linuxdeployqt*.AppImage | ||
| 18 | - - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH | ||
| 19 | - - export LD_LIBRARY_PATH=/usr/local/lib/ # Workaround for https://github.com/probonopd/linuxdeployqt/issues/160 | ||
| 20 | - - ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs | ||
| 21 | - - # In addition to the main executable, we have additional ones to process | ||
| 22 | - - # ./linuxdeployqt*.AppImage ./appdir/usr/bin/fix-qdf -bundle-non-qt-libs # Not an ELF? | ||
| 23 | - - ./linuxdeployqt*.AppImage ./appdir/usr/bin/zlib-flate -bundle-non-qt-libs | ||
| 24 | - - # Generate AppImage | ||
| 25 | - - ./linuxdeployqt*.AppImage --appimage-extract | ||
| 26 | - - rm ./appdir/AppRun ; cp dist/AppRun appdir/ ; chmod a+x ./appdir/AppRun # Replace symlink with custom script | ||
| 27 | - - PATH=./squashfs-root/usr/bin:$PATH ./squashfs-root/usr/bin/appimagetool ./appdir/ | 7 | + - appimage/build-appimage |
| 28 | 8 | ||
| 29 | after_success: | 9 | after_success: |
| 10 | + - cd appimage/build | ||
| 30 | - find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq | 11 | - find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq |
| 31 | - curl --upload-file ./QPDF*.AppImage https://transfer.sh/QPDF-git.$(git rev-parse --short HEAD)-x86_64.AppImage | 12 | - curl --upload-file ./QPDF*.AppImage https://transfer.sh/QPDF-git.$(git rev-parse --short HEAD)-x86_64.AppImage |
| 13 | + - sha512sum ./QPDF*.AppImage |
Makefile
| @@ -90,6 +90,7 @@ export QPDF_SKIP_TEST_COMPARE_IMAGES | @@ -90,6 +90,7 @@ export QPDF_SKIP_TEST_COMPARE_IMAGES | ||
| 90 | export QPDF_LARGE_FILE_TEST_PATH | 90 | export QPDF_LARGE_FILE_TEST_PATH |
| 91 | 91 | ||
| 92 | clean:: $(CLEAN_TARGETS) | 92 | clean:: $(CLEAN_TARGETS) |
| 93 | + $(RM) -r appimage/build | ||
| 93 | 94 | ||
| 94 | .PHONY: $(CLEAN_TARGETS) | 95 | .PHONY: $(CLEAN_TARGETS) |
| 95 | $(foreach B,$(BUILD_ITEMS),$(eval \ | 96 | $(foreach B,$(BUILD_ITEMS),$(eval \ |
dist/AppRun renamed to appimage/AppRun
appimage/build-appimage
0 → 100755
| 1 | +#!/bin/sh | ||
| 2 | +set -ex | ||
| 3 | +here="$(dirname $(readlink -f "$0"))" | ||
| 4 | +top=$(dirname $here) | ||
| 5 | +cd $top | ||
| 6 | +appdir=$here/build/appdir | ||
| 7 | +rm -rf $here/build | ||
| 8 | +./autogen.sh | ||
| 9 | +./configure --prefix=/usr --enable-werror --enable-show-failed-test-output | ||
| 10 | +make -j$(nproc) | ||
| 11 | +make check | ||
| 12 | +mkdir -p $appdir | ||
| 13 | +make install DESTDIR=$appdir; find $appdir | ||
| 14 | +cd $here/build | ||
| 15 | +# Don't bundle developer stuff | ||
| 16 | +rm -rf appdir/usr/include appdir/usr/lib/pkgconfig appdir/usr/lib/*.{a,la,so} | ||
| 17 | +rm -rf appdir/usr/share/doc appdir/usr/share/man | ||
| 18 | +for i in appdir/usr/share/icons/hicolor/128x128/apps; do | ||
| 19 | + mkdir -p $i | ||
| 20 | + cp $top/logo/qpdf.svg $i | ||
| 21 | + convert -resize '128x128>' $top/logo/qpdf.svg $i/qpdf.png | ||
| 22 | +done | ||
| 23 | +for i in appdir/usr/share/applications; do mkdir -p $i; cp $top/appimage/qpdf.desktop $i; done | ||
| 24 | +wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" | ||
| 25 | +chmod a+x linuxdeployqt*.AppImage | ||
| 26 | +unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH | ||
| 27 | +./linuxdeployqt*.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs | ||
| 28 | +# In addition to the main executable, we have additional ones to process | ||
| 29 | +./linuxdeployqt*.AppImage appdir/usr/bin/zlib-flate -bundle-non-qt-libs | ||
| 30 | +# Generate AppImage | ||
| 31 | +./linuxdeployqt*.AppImage --appimage-extract | ||
| 32 | +rm appdir/AppRun ; cp $top/appimage/AppRun appdir; chmod a+x appdir/AppRun # Replace symlink with custom script | ||
| 33 | +PATH=./squashfs-root/usr/bin:$PATH ./squashfs-root/usr/bin/appimagetool appdir | ||
| 34 | +echo "" | ||
| 35 | +echo "*** AppImage is ready in appimage/build ***" | ||
| 36 | +echo "" |
dist/qpdf.desktop renamed to appimage/qpdf.desktop
dist/qpdf.png deleted
4.76 KB