.. | ||
buildFontforge | ||
buildInstallLocally | ||
buildPdf2htmlEX | ||
buildPoppler | ||
createAppImage | ||
createDebianPackage | ||
createDockerImage | ||
createImages | ||
dockerFunctions | ||
getBuildTools | ||
getDevLibraries | ||
getFontforge | ||
getPoppler | ||
installPdf2htmlEX | ||
listFilesByChangeTime | ||
Readme.md | ||
reportEnvs | ||
runTests | ||
travisLinuxDoItAll | ||
uploadDockerImage | ||
uploadGitHubRelease | ||
uploadGitHubReleaseDSL | ||
uploadGitHubReleaseMessage | ||
uploadImages | ||
versionEnvs |
Building pdf2htmlEX
Because of its intimate use of specific versions of both Poppler and
FontForge, cleanly building pdf2htmlEX
is rather more complex than
normal.
The (bash) scripts in this directory help automate this mutli-stage process.
For all but the most experienced programmers, we strongly encourage you
to use these scripts to build pdf2htmlEX
.
Table of contents
TL;DR ...
Downloading precompiled versions
For most users, you probably really want to simply download one of the
precompiled versions of
pdf2htmlEX
:
-
AppImage : Download, make executable, and run...
This will work on most Linuxes, and most recent Windows 10.
-
Docker Image from the
pdf2htmlEX
Docker hub.This will work on any machine with Docker installed.
-
Debian archive : Download, apt install locally, and run...
This will work on any Debian based and most recent Windows 10 machines.
Experienced users of Linux, may be able to repackage this
*.deb
for use with their favourite package management tool.
Building yourself
To build pdf2htmlEX
on your own machine, inside the root directory of
a fresh clone of the
pdf2htmlEX/pdf2htmlEX
repository, type:
./buildScripts/buildInstallLocally
This will automatically install all required development tools and
libraries, and then proceed to download and statically compile the
required versions of both Poppler and FontForge before compiling and
installing pdf2htmlEX
into /usr/local/bin.
NOTE: at the moment this will only work on machines with a Debian based distribution. such as Ubuntu, Linux Mint, etc.
The gory details ...
The bash scripts in this directory automate the download, build, install,
test and upload steps required to provide a complete build/test/release
cycle of pdf2htmlEX
.
Each script can be used individually to re-run a particular step if needed.
Top-level scripts
Typically, most users, will run one of the following "top-level" scripts:
-
buildInstallLocally
This will automate:
-
the installation of all required development tools and libraries,
-
download and statically compile the required versions of both Poppler and FontForge,
-
compile and install
pdf2htmlEX
.
-
-
createImages
Following a successful
buildInstallLocally
, this will create the following images:-
AppImage
-
Docker image
-
Debian archive
-
-
runTests
Following a successful
buildInstallLocally
, this will run the various 'local' tests reporting errors as they occur.When run in Travis-ci, failing browser tests will not fail the overall Travis build, but will instead upload the test results to the GitHub Release page for later review.
-
uploadImages
Following successful
buildInstallLocally
,createImages
andrunTests
, this will automate the upload of the various artefacts to thepdf2htmlEX
releases page, LaunchPad ppa and docker hub repository.Note that this step requires the user to enter passwords for each of the respective services. Most users will not need (or be able) to run this step.
-
travisLinuxDoItAll
This script is used by the
.travis.yml
configuration to build, test and upload a completepdf2htmlEX
release cycle. It is essentially a compendium of all of the build scripts in the correct order.
Individual steps
-
buildFontforge
: Compiles a static version oflibfontforge
for use bypdf2htmlEX
. -
buildPdf2htmlEX
: Compiles and linkspdf2htmlEX
. -
buildPoppler
: Compiles a static version oflibpoppler
andlibpopper-glib
for use bypdf2htmlEX
. -
createAppImage
: Using an already compiled version ofpdf2htmlEX
, installs it andpopper-data
into an AppImage. -
createDebianPackage
: Using an already compiled version ofpdf2htmlEX
, installs it andpoppler-data
into a Debian archive (*.deb
). -
createDockerImage
: Using an already compile version ofpdf2htmlEX
, installs it andpoppler-data
into a Docker image. -
getBuildTools
: Locallyapt
installs all development tools required to buildpdf2htmlEX
. -
getDevLibraries
: Locallyapt
installs all development libraries required to buildpdf2htmlEX
.This script provides a definitive list of all libraries required to run
pdf2htmlEX
. -
getFontforge
: Downloads and unpacks the version of FontForge specified in theFONTFORGE_VERSION
environment variable into thepdf2htmlEX/fontoforge
directory.The
FONTFORGE_VERSION
variable is specified in theversionEnvs
script. -
getPoppler
: Downloads and unpacks the version of Poppler specified in thePOPPLER_VERSION
environment variable into thepdf2htmlEX/poppler
directory.The
POPPLER_VERSION
variable is specified in theversionEnvs
script.The
getPoppler
script also downloads and unpacks the most recent version ofpoppler-data
. Sincepoppler-data
does not change very often, the correct version ofpoppler-data
is specified in thegetPoppler
script itself. -
installPdf2htmlEX
: Installs an already compiled version ofpdf2htmlEX
andpoppler-data
into the location specified by thePDF2HTMLEX_PREFIX
environment variable.The
PDF2HTMLEX_PREFIX
variable is specified in theversionEnvs
script. -
rutTests
: Runs the tests located in thepdf2htmlEX/pdf2htmlEX/test
directory. See thepdf2htmlEX/pdf2htmlEx/test
directory's Readme file for details. -
uploadDebianArchive
: Upload thepdf2htmlEX
Debian archive to both the GitHub releases page, as well as the LaunchPad ppa.This script has not yet been implemented.
-
uploadDockerImage
: Upload thepdf2htmlEX
Docker image to Docker hub repository associated to the docker hub users specified in theDOCKER_USERNAME
environement variable.Unless the
DOCKER_USERNAME
andDOCKER_PASSWORD
environment variables are pre-defined, this script will prompt the user for the respective values. -
uploadGitHubRelease
: Upload thepdf2htmlEX
artefacts (AppImage, Debian archive, test results, etc) to the continuous section of the release page associated with theTRAVIS_REPO_SLUG
(user/project) environment variable.Unless the
GITHUB_USERNAME
,GITHUB_TOKEN
, andTRAVIS_REPO_SLUG
(user/project) environment variables are pre-defined, this script will prompt the user for the respective values.
Helper files and scripts
-
versionEnvs
: Specifies all of the evnironment variables required for a standard build ofpdf2htmlEX
. Changes in this script effect all of the other build scripts. -
reSourceVersionEnvs
: This bash script is automatically generated by the build scripts as they are run. It records the values of all important environment variables required by the buildScripts. It is typcicallysource
d by each script before it preforms any actions. -
reportEnvs
: Echos all important enviroment variables to the console. This script is used by the top-level scripts to ensure the current environment variables are listed before each build. -
uploadGitHubReleaseDSL
: A collection of bash functions used by theuploadGitHubRelease
script to automate the upload of release artefacts. -
uploadGitHubReleaseMessage
: The contents of this text file is used by theuploadGitHubRelease
script as the contents of the release message, as visible to the user, for the 'continuous' release section. -
dockerFunctions
: A collection of bash functions used by theuploadDockerImage
script to automate the upload of the Docker images to Docker Hub. -
listFilesByChangeTime
: A simple bash script which lists the files in the buildScripts directory by most recently changed files first. -
Readme.md
: This read me file.
Yet more details?
The various bash script files are meant to be fairly readable. They contain additional comments about what each step is meant to be doing.