mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
alpha version of build scripts
This commit is contained in:
parent
73d379e407
commit
65e674db42
@ -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
|
|
||||||
|
|
@ -5,6 +5,6 @@
|
|||||||
cd poppler
|
cd poppler
|
||||||
mkdir build
|
mkdir build
|
||||||
cd 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 ..
|
-DENABLE_LIBOPENJPEG=none ..
|
||||||
make -j `nproc`
|
make -j `nproc`
|
||||||
|
26
buildScripts/createAppImage
Executable file
26
buildScripts/createAppImage
Executable 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
26
buildScripts/doItAll
Executable 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
|
@ -1,31 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "WARNING: this will over-write any existing"
|
if [ -z "$UNATTENDED" ] ; then
|
||||||
echo "FontForge version you have installed on your system."
|
echo "WARNING: this may over-write any existing"
|
||||||
echo "This may break other packages/applications."
|
echo "FontForge version you have installed on your system."
|
||||||
echo ""
|
echo "This may break other packages/applications."
|
||||||
echo "This installation assumes you have 'sudo' privileges."
|
echo ""
|
||||||
echo ""
|
echo "This installation assumes you have 'sudo' privileges."
|
||||||
echo "Type ctrl-c now if DO NOT want to continue"
|
echo ""
|
||||||
read -p "Type anything else to continue: "
|
echo "Type ctrl-c now if DO NOT want to continue"
|
||||||
|
read -p "Type anything else to continue: "
|
||||||
|
fi
|
||||||
|
|
||||||
cd fontforge
|
cd fontforge
|
||||||
sudo make install
|
sudo make install
|
||||||
sudo ldconfig;
|
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
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [[ $# -eq 0 ]] ; then
|
if [ -z "$UNATTENDED" ] ; then
|
||||||
|
|
||||||
echo "This installation assumes you have 'sudo' privileges"
|
echo "This installation assumes you have 'sudo' privileges"
|
||||||
|
echo ""
|
||||||
echo "Type ctrl-c now if DO NOT want to continue"
|
echo "Type ctrl-c now if DO NOT want to continue"
|
||||||
read -p "Type anything else to continue: "
|
read -p "Type anything else to continue: "
|
||||||
|
|
||||||
|
@ -2,31 +2,34 @@
|
|||||||
|
|
||||||
# This bash script installs Poppler into the local system
|
# 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."
|
if [ -z "$UNATTENDED" ] ; then
|
||||||
echo "This may break other packages/applications."
|
echo "WARNING: this may over-write any existing"
|
||||||
echo ""
|
echo "Poppler version you have installed on your system."
|
||||||
echo "This installation assumes you have 'sudo' privileges."
|
echo "This may break other packages/applications."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Type ctrl-c now if DO NOT want to continue"
|
echo "This installation assumes you have 'sudo' privileges."
|
||||||
read -p "Type anything else to continue: "
|
echo ""
|
||||||
|
echo "Type ctrl-c now if DO NOT want to continue"
|
||||||
|
read -p "Type anything else to continue: "
|
||||||
|
fi
|
||||||
|
|
||||||
cd poppler/build
|
cd poppler/build
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
sudo mkdir -p /usr/include/poppler
|
sudo mkdir -p /usr/local/include/poppler
|
||||||
sudo cp poppler/*.h /usr/include/poppler
|
sudo cp poppler/*.h /usr/local/include/poppler
|
||||||
|
|
||||||
sudo mkdir -p /usr/include/poppler/goo
|
sudo mkdir -p /usr/local/include/poppler/goo
|
||||||
sudo cp goo/*.h /usr/include/poppler/goo
|
sudo cp goo/*.h /usr/local/include/poppler/goo
|
||||||
|
|
||||||
sudo mkdir -p /usr/include/poppler/fofi
|
sudo mkdir -p /usr/local/include/poppler/fofi
|
||||||
sudo cp fofi/*.h /usr/include/poppler/fofi
|
sudo cp fofi/*.h /usr/local/include/poppler/fofi
|
||||||
|
|
||||||
sudo mkdir -p /usr/include/poppler/splash
|
sudo mkdir -p /usr/local/include/poppler/splash
|
||||||
sudo cp splash/*.h /usr/include/poppler/splash
|
sudo cp splash/*.h /usr/local/include/poppler/splash
|
||||||
|
|
||||||
sudo cp build/poppler/poppler-config.h \
|
sudo cp build/poppler/poppler-config.h \
|
||||||
/usr/include/poppler
|
/usr/local/include/poppler
|
||||||
|
@ -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
|
|
@ -368,6 +368,13 @@ int main(int argc, char **argv)
|
|||||||
param.data_dir = PDF2HTMLEX_DATA_PATH;
|
param.data_dir = PDF2HTMLEX_DATA_PATH;
|
||||||
#endif
|
#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);
|
parse_options(argc, argv);
|
||||||
check_param();
|
check_param();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user