1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-21 12:40:08 +00:00

alpha version of build scripts

This commit is contained in:
Stephen Gaito 2019-11-22 12:08:20 +00:00
parent 73d379e407
commit 65e674db42
9 changed files with 92 additions and 77 deletions

View File

@ -1,22 +0,0 @@
#!/bin/bash
# This bash script automates the creation of an AppImage for pdf2htmlEX
# It is based upon code taken from
# https://github.com/AppImage/pkg2appimage
# and
# https://github.com/AppImage/AppImages
mkdir -p buildAppImage
cd buildAppImage
wget -q https://github.com/AppImage/AppImages/raw/master/functions.sh \
-O ./functions.sh
. ./functions.sh
apt download -y apt libapt-pkg5.0 libbz2-1.0 liblzma5 \
multiarch-support zlib1g dpkg
mkdir -p pdf2htmlEX.AppImage

View File

@ -5,6 +5,6 @@
cd poppler
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \
-DENABLE_LIBOPENJPEG=none ..
make -j `nproc`

26
buildScripts/createAppImage Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
# This bash script creates an AppImage for pdf2htmlEX
mkdir -p imageBuild/pdf2htmlEX.AppDir
cd pdf2htmlEX/build
sudo rm -rf install_manifest.txt
make install DESTDIR=../../imageBuild/pdf2htmlEX.AppDir
cd ../../imageBuild
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod a+x linuxdeploy-x86_64.AppImage
./linuxdeploy-x86_64.AppImage \
-e pdf2htmlEX.AppDir/usr/bin/pdf2htmlEX \
--create-desktop-file \
-i ../pdf2htmlEX/logo/pdf2htmlEX.svg \
--appdir=pdf2htmlEX.AppDir \
--output appimage

26
buildScripts/doItAll Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
# This bash script builds the complete pdf2htmlEX application LOCALLY
# (It does not create the AppImage or Docker images)
export UNATTENDED=--assume-yes
getBuildTools
getDevLibraries
getPoppler
buildPoppler
installPoppler
getFontForge
buildFontForge
installFontForge
buildPdf2htmlEX
installPdf2htmlEX

View File

@ -1,31 +1,16 @@
#!/bin/bash
echo "WARNING: this will over-write any existing"
echo "FontForge version you have installed on your system."
echo "This may break other packages/applications."
echo ""
echo "This installation assumes you have 'sudo' privileges."
echo ""
echo "Type ctrl-c now if DO NOT want to continue"
read -p "Type anything else to continue: "
if [ -z "$UNATTENDED" ] ; then
echo "WARNING: this may over-write any existing"
echo "FontForge version you have installed on your system."
echo "This may break other packages/applications."
echo ""
echo "This installation assumes you have 'sudo' privileges."
echo ""
echo "Type ctrl-c now if DO NOT want to continue"
read -p "Type anything else to continue: "
fi
cd fontforge
sudo make install
sudo ldconfig;
#cd
#
#sudo mkdir -p /usr/include/poppler
#sudo cp poppler/poppler/*.h /usr/include/poppler
#
#sudo mkdir -p /usr/include/poppler/goo
#sudo cp poppler/goo/*.h /usr/include/poppler/goo
#
#sudo mkdir -p /usr/include/poppler/fofi
#sudo cp poppler/fofi/*.h /usr/include/poppler/fofi
#
#sudo mkdir -p /usr/include/poppler/splash
#sudo cp poppler/splash/*.h /usr/include/poppler/splash
#
#sudo cp poppler/build/poppler/poppler-config.h \
# /usr/include/poppler

View File

@ -1,8 +1,9 @@
#!/bin/bash
if [[ $# -eq 0 ]] ; then
if [ -z "$UNATTENDED" ] ; then
echo "This installation assumes you have 'sudo' privileges"
echo ""
echo "Type ctrl-c now if DO NOT want to continue"
read -p "Type anything else to continue: "

View File

@ -2,31 +2,34 @@
# This bash script installs Poppler into the local system
echo "WARNING: this will over-write any existing"
echo "Poppler version you have installed on your system."
echo "This may break other packages/applications."
echo ""
echo "This installation assumes you have 'sudo' privileges."
echo ""
echo "Type ctrl-c now if DO NOT want to continue"
read -p "Type anything else to continue: "
if [ -z "$UNATTENDED" ] ; then
echo "WARNING: this may over-write any existing"
echo "Poppler version you have installed on your system."
echo "This may break other packages/applications."
echo ""
echo "This installation assumes you have 'sudo' privileges."
echo ""
echo "Type ctrl-c now if DO NOT want to continue"
read -p "Type anything else to continue: "
fi
cd poppler/build
sudo make install
cd ..
sudo mkdir -p /usr/include/poppler
sudo cp poppler/*.h /usr/include/poppler
sudo mkdir -p /usr/local/include/poppler
sudo cp poppler/*.h /usr/local/include/poppler
sudo mkdir -p /usr/include/poppler/goo
sudo cp goo/*.h /usr/include/poppler/goo
sudo mkdir -p /usr/local/include/poppler/goo
sudo cp goo/*.h /usr/local/include/poppler/goo
sudo mkdir -p /usr/include/poppler/fofi
sudo cp fofi/*.h /usr/include/poppler/fofi
sudo mkdir -p /usr/local/include/poppler/fofi
sudo cp fofi/*.h /usr/local/include/poppler/fofi
sudo mkdir -p /usr/include/poppler/splash
sudo cp splash/*.h /usr/include/poppler/splash
sudo mkdir -p /usr/local/include/poppler/splash
sudo cp splash/*.h /usr/local/include/poppler/splash
sudo cp build/poppler/poppler-config.h \
/usr/include/poppler
/usr/local/include/poppler

View File

@ -1,11 +0,0 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=pdf2htmlEX
Comment=pdf2htmlEX
Exec=/usr/local/bin/pdf2htmlEX
Icon=/usr/local/share/pdf2htmlEX/pdf2htmlEX-64x64
Categories=Office;
Terminal=false
StartupNotify=false
X-AppImage-Version=try1

View File

@ -368,6 +368,13 @@ int main(int argc, char **argv)
param.data_dir = PDF2HTMLEX_DATA_PATH;
#endif
if (getenv("APPDIR")) {
// we are running inside an AppImage so we need to adjust the data_dir
// however the user can supply some other absolute path later
//
param.data_dir = string(getenv("APPDIR")) + param.data_dir;
}
parse_options(argc, argv);
check_param();