2
1
mirror of https://github.com/qpdf/qpdf.git synced 2025-01-31 02:48:31 +00:00

Complete .travis.yml and AppImage support (fixes #160, #161)

This commit is contained in:
Jay Berkenbilt 2018-02-17 22:41:02 -05:00
parent 356e715228
commit 1e86f3ab70
7 changed files with 41 additions and 21 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
*.pdb
.lineno
aclocal.m4
appimage/build
autoconf.mk
autofiles.zip
autom4te.cache/

View File

@ -4,28 +4,10 @@ sudo: require
dist: trusty
script:
- ./autogen.sh
- ./configure --prefix=/usr
- make -j$(nproc)
- make check
- make install DESTDIR=$(readlink -f appdir) ; find appdir/
- rm -rf appdir/usr/include/ appdir/usr/lib/pkgconfig/ appdir/usr/lib/*.{a,la} # Don't bundle developer stuff
- sudo mv appdir/usr/lib/* /usr/local/lib/ # Workaround for https://github.com/probonopd/linuxdeployqt/issues/160
- mkdir -p appdir/usr/share/icons/hicolor/128x128/apps ; cp dist/qpdf.png appdir/usr/share/icons/hicolor/128x128/apps/
- mkdir -p appdir/usr/share/applications ; cp dist/qpdf.desktop appdir/usr/share/applications/
- wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
- chmod a+x linuxdeployqt*.AppImage
- unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
- export LD_LIBRARY_PATH=/usr/local/lib/ # Workaround for https://github.com/probonopd/linuxdeployqt/issues/160
- ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs
- # In addition to the main executable, we have additional ones to process
- # ./linuxdeployqt*.AppImage ./appdir/usr/bin/fix-qdf -bundle-non-qt-libs # Not an ELF?
- ./linuxdeployqt*.AppImage ./appdir/usr/bin/zlib-flate -bundle-non-qt-libs
- # Generate AppImage
- ./linuxdeployqt*.AppImage --appimage-extract
- rm ./appdir/AppRun ; cp dist/AppRun appdir/ ; chmod a+x ./appdir/AppRun # Replace symlink with custom script
- PATH=./squashfs-root/usr/bin:$PATH ./squashfs-root/usr/bin/appimagetool ./appdir/
- appimage/build-appimage
after_success:
- cd appimage/build
- find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
- curl --upload-file ./QPDF*.AppImage https://transfer.sh/QPDF-git.$(git rev-parse --short HEAD)-x86_64.AppImage
- sha512sum ./QPDF*.AppImage

View File

@ -90,6 +90,7 @@ export QPDF_SKIP_TEST_COMPARE_IMAGES
export QPDF_LARGE_FILE_TEST_PATH
clean:: $(CLEAN_TARGETS)
$(RM) -r appimage/build
.PHONY: $(CLEAN_TARGETS)
$(foreach B,$(BUILD_ITEMS),$(eval \

36
appimage/build-appimage Executable file
View File

@ -0,0 +1,36 @@
#!/bin/sh
set -ex
here="$(dirname $(readlink -f "$0"))"
top=$(dirname $here)
cd $top
appdir=$here/build/appdir
rm -rf $here/build
./autogen.sh
./configure --prefix=/usr --enable-werror --enable-show-failed-test-output
make -j$(nproc)
make check
mkdir -p $appdir
make install DESTDIR=$appdir; find $appdir
cd $here/build
# Don't bundle developer stuff
rm -rf appdir/usr/include appdir/usr/lib/pkgconfig appdir/usr/lib/*.{a,la,so}
rm -rf appdir/usr/share/doc appdir/usr/share/man
for i in appdir/usr/share/icons/hicolor/128x128/apps; do
mkdir -p $i
cp $top/logo/qpdf.svg $i
convert -resize '128x128>' $top/logo/qpdf.svg $i/qpdf.png
done
for i in appdir/usr/share/applications; do mkdir -p $i; cp $top/appimage/qpdf.desktop $i; done
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt*.AppImage
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
./linuxdeployqt*.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs
# In addition to the main executable, we have additional ones to process
./linuxdeployqt*.AppImage appdir/usr/bin/zlib-flate -bundle-non-qt-libs
# Generate AppImage
./linuxdeployqt*.AppImage --appimage-extract
rm appdir/AppRun ; cp $top/appimage/AppRun appdir; chmod a+x appdir/AppRun # Replace symlink with custom script
PATH=./squashfs-root/usr/bin:$PATH ./squashfs-root/usr/bin/appimagetool appdir
echo ""
echo "*** AppImage is ready in appimage/build ***"
echo ""

BIN
dist/qpdf.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB