Commit 83d82a85d01b2e1e727babbce851a121bf110a50

Authored by probonopd
Committed by Jay Berkenbilt
1 parent 2ebdd692

Contributed AppImage and .travis.yml support

.travis.yml 0 → 100644
  1 +language: cpp
  2 +compiler: gcc
  3 +sudo: require
  4 +dist: trusty
  5 +
  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/
  28 +
  29 +after_success:
  30 + - 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
... ...
dist/AppRun 0 → 100644
  1 +#!/bin/bash
  2 +
  3 +# The purpose of this custom AppRun script is
  4 +# to allow symlinking the AppImage and invoking
  5 +# the corresponding binary depending on which
  6 +# symlink was used to invoke the AppImage
  7 +
  8 +HERE="$(dirname "$(readlink -f "${0}")")"
  9 +
  10 +if [ ! -z $APPIMAGE ] ; then
  11 + BINARY_NAME=$(basename "$ARGV0")
  12 + if [ -e "$HERE/usr/bin/$BINARY_NAME" ] ; then
  13 + exec "$HERE/usr/bin/$BINARY_NAME" "$@"
  14 + else
  15 + exec "$HERE/usr/bin/qpdf" "$@"
  16 + fi
  17 +else
  18 + exec "$HERE/usr/bin/qpdf" "$@"
  19 +fi
... ...
dist/qpdf.desktop 0 → 100644
  1 +[Desktop Entry]
  2 +Type=Application
  3 +Terminal=true
  4 +Exec=qpdf
  5 +Name=QPDF
  6 +Comment=Structural, content-preserving transformations on PDF files
  7 +Icon=qpdf
... ...
dist/qpdf.png 0 → 100644

4.76 KB