2020-06-20 09:11:30 +00:00
|
|
|
#!/bin/sh
|
2019-11-22 12:08:20 +00:00
|
|
|
|
2020-06-20 09:11:30 +00:00
|
|
|
# This shell script creates an AppImage for pdf2htmlEX
|
2019-11-22 12:08:20 +00:00
|
|
|
|
2020-06-20 09:11:30 +00:00
|
|
|
# source ./buildScripts/reSourceVersionEnvs
|
|
|
|
. ./buildScripts/reSourceVersionEnvs
|
2019-11-22 12:08:20 +00:00
|
|
|
|
2019-11-29 09:11:32 +00:00
|
|
|
echo ""
|
|
|
|
echo "-------------------------------------------------------------------"
|
|
|
|
echo "CREATING pdf2htmlEX AppImage"
|
|
|
|
echo "-------------------------------------------------------------------"
|
|
|
|
echo ""
|
|
|
|
|
2020-06-02 11:58:27 +00:00
|
|
|
set -ev
|
|
|
|
|
2019-11-26 13:41:13 +00:00
|
|
|
# For appimage output plugin
|
|
|
|
#
|
2020-06-06 08:15:01 +00:00
|
|
|
#export VERSION="$PDF2HTMLEX_BRANCH-$BUILD_TIME"
|
2020-06-21 06:12:05 +00:00
|
|
|
export APPIMAGE_NAME="pdf2htmlEX-$PDF2HTMLEX_NAME.AppImage"
|
2019-11-29 09:43:07 +00:00
|
|
|
|
|
|
|
echo "export APPIMAGE_NAME=\"$APPIMAGE_NAME\"" >> buildScripts/reSourceVersionEnvs
|
2019-11-26 13:41:13 +00:00
|
|
|
|
2019-11-25 16:46:14 +00:00
|
|
|
mkdir -p imageBuild/appDir/usr/lib/
|
2019-11-22 12:08:20 +00:00
|
|
|
|
|
|
|
cd pdf2htmlEX/build
|
|
|
|
|
|
|
|
sudo rm -rf install_manifest.txt
|
|
|
|
|
2019-11-25 16:46:14 +00:00
|
|
|
make install DESTDIR=../../imageBuild/appDir
|
2019-11-22 12:08:20 +00:00
|
|
|
|
2019-12-17 16:01:02 +00:00
|
|
|
cd ../../poppler-data
|
|
|
|
|
2020-05-31 18:34:48 +00:00
|
|
|
make install \
|
|
|
|
prefix=$PDF2HTMLEX_PREFIX \
|
|
|
|
datadir=$PDF2HTMLEX_PREFIX/share/pdf2htmlEX \
|
|
|
|
DESTDIR=../imageBuild/appDir
|
2019-12-17 16:01:02 +00:00
|
|
|
|
|
|
|
cd ../imageBuild
|
2019-11-22 12:08:20 +00:00
|
|
|
|
2020-06-11 05:37:23 +00:00
|
|
|
# Make sure directories can be traversed by nobody
|
|
|
|
#
|
2020-06-11 08:05:14 +00:00
|
|
|
#find appDir -type d -exec chmod 755 {} \;
|
2020-06-11 05:37:23 +00:00
|
|
|
#
|
|
|
|
# Make sure files can be read by nobody
|
|
|
|
#
|
2020-06-11 08:05:14 +00:00
|
|
|
#find appDir -type f -exec chmod 644 {} \;
|
2020-06-11 05:37:23 +00:00
|
|
|
|
2020-05-30 07:46:22 +00:00
|
|
|
# force libfontconfig into AppImage (linuxdeploy blacklists libfontconfig)
|
|
|
|
# (turned off since libfontconfig needs to be matched to the underlying
|
|
|
|
# OS's collection of fonts and /etc/fonts configuration files)
|
2019-11-22 17:25:05 +00:00
|
|
|
#
|
2020-05-30 07:46:22 +00:00
|
|
|
#cp /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 appDir/usr/lib/
|
2019-11-22 17:25:05 +00:00
|
|
|
|
2019-11-23 10:25:09 +00:00
|
|
|
LINUX_DEPLOY_APP_IMAGE=linuxdeploy-$MACHINE_ARCH.AppImage
|
2019-11-22 12:08:20 +00:00
|
|
|
|
2020-08-19 09:46:43 +00:00
|
|
|
wget $LINUX_DEPLOY_URL/$LINUX_DEPLOY_APP_IMAGE
|
2019-11-22 12:08:20 +00:00
|
|
|
|
2019-11-23 10:25:09 +00:00
|
|
|
chmod a+x $LINUX_DEPLOY_APP_IMAGE
|
|
|
|
|
2020-07-07 18:01:43 +00:00
|
|
|
if [ ! -w /dev/fuse ] ; then
|
|
|
|
# We are in an environment in which FUSE is not useable...
|
2020-05-28 10:59:27 +00:00
|
|
|
#
|
|
|
|
# We explicilty extract the appimage to a squashfs to allow it to be used
|
2020-07-07 18:01:43 +00:00
|
|
|
# even if FUSE is not available.
|
2020-05-28 10:59:27 +00:00
|
|
|
#
|
|
|
|
./$LINUX_DEPLOY_APP_IMAGE --appimage-extract
|
|
|
|
#
|
|
|
|
LINUX_DEPLOY_APP_IMAGE=squashfs-root/AppRun
|
|
|
|
fi
|
|
|
|
|
2020-06-06 11:31:17 +00:00
|
|
|
export VERBOSE=1
|
|
|
|
export OUTPUT=$APPIMAGE_NAME
|
|
|
|
|
2020-05-28 10:59:27 +00:00
|
|
|
./$LINUX_DEPLOY_APP_IMAGE \
|
2019-12-17 16:23:39 +00:00
|
|
|
-e appDir/$PDF2HTMLEX_PREFIX/bin/pdf2htmlEX \
|
2020-05-28 10:59:27 +00:00
|
|
|
--create-desktop-file \
|
|
|
|
-i ../pdf2htmlEX/logo/pdf2htmlEX.svg \
|
|
|
|
--appdir=appDir \
|
2019-11-22 12:08:20 +00:00
|
|
|
--output appimage
|
2019-11-27 12:24:03 +00:00
|
|
|
|
|
|
|
|