language: c
-
compiler:
- clang
- gcc
- sudo apt-get install -y libraqm-dev libfreetype6-dev libharfbuzz-dev libfribidi-dev
script:
- - export OMP_NUM_THREADS=1
- - export CFLAGS="-Wno-deprecated-declarations -Wdeclaration-after-statement -Wno-error=unused-variable"
- - ./configure --disable-openmp --with-quantum-depth=16 --enable-hdri=no --with-perl
- - make
+ - export OMP_NUM_THREADS=1
+ - export CFLAGS="-Wno-deprecated-declarations -Wdeclaration-after-statement -Wno-error=unused-variable"
+ - ./configure --disable-openmp --with-quantum-depth=16 --enable-hdri=no --without-perl --prefix=/usr
+ - make -j$(nproc)
+ - # Generate AppImage
+ - make install DESTDIR=$(readlink -f appdir) ; find appdir/
+ - mkdir -p appdir/usr/share/applications/ ; cp imagemagick.desktop appdir/usr/share/applications/
+ - mkdir -p appdir/usr/share/icons/hicolor/128x128/apps/ ; touch appdir/usr/share/icons/hicolor/128x128/apps/imagemagick.png # FIXME
+ - 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 VERSION=$(git rev-parse --short HEAD)-$CC
+ - ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/imagemagick.desktop -bundle-non-qt-libs
+ - ./linuxdeployqt*.AppImage --appimage-extract
+ - rm ./appdir/AppRun ; cp AppRun appdir/ ; chmod a+x ./appdir/AppRun # Replace symlink with custom script
+ - PATH=./squashfs-root/usr/bin:$PATH ./squashfs-root/usr/bin/appimagetool -g ./appdir/
+
+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 ImageMagick*AppImage*
+
+branches:
+ except:
+ - # Do not build tags that we create when we upload to GitHub Releases
+ - /^(?i:continuous)$/
+
# - cd PerlMagick
# - perl Makefile.PL
# - make
--- /dev/null
+#!/bin/bash
+
+# The purpose of this custom AppRun script is
+# to allow symlinking the AppImage and invoking
+# the corresponding binary depending on which
+# symlink was used to invoke the AppImage
+
+HERE="$(dirname "$(readlink -f "${0}")")"
+
+export MAGICK_HOME="$HERE/usr" # http://www.imagemagick.org/QuickStart.txt
+export MAGICK_CONFIGURE_PATH="$HERE/usr/lib/ImageMagick-7.0.7/config-Q16/" # Undocumented?
+export MANPATH="$HERE/usr/share/man:$MANPATH"
+export INFOPATH="$HERE/usr/share/info:$MANPATH"
+
+if [ "$1" == "man" ] ; then
+ shift ; exec "$@" ; exit $?
+elif [ "$1" == "info" ] ; then
+ shift ; exec "$@" ; exit $?
+fi
+
+if [ ! -z $APPIMAGE ] ; then
+ BINARY_NAME=$(basename "$ARGV0")
+ if [ -e "$HERE/usr/bin/$BINARY_NAME" ] ; then
+ exec "$HERE/usr/bin/$BINARY_NAME" "$@"
+ else
+ exec "$HERE/usr/bin/magick" "$@"
+ fi
+else
+ exec "$HERE/usr/bin/magick" "$@"
+fi