From 4e4f15282889adf65dfc84e1e4beae3f32831bcb Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 12:35:10 +0000 Subject: [PATCH 001/128] initial restructure of directories --- build_for_ppa.py => archive/build_for_ppa.py | 0 dobuild => buildScripts/dobuildPdf2htmlEX | 0 dobuildClang => buildScripts/dobuildPdf2htmlEXClang | 0 doclean => buildScripts/docleanPdf2htmlEX | 0 doinstall => buildScripts/doinstallPdf2htmlEX | 0 {3rdparty => pdf2htmlEX/3rdparty}/PDF.js/LICENSE | 0 {3rdparty => pdf2htmlEX/3rdparty}/PDF.js/build.sh | 0 .../3rdparty}/PDF.js/compatibility.js | 0 .../3rdparty}/PDF.js/compatibility.min.js | 0 .../3rdparty}/closure-compiler/COPYING | 0 .../3rdparty}/closure-compiler/README | 0 .../3rdparty}/closure-compiler/compiler.jar | Bin {3rdparty => pdf2htmlEX/3rdparty}/poppler/COPYING3 | 0 .../3rdparty}/poppler/git/CairoFontEngine.cc | 0 .../3rdparty}/poppler/git/CairoFontEngine.h | 0 .../3rdparty}/poppler/git/CairoOutputDev.cc | 0 .../3rdparty}/poppler/git/CairoOutputDev.h | 0 .../3rdparty}/poppler/git/CairoRescaleBox.cc | 0 .../3rdparty}/poppler/git/CairoRescaleBox.h | 0 .../3rdparty}/yuicompressor/LICENSE.TXT | 0 .../3rdparty}/yuicompressor/yuicompressor-2.4.8.jar | Bin CMakeLists.txt => pdf2htmlEX/CMakeLists.txt | 0 .../CMakeLists.txt.patch | 0 {logo => pdf2htmlEX/logo}/LICENSE | 0 {logo => pdf2htmlEX/logo}/LICENSE_CC-BY-3.0 | 0 {logo => pdf2htmlEX/logo}/design.svg | 0 {logo => pdf2htmlEX/logo}/notes.txt | 0 {logo => pdf2htmlEX/logo}/pdf2htmlEX-256x256.png | Bin {logo => pdf2htmlEX/logo}/pdf2htmlEX-64x64.png | Bin {logo => pdf2htmlEX/logo}/pdf2htmlEX.svg | 0 {logo => pdf2htmlEX/logo}/update_png.sh | 0 pdf2htmlEX.1.in => pdf2htmlEX/pdf2htmlEX.1.in | 0 {share => pdf2htmlEX/share}/LICENSE | 0 {share => pdf2htmlEX/share}/base.css.in | 0 {share => pdf2htmlEX/share}/build_css.sh | 0 {share => pdf2htmlEX/share}/build_js.sh | 0 {share => pdf2htmlEX/share}/fancy.css.in | 0 {share => pdf2htmlEX/share}/manifest | 0 {share => pdf2htmlEX/share}/pdf2htmlEX-64x64.png | Bin {share => pdf2htmlEX/share}/pdf2htmlEX.js.in | 0 {src => pdf2htmlEX/src}/ArgParser.cc | 0 {src => pdf2htmlEX/src}/ArgParser.h | 0 .../src}/BackgroundRenderer/BackgroundRenderer.cc | 0 .../src}/BackgroundRenderer/BackgroundRenderer.h | 0 .../BackgroundRenderer/CairoBackgroundRenderer.cc | 0 .../BackgroundRenderer/CairoBackgroundRenderer.h | 0 .../BackgroundRenderer/SplashBackgroundRenderer.cc | 0 .../BackgroundRenderer/SplashBackgroundRenderer.h | 0 {src => pdf2htmlEX/src}/Base64Stream.cc | 0 {src => pdf2htmlEX/src}/Base64Stream.h | 0 {src => pdf2htmlEX/src}/Color.cc | 0 {src => pdf2htmlEX/src}/Color.h | 0 {src => pdf2htmlEX/src}/CoveredTextDetector.cc | 0 {src => pdf2htmlEX/src}/CoveredTextDetector.h | 0 {src => pdf2htmlEX/src}/DrawingTracer.cc | 0 {src => pdf2htmlEX/src}/DrawingTracer.h | 0 {src => pdf2htmlEX/src}/HTMLRenderer/HTMLRenderer.h | 0 {src => pdf2htmlEX/src}/HTMLRenderer/draw.cc | 0 {src => pdf2htmlEX/src}/HTMLRenderer/font.cc | 0 {src => pdf2htmlEX/src}/HTMLRenderer/form.cc | 0 {src => pdf2htmlEX/src}/HTMLRenderer/general.cc | 0 {src => pdf2htmlEX/src}/HTMLRenderer/image.cc | 0 {src => pdf2htmlEX/src}/HTMLRenderer/link.cc | 0 {src => pdf2htmlEX/src}/HTMLRenderer/outline.cc | 0 {src => pdf2htmlEX/src}/HTMLRenderer/state.cc | 0 {src => pdf2htmlEX/src}/HTMLRenderer/text.cc | 0 {src => pdf2htmlEX/src}/HTMLState.h | 0 {src => pdf2htmlEX/src}/HTMLTextLine.cc | 0 {src => pdf2htmlEX/src}/HTMLTextLine.h | 0 {src => pdf2htmlEX/src}/HTMLTextPage.cc | 0 {src => pdf2htmlEX/src}/HTMLTextPage.h | 0 {src => pdf2htmlEX/src}/Param.h | 0 {src => pdf2htmlEX/src}/Preprocessor.cc | 0 {src => pdf2htmlEX/src}/Preprocessor.h | 0 {src => pdf2htmlEX/src}/StateManager.h | 0 {src => pdf2htmlEX/src}/StringFormatter.cc | 0 {src => pdf2htmlEX/src}/StringFormatter.h | 0 {src => pdf2htmlEX/src}/TmpFiles.cc | 0 {src => pdf2htmlEX/src}/TmpFiles.h | 0 .../src}/css_class_names.cmakelists.txt | 0 {src => pdf2htmlEX/src}/pdf2htmlEX-config.h.in | 0 {src => pdf2htmlEX/src}/pdf2htmlEX.cc | 0 {src => pdf2htmlEX/src}/util/const.cc | 0 {src => pdf2htmlEX/src}/util/const.h | 0 {src => pdf2htmlEX/src}/util/css_const.h.in | 0 {src => pdf2htmlEX/src}/util/encoding.cc | 0 {src => pdf2htmlEX/src}/util/encoding.h | 0 {src => pdf2htmlEX/src}/util/ffw.c | 0 {src => pdf2htmlEX/src}/util/ffw.h | 0 .../src}/util/fontforge-2.0.20170731/autowidth.h | 0 .../src}/util/fontforge-2.0.20170731/bitmapchar.h | 0 .../src}/util/fontforge-2.0.20170731/cvimages.h | 0 .../src}/util/fontforge-2.0.20170731/encoding.h | 0 .../src}/util/fontforge-2.0.20170731/fvfonts.h | 0 .../src}/util/fontforge-2.0.20170731/namelist.h | 0 .../src}/util/fontforge-2.0.20170731/savefont.h | 0 .../src}/util/fontforge-2.0.20170731/splineorder2.h | 0 .../src}/util/fontforge-2.0.20170731/splineutil.h | 0 .../src}/util/fontforge-2.0.20170731/splineutil2.h | 0 .../src}/util/fontforge-2.0.20170731/start.h | 0 .../src}/util/fontforge-2.0.20170731/tottf.h | 0 .../src}/util/fontforge-2.0.20170731/views.h | 0 {src => pdf2htmlEX/src}/util/math.cc | 0 {src => pdf2htmlEX/src}/util/math.h | 0 {src => pdf2htmlEX/src}/util/mingw.cc | 0 {src => pdf2htmlEX/src}/util/mingw.h | 0 {src => pdf2htmlEX/src}/util/misc.cc | 0 {src => pdf2htmlEX/src}/util/misc.h | 0 {src => pdf2htmlEX/src}/util/namespace.h | 0 {src => pdf2htmlEX/src}/util/path.cc | 0 {src => pdf2htmlEX/src}/util/path.h | 0 {src => pdf2htmlEX/src}/util/unicode.cc | 0 {src => pdf2htmlEX/src}/util/unicode.h | 0 {test => pdf2htmlEX/test}/.gitattributes | 0 {test => pdf2htmlEX/test}/README.md | 0 {test => pdf2htmlEX/test}/browser_tests.py | 0 .../test}/browser_tests/basic_text.pdf | Bin .../test}/browser_tests/basic_text.tex | 0 .../test}/browser_tests/basic_text/basic_text.html | 0 .../test}/browser_tests/fontfile3_opentype.pdf | Bin .../fontfile3_opentype/fontfile3_opentype.html | 0 .../test}/browser_tests/geneve_1564.pdf | Bin .../browser_tests/geneve_1564/geneve_1564.html | 0 .../browser_tests/invalid_unicode_issue477.pdf | Bin .../invalid_unicode_issue477.html | 0 .../svg_background_with_page_rotation_issue402.pdf | Bin .../svg_background_with_page_rotation_issue402.html | 0 .../test}/browser_tests/test_fail.pdf | Bin .../test}/browser_tests/test_fail.tex | 0 .../test_fail/THIS_FOLDER_SHOULD_BE_EMPTY | 0 .../test}/browser_tests/text_visibility.pdf | Bin .../text_visibility/text_visibility.html | 0 .../test}/browser_tests/with_form.pdf | Bin .../test}/browser_tests/with_form/with_form.html | 0 {test => pdf2htmlEX/test}/fancy.min.css | 0 .../test}/old/convert_to_woff.fontforge | 0 {test => pdf2htmlEX/test}/old/test.py | 0 {test => pdf2htmlEX/test}/start_xvfb.sh | 0 {test => pdf2htmlEX/test}/test.py.in | 0 {test => pdf2htmlEX/test}/test_local_browser.py | 0 {test => pdf2htmlEX/test}/test_output.py | 0 {test => pdf2htmlEX/test}/test_output/1-page.pdf | Bin {test => pdf2htmlEX/test}/test_output/2-pages.pdf | Bin {test => pdf2htmlEX/test}/test_output/3-pages.pdf | Bin {test => pdf2htmlEX/test}/test_output/issue501 | Bin {test => pdf2htmlEX/test}/test_remote_browser.py | 0 146 files changed, 0 insertions(+), 0 deletions(-) rename build_for_ppa.py => archive/build_for_ppa.py (100%) rename dobuild => buildScripts/dobuildPdf2htmlEX (100%) rename dobuildClang => buildScripts/dobuildPdf2htmlEXClang (100%) rename doclean => buildScripts/docleanPdf2htmlEX (100%) rename doinstall => buildScripts/doinstallPdf2htmlEX (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/PDF.js/LICENSE (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/PDF.js/build.sh (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/PDF.js/compatibility.js (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/PDF.js/compatibility.min.js (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/closure-compiler/COPYING (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/closure-compiler/README (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/closure-compiler/compiler.jar (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/poppler/COPYING3 (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/poppler/git/CairoFontEngine.cc (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/poppler/git/CairoFontEngine.h (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/poppler/git/CairoOutputDev.cc (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/poppler/git/CairoOutputDev.h (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/poppler/git/CairoRescaleBox.cc (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/poppler/git/CairoRescaleBox.h (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/yuicompressor/LICENSE.TXT (100%) rename {3rdparty => pdf2htmlEX/3rdparty}/yuicompressor/yuicompressor-2.4.8.jar (100%) rename CMakeLists.txt => pdf2htmlEX/CMakeLists.txt (100%) rename CMakeLists.txt.patch => pdf2htmlEX/CMakeLists.txt.patch (100%) rename {logo => pdf2htmlEX/logo}/LICENSE (100%) rename {logo => pdf2htmlEX/logo}/LICENSE_CC-BY-3.0 (100%) rename {logo => pdf2htmlEX/logo}/design.svg (100%) rename {logo => pdf2htmlEX/logo}/notes.txt (100%) rename {logo => pdf2htmlEX/logo}/pdf2htmlEX-256x256.png (100%) rename {logo => pdf2htmlEX/logo}/pdf2htmlEX-64x64.png (100%) rename {logo => pdf2htmlEX/logo}/pdf2htmlEX.svg (100%) rename {logo => pdf2htmlEX/logo}/update_png.sh (100%) rename pdf2htmlEX.1.in => pdf2htmlEX/pdf2htmlEX.1.in (100%) rename {share => pdf2htmlEX/share}/LICENSE (100%) rename {share => pdf2htmlEX/share}/base.css.in (100%) rename {share => pdf2htmlEX/share}/build_css.sh (100%) rename {share => pdf2htmlEX/share}/build_js.sh (100%) rename {share => pdf2htmlEX/share}/fancy.css.in (100%) rename {share => pdf2htmlEX/share}/manifest (100%) rename {share => pdf2htmlEX/share}/pdf2htmlEX-64x64.png (100%) rename {share => pdf2htmlEX/share}/pdf2htmlEX.js.in (100%) rename {src => pdf2htmlEX/src}/ArgParser.cc (100%) rename {src => pdf2htmlEX/src}/ArgParser.h (100%) rename {src => pdf2htmlEX/src}/BackgroundRenderer/BackgroundRenderer.cc (100%) rename {src => pdf2htmlEX/src}/BackgroundRenderer/BackgroundRenderer.h (100%) rename {src => pdf2htmlEX/src}/BackgroundRenderer/CairoBackgroundRenderer.cc (100%) rename {src => pdf2htmlEX/src}/BackgroundRenderer/CairoBackgroundRenderer.h (100%) rename {src => pdf2htmlEX/src}/BackgroundRenderer/SplashBackgroundRenderer.cc (100%) rename {src => pdf2htmlEX/src}/BackgroundRenderer/SplashBackgroundRenderer.h (100%) rename {src => pdf2htmlEX/src}/Base64Stream.cc (100%) rename {src => pdf2htmlEX/src}/Base64Stream.h (100%) rename {src => pdf2htmlEX/src}/Color.cc (100%) rename {src => pdf2htmlEX/src}/Color.h (100%) rename {src => pdf2htmlEX/src}/CoveredTextDetector.cc (100%) rename {src => pdf2htmlEX/src}/CoveredTextDetector.h (100%) rename {src => pdf2htmlEX/src}/DrawingTracer.cc (100%) rename {src => pdf2htmlEX/src}/DrawingTracer.h (100%) rename {src => pdf2htmlEX/src}/HTMLRenderer/HTMLRenderer.h (100%) rename {src => pdf2htmlEX/src}/HTMLRenderer/draw.cc (100%) rename {src => pdf2htmlEX/src}/HTMLRenderer/font.cc (100%) rename {src => pdf2htmlEX/src}/HTMLRenderer/form.cc (100%) rename {src => pdf2htmlEX/src}/HTMLRenderer/general.cc (100%) rename {src => pdf2htmlEX/src}/HTMLRenderer/image.cc (100%) rename {src => pdf2htmlEX/src}/HTMLRenderer/link.cc (100%) rename {src => pdf2htmlEX/src}/HTMLRenderer/outline.cc (100%) rename {src => pdf2htmlEX/src}/HTMLRenderer/state.cc (100%) rename {src => pdf2htmlEX/src}/HTMLRenderer/text.cc (100%) rename {src => pdf2htmlEX/src}/HTMLState.h (100%) rename {src => pdf2htmlEX/src}/HTMLTextLine.cc (100%) rename {src => pdf2htmlEX/src}/HTMLTextLine.h (100%) rename {src => pdf2htmlEX/src}/HTMLTextPage.cc (100%) rename {src => pdf2htmlEX/src}/HTMLTextPage.h (100%) rename {src => pdf2htmlEX/src}/Param.h (100%) rename {src => pdf2htmlEX/src}/Preprocessor.cc (100%) rename {src => pdf2htmlEX/src}/Preprocessor.h (100%) rename {src => pdf2htmlEX/src}/StateManager.h (100%) rename {src => pdf2htmlEX/src}/StringFormatter.cc (100%) rename {src => pdf2htmlEX/src}/StringFormatter.h (100%) rename {src => pdf2htmlEX/src}/TmpFiles.cc (100%) rename {src => pdf2htmlEX/src}/TmpFiles.h (100%) rename {src => pdf2htmlEX/src}/css_class_names.cmakelists.txt (100%) rename {src => pdf2htmlEX/src}/pdf2htmlEX-config.h.in (100%) rename {src => pdf2htmlEX/src}/pdf2htmlEX.cc (100%) rename {src => pdf2htmlEX/src}/util/const.cc (100%) rename {src => pdf2htmlEX/src}/util/const.h (100%) rename {src => pdf2htmlEX/src}/util/css_const.h.in (100%) rename {src => pdf2htmlEX/src}/util/encoding.cc (100%) rename {src => pdf2htmlEX/src}/util/encoding.h (100%) rename {src => pdf2htmlEX/src}/util/ffw.c (100%) rename {src => pdf2htmlEX/src}/util/ffw.h (100%) rename {src => pdf2htmlEX/src}/util/fontforge-2.0.20170731/autowidth.h (100%) rename {src => pdf2htmlEX/src}/util/fontforge-2.0.20170731/bitmapchar.h (100%) rename {src => pdf2htmlEX/src}/util/fontforge-2.0.20170731/cvimages.h (100%) rename {src => pdf2htmlEX/src}/util/fontforge-2.0.20170731/encoding.h (100%) rename {src => pdf2htmlEX/src}/util/fontforge-2.0.20170731/fvfonts.h (100%) rename {src => pdf2htmlEX/src}/util/fontforge-2.0.20170731/namelist.h (100%) rename {src => pdf2htmlEX/src}/util/fontforge-2.0.20170731/savefont.h (100%) rename {src => pdf2htmlEX/src}/util/fontforge-2.0.20170731/splineorder2.h (100%) rename {src => pdf2htmlEX/src}/util/fontforge-2.0.20170731/splineutil.h (100%) rename {src => pdf2htmlEX/src}/util/fontforge-2.0.20170731/splineutil2.h (100%) rename {src => pdf2htmlEX/src}/util/fontforge-2.0.20170731/start.h (100%) rename {src => pdf2htmlEX/src}/util/fontforge-2.0.20170731/tottf.h (100%) rename {src => pdf2htmlEX/src}/util/fontforge-2.0.20170731/views.h (100%) rename {src => pdf2htmlEX/src}/util/math.cc (100%) rename {src => pdf2htmlEX/src}/util/math.h (100%) rename {src => pdf2htmlEX/src}/util/mingw.cc (100%) rename {src => pdf2htmlEX/src}/util/mingw.h (100%) rename {src => pdf2htmlEX/src}/util/misc.cc (100%) rename {src => pdf2htmlEX/src}/util/misc.h (100%) rename {src => pdf2htmlEX/src}/util/namespace.h (100%) rename {src => pdf2htmlEX/src}/util/path.cc (100%) rename {src => pdf2htmlEX/src}/util/path.h (100%) rename {src => pdf2htmlEX/src}/util/unicode.cc (100%) rename {src => pdf2htmlEX/src}/util/unicode.h (100%) rename {test => pdf2htmlEX/test}/.gitattributes (100%) rename {test => pdf2htmlEX/test}/README.md (100%) rename {test => pdf2htmlEX/test}/browser_tests.py (100%) rename {test => pdf2htmlEX/test}/browser_tests/basic_text.pdf (100%) rename {test => pdf2htmlEX/test}/browser_tests/basic_text.tex (100%) rename {test => pdf2htmlEX/test}/browser_tests/basic_text/basic_text.html (100%) rename {test => pdf2htmlEX/test}/browser_tests/fontfile3_opentype.pdf (100%) rename {test => pdf2htmlEX/test}/browser_tests/fontfile3_opentype/fontfile3_opentype.html (100%) rename {test => pdf2htmlEX/test}/browser_tests/geneve_1564.pdf (100%) rename {test => pdf2htmlEX/test}/browser_tests/geneve_1564/geneve_1564.html (100%) rename {test => pdf2htmlEX/test}/browser_tests/invalid_unicode_issue477.pdf (100%) rename {test => pdf2htmlEX/test}/browser_tests/invalid_unicode_issue477/invalid_unicode_issue477.html (100%) rename {test => pdf2htmlEX/test}/browser_tests/svg_background_with_page_rotation_issue402.pdf (100%) rename {test => pdf2htmlEX/test}/browser_tests/svg_background_with_page_rotation_issue402/svg_background_with_page_rotation_issue402.html (100%) rename {test => pdf2htmlEX/test}/browser_tests/test_fail.pdf (100%) rename {test => pdf2htmlEX/test}/browser_tests/test_fail.tex (100%) rename {test => pdf2htmlEX/test}/browser_tests/test_fail/THIS_FOLDER_SHOULD_BE_EMPTY (100%) rename {test => pdf2htmlEX/test}/browser_tests/text_visibility.pdf (100%) rename {test => pdf2htmlEX/test}/browser_tests/text_visibility/text_visibility.html (100%) rename {test => pdf2htmlEX/test}/browser_tests/with_form.pdf (100%) rename {test => pdf2htmlEX/test}/browser_tests/with_form/with_form.html (100%) rename {test => pdf2htmlEX/test}/fancy.min.css (100%) rename {test => pdf2htmlEX/test}/old/convert_to_woff.fontforge (100%) rename {test => pdf2htmlEX/test}/old/test.py (100%) rename {test => pdf2htmlEX/test}/start_xvfb.sh (100%) rename {test => pdf2htmlEX/test}/test.py.in (100%) rename {test => pdf2htmlEX/test}/test_local_browser.py (100%) rename {test => pdf2htmlEX/test}/test_output.py (100%) rename {test => pdf2htmlEX/test}/test_output/1-page.pdf (100%) rename {test => pdf2htmlEX/test}/test_output/2-pages.pdf (100%) rename {test => pdf2htmlEX/test}/test_output/3-pages.pdf (100%) rename {test => pdf2htmlEX/test}/test_output/issue501 (100%) rename {test => pdf2htmlEX/test}/test_remote_browser.py (100%) diff --git a/build_for_ppa.py b/archive/build_for_ppa.py similarity index 100% rename from build_for_ppa.py rename to archive/build_for_ppa.py diff --git a/dobuild b/buildScripts/dobuildPdf2htmlEX similarity index 100% rename from dobuild rename to buildScripts/dobuildPdf2htmlEX diff --git a/dobuildClang b/buildScripts/dobuildPdf2htmlEXClang similarity index 100% rename from dobuildClang rename to buildScripts/dobuildPdf2htmlEXClang diff --git a/doclean b/buildScripts/docleanPdf2htmlEX similarity index 100% rename from doclean rename to buildScripts/docleanPdf2htmlEX diff --git a/doinstall b/buildScripts/doinstallPdf2htmlEX similarity index 100% rename from doinstall rename to buildScripts/doinstallPdf2htmlEX diff --git a/3rdparty/PDF.js/LICENSE b/pdf2htmlEX/3rdparty/PDF.js/LICENSE similarity index 100% rename from 3rdparty/PDF.js/LICENSE rename to pdf2htmlEX/3rdparty/PDF.js/LICENSE diff --git a/3rdparty/PDF.js/build.sh b/pdf2htmlEX/3rdparty/PDF.js/build.sh similarity index 100% rename from 3rdparty/PDF.js/build.sh rename to pdf2htmlEX/3rdparty/PDF.js/build.sh diff --git a/3rdparty/PDF.js/compatibility.js b/pdf2htmlEX/3rdparty/PDF.js/compatibility.js similarity index 100% rename from 3rdparty/PDF.js/compatibility.js rename to pdf2htmlEX/3rdparty/PDF.js/compatibility.js diff --git a/3rdparty/PDF.js/compatibility.min.js b/pdf2htmlEX/3rdparty/PDF.js/compatibility.min.js similarity index 100% rename from 3rdparty/PDF.js/compatibility.min.js rename to pdf2htmlEX/3rdparty/PDF.js/compatibility.min.js diff --git a/3rdparty/closure-compiler/COPYING b/pdf2htmlEX/3rdparty/closure-compiler/COPYING similarity index 100% rename from 3rdparty/closure-compiler/COPYING rename to pdf2htmlEX/3rdparty/closure-compiler/COPYING diff --git a/3rdparty/closure-compiler/README b/pdf2htmlEX/3rdparty/closure-compiler/README similarity index 100% rename from 3rdparty/closure-compiler/README rename to pdf2htmlEX/3rdparty/closure-compiler/README diff --git a/3rdparty/closure-compiler/compiler.jar b/pdf2htmlEX/3rdparty/closure-compiler/compiler.jar similarity index 100% rename from 3rdparty/closure-compiler/compiler.jar rename to pdf2htmlEX/3rdparty/closure-compiler/compiler.jar diff --git a/3rdparty/poppler/COPYING3 b/pdf2htmlEX/3rdparty/poppler/COPYING3 similarity index 100% rename from 3rdparty/poppler/COPYING3 rename to pdf2htmlEX/3rdparty/poppler/COPYING3 diff --git a/3rdparty/poppler/git/CairoFontEngine.cc b/pdf2htmlEX/3rdparty/poppler/git/CairoFontEngine.cc similarity index 100% rename from 3rdparty/poppler/git/CairoFontEngine.cc rename to pdf2htmlEX/3rdparty/poppler/git/CairoFontEngine.cc diff --git a/3rdparty/poppler/git/CairoFontEngine.h b/pdf2htmlEX/3rdparty/poppler/git/CairoFontEngine.h similarity index 100% rename from 3rdparty/poppler/git/CairoFontEngine.h rename to pdf2htmlEX/3rdparty/poppler/git/CairoFontEngine.h diff --git a/3rdparty/poppler/git/CairoOutputDev.cc b/pdf2htmlEX/3rdparty/poppler/git/CairoOutputDev.cc similarity index 100% rename from 3rdparty/poppler/git/CairoOutputDev.cc rename to pdf2htmlEX/3rdparty/poppler/git/CairoOutputDev.cc diff --git a/3rdparty/poppler/git/CairoOutputDev.h b/pdf2htmlEX/3rdparty/poppler/git/CairoOutputDev.h similarity index 100% rename from 3rdparty/poppler/git/CairoOutputDev.h rename to pdf2htmlEX/3rdparty/poppler/git/CairoOutputDev.h diff --git a/3rdparty/poppler/git/CairoRescaleBox.cc b/pdf2htmlEX/3rdparty/poppler/git/CairoRescaleBox.cc similarity index 100% rename from 3rdparty/poppler/git/CairoRescaleBox.cc rename to pdf2htmlEX/3rdparty/poppler/git/CairoRescaleBox.cc diff --git a/3rdparty/poppler/git/CairoRescaleBox.h b/pdf2htmlEX/3rdparty/poppler/git/CairoRescaleBox.h similarity index 100% rename from 3rdparty/poppler/git/CairoRescaleBox.h rename to pdf2htmlEX/3rdparty/poppler/git/CairoRescaleBox.h diff --git a/3rdparty/yuicompressor/LICENSE.TXT b/pdf2htmlEX/3rdparty/yuicompressor/LICENSE.TXT similarity index 100% rename from 3rdparty/yuicompressor/LICENSE.TXT rename to pdf2htmlEX/3rdparty/yuicompressor/LICENSE.TXT diff --git a/3rdparty/yuicompressor/yuicompressor-2.4.8.jar b/pdf2htmlEX/3rdparty/yuicompressor/yuicompressor-2.4.8.jar similarity index 100% rename from 3rdparty/yuicompressor/yuicompressor-2.4.8.jar rename to pdf2htmlEX/3rdparty/yuicompressor/yuicompressor-2.4.8.jar diff --git a/CMakeLists.txt b/pdf2htmlEX/CMakeLists.txt similarity index 100% rename from CMakeLists.txt rename to pdf2htmlEX/CMakeLists.txt diff --git a/CMakeLists.txt.patch b/pdf2htmlEX/CMakeLists.txt.patch similarity index 100% rename from CMakeLists.txt.patch rename to pdf2htmlEX/CMakeLists.txt.patch diff --git a/logo/LICENSE b/pdf2htmlEX/logo/LICENSE similarity index 100% rename from logo/LICENSE rename to pdf2htmlEX/logo/LICENSE diff --git a/logo/LICENSE_CC-BY-3.0 b/pdf2htmlEX/logo/LICENSE_CC-BY-3.0 similarity index 100% rename from logo/LICENSE_CC-BY-3.0 rename to pdf2htmlEX/logo/LICENSE_CC-BY-3.0 diff --git a/logo/design.svg b/pdf2htmlEX/logo/design.svg similarity index 100% rename from logo/design.svg rename to pdf2htmlEX/logo/design.svg diff --git a/logo/notes.txt b/pdf2htmlEX/logo/notes.txt similarity index 100% rename from logo/notes.txt rename to pdf2htmlEX/logo/notes.txt diff --git a/logo/pdf2htmlEX-256x256.png b/pdf2htmlEX/logo/pdf2htmlEX-256x256.png similarity index 100% rename from logo/pdf2htmlEX-256x256.png rename to pdf2htmlEX/logo/pdf2htmlEX-256x256.png diff --git a/logo/pdf2htmlEX-64x64.png b/pdf2htmlEX/logo/pdf2htmlEX-64x64.png similarity index 100% rename from logo/pdf2htmlEX-64x64.png rename to pdf2htmlEX/logo/pdf2htmlEX-64x64.png diff --git a/logo/pdf2htmlEX.svg b/pdf2htmlEX/logo/pdf2htmlEX.svg similarity index 100% rename from logo/pdf2htmlEX.svg rename to pdf2htmlEX/logo/pdf2htmlEX.svg diff --git a/logo/update_png.sh b/pdf2htmlEX/logo/update_png.sh similarity index 100% rename from logo/update_png.sh rename to pdf2htmlEX/logo/update_png.sh diff --git a/pdf2htmlEX.1.in b/pdf2htmlEX/pdf2htmlEX.1.in similarity index 100% rename from pdf2htmlEX.1.in rename to pdf2htmlEX/pdf2htmlEX.1.in diff --git a/share/LICENSE b/pdf2htmlEX/share/LICENSE similarity index 100% rename from share/LICENSE rename to pdf2htmlEX/share/LICENSE diff --git a/share/base.css.in b/pdf2htmlEX/share/base.css.in similarity index 100% rename from share/base.css.in rename to pdf2htmlEX/share/base.css.in diff --git a/share/build_css.sh b/pdf2htmlEX/share/build_css.sh similarity index 100% rename from share/build_css.sh rename to pdf2htmlEX/share/build_css.sh diff --git a/share/build_js.sh b/pdf2htmlEX/share/build_js.sh similarity index 100% rename from share/build_js.sh rename to pdf2htmlEX/share/build_js.sh diff --git a/share/fancy.css.in b/pdf2htmlEX/share/fancy.css.in similarity index 100% rename from share/fancy.css.in rename to pdf2htmlEX/share/fancy.css.in diff --git a/share/manifest b/pdf2htmlEX/share/manifest similarity index 100% rename from share/manifest rename to pdf2htmlEX/share/manifest diff --git a/share/pdf2htmlEX-64x64.png b/pdf2htmlEX/share/pdf2htmlEX-64x64.png similarity index 100% rename from share/pdf2htmlEX-64x64.png rename to pdf2htmlEX/share/pdf2htmlEX-64x64.png diff --git a/share/pdf2htmlEX.js.in b/pdf2htmlEX/share/pdf2htmlEX.js.in similarity index 100% rename from share/pdf2htmlEX.js.in rename to pdf2htmlEX/share/pdf2htmlEX.js.in diff --git a/src/ArgParser.cc b/pdf2htmlEX/src/ArgParser.cc similarity index 100% rename from src/ArgParser.cc rename to pdf2htmlEX/src/ArgParser.cc diff --git a/src/ArgParser.h b/pdf2htmlEX/src/ArgParser.h similarity index 100% rename from src/ArgParser.h rename to pdf2htmlEX/src/ArgParser.h diff --git a/src/BackgroundRenderer/BackgroundRenderer.cc b/pdf2htmlEX/src/BackgroundRenderer/BackgroundRenderer.cc similarity index 100% rename from src/BackgroundRenderer/BackgroundRenderer.cc rename to pdf2htmlEX/src/BackgroundRenderer/BackgroundRenderer.cc diff --git a/src/BackgroundRenderer/BackgroundRenderer.h b/pdf2htmlEX/src/BackgroundRenderer/BackgroundRenderer.h similarity index 100% rename from src/BackgroundRenderer/BackgroundRenderer.h rename to pdf2htmlEX/src/BackgroundRenderer/BackgroundRenderer.h diff --git a/src/BackgroundRenderer/CairoBackgroundRenderer.cc b/pdf2htmlEX/src/BackgroundRenderer/CairoBackgroundRenderer.cc similarity index 100% rename from src/BackgroundRenderer/CairoBackgroundRenderer.cc rename to pdf2htmlEX/src/BackgroundRenderer/CairoBackgroundRenderer.cc diff --git a/src/BackgroundRenderer/CairoBackgroundRenderer.h b/pdf2htmlEX/src/BackgroundRenderer/CairoBackgroundRenderer.h similarity index 100% rename from src/BackgroundRenderer/CairoBackgroundRenderer.h rename to pdf2htmlEX/src/BackgroundRenderer/CairoBackgroundRenderer.h diff --git a/src/BackgroundRenderer/SplashBackgroundRenderer.cc b/pdf2htmlEX/src/BackgroundRenderer/SplashBackgroundRenderer.cc similarity index 100% rename from src/BackgroundRenderer/SplashBackgroundRenderer.cc rename to pdf2htmlEX/src/BackgroundRenderer/SplashBackgroundRenderer.cc diff --git a/src/BackgroundRenderer/SplashBackgroundRenderer.h b/pdf2htmlEX/src/BackgroundRenderer/SplashBackgroundRenderer.h similarity index 100% rename from src/BackgroundRenderer/SplashBackgroundRenderer.h rename to pdf2htmlEX/src/BackgroundRenderer/SplashBackgroundRenderer.h diff --git a/src/Base64Stream.cc b/pdf2htmlEX/src/Base64Stream.cc similarity index 100% rename from src/Base64Stream.cc rename to pdf2htmlEX/src/Base64Stream.cc diff --git a/src/Base64Stream.h b/pdf2htmlEX/src/Base64Stream.h similarity index 100% rename from src/Base64Stream.h rename to pdf2htmlEX/src/Base64Stream.h diff --git a/src/Color.cc b/pdf2htmlEX/src/Color.cc similarity index 100% rename from src/Color.cc rename to pdf2htmlEX/src/Color.cc diff --git a/src/Color.h b/pdf2htmlEX/src/Color.h similarity index 100% rename from src/Color.h rename to pdf2htmlEX/src/Color.h diff --git a/src/CoveredTextDetector.cc b/pdf2htmlEX/src/CoveredTextDetector.cc similarity index 100% rename from src/CoveredTextDetector.cc rename to pdf2htmlEX/src/CoveredTextDetector.cc diff --git a/src/CoveredTextDetector.h b/pdf2htmlEX/src/CoveredTextDetector.h similarity index 100% rename from src/CoveredTextDetector.h rename to pdf2htmlEX/src/CoveredTextDetector.h diff --git a/src/DrawingTracer.cc b/pdf2htmlEX/src/DrawingTracer.cc similarity index 100% rename from src/DrawingTracer.cc rename to pdf2htmlEX/src/DrawingTracer.cc diff --git a/src/DrawingTracer.h b/pdf2htmlEX/src/DrawingTracer.h similarity index 100% rename from src/DrawingTracer.h rename to pdf2htmlEX/src/DrawingTracer.h diff --git a/src/HTMLRenderer/HTMLRenderer.h b/pdf2htmlEX/src/HTMLRenderer/HTMLRenderer.h similarity index 100% rename from src/HTMLRenderer/HTMLRenderer.h rename to pdf2htmlEX/src/HTMLRenderer/HTMLRenderer.h diff --git a/src/HTMLRenderer/draw.cc b/pdf2htmlEX/src/HTMLRenderer/draw.cc similarity index 100% rename from src/HTMLRenderer/draw.cc rename to pdf2htmlEX/src/HTMLRenderer/draw.cc diff --git a/src/HTMLRenderer/font.cc b/pdf2htmlEX/src/HTMLRenderer/font.cc similarity index 100% rename from src/HTMLRenderer/font.cc rename to pdf2htmlEX/src/HTMLRenderer/font.cc diff --git a/src/HTMLRenderer/form.cc b/pdf2htmlEX/src/HTMLRenderer/form.cc similarity index 100% rename from src/HTMLRenderer/form.cc rename to pdf2htmlEX/src/HTMLRenderer/form.cc diff --git a/src/HTMLRenderer/general.cc b/pdf2htmlEX/src/HTMLRenderer/general.cc similarity index 100% rename from src/HTMLRenderer/general.cc rename to pdf2htmlEX/src/HTMLRenderer/general.cc diff --git a/src/HTMLRenderer/image.cc b/pdf2htmlEX/src/HTMLRenderer/image.cc similarity index 100% rename from src/HTMLRenderer/image.cc rename to pdf2htmlEX/src/HTMLRenderer/image.cc diff --git a/src/HTMLRenderer/link.cc b/pdf2htmlEX/src/HTMLRenderer/link.cc similarity index 100% rename from src/HTMLRenderer/link.cc rename to pdf2htmlEX/src/HTMLRenderer/link.cc diff --git a/src/HTMLRenderer/outline.cc b/pdf2htmlEX/src/HTMLRenderer/outline.cc similarity index 100% rename from src/HTMLRenderer/outline.cc rename to pdf2htmlEX/src/HTMLRenderer/outline.cc diff --git a/src/HTMLRenderer/state.cc b/pdf2htmlEX/src/HTMLRenderer/state.cc similarity index 100% rename from src/HTMLRenderer/state.cc rename to pdf2htmlEX/src/HTMLRenderer/state.cc diff --git a/src/HTMLRenderer/text.cc b/pdf2htmlEX/src/HTMLRenderer/text.cc similarity index 100% rename from src/HTMLRenderer/text.cc rename to pdf2htmlEX/src/HTMLRenderer/text.cc diff --git a/src/HTMLState.h b/pdf2htmlEX/src/HTMLState.h similarity index 100% rename from src/HTMLState.h rename to pdf2htmlEX/src/HTMLState.h diff --git a/src/HTMLTextLine.cc b/pdf2htmlEX/src/HTMLTextLine.cc similarity index 100% rename from src/HTMLTextLine.cc rename to pdf2htmlEX/src/HTMLTextLine.cc diff --git a/src/HTMLTextLine.h b/pdf2htmlEX/src/HTMLTextLine.h similarity index 100% rename from src/HTMLTextLine.h rename to pdf2htmlEX/src/HTMLTextLine.h diff --git a/src/HTMLTextPage.cc b/pdf2htmlEX/src/HTMLTextPage.cc similarity index 100% rename from src/HTMLTextPage.cc rename to pdf2htmlEX/src/HTMLTextPage.cc diff --git a/src/HTMLTextPage.h b/pdf2htmlEX/src/HTMLTextPage.h similarity index 100% rename from src/HTMLTextPage.h rename to pdf2htmlEX/src/HTMLTextPage.h diff --git a/src/Param.h b/pdf2htmlEX/src/Param.h similarity index 100% rename from src/Param.h rename to pdf2htmlEX/src/Param.h diff --git a/src/Preprocessor.cc b/pdf2htmlEX/src/Preprocessor.cc similarity index 100% rename from src/Preprocessor.cc rename to pdf2htmlEX/src/Preprocessor.cc diff --git a/src/Preprocessor.h b/pdf2htmlEX/src/Preprocessor.h similarity index 100% rename from src/Preprocessor.h rename to pdf2htmlEX/src/Preprocessor.h diff --git a/src/StateManager.h b/pdf2htmlEX/src/StateManager.h similarity index 100% rename from src/StateManager.h rename to pdf2htmlEX/src/StateManager.h diff --git a/src/StringFormatter.cc b/pdf2htmlEX/src/StringFormatter.cc similarity index 100% rename from src/StringFormatter.cc rename to pdf2htmlEX/src/StringFormatter.cc diff --git a/src/StringFormatter.h b/pdf2htmlEX/src/StringFormatter.h similarity index 100% rename from src/StringFormatter.h rename to pdf2htmlEX/src/StringFormatter.h diff --git a/src/TmpFiles.cc b/pdf2htmlEX/src/TmpFiles.cc similarity index 100% rename from src/TmpFiles.cc rename to pdf2htmlEX/src/TmpFiles.cc diff --git a/src/TmpFiles.h b/pdf2htmlEX/src/TmpFiles.h similarity index 100% rename from src/TmpFiles.h rename to pdf2htmlEX/src/TmpFiles.h diff --git a/src/css_class_names.cmakelists.txt b/pdf2htmlEX/src/css_class_names.cmakelists.txt similarity index 100% rename from src/css_class_names.cmakelists.txt rename to pdf2htmlEX/src/css_class_names.cmakelists.txt diff --git a/src/pdf2htmlEX-config.h.in b/pdf2htmlEX/src/pdf2htmlEX-config.h.in similarity index 100% rename from src/pdf2htmlEX-config.h.in rename to pdf2htmlEX/src/pdf2htmlEX-config.h.in diff --git a/src/pdf2htmlEX.cc b/pdf2htmlEX/src/pdf2htmlEX.cc similarity index 100% rename from src/pdf2htmlEX.cc rename to pdf2htmlEX/src/pdf2htmlEX.cc diff --git a/src/util/const.cc b/pdf2htmlEX/src/util/const.cc similarity index 100% rename from src/util/const.cc rename to pdf2htmlEX/src/util/const.cc diff --git a/src/util/const.h b/pdf2htmlEX/src/util/const.h similarity index 100% rename from src/util/const.h rename to pdf2htmlEX/src/util/const.h diff --git a/src/util/css_const.h.in b/pdf2htmlEX/src/util/css_const.h.in similarity index 100% rename from src/util/css_const.h.in rename to pdf2htmlEX/src/util/css_const.h.in diff --git a/src/util/encoding.cc b/pdf2htmlEX/src/util/encoding.cc similarity index 100% rename from src/util/encoding.cc rename to pdf2htmlEX/src/util/encoding.cc diff --git a/src/util/encoding.h b/pdf2htmlEX/src/util/encoding.h similarity index 100% rename from src/util/encoding.h rename to pdf2htmlEX/src/util/encoding.h diff --git a/src/util/ffw.c b/pdf2htmlEX/src/util/ffw.c similarity index 100% rename from src/util/ffw.c rename to pdf2htmlEX/src/util/ffw.c diff --git a/src/util/ffw.h b/pdf2htmlEX/src/util/ffw.h similarity index 100% rename from src/util/ffw.h rename to pdf2htmlEX/src/util/ffw.h diff --git a/src/util/fontforge-2.0.20170731/autowidth.h b/pdf2htmlEX/src/util/fontforge-2.0.20170731/autowidth.h similarity index 100% rename from src/util/fontforge-2.0.20170731/autowidth.h rename to pdf2htmlEX/src/util/fontforge-2.0.20170731/autowidth.h diff --git a/src/util/fontforge-2.0.20170731/bitmapchar.h b/pdf2htmlEX/src/util/fontforge-2.0.20170731/bitmapchar.h similarity index 100% rename from src/util/fontforge-2.0.20170731/bitmapchar.h rename to pdf2htmlEX/src/util/fontforge-2.0.20170731/bitmapchar.h diff --git a/src/util/fontforge-2.0.20170731/cvimages.h b/pdf2htmlEX/src/util/fontforge-2.0.20170731/cvimages.h similarity index 100% rename from src/util/fontforge-2.0.20170731/cvimages.h rename to pdf2htmlEX/src/util/fontforge-2.0.20170731/cvimages.h diff --git a/src/util/fontforge-2.0.20170731/encoding.h b/pdf2htmlEX/src/util/fontforge-2.0.20170731/encoding.h similarity index 100% rename from src/util/fontforge-2.0.20170731/encoding.h rename to pdf2htmlEX/src/util/fontforge-2.0.20170731/encoding.h diff --git a/src/util/fontforge-2.0.20170731/fvfonts.h b/pdf2htmlEX/src/util/fontforge-2.0.20170731/fvfonts.h similarity index 100% rename from src/util/fontforge-2.0.20170731/fvfonts.h rename to pdf2htmlEX/src/util/fontforge-2.0.20170731/fvfonts.h diff --git a/src/util/fontforge-2.0.20170731/namelist.h b/pdf2htmlEX/src/util/fontforge-2.0.20170731/namelist.h similarity index 100% rename from src/util/fontforge-2.0.20170731/namelist.h rename to pdf2htmlEX/src/util/fontforge-2.0.20170731/namelist.h diff --git a/src/util/fontforge-2.0.20170731/savefont.h b/pdf2htmlEX/src/util/fontforge-2.0.20170731/savefont.h similarity index 100% rename from src/util/fontforge-2.0.20170731/savefont.h rename to pdf2htmlEX/src/util/fontforge-2.0.20170731/savefont.h diff --git a/src/util/fontforge-2.0.20170731/splineorder2.h b/pdf2htmlEX/src/util/fontforge-2.0.20170731/splineorder2.h similarity index 100% rename from src/util/fontforge-2.0.20170731/splineorder2.h rename to pdf2htmlEX/src/util/fontforge-2.0.20170731/splineorder2.h diff --git a/src/util/fontforge-2.0.20170731/splineutil.h b/pdf2htmlEX/src/util/fontforge-2.0.20170731/splineutil.h similarity index 100% rename from src/util/fontforge-2.0.20170731/splineutil.h rename to pdf2htmlEX/src/util/fontforge-2.0.20170731/splineutil.h diff --git a/src/util/fontforge-2.0.20170731/splineutil2.h b/pdf2htmlEX/src/util/fontforge-2.0.20170731/splineutil2.h similarity index 100% rename from src/util/fontforge-2.0.20170731/splineutil2.h rename to pdf2htmlEX/src/util/fontforge-2.0.20170731/splineutil2.h diff --git a/src/util/fontforge-2.0.20170731/start.h b/pdf2htmlEX/src/util/fontforge-2.0.20170731/start.h similarity index 100% rename from src/util/fontforge-2.0.20170731/start.h rename to pdf2htmlEX/src/util/fontforge-2.0.20170731/start.h diff --git a/src/util/fontforge-2.0.20170731/tottf.h b/pdf2htmlEX/src/util/fontforge-2.0.20170731/tottf.h similarity index 100% rename from src/util/fontforge-2.0.20170731/tottf.h rename to pdf2htmlEX/src/util/fontforge-2.0.20170731/tottf.h diff --git a/src/util/fontforge-2.0.20170731/views.h b/pdf2htmlEX/src/util/fontforge-2.0.20170731/views.h similarity index 100% rename from src/util/fontforge-2.0.20170731/views.h rename to pdf2htmlEX/src/util/fontforge-2.0.20170731/views.h diff --git a/src/util/math.cc b/pdf2htmlEX/src/util/math.cc similarity index 100% rename from src/util/math.cc rename to pdf2htmlEX/src/util/math.cc diff --git a/src/util/math.h b/pdf2htmlEX/src/util/math.h similarity index 100% rename from src/util/math.h rename to pdf2htmlEX/src/util/math.h diff --git a/src/util/mingw.cc b/pdf2htmlEX/src/util/mingw.cc similarity index 100% rename from src/util/mingw.cc rename to pdf2htmlEX/src/util/mingw.cc diff --git a/src/util/mingw.h b/pdf2htmlEX/src/util/mingw.h similarity index 100% rename from src/util/mingw.h rename to pdf2htmlEX/src/util/mingw.h diff --git a/src/util/misc.cc b/pdf2htmlEX/src/util/misc.cc similarity index 100% rename from src/util/misc.cc rename to pdf2htmlEX/src/util/misc.cc diff --git a/src/util/misc.h b/pdf2htmlEX/src/util/misc.h similarity index 100% rename from src/util/misc.h rename to pdf2htmlEX/src/util/misc.h diff --git a/src/util/namespace.h b/pdf2htmlEX/src/util/namespace.h similarity index 100% rename from src/util/namespace.h rename to pdf2htmlEX/src/util/namespace.h diff --git a/src/util/path.cc b/pdf2htmlEX/src/util/path.cc similarity index 100% rename from src/util/path.cc rename to pdf2htmlEX/src/util/path.cc diff --git a/src/util/path.h b/pdf2htmlEX/src/util/path.h similarity index 100% rename from src/util/path.h rename to pdf2htmlEX/src/util/path.h diff --git a/src/util/unicode.cc b/pdf2htmlEX/src/util/unicode.cc similarity index 100% rename from src/util/unicode.cc rename to pdf2htmlEX/src/util/unicode.cc diff --git a/src/util/unicode.h b/pdf2htmlEX/src/util/unicode.h similarity index 100% rename from src/util/unicode.h rename to pdf2htmlEX/src/util/unicode.h diff --git a/test/.gitattributes b/pdf2htmlEX/test/.gitattributes similarity index 100% rename from test/.gitattributes rename to pdf2htmlEX/test/.gitattributes diff --git a/test/README.md b/pdf2htmlEX/test/README.md similarity index 100% rename from test/README.md rename to pdf2htmlEX/test/README.md diff --git a/test/browser_tests.py b/pdf2htmlEX/test/browser_tests.py similarity index 100% rename from test/browser_tests.py rename to pdf2htmlEX/test/browser_tests.py diff --git a/test/browser_tests/basic_text.pdf b/pdf2htmlEX/test/browser_tests/basic_text.pdf similarity index 100% rename from test/browser_tests/basic_text.pdf rename to pdf2htmlEX/test/browser_tests/basic_text.pdf diff --git a/test/browser_tests/basic_text.tex b/pdf2htmlEX/test/browser_tests/basic_text.tex similarity index 100% rename from test/browser_tests/basic_text.tex rename to pdf2htmlEX/test/browser_tests/basic_text.tex diff --git a/test/browser_tests/basic_text/basic_text.html b/pdf2htmlEX/test/browser_tests/basic_text/basic_text.html similarity index 100% rename from test/browser_tests/basic_text/basic_text.html rename to pdf2htmlEX/test/browser_tests/basic_text/basic_text.html diff --git a/test/browser_tests/fontfile3_opentype.pdf b/pdf2htmlEX/test/browser_tests/fontfile3_opentype.pdf similarity index 100% rename from test/browser_tests/fontfile3_opentype.pdf rename to pdf2htmlEX/test/browser_tests/fontfile3_opentype.pdf diff --git a/test/browser_tests/fontfile3_opentype/fontfile3_opentype.html b/pdf2htmlEX/test/browser_tests/fontfile3_opentype/fontfile3_opentype.html similarity index 100% rename from test/browser_tests/fontfile3_opentype/fontfile3_opentype.html rename to pdf2htmlEX/test/browser_tests/fontfile3_opentype/fontfile3_opentype.html diff --git a/test/browser_tests/geneve_1564.pdf b/pdf2htmlEX/test/browser_tests/geneve_1564.pdf similarity index 100% rename from test/browser_tests/geneve_1564.pdf rename to pdf2htmlEX/test/browser_tests/geneve_1564.pdf diff --git a/test/browser_tests/geneve_1564/geneve_1564.html b/pdf2htmlEX/test/browser_tests/geneve_1564/geneve_1564.html similarity index 100% rename from test/browser_tests/geneve_1564/geneve_1564.html rename to pdf2htmlEX/test/browser_tests/geneve_1564/geneve_1564.html diff --git a/test/browser_tests/invalid_unicode_issue477.pdf b/pdf2htmlEX/test/browser_tests/invalid_unicode_issue477.pdf similarity index 100% rename from test/browser_tests/invalid_unicode_issue477.pdf rename to pdf2htmlEX/test/browser_tests/invalid_unicode_issue477.pdf diff --git a/test/browser_tests/invalid_unicode_issue477/invalid_unicode_issue477.html b/pdf2htmlEX/test/browser_tests/invalid_unicode_issue477/invalid_unicode_issue477.html similarity index 100% rename from test/browser_tests/invalid_unicode_issue477/invalid_unicode_issue477.html rename to pdf2htmlEX/test/browser_tests/invalid_unicode_issue477/invalid_unicode_issue477.html diff --git a/test/browser_tests/svg_background_with_page_rotation_issue402.pdf b/pdf2htmlEX/test/browser_tests/svg_background_with_page_rotation_issue402.pdf similarity index 100% rename from test/browser_tests/svg_background_with_page_rotation_issue402.pdf rename to pdf2htmlEX/test/browser_tests/svg_background_with_page_rotation_issue402.pdf diff --git a/test/browser_tests/svg_background_with_page_rotation_issue402/svg_background_with_page_rotation_issue402.html b/pdf2htmlEX/test/browser_tests/svg_background_with_page_rotation_issue402/svg_background_with_page_rotation_issue402.html similarity index 100% rename from test/browser_tests/svg_background_with_page_rotation_issue402/svg_background_with_page_rotation_issue402.html rename to pdf2htmlEX/test/browser_tests/svg_background_with_page_rotation_issue402/svg_background_with_page_rotation_issue402.html diff --git a/test/browser_tests/test_fail.pdf b/pdf2htmlEX/test/browser_tests/test_fail.pdf similarity index 100% rename from test/browser_tests/test_fail.pdf rename to pdf2htmlEX/test/browser_tests/test_fail.pdf diff --git a/test/browser_tests/test_fail.tex b/pdf2htmlEX/test/browser_tests/test_fail.tex similarity index 100% rename from test/browser_tests/test_fail.tex rename to pdf2htmlEX/test/browser_tests/test_fail.tex diff --git a/test/browser_tests/test_fail/THIS_FOLDER_SHOULD_BE_EMPTY b/pdf2htmlEX/test/browser_tests/test_fail/THIS_FOLDER_SHOULD_BE_EMPTY similarity index 100% rename from test/browser_tests/test_fail/THIS_FOLDER_SHOULD_BE_EMPTY rename to pdf2htmlEX/test/browser_tests/test_fail/THIS_FOLDER_SHOULD_BE_EMPTY diff --git a/test/browser_tests/text_visibility.pdf b/pdf2htmlEX/test/browser_tests/text_visibility.pdf similarity index 100% rename from test/browser_tests/text_visibility.pdf rename to pdf2htmlEX/test/browser_tests/text_visibility.pdf diff --git a/test/browser_tests/text_visibility/text_visibility.html b/pdf2htmlEX/test/browser_tests/text_visibility/text_visibility.html similarity index 100% rename from test/browser_tests/text_visibility/text_visibility.html rename to pdf2htmlEX/test/browser_tests/text_visibility/text_visibility.html diff --git a/test/browser_tests/with_form.pdf b/pdf2htmlEX/test/browser_tests/with_form.pdf similarity index 100% rename from test/browser_tests/with_form.pdf rename to pdf2htmlEX/test/browser_tests/with_form.pdf diff --git a/test/browser_tests/with_form/with_form.html b/pdf2htmlEX/test/browser_tests/with_form/with_form.html similarity index 100% rename from test/browser_tests/with_form/with_form.html rename to pdf2htmlEX/test/browser_tests/with_form/with_form.html diff --git a/test/fancy.min.css b/pdf2htmlEX/test/fancy.min.css similarity index 100% rename from test/fancy.min.css rename to pdf2htmlEX/test/fancy.min.css diff --git a/test/old/convert_to_woff.fontforge b/pdf2htmlEX/test/old/convert_to_woff.fontforge similarity index 100% rename from test/old/convert_to_woff.fontforge rename to pdf2htmlEX/test/old/convert_to_woff.fontforge diff --git a/test/old/test.py b/pdf2htmlEX/test/old/test.py similarity index 100% rename from test/old/test.py rename to pdf2htmlEX/test/old/test.py diff --git a/test/start_xvfb.sh b/pdf2htmlEX/test/start_xvfb.sh similarity index 100% rename from test/start_xvfb.sh rename to pdf2htmlEX/test/start_xvfb.sh diff --git a/test/test.py.in b/pdf2htmlEX/test/test.py.in similarity index 100% rename from test/test.py.in rename to pdf2htmlEX/test/test.py.in diff --git a/test/test_local_browser.py b/pdf2htmlEX/test/test_local_browser.py similarity index 100% rename from test/test_local_browser.py rename to pdf2htmlEX/test/test_local_browser.py diff --git a/test/test_output.py b/pdf2htmlEX/test/test_output.py similarity index 100% rename from test/test_output.py rename to pdf2htmlEX/test/test_output.py diff --git a/test/test_output/1-page.pdf b/pdf2htmlEX/test/test_output/1-page.pdf similarity index 100% rename from test/test_output/1-page.pdf rename to pdf2htmlEX/test/test_output/1-page.pdf diff --git a/test/test_output/2-pages.pdf b/pdf2htmlEX/test/test_output/2-pages.pdf similarity index 100% rename from test/test_output/2-pages.pdf rename to pdf2htmlEX/test/test_output/2-pages.pdf diff --git a/test/test_output/3-pages.pdf b/pdf2htmlEX/test/test_output/3-pages.pdf similarity index 100% rename from test/test_output/3-pages.pdf rename to pdf2htmlEX/test/test_output/3-pages.pdf diff --git a/test/test_output/issue501 b/pdf2htmlEX/test/test_output/issue501 similarity index 100% rename from test/test_output/issue501 rename to pdf2htmlEX/test/test_output/issue501 diff --git a/test/test_remote_browser.py b/pdf2htmlEX/test/test_remote_browser.py similarity index 100% rename from test/test_remote_browser.py rename to pdf2htmlEX/test/test_remote_browser.py From 87ecadd58969d93dc1ed205db067d2069d4ee248 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 13:31:28 +0000 Subject: [PATCH 002/128] added buildScripts --- .gitignore | 1 + buildScripts/buildFontforge | 4 +++ .../{dobuildPdf2htmlEX => buildPdf2htmlEX} | 0 ...ldPdf2htmlEXClang => buildPdf2htmlEXClang} | 0 buildScripts/buildPoppler | 10 ++++++ .../{docleanPdf2htmlEX => cleanPdf2htmlEX} | 0 buildScripts/getFontforge | 8 +++++ buildScripts/getPoppler | 15 +++++++++ buildScripts/installFontforge | 26 +++++++++++++++ ...{doinstallPdf2htmlEX => installPdf2htmlEX} | 0 buildScripts/installPoppler | 32 +++++++++++++++++++ buildScripts/versionEnvs | 9 ++++++ 12 files changed, 105 insertions(+) create mode 100755 buildScripts/buildFontforge rename buildScripts/{dobuildPdf2htmlEX => buildPdf2htmlEX} (100%) rename buildScripts/{dobuildPdf2htmlEXClang => buildPdf2htmlEXClang} (100%) create mode 100755 buildScripts/buildPoppler rename buildScripts/{docleanPdf2htmlEX => cleanPdf2htmlEX} (100%) create mode 100755 buildScripts/getFontforge create mode 100755 buildScripts/getPoppler create mode 100755 buildScripts/installFontforge rename buildScripts/{doinstallPdf2htmlEX => installPdf2htmlEX} (100%) create mode 100755 buildScripts/installPoppler create mode 100644 buildScripts/versionEnvs diff --git a/.gitignore b/.gitignore index c49977f..fb14b58 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +poppler* build compile_commands.json CMakeCache.txt diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge new file mode 100755 index 0000000..2177738 --- /dev/null +++ b/buildScripts/buildFontforge @@ -0,0 +1,4 @@ +cd fontforge; +./bootstrap; +./configure; +make; diff --git a/buildScripts/dobuildPdf2htmlEX b/buildScripts/buildPdf2htmlEX similarity index 100% rename from buildScripts/dobuildPdf2htmlEX rename to buildScripts/buildPdf2htmlEX diff --git a/buildScripts/dobuildPdf2htmlEXClang b/buildScripts/buildPdf2htmlEXClang similarity index 100% rename from buildScripts/dobuildPdf2htmlEXClang rename to buildScripts/buildPdf2htmlEXClang diff --git a/buildScripts/buildPoppler b/buildScripts/buildPoppler new file mode 100755 index 0000000..2cda28c --- /dev/null +++ b/buildScripts/buildPoppler @@ -0,0 +1,10 @@ +#!/bin/bash + +# This bash script builds the latest poppler + +cd poppler +mkdir build +cd build +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \ + -DENABLE_LIBOPENJPEG=none .. +make diff --git a/buildScripts/docleanPdf2htmlEX b/buildScripts/cleanPdf2htmlEX similarity index 100% rename from buildScripts/docleanPdf2htmlEX rename to buildScripts/cleanPdf2htmlEX diff --git a/buildScripts/getFontforge b/buildScripts/getFontforge new file mode 100755 index 0000000..d1094f7 --- /dev/null +++ b/buildScripts/getFontforge @@ -0,0 +1,8 @@ +#!/bin/bash + +# This bash script gets and unpacks the latest fontforge AppImage + +sudo add-apt-repository ppa:fontforge/fontforge +sudo apt-get update +sudo apt-get install libfontforge-dev + diff --git a/buildScripts/getPoppler b/buildScripts/getPoppler new file mode 100755 index 0000000..1fce35d --- /dev/null +++ b/buildScripts/getPoppler @@ -0,0 +1,15 @@ +#!/bin/bash + +# This bash script gets and unpacks the latest Poppler source code + +source buildScripts/versionEnvs + +echo "Getting poppler version: $POPPLER_VERSION" + +rm -rf $POPPLER_VERSION.tar.xz + +wget https://poppler.freedesktop.org/$POPPLER_VERSION.tar.xz + +tar xvf $POPPLER_VERSION.tar.xz + +mv $POPPLER_VERSION poppler diff --git a/buildScripts/installFontforge b/buildScripts/installFontforge new file mode 100755 index 0000000..7c57186 --- /dev/null +++ b/buildScripts/installFontforge @@ -0,0 +1,26 @@ +#!/bin/bash + +echo "This installation assumes you have 'sudo' privileges" +echo "Type ctrl-c now if DO NOT want to continue" +read -p "Type anything else to continue: " + +cd poppler +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 diff --git a/buildScripts/doinstallPdf2htmlEX b/buildScripts/installPdf2htmlEX similarity index 100% rename from buildScripts/doinstallPdf2htmlEX rename to buildScripts/installPdf2htmlEX diff --git a/buildScripts/installPoppler b/buildScripts/installPoppler new file mode 100755 index 0000000..605e0b3 --- /dev/null +++ b/buildScripts/installPoppler @@ -0,0 +1,32 @@ +#!/bin/bash + +# 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: " + +cd poppler/build +sudo make install + +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 diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs new file mode 100644 index 0000000..4a97bb0 --- /dev/null +++ b/buildScripts/versionEnvs @@ -0,0 +1,9 @@ +#!/bin/bash + +# This bash script exports environment variables for the latest software +# versions + +export POPPLER_VERSION=poppler-0.82.0 +export FONTFORGE_VERSION=20190801 + +export FONTFORGE_APPIMAGE=https://github.com/fontforge/fontforge/releases/download/20190801/FontForge-2019-08-01-ac635b8-x86_64.AppImage From 3f943cddeb1c1b82d57b2482c7f337c0032a9cb7 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 14:13:14 +0000 Subject: [PATCH 003/128] updated getFontForge --- .gitignore | 2 ++ buildScripts/getFontforge | 21 ++++++++++++++++++--- buildScripts/getPoppler | 1 + buildScripts/versionEnvs | 2 +- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index fb14b58..d2f4091 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +fontforge* +FontForge* poppler* build compile_commands.json diff --git a/buildScripts/getFontforge b/buildScripts/getFontforge index d1094f7..90caf9d 100755 --- a/buildScripts/getFontforge +++ b/buildScripts/getFontforge @@ -2,7 +2,22 @@ # This bash script gets and unpacks the latest fontforge AppImage -sudo add-apt-repository ppa:fontforge/fontforge -sudo apt-get update -sudo apt-get install libfontforge-dev +# The ppa is "rather old" ;-( +#sudo add-apt-repository ppa:fontforge/fontforge +#sudo apt-get update +#sudo apt-get install libfontforge-dev + +source buildScripts/versionEnvs + +rm -rf $FONTFORGE_APPIMAGE +rm -rf squashfs-root +rm -rf fontforge + +wget https://github.com/fontforge/fontforge/releases/download/$FONTFORGE_VERSION/$FONTFORGE_APPIMAGE + +chmod a+x $FONTFORGE_APPIMAGE + +./$FONTFORGE_APPIMAGE --appimage-extract + +mv squashfs-root fontforge diff --git a/buildScripts/getPoppler b/buildScripts/getPoppler index 1fce35d..ce9474f 100755 --- a/buildScripts/getPoppler +++ b/buildScripts/getPoppler @@ -7,6 +7,7 @@ source buildScripts/versionEnvs echo "Getting poppler version: $POPPLER_VERSION" rm -rf $POPPLER_VERSION.tar.xz +rm -rf poppler wget https://poppler.freedesktop.org/$POPPLER_VERSION.tar.xz diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index 4a97bb0..e53354a 100644 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -6,4 +6,4 @@ export POPPLER_VERSION=poppler-0.82.0 export FONTFORGE_VERSION=20190801 -export FONTFORGE_APPIMAGE=https://github.com/fontforge/fontforge/releases/download/20190801/FontForge-2019-08-01-ac635b8-x86_64.AppImage +export FONTFORGE_APPIMAGE=FontForge-2019-08-01-ac635b8-x86_64.AppImage From 4a6f578e55668ffe4f250e1c19c3ce9fcfe72743 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 14:24:29 +0000 Subject: [PATCH 004/128] updated getFontForge to simply get the source --- buildScripts/getFontforge | 19 ++++++------------- buildScripts/versionEnvs | 4 +--- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/buildScripts/getFontforge b/buildScripts/getFontforge index 90caf9d..b5790a2 100755 --- a/buildScripts/getFontforge +++ b/buildScripts/getFontforge @@ -2,22 +2,15 @@ # This bash script gets and unpacks the latest fontforge AppImage -# The ppa is "rather old" ;-( -#sudo add-apt-repository ppa:fontforge/fontforge -#sudo apt-get update -#sudo apt-get install libfontforge-dev - source buildScripts/versionEnvs -rm -rf $FONTFORGE_APPIMAGE -rm -rf squashfs-root +FONTFORGE_SRC=fontforge-$FONTFORGE_VERSION.tar.gz + +rm -rf $FONTFORGE_SRC rm -rf fontforge -wget https://github.com/fontforge/fontforge/releases/download/$FONTFORGE_VERSION/$FONTFORGE_APPIMAGE +wget https://github.com/fontforge/fontforge/releases/download/$FONTFORGE_VERSION/$FONTFORGE_SRC -chmod a+x $FONTFORGE_APPIMAGE - -./$FONTFORGE_APPIMAGE --appimage-extract - -mv squashfs-root fontforge +tar xvf $FONTFORGE_SRC +mv fontforge-$FONTFORGE_VERSION fontforge diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index e53354a..2a6e589 100644 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -1,9 +1,7 @@ #!/bin/bash -# This bash script exports environment variables for the latest software +# This bash script exports environment variables for the latest software # versions export POPPLER_VERSION=poppler-0.82.0 export FONTFORGE_VERSION=20190801 - -export FONTFORGE_APPIMAGE=FontForge-2019-08-01-ac635b8-x86_64.AppImage From 4a29b8bc1503f0a2a6b63accafd65fc05259a7f6 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 15:36:04 +0000 Subject: [PATCH 005/128] added apt based get scripts --- buildScripts/getBuildTools | 15 +++++++++++++++ buildScripts/getDevLibraries | 14 ++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 buildScripts/getBuildTools create mode 100644 buildScripts/getDevLibraries diff --git a/buildScripts/getBuildTools b/buildScripts/getBuildTools new file mode 100644 index 0000000..34cfb5a --- /dev/null +++ b/buildScripts/getBuildTools @@ -0,0 +1,15 @@ +#!/bin/bash + +# This bash script automates getting the required build tools (apt install) + +sudo apt install \ + aptitude \ + git \ + pkg-config \ + ruby \ + cmake \ + make \ + gcc \ + g++ \ + tree + diff --git a/buildScripts/getDevLibraries b/buildScripts/getDevLibraries new file mode 100644 index 0000000..5c76724 --- /dev/null +++ b/buildScripts/getDevLibraries @@ -0,0 +1,14 @@ +#!/bin/bash + +# This bash script automates the getting of the development libraries +# required to build poppler and fontforge + +sudo apt install \ + libcairo-dev \ + libspiro-dev \ + libpng-dev \ + libjpeg-dev \ + poppler-data \ + libpango1.0-dev \ + liblcms2-dev + From 1bf18efff91451a783b6b9fddccb3bbd36c91b0f Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 15:37:18 +0000 Subject: [PATCH 006/128] added apt based get scripts --- buildScripts/getBuildTools | 0 buildScripts/getDevLibraries | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 buildScripts/getBuildTools mode change 100644 => 100755 buildScripts/getDevLibraries diff --git a/buildScripts/getBuildTools b/buildScripts/getBuildTools old mode 100644 new mode 100755 diff --git a/buildScripts/getDevLibraries b/buildScripts/getDevLibraries old mode 100644 new mode 100755 From 42244c55b74b8adf243c0e4ca816e9255d4508ef Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 15:42:49 +0000 Subject: [PATCH 007/128] added getPdf2htmlEX --- buildScripts/getPdf2htmlEX | 16 ++++++++++++++++ buildScripts/versionEnvs | 1 + 2 files changed, 17 insertions(+) create mode 100755 buildScripts/getPdf2htmlEX diff --git a/buildScripts/getPdf2htmlEX b/buildScripts/getPdf2htmlEX new file mode 100755 index 0000000..ff311bd --- /dev/null +++ b/buildScripts/getPdf2htmlEX @@ -0,0 +1,16 @@ +#!/bin/bash + +# This bash script automates the process of getting the original pdf2htmlEX +# source + +PDF2HTMLEX_VERSION=newBuildSystem + +wget https://codeload.github.com/stephengaito/pdf2htmlEX/zip/$PDF2HTMLEX_VERSION + +mv $PDF2HTMLEX_VERSION $PDF2HTMLEX_VERSION.zip + +sudo apt get unzip + +unzip $PDF2HTMLEX_VERSION.zip + +mv pdf2htmlEX-$PDF2HTMLEX_VERSION pdf2htmlEX diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index 2a6e589..c4e9ed4 100644 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -5,3 +5,4 @@ export POPPLER_VERSION=poppler-0.82.0 export FONTFORGE_VERSION=20190801 +export PDF2HTMLEX_VERSION=newBuildSystem From 2e618dbac4e2d25a5d29f0fb70a443d4f99cf0ac Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 15:45:52 +0000 Subject: [PATCH 008/128] turned travis off for the moment --- .travis.yml => .travis.yml.off | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .travis.yml => .travis.yml.off (100%) diff --git a/.travis.yml b/.travis.yml.off similarity index 100% rename from .travis.yml rename to .travis.yml.off From f82e1cbd585fb28432f03c8339ed19216fa8a9ed Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 15:54:21 +0000 Subject: [PATCH 009/128] corrected the apt get scripts --- buildScripts/getBuildTools | 23 +++++++++++++---------- buildScripts/getDevLibraries | 21 ++++++++++++--------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/buildScripts/getBuildTools b/buildScripts/getBuildTools index 34cfb5a..711532d 100755 --- a/buildScripts/getBuildTools +++ b/buildScripts/getBuildTools @@ -2,14 +2,17 @@ # This bash script automates getting the required build tools (apt install) -sudo apt install \ - aptitude \ - git \ - pkg-config \ - ruby \ - cmake \ - make \ - gcc \ - g++ \ - tree +# set the bash environment variable 'UNATTENDED' to '--assume-yes' for +# unattended use (for example in the .travis.yml script) + +sudo apt $UNATTENDED install \ + aptitude \ + git \ + pkg-config \ + ruby \ + cmake \ + make \ + gcc \ + g++ \ + tree diff --git a/buildScripts/getDevLibraries b/buildScripts/getDevLibraries index 5c76724..63d7a68 100755 --- a/buildScripts/getDevLibraries +++ b/buildScripts/getDevLibraries @@ -1,14 +1,17 @@ #!/bin/bash -# This bash script automates the getting of the development libraries -# required to build poppler and fontforge +# This bash script automates getting the development libraries required to +# build poppler and fontforge -sudo apt install \ - libcairo-dev \ - libspiro-dev \ - libpng-dev \ - libjpeg-dev \ - poppler-data \ - libpango1.0-dev \ +# set the bash environment variable 'UNATTENDED' to '--assume-yes' for +# unattended use (for example in the .travis.yml script) + +sudo apt $UNATTENDED install \ + libcairo-dev \ + libspiro-dev \ + libpng-dev \ + libjpeg-dev \ + poppler-data \ + libpango1.0-dev \ liblcms2-dev From 9f48bcd107310b80b8140ee11d6c897aecce5244 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 16:03:35 +0000 Subject: [PATCH 010/128] updated build scripts --- buildScripts/buildFontforge | 8 ++++---- buildScripts/buildPdf2htmlEX | 4 ++-- buildScripts/buildPoppler | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 2177738..8168b08 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -1,4 +1,4 @@ -cd fontforge; -./bootstrap; -./configure; -make; +cd fontforge +./bootstrap +./configure +make -j `nproc` diff --git a/buildScripts/buildPdf2htmlEX b/buildScripts/buildPdf2htmlEX index 97e5ac1..399912c 100755 --- a/buildScripts/buildPdf2htmlEX +++ b/buildScripts/buildPdf2htmlEX @@ -1,4 +1,4 @@ mkdir build cd build -cmake .. -make +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. +make -j `nproc` diff --git a/buildScripts/buildPoppler b/buildScripts/buildPoppler index 2cda28c..c9e6a98 100755 --- a/buildScripts/buildPoppler +++ b/buildScripts/buildPoppler @@ -7,4 +7,4 @@ mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \ -DENABLE_LIBOPENJPEG=none .. -make +make -j `nproc` From 03bdc9bda76d35707f12bb8d5ed1c8566a4e414c Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 16:33:24 +0000 Subject: [PATCH 011/128] continued correcting buildscripts --- buildScripts/getBuildTools | 1 + buildScripts/getDevLibraries | 4 +++- buildScripts/installFontforge | 9 +++++++-- buildScripts/installPoppler | 12 ++++++------ buildScripts/versionEnvs | 6 ++++-- 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/buildScripts/getBuildTools b/buildScripts/getBuildTools index 711532d..5d02109 100755 --- a/buildScripts/getBuildTools +++ b/buildScripts/getBuildTools @@ -14,5 +14,6 @@ sudo apt $UNATTENDED install \ make \ gcc \ g++ \ + gettext \ tree diff --git a/buildScripts/getDevLibraries b/buildScripts/getDevLibraries index 63d7a68..eab6818 100755 --- a/buildScripts/getDevLibraries +++ b/buildScripts/getDevLibraries @@ -13,5 +13,7 @@ sudo apt $UNATTENDED install \ libjpeg-dev \ poppler-data \ libpango1.0-dev \ - liblcms2-dev + liblcms2-dev \ + libxml2-dev \ + libuninameslist-dev diff --git a/buildScripts/installFontforge b/buildScripts/installFontforge index 7c57186..e5eb120 100755 --- a/buildScripts/installFontforge +++ b/buildScripts/installFontforge @@ -1,10 +1,15 @@ #!/bin/bash -echo "This installation assumes you have 'sudo' privileges" +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: " -cd poppler +cd fontforge sudo make install sudo ldconfig; diff --git a/buildScripts/installPoppler b/buildScripts/installPoppler index 605e0b3..6b5f540 100755 --- a/buildScripts/installPoppler +++ b/buildScripts/installPoppler @@ -14,19 +14,19 @@ read -p "Type anything else to continue: " cd poppler/build sudo make install -cd +cd .. sudo mkdir -p /usr/include/poppler -sudo cp poppler/poppler/*.h /usr/include/poppler +sudo cp poppler/*.h /usr/include/poppler sudo mkdir -p /usr/include/poppler/goo -sudo cp poppler/goo/*.h /usr/include/poppler/goo +sudo cp goo/*.h /usr/include/poppler/goo sudo mkdir -p /usr/include/poppler/fofi -sudo cp poppler/fofi/*.h /usr/include/poppler/fofi +sudo cp fofi/*.h /usr/include/poppler/fofi sudo mkdir -p /usr/include/poppler/splash -sudo cp poppler/splash/*.h /usr/include/poppler/splash +sudo cp splash/*.h /usr/include/poppler/splash -sudo cp poppler/build/poppler/poppler-config.h \ +sudo cp build/poppler/poppler-config.h \ /usr/include/poppler diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index c4e9ed4..30f7465 100644 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -3,6 +3,8 @@ # This bash script exports environment variables for the latest software # versions -export POPPLER_VERSION=poppler-0.82.0 -export FONTFORGE_VERSION=20190801 +#export POPPLER_VERSION=poppler-0.82.0 +export POPPLER_VERSION=poppler-0.81.0 +#export FONTFORGE_VERSION=20190801 +export FONTFORGE_VERSION=20170731 export PDF2HTMLEX_VERSION=newBuildSystem From 5a1a090a5e295d1c9f8c6ee8b1617cfb5a30f359 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 16:38:40 +0000 Subject: [PATCH 012/128] corrected getFontForge --- buildScripts/getFontforge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/getFontforge b/buildScripts/getFontforge index b5790a2..0dc10e5 100755 --- a/buildScripts/getFontforge +++ b/buildScripts/getFontforge @@ -9,7 +9,7 @@ FONTFORGE_SRC=fontforge-$FONTFORGE_VERSION.tar.gz rm -rf $FONTFORGE_SRC rm -rf fontforge -wget https://github.com/fontforge/fontforge/releases/download/$FONTFORGE_VERSION/$FONTFORGE_SRC +wget https://github.com/fontforge/fontforge/archive/$FONTFORGE_SRC tar xvf $FONTFORGE_SRC From 0eecbed932238ee31b5224f354fcb4e0f98f54d3 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 18:43:26 +0000 Subject: [PATCH 013/128] corrected build scripts to reflect those on virtual machine --- buildScripts/buildFontforge | 4 ++++ buildScripts/buildPdf2htmlEX | 5 +++++ buildScripts/buildPdf2htmlEXClang | 5 +++++ buildScripts/cleanPdf2htmlEX | 6 ++++++ buildScripts/getBuildTools | 3 +++ buildScripts/getFontforge | 8 +++++++- buildScripts/installPdf2htmlEX | 3 ++- 7 files changed, 32 insertions(+), 2 deletions(-) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 8168b08..b8ba71a 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -1,3 +1,7 @@ +#!/bin/bash + +# This bash script build FontForge + cd fontforge ./bootstrap ./configure diff --git a/buildScripts/buildPdf2htmlEX b/buildScripts/buildPdf2htmlEX index 399912c..6dbef4e 100755 --- a/buildScripts/buildPdf2htmlEX +++ b/buildScripts/buildPdf2htmlEX @@ -1,3 +1,8 @@ +#!/bin/bash + +# This bash script builds pdf2htmlEX + +cd pdf2html mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. diff --git a/buildScripts/buildPdf2htmlEXClang b/buildScripts/buildPdf2htmlEXClang index 4a9914a..95a4574 100755 --- a/buildScripts/buildPdf2htmlEXClang +++ b/buildScripts/buildPdf2htmlEXClang @@ -1,3 +1,8 @@ +#!/bin/bash + +# This bash script builds pdf2htmlEX using Clang (if it is installed) + +cd pdf2htmlEX mkdir build cd build CC=clang CXX=clang++ cmake .. diff --git a/buildScripts/cleanPdf2htmlEX b/buildScripts/cleanPdf2htmlEX index 97f8946..0b44a63 100755 --- a/buildScripts/cleanPdf2htmlEX +++ b/buildScripts/cleanPdf2htmlEX @@ -1 +1,7 @@ +#!/bin/bash + +# This bash script clean all pdf2htmlEX build products + + +cd pdf2htmlEX rm -rf build pdf2htmlEX.1 share/*.css share/*.js share/*.min.* src/pdf2htmlEX-config.h src/util/css_const.h diff --git a/buildScripts/getBuildTools b/buildScripts/getBuildTools index 5d02109..9219bb8 100755 --- a/buildScripts/getBuildTools +++ b/buildScripts/getBuildTools @@ -10,10 +10,13 @@ sudo apt $UNATTENDED install \ git \ pkg-config \ ruby \ + autoconf \ + libtool \ cmake \ make \ gcc \ g++ \ gettext \ + openjdk-8-jre-headless \ tree diff --git a/buildScripts/getFontforge b/buildScripts/getFontforge index 0dc10e5..193eca4 100755 --- a/buildScripts/getFontforge +++ b/buildScripts/getFontforge @@ -4,7 +4,7 @@ source buildScripts/versionEnvs -FONTFORGE_SRC=fontforge-$FONTFORGE_VERSION.tar.gz +FONTFORGE_SRC=$FONTFORGE_VERSION.tar.gz rm -rf $FONTFORGE_SRC rm -rf fontforge @@ -14,3 +14,9 @@ wget https://github.com/fontforge/fontforge/archive/$FONTFORGE_SRC tar xvf $FONTFORGE_SRC mv fontforge-$FONTFORGE_VERSION fontforge + +# FIX required for fontforge 20170731 raw sources +# +cd fontforge +# +patch -p 1 < ../patches/fontforge-20170731-fixGDraw.patch diff --git a/buildScripts/installPdf2htmlEX b/buildScripts/installPdf2htmlEX index de19338..4102e29 100755 --- a/buildScripts/installPdf2htmlEX +++ b/buildScripts/installPdf2htmlEX @@ -8,5 +8,6 @@ if [[ $# -eq 0 ]] ; then fi -cd build +cd pdf2htmlEX/build + sudo make install From 0b8bcf565c26086f73cb51d3bb1151e3853cffdc Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 19:06:46 +0000 Subject: [PATCH 014/128] added patches --- .gitignore | 6 ++--- buildScripts/getPdf2htmlEX | 2 +- patches/fontforge-20170731-fixGDraw.patch | 32 +++++++++++++++++++++++ 3 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 patches/fontforge-20170731-fixGDraw.patch diff --git a/.gitignore b/.gitignore index d2f4091..f1f1335 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -fontforge* -FontForge* -poppler* +fontforge +*.tar.* +poppler build compile_commands.json CMakeCache.txt diff --git a/buildScripts/getPdf2htmlEX b/buildScripts/getPdf2htmlEX index ff311bd..a3a375d 100755 --- a/buildScripts/getPdf2htmlEX +++ b/buildScripts/getPdf2htmlEX @@ -9,7 +9,7 @@ wget https://codeload.github.com/stephengaito/pdf2htmlEX/zip/$PDF2HTMLEX_VERSION mv $PDF2HTMLEX_VERSION $PDF2HTMLEX_VERSION.zip -sudo apt get unzip +sudo apt install unzip unzip $PDF2HTMLEX_VERSION.zip diff --git a/patches/fontforge-20170731-fixGDraw.patch b/patches/fontforge-20170731-fixGDraw.patch new file mode 100644 index 0000000..8d162d2 --- /dev/null +++ b/patches/fontforge-20170731-fixGDraw.patch @@ -0,0 +1,32 @@ +diff --git a/gdraw/drawboxborder.c b/gdraw/drawboxborder.c +index 629968608..0b00e9dd5 100644 +--- a/gdraw/drawboxborder.c ++++ b/gdraw/drawboxborder.c +@@ -24,6 +24,7 @@ + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ ++#include + #include + #include + #include +diff --git a/gdraw/gpsdraw.c b/gdraw/gpsdraw.c +index 5e58b6208..099e41bbd 100644 +--- a/gdraw/gpsdraw.c ++++ b/gdraw/gpsdraw.c +@@ -24,6 +24,7 @@ + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ ++#include "fontforge-config.h" + #include + #include + #include +@@ -31,7 +32,6 @@ + #if !defined(__MINGW32__) + #include + #endif +-#include "fontforge-config.h" + #include + + #include "gpsdrawP.h" From 73d379e4072c47028bbc09543c96900c1b25610e Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 21 Nov 2019 20:34:17 +0000 Subject: [PATCH 015/128] begun work on assembling images --- buildScripts/assembleAppImage | 22 ++++++++++++++++++++++ buildScripts/buildPdf2htmlEX | 2 +- buildScripts/pdf2htmlEX.desktop | 11 +++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100755 buildScripts/assembleAppImage create mode 100644 buildScripts/pdf2htmlEX.desktop diff --git a/buildScripts/assembleAppImage b/buildScripts/assembleAppImage new file mode 100755 index 0000000..e48c1fe --- /dev/null +++ b/buildScripts/assembleAppImage @@ -0,0 +1,22 @@ +#!/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 + diff --git a/buildScripts/buildPdf2htmlEX b/buildScripts/buildPdf2htmlEX index 6dbef4e..ad47a2d 100755 --- a/buildScripts/buildPdf2htmlEX +++ b/buildScripts/buildPdf2htmlEX @@ -2,7 +2,7 @@ # This bash script builds pdf2htmlEX -cd pdf2html +cd pdf2htmlEX mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. diff --git a/buildScripts/pdf2htmlEX.desktop b/buildScripts/pdf2htmlEX.desktop new file mode 100644 index 0000000..81f4508 --- /dev/null +++ b/buildScripts/pdf2htmlEX.desktop @@ -0,0 +1,11 @@ +[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 From 65e674db4227b3c99ef009d088a68e4a2664824a Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 22 Nov 2019 12:08:20 +0000 Subject: [PATCH 016/128] alpha version of build scripts --- buildScripts/assembleAppImage | 22 -------------------- buildScripts/buildPoppler | 2 +- buildScripts/createAppImage | 26 +++++++++++++++++++++++ buildScripts/doItAll | 26 +++++++++++++++++++++++ buildScripts/installFontforge | 35 +++++++++---------------------- buildScripts/installPdf2htmlEX | 3 ++- buildScripts/installPoppler | 37 ++++++++++++++++++--------------- buildScripts/pdf2htmlEX.desktop | 11 ---------- pdf2htmlEX/src/pdf2htmlEX.cc | 7 +++++++ 9 files changed, 92 insertions(+), 77 deletions(-) delete mode 100755 buildScripts/assembleAppImage create mode 100755 buildScripts/createAppImage create mode 100755 buildScripts/doItAll delete mode 100644 buildScripts/pdf2htmlEX.desktop diff --git a/buildScripts/assembleAppImage b/buildScripts/assembleAppImage deleted file mode 100755 index e48c1fe..0000000 --- a/buildScripts/assembleAppImage +++ /dev/null @@ -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 - diff --git a/buildScripts/buildPoppler b/buildScripts/buildPoppler index c9e6a98..458697b 100755 --- a/buildScripts/buildPoppler +++ b/buildScripts/buildPoppler @@ -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` diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage new file mode 100755 index 0000000..f6abbc1 --- /dev/null +++ b/buildScripts/createAppImage @@ -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 + diff --git a/buildScripts/doItAll b/buildScripts/doItAll new file mode 100755 index 0000000..e18b385 --- /dev/null +++ b/buildScripts/doItAll @@ -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 diff --git a/buildScripts/installFontforge b/buildScripts/installFontforge index e5eb120..77c2058 100755 --- a/buildScripts/installFontforge +++ b/buildScripts/installFontforge @@ -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 diff --git a/buildScripts/installPdf2htmlEX b/buildScripts/installPdf2htmlEX index 4102e29..4193c6b 100755 --- a/buildScripts/installPdf2htmlEX +++ b/buildScripts/installPdf2htmlEX @@ -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: " diff --git a/buildScripts/installPoppler b/buildScripts/installPoppler index 6b5f540..ec97f26 100755 --- a/buildScripts/installPoppler +++ b/buildScripts/installPoppler @@ -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 diff --git a/buildScripts/pdf2htmlEX.desktop b/buildScripts/pdf2htmlEX.desktop deleted file mode 100644 index 81f4508..0000000 --- a/buildScripts/pdf2htmlEX.desktop +++ /dev/null @@ -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 diff --git a/pdf2htmlEX/src/pdf2htmlEX.cc b/pdf2htmlEX/src/pdf2htmlEX.cc index bdc56aa..d08bc6c 100644 --- a/pdf2htmlEX/src/pdf2htmlEX.cc +++ b/pdf2htmlEX/src/pdf2htmlEX.cc @@ -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(); From d70cf0aceb2823af49380653b3a3bedcdc708901 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 22 Nov 2019 12:20:08 +0000 Subject: [PATCH 017/128] corrected doItAll --- buildScripts/doItAll | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/buildScripts/doItAll b/buildScripts/doItAll index e18b385..1b74d01 100755 --- a/buildScripts/doItAll +++ b/buildScripts/doItAll @@ -5,22 +5,22 @@ export UNATTENDED=--assume-yes -getBuildTools +./buildScripts/getBuildTools -getDevLibraries +./buildScripts/getDevLibraries -getPoppler +./buildScripts/getPoppler -buildPoppler +./buildScripts/buildPoppler -installPoppler +./buildScripts/installPoppler -getFontForge +./buildScripts/getFontForge -buildFontForge +./buildScripts/buildFontForge -installFontForge +./buildScripts/installFontForge -buildPdf2htmlEX +./buildScripts/buildPdf2htmlEX -installPdf2htmlEX +./buildScripts/installPdf2htmlEX From 0bc60ce7261fa1aecd6047b7298297034df58477 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 22 Nov 2019 12:27:33 +0000 Subject: [PATCH 018/128] corrected doItAll --- buildScripts/doItAll | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildScripts/doItAll b/buildScripts/doItAll index 1b74d01..114d01d 100755 --- a/buildScripts/doItAll +++ b/buildScripts/doItAll @@ -15,11 +15,11 @@ export UNATTENDED=--assume-yes ./buildScripts/installPoppler -./buildScripts/getFontForge +./buildScripts/getFontforge -./buildScripts/buildFontForge +./buildScripts/buildFontforge -./buildScripts/installFontForge +./buildScripts/installFontforge ./buildScripts/buildPdf2htmlEX From 7e270ab49729145095e517f74828e2f78cdafff1 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 22 Nov 2019 17:25:05 +0000 Subject: [PATCH 019/128] force libfontconfig into appimage --- buildScripts/createAppImage | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index f6abbc1..07f2c4a 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -3,7 +3,7 @@ # This bash script creates an AppImage for pdf2htmlEX -mkdir -p imageBuild/pdf2htmlEX.AppDir +mkdir -p imageBuild/pdf2htmlEX.AppDir/usr/lib/ cd pdf2htmlEX/build @@ -13,6 +13,10 @@ make install DESTDIR=../../imageBuild/pdf2htmlEX.AppDir cd ../../imageBuild +# force libfontconfig into AppImage (linuxdeploy blacklists libfontconfig) +# +cp /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 pdf2htmlEX.AppDir/usr/lib/ + wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage chmod a+x linuxdeploy-x86_64.AppImage From 019db4e6358f047cf5dd469a1d4c4ef871182412 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 22 Nov 2019 17:43:56 +0000 Subject: [PATCH 020/128] added signal handler code --- pdf2htmlEX/CMakeLists.txt | 2 + pdf2htmlEX/src/pdf2htmlEX.cc | 14 +- pdf2htmlEX/src/util/SignalHandler.cc | 220 +++++++++++++++++++++++++++ pdf2htmlEX/src/util/SignalHandler.h | 21 +++ pdf2htmlEX/src/util/ffw.c | 68 ++++++++- pdf2htmlEX/src/util/ffw.h | 10 +- 6 files changed, 329 insertions(+), 6 deletions(-) create mode 100644 pdf2htmlEX/src/util/SignalHandler.cc create mode 100644 pdf2htmlEX/src/util/SignalHandler.h diff --git a/pdf2htmlEX/CMakeLists.txt b/pdf2htmlEX/CMakeLists.txt index 3852c22..b8e5008 100644 --- a/pdf2htmlEX/CMakeLists.txt +++ b/pdf2htmlEX/CMakeLists.txt @@ -149,6 +149,8 @@ set(PDF2HTMLEX_SRC ${PDF2HTMLEX_SRC} src/util/unicode.cc src/util/mingw.h src/util/mingw.cc + src/util/SignalHandler.h + src/util/SignalHandler.cc src/ArgParser.h src/ArgParser.cc src/Base64Stream.h diff --git a/pdf2htmlEX/src/pdf2htmlEX.cc b/pdf2htmlEX/src/pdf2htmlEX.cc index d08bc6c..9191489 100644 --- a/pdf2htmlEX/src/pdf2htmlEX.cc +++ b/pdf2htmlEX/src/pdf2htmlEX.cc @@ -25,6 +25,8 @@ #include "pdf2htmlEX-config.h" +#include "util/SignalHandler.h" + #if ENABLE_SVG #include #endif @@ -55,11 +57,15 @@ void show_usage_and_exit(const char * dummy = nullptr) void show_version_and_exit(const char * dummy = nullptr) { + const FFWVersionInfo* ffwVersionInfo = ffw_get_version_info(); + cerr << "pdf2htmlEX version " << PDF2HTMLEX_VERSION << endl; cerr << "Copyright 2012-2015 Lu Wang and other contributors" << endl; cerr << "Libraries: " << endl; cerr << " poppler " << POPPLER_VERSION << endl; - cerr << " libfontforge " << ffw_get_version() << endl; + cerr << " libfontforge " << ffwVersionInfo->majorVersion << "." << + ffwVersionInfo->minorVersion << "." << ffwVersionInfo->gitVersion << endl; + cerr << " libfontforge (date) " << ffwVersionInfo->versionDate << endl; #if ENABLE_SVG cerr << " cairo " << cairo_version_string() << endl; #endif @@ -394,6 +400,12 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); } + // setup the signal handler + setupSignalHandler(argc, (const char**)argv, + param.data_dir.c_str(), + param.poppler_data_dir.c_str(), + param.tmp_dir.c_str()); + bool finished = false; // read config file globalParams = new GlobalParams(!param.poppler_data_dir.empty() ? param.poppler_data_dir.c_str() : NULL); diff --git a/pdf2htmlEX/src/util/SignalHandler.cc b/pdf2htmlEX/src/util/SignalHandler.cc new file mode 100644 index 0000000..c19eedc --- /dev/null +++ b/pdf2htmlEX/src/util/SignalHandler.cc @@ -0,0 +1,220 @@ +/* + * SignalHandler.cc + * + * Created on: 2019-Nov-14 + * Author: Stephen Gaito + */ + +/********** + +This collection of basic ANSI-C functions implement a crude SIG-SEGV +handler for when things go horribly wrong ;-( + +We implement them in as simple a maner as possible so that it will be as +portable as possible and less likely to fall into a reentrant deadlock. + +At the moment the most critical SIG-SEGVs are happening inside the +FontForge library. So we start by focusing upon adding more helpful +messages when FontForge can't save a file for us. + +**********/ + + +#include +#include +#include +#include +#include + +#include "pdf2htmlEX-config.h" +#include "util/ffw.h" +#include +#include + +const char* oopsMessage = + "\n" + "\n" + "Oops! Something went horribly wrong.... sorry!\n" + "\n"; + +const char* ffwMessage_1 = + "I was in the middle of asking FontForge to "; + +const char* ffwMessage_2 = + " a font.\n" + "\n" + "I suspect that the problem is that FontForge is having trouble\n" + "working with one of the fonts embedded in your pdf file.\n" + "\n" + "The best way to verify this is to install FontForge and to try\n" + "loading and then (re)generating each font in the\n" + "\n" + " "; + +const char* ffwMessage_3 = + "\n" + "\n" + "directory. See:\n" + "\n" + " https://github.com/pdf2htmlEX/pdf2htmlEX/wiki/Troubleshooting-Crashes\n" + "\n" + "for details.\n" + "\n" + "If one of these fonts crashes FontForge, then it is certainly not a\n" + "pdf2htmlEX problem.... sorry.\n" + "\n" + "IF it *is* a FontForge problem then you have the following options:\n" + "\n" + " 1) You can send a copy of the font you found which crashed FontForge to\n" + " the FontForge developers and see if they can find the problem.\n" + " (Be warned FontForge is a complex application, so it might be\n" + " very hard for the developers to isolate your problem.... )\n" + "\n" + " 2) You can try re-creating your PDF with a different font.\n" + "\n" + " 3) Or you can do both of these things...\n" + "\n" + "IF you were not able to crash FontForge using the fonts in the above\n" + "directory... then and only then please raise an issue with the pdf2htmlEX\n" + "team... make sure you provide them with your pdf, as well as the following\n" + "details:\n"; + +const char* noFfwMessage = + "Please raise an issue with the pdf2hmtlEX team so they can fix this...\n" + "\n" + "Please make sure you provide them with your pdf as well as the following\n" + "details:\n"; + +const char* detailsHeader = + "\n" + "--------------------------------------------------------------------------\n" + "\n"; + +const char* detailsBody = "no details recorded\n"; + +const char* pdf2htmlEXTmpDir = NULL; +const char* ffwAction = NULL; + +struct sigaction act; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-result" +void signalHandler(int sigInt) { + write(STDERR_FILENO, oopsMessage, strlen(oopsMessage) ); + + if (ffwAction) { + write(STDERR_FILENO, ffwMessage_1, strlen(ffwMessage_1) ); + write(STDERR_FILENO, ffwAction, strlen(ffwAction) ); + write(STDERR_FILENO, ffwMessage_2, strlen(ffwMessage_2) ); + write(STDERR_FILENO, pdf2htmlEXTmpDir, strlen(pdf2htmlEXTmpDir) ); + write(STDERR_FILENO, ffwMessage_3, strlen(ffwMessage_3) ); + } else { + write(STDERR_FILENO, noFfwMessage, strlen(noFfwMessage) ); + } + + write(STDERR_FILENO, detailsHeader, strlen(detailsHeader) ); + write(STDERR_FILENO, detailsBody, strlen(detailsBody) ); + exit(-1); + +} +#pragma GCC diagnostic pop + +#ifdef __cplusplus +extern "C" { +#endif + +void ffwSetAction(const char* anAction) { ffwAction = anAction; } +void ffwClearAction(const char* anAction) { ffwAction = NULL; } + +#ifdef __cplusplus +} +#endif + +void setupSignalHandler( + int argc, const char* argv[], + const char* data_dir, + const char* poppler_data_dir, + const char* tmp_dir) { + // THIS MUST BE CALLED AFTER ARGUMENT PARSING + + // Start by setting up the messages + // + // Construct the command line information + std::string detailInfo; + detailInfo = "Command line:\n"; + for (int i = 0 ; i < argc ; i++ ){ + detailInfo = detailInfo + " " + std::to_string(i) + ": [" + argv[i] + "]\n" ; + } + detailInfo = detailInfo + "\n"; + + // Construct the version information + const pdf2htmlEX::FFWVersionInfo* ffwVersionInfo = + pdf2htmlEX::ffw_get_version_info(); + + detailInfo = detailInfo + "Version information:\n"; + detailInfo = detailInfo + " pdf2htmlEX version " + pdf2htmlEX::PDF2HTMLEX_VERSION + "\n"; + detailInfo = detailInfo + " Copyright 2012-2015 Lu Wang and other contributors\n"; + detailInfo = detailInfo + "\n"; + detailInfo = detailInfo + "Libraries:\n" ; + detailInfo = detailInfo + " poppler " + POPPLER_VERSION + "\n"; + detailInfo = detailInfo + " libfontforge " + ffwVersionInfo->majorVersion + "." + ffwVersionInfo->minorVersion + "." + ffwVersionInfo->gitVersion + "\n"; + detailInfo = detailInfo + " libfontforge (date) " + ffwVersionInfo->versionDate + "\n"; +#if ENABLE_SVG + detailInfo = detailInfo + " cairo " + cairo_version_string() + "\n"; +#endif + detailInfo = detailInfo + "\n"; + detailInfo = detailInfo + "Default data-dir: " + data_dir + "\n"; + detailInfo = detailInfo + "Default poppler-data-dir: " + poppler_data_dir + "\n"; + detailInfo = detailInfo + "Default tmp-dir: " + tmp_dir + "\n"; + detailInfo = detailInfo + "\n"; + detailInfo = detailInfo + "Supported image formats:"; +#ifdef ENABLE_LIBPNG + detailInfo = detailInfo + " png"; +#endif +#ifdef ENABLE_LIBJPEG + detailInfo = detailInfo + " jpg"; +#endif +#if ENABLE_SVG + detailInfo = detailInfo + " svg"; +#endif + detailInfo = detailInfo + "\n\n"; + + detailsBody = strdup(detailInfo.c_str()); + + pdf2htmlEXTmpDir = strdup(tmp_dir); + + // Now setup the signal handler + // + memset(&act, 0, sizeof(act)); + act.sa_handler = signalHandler; + // + sigaction(SIGILL, &act, NULL); // Illegal Instruction + sigaction(SIGFPE, &act, NULL); // Floating-point exception + sigaction(SIGSEGV, &act, NULL); // Invalid memory reference + sigaction(SIGBUS, &act, NULL); // Bus error (bad memory access) + sigaction(SIGSYS, &act, NULL); // Bad system call (SVr4) + + // All done +} + + +/*** +int main(int argc, const char* argv[]) { + + setupSignalHandler(argc, argv, "aTmpDir"); + + ffwSetAction("save"); + + for (int i = 0; i < 5; i++) { + printf("sleeping.... \n"); + sleep(1); + } + + int *foo = NULL; + + *foo = 1; + + printf("We should not reach here!\n"); + +} +***/ diff --git a/pdf2htmlEX/src/util/SignalHandler.h b/pdf2htmlEX/src/util/SignalHandler.h new file mode 100644 index 0000000..d39b844 --- /dev/null +++ b/pdf2htmlEX/src/util/SignalHandler.h @@ -0,0 +1,21 @@ +#ifndef SIGNAL_HANDLER_H +#define SIGNAL_HANDLER_H + +#ifdef __cplusplus +extern "C" { +#endif + +void ffwSetAction(const char* anAction); +void ffwClearAction(void); + +#ifdef __cplusplus +} +#endif + +void setupSignalHandler( + int argc, const char* argv[], + const char* data_dir, + const char* poppler_data_dir, + const char* tmp_dir); + +#endif diff --git a/pdf2htmlEX/src/util/ffw.c b/pdf2htmlEX/src/util/ffw.c index c296f38..2101cde 100644 --- a/pdf2htmlEX/src/util/ffw.c +++ b/pdf2htmlEX/src/util/ffw.c @@ -16,6 +16,8 @@ #include #include +#include "SignalHandler.h" + #include "ffw.h" #include "fontforge-2.0.20170731/autowidth.h" #include "fontforge-2.0.20170731/bitmapchar.h" @@ -66,6 +68,7 @@ static void dumb_post_error(const char * title, const char * error, ...) { } void ffw_init(int debug) { + ffwSetAction("initialize"); InitSimpleStuff(); if ( default_encoding==NULL ) default_encoding=FindOrMakeEncoding("ISO8859-1"); @@ -88,10 +91,12 @@ void ffw_init(int debug) v.u.ival = 1; SetPrefs("DetectDiagonalStems", &v, NULL); } + ffwClearAction(); } void ffw_finalize(void) { + ffwSetAction("finalize"); while(enc_head) { Encoding * next = enc_head->next; @@ -107,21 +112,36 @@ void ffw_finalize(void) free(enc_head); enc_head = next; } + ffwClearAction(); } -long ffw_get_version(void) +// see: https://stackoverflow.com/a/2653351 +#define xstr(a) str(a) +#define str(a) #a + +static FFWVersionInfo ffwVersionInfo; + +const FFWVersionInfo* ffw_get_version_info(void) { - return FONTFORGE_VERSIONDATE_RAW; + ffwVersionInfo.gitVersion = FONTFORGE_GIT_VERSION; + ffwVersionInfo.majorVersion = xstr(FONTFORGE_VERSION_MAJOR); + ffwVersionInfo.minorVersion = xstr(FONTFORGE_VERSION_MINOR); + ffwVersionInfo.versionDate = FONTFORGE_VERSIONDATE; + + return &ffwVersionInfo; } void ffw_new_font() { + ffwSetAction("create"); assert((cur_fv == NULL) && "Previous font is not destroyed"); cur_fv = FVAppend(_FontViewCreate(SplineFontNew())); + ffwClearAction(); } void ffw_load_font(const char * filename) { + ffwSetAction("load"); assert((cur_fv == NULL) && "Previous font is not destroyed"); char * _filename = strcopy(filename); @@ -147,6 +167,7 @@ void ffw_load_font(const char * filename) cur_fv->cidmaster->ascent = cur_fv->sf->ascent; cur_fv->cidmaster->descent = cur_fv->sf->descent; } + ffwClearAction(); } /* @@ -154,6 +175,7 @@ void ffw_load_font(const char * filename) */ void ffw_prepare_font(void) { + ffwSetAction("prepare"); memset(cur_fv->selected, 1, cur_fv->map->enccount); // remove kern FVRemoveKerns(cur_fv); @@ -185,10 +207,12 @@ void ffw_prepare_font(void) */ free(sf->fontname); sf->fontname = strcopy(""); + ffwClearAction(); } void ffw_save(const char * filename) { + ffwSetAction("save"); char * _filename = strcopy(filename); char * _ = strcopy(""); @@ -200,11 +224,14 @@ void ffw_save(const char * filename) if(!r) err("Cannot save font to %s\n", filename); + ffwClearAction(); } void ffw_close(void) { + ffwSetAction("close"); FontViewClose(cur_fv); cur_fv = NULL; + ffwClearAction(); } static void ffw_do_reencode(Encoding * encoding, int force) @@ -234,25 +261,32 @@ static void ffw_do_reencode(Encoding * encoding, int force) void ffw_reencode_glyph_order(void) { + ffwSetAction("re-encode the glyph order in"); ffw_do_reencode(original_enc, 0); + ffwClearAction(); } void ffw_reencode_unicode_full(void) { + ffwSetAction("re-encode to unicode"); ffw_do_reencode(unicodefull_enc, 0); + ffwClearAction(); } void ffw_reencode(const char * encname, int force) { + ffwSetAction("re-encode"); Encoding * enc = FindOrMakeEncoding(encname); if(!enc) err("Unknown encoding %s\n", encname); ffw_do_reencode(enc, force); + ffwClearAction(); } void ffw_reencode_raw(int32 * mapping, int mapping_len, int force) { + ffwSetAction("re-encode (raw1)"); Encoding * enc = calloc(1, sizeof(Encoding)); enc->only_1byte = enc->has_1byte = true; @@ -273,10 +307,12 @@ void ffw_reencode_raw(int32 * mapping, int mapping_len, int force) enc_head = enc; ffw_do_reencode(enc, force); + ffwClearAction(); } void ffw_reencode_raw2(const char ** mapping, int mapping_len, int force) { + ffwSetAction("re-encode (raw2)"); Encoding * enc = calloc(1, sizeof(Encoding)); enc->enc_name = strcopy(""); enc->char_cnt = mapping_len; @@ -300,6 +336,7 @@ void ffw_reencode_raw2(const char ** mapping, int mapping_len, int force) enc_head = enc; ffw_do_reencode(enc, force); + ffwClearAction(); } void ffw_cidflatten(void) @@ -309,7 +346,9 @@ void ffw_cidflatten(void) fprintf(stderr, "Cannot flatten a non-CID font\n"); return; } + ffwSetAction("flatten the cid in"); SFFlatten(cur_fv->sf->cidmaster); + ffwClearAction(); } /* @@ -318,6 +357,7 @@ void ffw_cidflatten(void) */ void ffw_add_empty_char(int32_t unicode, int width) { + ffwSetAction("add an empty character to"); SplineChar * sc = SFMakeChar(cur_fv->sf, cur_fv->map, cur_fv->map->enccount); char buffer[400]; SCSetMetaData(sc, @@ -325,22 +365,29 @@ void ffw_add_empty_char(int32_t unicode, int width) cur_fv->sf->uni_interp, cur_fv->sf->for_new_glyphs)), unicode, sc->comment); SCSynchronizeWidth(sc, width, sc->width, cur_fv); + ffwClearAction(); } int ffw_get_em_size(void) { - return cur_fv->sf->ascent + cur_fv->sf->descent; + ffwSetAction("get the em size of"); + int emSize = cur_fv->sf->ascent + cur_fv->sf->descent; + ffwClearAction(); + return emSize; } void ffw_fix_metric() { + ffwSetAction("fix the metric of"); double ascent, descent; ffw_get_metric(&ascent, &descent); ffw_set_metric(ascent, descent); + ffwClearAction(); } void ffw_get_metric(double * ascent, double * descent) { + ffwSetAction("get the metric of"); SplineFont * sf = cur_fv->sf; DBounds bb; @@ -357,10 +404,12 @@ void ffw_get_metric(double * ascent, double * descent) { *ascent = *descent = 0; } + ffwClearAction(); } void ffw_set_metric(double ascent, double descent) { + ffwSetAction("set the metric of"); SplineFont * sf = cur_fv->sf; struct pfminfo * info = &sf->pfminfo; @@ -402,6 +451,7 @@ void ffw_set_metric(double ascent, double descent) info->os2_typolinegap = 0; info->linegap = 0; + ffwClearAction(); } /* @@ -410,6 +460,7 @@ void ffw_set_metric(double ascent, double descent) void ffw_set_widths(int * width_list, int mapping_len, int stretch_narrow, int squeeze_wide) { + ffwSetAction("set the widths of"); SplineFont * sf = cur_fv->sf; if(sf->onlybitmaps @@ -453,13 +504,17 @@ void ffw_set_widths(int * width_list, int mapping_len, SCSynchronizeWidth(sc, width_list[i], sc->width, cur_fv); } + ffwClearAction(); } void ffw_import_svg_glyph(int code, const char * filename, double ox, double oy, double width) { + ffwSetAction("import the glyphs from"); int enc = SFFindSlot(cur_fv->sf, cur_fv->map, code, ""); - if(enc == -1) + if(enc == -1) { + ffwClearAction(); return; + } SplineChar * sc = SFMakeChar(cur_fv->sf, cur_fv->map, enc); @@ -483,10 +538,12 @@ void ffw_import_svg_glyph(int code, const char * filename, double ox, double oy, SCSynchronizeWidth(sc, floor(width * (a+d) + 0.5), sc->width, cur_fv); } + ffwClearAction(); } void ffw_auto_hint(void) { + ffwSetAction("automatically hint"); // convert to quadratic if(!(cur_fv->sf->layers[ly_fore].order2)) { @@ -496,11 +553,14 @@ void ffw_auto_hint(void) memset(cur_fv->selected, 1, cur_fv->map->enccount); FVAutoHint(cur_fv); FVAutoInstr(cur_fv); + ffwClearAction(); } void ffw_override_fstype(void) { + ffwSetAction("override the fstype of"); *(int16 *)(&cur_fv->sf->pfminfo.fstype) = 0; cur_fv->sf->pfminfo.pfmset = true; cur_fv->sf->changed = true; + ffwClearAction(); } diff --git a/pdf2htmlEX/src/util/ffw.h b/pdf2htmlEX/src/util/ffw.h index 106310a..5ce70e9 100644 --- a/pdf2htmlEX/src/util/ffw.h +++ b/pdf2htmlEX/src/util/ffw.h @@ -23,7 +23,15 @@ extern "C" { // global void ffw_init(int debug); void ffw_finalize(void); -long ffw_get_version(void); + +typedef struct ffw_version_info { + const char* gitVersion; + const char* majorVersion; + const char* minorVersion; + const char* versionDate; +} FFWVersionInfo ; + +const FFWVersionInfo* ffw_get_version_info(void); //////////////////////// // load & save From f7aa5f3b48f278c5011f17d2abab7862a6b559d4 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Sat, 23 Nov 2019 06:23:30 +0000 Subject: [PATCH 021/128] rearrange fontforge patches --- buildScripts/buildFontforge | 8 ++++++++ buildScripts/getFontforge | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index b8ba71a..69b3325 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -5,4 +5,12 @@ cd fontforge ./bootstrap ./configure + +# Apply any patches required for fontforge raw sources before we make +# +for APATCHFILE in $(ls ../patches/fontforge-$FONTFORGE_VERSION-*) do + echo "patching fontforge using [$APATCHFILE]" + patch -p 1 < $APATCHFILE +done + make -j `nproc` diff --git a/buildScripts/getFontforge b/buildScripts/getFontforge index 193eca4..0db0b23 100755 --- a/buildScripts/getFontforge +++ b/buildScripts/getFontforge @@ -14,9 +14,3 @@ wget https://github.com/fontforge/fontforge/archive/$FONTFORGE_SRC tar xvf $FONTFORGE_SRC mv fontforge-$FONTFORGE_VERSION fontforge - -# FIX required for fontforge 20170731 raw sources -# -cd fontforge -# -patch -p 1 < ../patches/fontforge-20170731-fixGDraw.patch From 51ea338524501efbc3409f76265b3aee871a8a54 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Sat, 23 Nov 2019 06:41:05 +0000 Subject: [PATCH 022/128] added patch to fix the FONTFORGE_GIT_VERSION for our use --- buildScripts/buildFontforge | 7 +++++-- patches/fontforge-20170731-fixGitVersion.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 patches/fontforge-20170731-fixGitVersion.patch diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 69b3325..4d4e953 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -2,14 +2,17 @@ # This bash script build FontForge +source buildScripts/versionEnvs + cd fontforge ./bootstrap ./configure # Apply any patches required for fontforge raw sources before we make # -for APATCHFILE in $(ls ../patches/fontforge-$FONTFORGE_VERSION-*) do - echo "patching fontforge using [$APATCHFILE]" +for APATCHFILE in $(ls ../patches/fontforge-$FONTFORGE_VERSION-*) +do + echo "patching fontforge using [$APATCHFILE]" patch -p 1 < $APATCHFILE done diff --git a/patches/fontforge-20170731-fixGitVersion.patch b/patches/fontforge-20170731-fixGitVersion.patch new file mode 100644 index 0000000..887c05d --- /dev/null +++ b/patches/fontforge-20170731-fixGitVersion.patch @@ -0,0 +1,13 @@ +fontforge-config.h +--- a/inc/fontforge-config.h 2019-11-23 06:38:36.632042953 +0000 ++++ b/inc/fontforge-config.h 2019-11-23 06:38:47.424229496 +0000 +@@ -67,7 +67,7 @@ + /* #undef FONTFORGE_DEBUG */ + + /* "git hash that source are built from" */ +-#define FONTFORGE_GIT_VERSION "" ++#define FONTFORGE_GIT_VERSION "20170731" + + /* ExeLibFontForge Major Version */ + #define FONTFORGE_LIBFFE_VERSION_MAJOR 2 + From 1580ce3e5356e2bb7a7ec25fb1c9d38c5df50d5f Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Sat, 23 Nov 2019 07:05:50 +0000 Subject: [PATCH 023/128] added version information to AppImage --- buildScripts/createAppImage | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index 07f2c4a..c59914b 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -2,6 +2,7 @@ # This bash script creates an AppImage for pdf2htmlEX +source buildScripts/versionEnvs mkdir -p imageBuild/pdf2htmlEX.AppDir/usr/lib/ @@ -28,3 +29,4 @@ chmod a+x linuxdeploy-x86_64.AppImage --appdir=pdf2htmlEX.AppDir \ --output appimage +mv pdf2htmlEX-x86_64.AppImage pdf2htmlEX-$PDF2HTMLEX_VERSION-x86_64.AppImage From 2be983742266854df47529f40db60dc9088a8bbe Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Sat, 23 Nov 2019 10:25:09 +0000 Subject: [PATCH 024/128] continued work on image creation --- buildScripts/createAppImage | 11 +++++++---- buildScripts/createDockerImage | 13 +++++++++++++ buildScripts/versionEnvs | 1 + 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100755 buildScripts/createDockerImage diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index c59914b..a0f19c1 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -18,15 +18,18 @@ cd ../../imageBuild # cp /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 pdf2htmlEX.AppDir/usr/lib/ -wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage +LINUX_DEPLOY_APP_IMAGE=linuxdeploy-$MACHINE_ARCH.AppImage -chmod a+x linuxdeploy-x86_64.AppImage +wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/$LINUX_DEPLOY_APP_IMAGE -./linuxdeploy-x86_64.AppImage \ +chmod a+x $LINUX_DEPLOY_APP_IMAGE + +./$LINUX_DEPLOY_APP_IMAGE \ -e pdf2htmlEX.AppDir/usr/bin/pdf2htmlEX \ --create-desktop-file \ -i ../pdf2htmlEX/logo/pdf2htmlEX.svg \ --appdir=pdf2htmlEX.AppDir \ --output appimage -mv pdf2htmlEX-x86_64.AppImage pdf2htmlEX-$PDF2HTMLEX_VERSION-x86_64.AppImage +mv pdf2htmlEX-$MACHINE_ARC.AppImage \ + pdf2htmlEX-$PDF2HTMLEX_VERSION-$MACHINE_ARCH.AppImage diff --git a/buildScripts/createDockerImage b/buildScripts/createDockerImage new file mode 100755 index 0000000..bc11110 --- /dev/null +++ b/buildScripts/createDockerImage @@ -0,0 +1,13 @@ +#!/bin/bash + +# This bash script creates an Docker Image for pdf2htmlEX + +source buildScripts/versionEnvs + +cd imageBuild + +pip install git+https://github.com/larsks/dockerize + +dockerize \ + /usr/bin/pdf2htmlEX \ + diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index 30f7465..e7bf2c2 100644 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -8,3 +8,4 @@ export POPPLER_VERSION=poppler-0.81.0 #export FONTFORGE_VERSION=20190801 export FONTFORGE_VERSION=20170731 export PDF2HTMLEX_VERSION=newBuildSystem +export MACHINE_ARCH=`uname -m` From b6813a98f5cb7d5b56da2c95e4c1afc33a955286 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Sat, 23 Nov 2019 10:28:43 +0000 Subject: [PATCH 025/128] corrected spelling --- buildScripts/createAppImage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index a0f19c1..4f82477 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -31,5 +31,5 @@ chmod a+x $LINUX_DEPLOY_APP_IMAGE --appdir=pdf2htmlEX.AppDir \ --output appimage -mv pdf2htmlEX-$MACHINE_ARC.AppImage \ +mv pdf2htmlEX-$MACHINE_ARCH.AppImage \ pdf2htmlEX-$PDF2HTMLEX_VERSION-$MACHINE_ARCH.AppImage From 071904fd830430d7f92d456a5d1200ee5116ffc6 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Sat, 23 Nov 2019 17:49:43 +0000 Subject: [PATCH 026/128] updated doItAll --- buildScripts/doItAll | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/buildScripts/doItAll b/buildScripts/doItAll index 114d01d..f40d328 100755 --- a/buildScripts/doItAll +++ b/buildScripts/doItAll @@ -5,22 +5,23 @@ export UNATTENDED=--assume-yes -./buildScripts/getBuildTools +./buildScripts/getBuildTools || { echo 'getBuildTools FAILED' ; exit 1 ; } -./buildScripts/getDevLibraries +./buildScripts/getDevLibraries || { echo 'getDevLibraries FAILED' ; exit 1 ; } -./buildScripts/getPoppler +./buildScripts/getPoppler || { echo 'getPoppler FAILED' ; exit 1 ; } -./buildScripts/buildPoppler +./buildScripts/buildPoppler || { echo 'buildPoppler FAILED' ; exit 1 ; } -./buildScripts/installPoppler +./buildScripts/installPoppler || { echo 'installPoppler FAILED' ; exit 1 ; } -./buildScripts/getFontforge +./buildScripts/getFontforge || { echo 'getFontforge FAILED' ; exit 1 ; } -./buildScripts/buildFontforge +./buildScripts/buildFontforge || { echo 'buildFontforge FAILED' ; exit 1 ; } -./buildScripts/installFontforge +./buildScripts/installFontforge || { echo 'installFontforge FAILED' ; exit 1 ; } -./buildScripts/buildPdf2htmlEX +./buildScripts/buildPdf2htmlEX || { echo 'buildPdf2htmlEX FAILED' ; exit 1 ; } + +./buildScripts/installPdf2htmlEX || { echo 'installPdf2htmlEX FAILED' ; exit 1 ; } -./buildScripts/installPdf2htmlEX From 817db7592af8f6d48b6066dbdf6d83ea8e9909fa Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 25 Nov 2019 11:19:44 +0000 Subject: [PATCH 027/128] initial working draft of building docker image --- buildScripts/createDockerImage | 31 +++++++++++++++--- buildScripts/dockerFunctions | 59 ++++++++++++++++++++++++++++++++++ buildScripts/versionEnvs | 2 ++ 3 files changed, 87 insertions(+), 5 deletions(-) create mode 100644 buildScripts/dockerFunctions diff --git a/buildScripts/createDockerImage b/buildScripts/createDockerImage index bc11110..f9f2cda 100755 --- a/buildScripts/createDockerImage +++ b/buildScripts/createDockerImage @@ -1,13 +1,34 @@ #!/bin/bash -# This bash script creates an Docker Image for pdf2htmlEX +# This bash script creates a docker image from an existing pdf2htmlEX source buildScripts/versionEnvs -cd imageBuild +source buildScripts/dockerFunctions -pip install git+https://github.com/larsks/dockerize +mkdir -p imageBuild/dockerDir + +cd pdf2htmlEX/build + +sudo rm -rf install_manifest.txt + +make install DESTDIR=../../imageBuild/dockerDir + +cd ../../imageBuild/dockerDir + +copy_deps + +delete_blacklisted + +cat >> Dockerfile <" | awk '{print $3}' \ + | xargs -I '{}' echo '{}' >> DEPSFILE + done + + DEPS=$(cat DEPSFILE | sort | uniq) + + for FILE in $DEPS ; do + if [ -e $FILE ] && [[ $(readlink -f $FILE)/ != $PWD/* ]] ; then + cp -v --parents -rfL $FILE ./ || true + fi + done + rm -f DEPSFILE +} + +# Delete blacklisted files. Our blacklisted files are the shared libraries +# extracted from the "base" docker image +# +delete_blacklisted() +{ + docker run --rm -it --entrypoint=find $DOCKER_FROM -iname "*.so.*" \ + | xargs -i basename {} | sed 's/\r//g' | sed 's/\(so\.[0-9]\+\).*$/\1/' \ + | sort | uniq > BLACKLISTED_FILES + + for FILE in $(cat BLACKLISTED_FILES | tr "\r\n" " ") ; do + FILES="$(find . -name "${FILE}*" -not -path "./usr/optional/*")" + for FOUND in $FILES ; do + rm -vf "$FOUND" "$(readlink -f "$FOUND")" + done + done + + rm BLACKLISTED_FILES + + # Do not bundle developer stuff + rm -rf usr/include || true + rm -rf usr/lib/cmake || true + rm -rf usr/lib/pkgconfig || true + find . -name '*.la' | xargs -i rm {} +} + diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index e7bf2c2..3cea7c5 100644 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -9,3 +9,5 @@ export POPPLER_VERSION=poppler-0.81.0 export FONTFORGE_VERSION=20170731 export PDF2HTMLEX_VERSION=newBuildSystem export MACHINE_ARCH=`uname -m` +export DOCKER_FROM=ubuntu:16.04 + From dd3596432be555d9898d410afa739c5a4c9fd46f Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 25 Nov 2019 16:04:50 +0000 Subject: [PATCH 028/128] tidied build scripts --- buildScripts/buildFontforge | 2 +- buildScripts/buildPdf2htmlEX | 4 ++-- buildScripts/buildPdf2htmlEXClang | 4 ++-- buildScripts/buildPoppler | 2 +- buildScripts/travisEnvs | 3 +++ buildScripts/versionEnvs | 4 ++++ 6 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 buildScripts/travisEnvs diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 4d4e953..139d466 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -16,4 +16,4 @@ do patch -p 1 < $APATCHFILE done -make -j `nproc` +make $MAKE_PARALLEL diff --git a/buildScripts/buildPdf2htmlEX b/buildScripts/buildPdf2htmlEX index ad47a2d..efbc54d 100755 --- a/buildScripts/buildPdf2htmlEX +++ b/buildScripts/buildPdf2htmlEX @@ -5,5 +5,5 @@ cd pdf2htmlEX mkdir build cd build -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. -make -j `nproc` +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local .. +make $MAKE_PARALLEL diff --git a/buildScripts/buildPdf2htmlEXClang b/buildScripts/buildPdf2htmlEXClang index 95a4574..6d0b7ee 100755 --- a/buildScripts/buildPdf2htmlEXClang +++ b/buildScripts/buildPdf2htmlEXClang @@ -5,5 +5,5 @@ cd pdf2htmlEX mkdir build cd build -CC=clang CXX=clang++ cmake .. -make +CC=clang CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. +make $MAKE_PARALLEL diff --git a/buildScripts/buildPoppler b/buildScripts/buildPoppler index 458697b..711fbd3 100755 --- a/buildScripts/buildPoppler +++ b/buildScripts/buildPoppler @@ -7,4 +7,4 @@ mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \ -DENABLE_LIBOPENJPEG=none .. -make -j `nproc` +make $MAKE_PARALLEL diff --git a/buildScripts/travisEnvs b/buildScripts/travisEnvs new file mode 100644 index 0000000..9ab6776 --- /dev/null +++ b/buildScripts/travisEnvs @@ -0,0 +1,3 @@ + +export MAKE_PARALLEL=-j `nproc` + diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index 3cea7c5..51208ac 100644 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -5,9 +5,13 @@ #export POPPLER_VERSION=poppler-0.82.0 export POPPLER_VERSION=poppler-0.81.0 + #export FONTFORGE_VERSION=20190801 export FONTFORGE_VERSION=20170731 + export PDF2HTMLEX_VERSION=newBuildSystem + export MACHINE_ARCH=`uname -m` + export DOCKER_FROM=ubuntu:16.04 From 1bf3eadbdc7b71623043e8d24569168f613f681b Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 25 Nov 2019 16:10:34 +0000 Subject: [PATCH 029/128] added image creation to doItAll --- buildScripts/doItAll | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildScripts/doItAll b/buildScripts/doItAll index f40d328..aee2d2f 100755 --- a/buildScripts/doItAll +++ b/buildScripts/doItAll @@ -25,3 +25,6 @@ export UNATTENDED=--assume-yes ./buildScripts/installPdf2htmlEX || { echo 'installPdf2htmlEX FAILED' ; exit 1 ; } +./buildScripts/createAppImage || { echo 'createAppImage FAILED' ; exit 1 ; } + +./buildScripts/createDockerImage || { echo 'createDockerImage FAILED' ; exit 1 ; } From c5ab4f4f9e4f303bbc6a70c4ac08da66a9d65988 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 25 Nov 2019 16:46:14 +0000 Subject: [PATCH 030/128] corrected build scripts --- buildScripts/createAppImage | 16 ++++++++-------- buildScripts/travisEnvs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index 4f82477..8a61951 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -4,19 +4,19 @@ source buildScripts/versionEnvs -mkdir -p imageBuild/pdf2htmlEX.AppDir/usr/lib/ +mkdir -p imageBuild/appDir/usr/lib/ cd pdf2htmlEX/build sudo rm -rf install_manifest.txt -make install DESTDIR=../../imageBuild/pdf2htmlEX.AppDir +make install DESTDIR=../../imageBuild/appDir cd ../../imageBuild # force libfontconfig into AppImage (linuxdeploy blacklists libfontconfig) # -cp /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 pdf2htmlEX.AppDir/usr/lib/ +cp /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 appDir/usr/lib/ LINUX_DEPLOY_APP_IMAGE=linuxdeploy-$MACHINE_ARCH.AppImage @@ -24,11 +24,11 @@ wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/$LI chmod a+x $LINUX_DEPLOY_APP_IMAGE -./$LINUX_DEPLOY_APP_IMAGE \ - -e pdf2htmlEX.AppDir/usr/bin/pdf2htmlEX \ - --create-desktop-file \ - -i ../pdf2htmlEX/logo/pdf2htmlEX.svg \ - --appdir=pdf2htmlEX.AppDir \ +./$LINUX_DEPLOY_APP_IMAGE \ + -e appDir/usr/bin/pdf2htmlEX \ + --create-desktop-file \ + -i ../pdf2htmlEX/logo/pdf2htmlEX.svg \ + --appdir=appDir \ --output appimage mv pdf2htmlEX-$MACHINE_ARCH.AppImage \ diff --git a/buildScripts/travisEnvs b/buildScripts/travisEnvs index 9ab6776..35d2199 100644 --- a/buildScripts/travisEnvs +++ b/buildScripts/travisEnvs @@ -1,3 +1,3 @@ -export MAKE_PARALLEL=-j `nproc` +export MAKE_PARALLEL="-j `nproc`" From 4d78893209babce886e39ccc00a18914fcbb5424 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 25 Nov 2019 18:06:04 +0000 Subject: [PATCH 031/128] corrected build scripts --- .travis.yml.off | 52 +++++-------------------------------- buildScripts/createAppImage | 2 +- pdf2htmlEX/CMakeLists.txt | 4 +-- 3 files changed, 10 insertions(+), 48 deletions(-) diff --git a/.travis.yml.off b/.travis.yml.off index bff2be1..71baa25 100644 --- a/.travis.yml.off +++ b/.travis.yml.off @@ -6,44 +6,14 @@ os: - linux # - osx -dist: bionic +dist: xenial -env: - global: - - POPPLER_SOURCE="https://gitlab.freedesktop.org/poppler/poppler.git" - matrix: - - PDF2HTMLEX_RELEASE="v0.18.7-poppler-0.81.0" POPPLER_RELEASE="poppler-0.81.0" - - PDF2HTMLEX_RELEASE="v0.18.0-poppler-0.74.0-ubuntu-19.04" POPPLER_RELEASE="poppler-0.74.0" - - PDF2HTMLEX_RELEASE="v0.16.0-poppler-0.62.0-ubuntu-18.04" POPPLER_RELEASE="poppler-0.62.0" +services: + - docker compiler: gcc -addons: - apt: - update: true - packages: - - build-essential - - autoconf - - git - - pkg-config - - cmake - - make - - gcc - - g++ - # - ca-certificates - # - libfreetype6-dev - # Poppler-specific packages - - libfontforge-dev - - libfontconfig-dev - - libjpeg-dev - - libpng-dev - - libnss3-dev - # pdf2htmlEX-specific packages - - default-jre - - libcairo-dev - - libspiro-dev - - libpango1.0-dev - - poppler-data +#addons: # homebrew: # packages: # - autoconf @@ -74,15 +44,7 @@ matrix: # allow_failures: # - os: osx # Until the build passes, then re-enable. -before_install: - - ./.travisScripts/copyScriptsToBin - - $HOME/bin/buildPoppler.sh - - $HOME/bin/installPoppler.sh - #- $HOME/setupTests.sh - script: - - git checkout ${PDF2HTMLEX_RELEASE} - - git branch - - $HOME/bin/dobuild - - $HOME/bin/doinstall --noWait - - /usr/local/bin/pdf2htmlEX -v + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + - ./buildScripts/doItAll + - docker push $DOCKER_USERNAME/pdf2htmlex diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index 8a61951..c86c0f2 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -25,7 +25,7 @@ wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/$LI chmod a+x $LINUX_DEPLOY_APP_IMAGE ./$LINUX_DEPLOY_APP_IMAGE \ - -e appDir/usr/bin/pdf2htmlEX \ + -e appDir/usr/local/bin/pdf2htmlEX \ --create-desktop-file \ -i ../pdf2htmlEX/logo/pdf2htmlEX.svg \ --appdir=appDir \ diff --git a/pdf2htmlEX/CMakeLists.txt b/pdf2htmlEX/CMakeLists.txt index b8e5008..30822da 100644 --- a/pdf2htmlEX/CMakeLists.txt +++ b/pdf2htmlEX/CMakeLists.txt @@ -20,7 +20,7 @@ add_custom_target(dist find_package(PkgConfig) -pkg_check_modules(POPPLER REQUIRED poppler>=0.25.0) +pkg_check_modules(POPPLER REQUIRED poppler>=0.81.0) include_directories(${POPPLER_INCLUDE_DIRS}) link_directories(${POPPLER_LIBRARY_DIRS}) set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${POPPLER_LIBRARIES}) @@ -55,7 +55,7 @@ if(ENABLE_SVG) endif() # fontforge starts using pkg-config 'correctly' since 2.0.0 -pkg_check_modules(FONTFORGE REQUIRED libfontforge>=2.0.0) +pkg_check_modules(FONTFORGE REQUIRED libfontforge>=2.0.20170731) include_directories(${FONTFORGE_INCLUDE_DIRS}) link_directories(${FONTFORGE_LIBRARY_DIRS}) set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${FONTFORGE_LIBRARIES}) From 58bdd22293858216827a819aef14a56b83daa614 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 25 Nov 2019 18:53:01 +0000 Subject: [PATCH 032/128] final correction and first travis build --- .travis.yml.off => .travis.yml | 0 pdf2htmlEX/CMakeLists.txt | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) rename .travis.yml.off => .travis.yml (100%) diff --git a/.travis.yml.off b/.travis.yml similarity index 100% rename from .travis.yml.off rename to .travis.yml diff --git a/pdf2htmlEX/CMakeLists.txt b/pdf2htmlEX/CMakeLists.txt index 30822da..22c3906 100644 --- a/pdf2htmlEX/CMakeLists.txt +++ b/pdf2htmlEX/CMakeLists.txt @@ -55,7 +55,8 @@ if(ENABLE_SVG) endif() # fontforge starts using pkg-config 'correctly' since 2.0.0 -pkg_check_modules(FONTFORGE REQUIRED libfontforge>=2.0.20170731) +#pkg_check_modules(FONTFORGE REQUIRED libfontforge>=2.0.20170731) +pkg_check_modules(FONTFORGE REQUIRED libfontforge>=2.0.0) include_directories(${FONTFORGE_INCLUDE_DIRS}) link_directories(${FONTFORGE_LIBRARY_DIRS}) set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} ${FONTFORGE_LIBRARIES}) From 93ed653ba9057bc5e9a8c5ab139bfc31a44b7daf Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 25 Nov 2019 19:27:09 +0000 Subject: [PATCH 033/128] corrected tarvis --- .travis.yml | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 71baa25..ae3348b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,34 @@ services: compiler: gcc -#addons: +env: + - UNATTENDED=--assume-yes + +addons: + apt: + # build tools + - git + - pkg-config + - ruby + - autoconf + - libtool + - cmake + - make + - gcc + - g++ + - gettext + - openjdk-8-jre-headless + - tree + # dev libraries + - libcairo-dev + - libspiro-dev + - libpng-dev + - libjpeg-dev + - poppler-data + - libpango1.0-dev + - liblcms2-dev + - libxml2-dev + - libuninameslist-dev # homebrew: # packages: # - autoconf @@ -46,5 +73,14 @@ matrix: script: - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - - ./buildScripts/doItAll + - ./buildScripts/getPoppler + - ./buildScripts/buildPoppler + - ./buildScripts/installPoppler + - ./buildScripts/getFontforge + - ./buildScripts/buildFontforge + - ./buildScripts/installFontforge + - ./buildScripts/buildPdf2htmlEX + - ./buildScripts/installPdf2htmlEX + - ./buildScripts/createAppImage + - ./buildScripts/createDockerImage - docker push $DOCKER_USERNAME/pdf2htmlex From fe2111309090e359eae512d1c71ada0d409b846a Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 25 Nov 2019 19:28:50 +0000 Subject: [PATCH 034/128] corrected tarvis 2 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ae3348b..82012d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ services: compiler: gcc env: - - UNATTENDED=--assume-yes + - UNATTENDED="--assume-yes" addons: apt: From a8346a4204f78ea8195595b692b973c9805a921b Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 25 Nov 2019 19:31:00 +0000 Subject: [PATCH 035/128] corrected tarvis 3 --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 82012d0..b64fa7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,10 +14,13 @@ services: compiler: gcc env: - - UNATTENDED="--assume-yes" + global: + - UNATTENDED="--assume-yes" addons: apt: + update: true + packages: # build tools - git - pkg-config From 8f177e198d17559abc303a780d440a3b31398bf4 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 25 Nov 2019 19:57:11 +0000 Subject: [PATCH 036/128] corrected tarvis 4 --- .travis.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index b64fa7b..2477009 100644 --- a/.travis.yml +++ b/.travis.yml @@ -76,14 +76,14 @@ matrix: script: - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - - ./buildScripts/getPoppler - - ./buildScripts/buildPoppler - - ./buildScripts/installPoppler - - ./buildScripts/getFontforge - - ./buildScripts/buildFontforge - - ./buildScripts/installFontforge - - ./buildScripts/buildPdf2htmlEX - - ./buildScripts/installPdf2htmlEX - - ./buildScripts/createAppImage - - ./buildScripts/createDockerImage + - ./buildScripts/getPoppler || travis_terminate 1; + - ./buildScripts/buildPoppler || travis_terminate 1; + - ./buildScripts/installPoppler || travis_terminate 1; + - ./buildScripts/getFontforge || travis_terminate 1; + - ./buildScripts/buildFontforge || travis_terminate 1; + - ./buildScripts/installFontforge || travis_terminate 1; + - ./buildScripts/buildPdf2htmlEX || travis_terminate 1; + - ./buildScripts/installPdf2htmlEX || travis_terminate 1; + - ./buildScripts/createAppImage || travis_terminate 1; + - ./buildScripts/createDockerImage || travis_terminate 1; - docker push $DOCKER_USERNAME/pdf2htmlex From 1f25183b4cb930c34cc155db8b8f0586c2ebf80d Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 25 Nov 2019 20:04:24 +0000 Subject: [PATCH 037/128] corrected tarvis 5 --- .travis.yml | 2 +- buildScripts/versionEnvs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2477009..83ea400 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ os: - linux # - osx -dist: xenial +dist: bionic services: - docker diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index 51208ac..4db6f51 100644 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -13,5 +13,5 @@ export PDF2HTMLEX_VERSION=newBuildSystem export MACHINE_ARCH=`uname -m` -export DOCKER_FROM=ubuntu:16.04 +export DOCKER_FROM=ubuntu:18.04 From 7155ed25cc5b5deaf54c394eeafe459aea5ee957 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 25 Nov 2019 22:06:17 +0000 Subject: [PATCH 038/128] corrected travis 6 --- .travis.yml | 56 +++++++++++++++++++----------------- buildScripts/getBuildTools | 27 ++++++++--------- buildScripts/getDevLibraries | 19 ++++++------ 3 files changed, 53 insertions(+), 49 deletions(-) diff --git a/.travis.yml b/.travis.yml index 83ea400..32e5583 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,33 +17,33 @@ env: global: - UNATTENDED="--assume-yes" -addons: - apt: - update: true - packages: - # build tools - - git - - pkg-config - - ruby - - autoconf - - libtool - - cmake - - make - - gcc - - g++ - - gettext - - openjdk-8-jre-headless - - tree - # dev libraries - - libcairo-dev - - libspiro-dev - - libpng-dev - - libjpeg-dev - - poppler-data - - libpango1.0-dev - - liblcms2-dev - - libxml2-dev - - libuninameslist-dev +#addons: +# apt: +# update: true +# packages: +# # build tools +# - git +# - pkg-config +# - ruby +# - autoconf +# - libtool +# - cmake +# - make +# - gcc +# - g++ +# - gettext +# - openjdk-8-jre-headless +# - tree +# # dev libraries +# - libcairo-dev +# - libspiro-dev +# - libpng-dev +# - libjpeg-dev +# - poppler-data +# - libpango1.0-dev +# - liblcms2-dev +# - libxml2-dev +# - libuninameslist-dev # homebrew: # packages: # - autoconf @@ -76,6 +76,8 @@ matrix: script: - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + - ./buildScripts/getBuildTools || travis_terminate 1; + - ./buildScripts/getDevLibraries || travis_terminate 1; - ./buildScripts/getPoppler || travis_terminate 1; - ./buildScripts/buildPoppler || travis_terminate 1; - ./buildScripts/installPoppler || travis_terminate 1; diff --git a/buildScripts/getBuildTools b/buildScripts/getBuildTools index 9219bb8..d4f29c6 100755 --- a/buildScripts/getBuildTools +++ b/buildScripts/getBuildTools @@ -5,18 +5,19 @@ # set the bash environment variable 'UNATTENDED' to '--assume-yes' for # unattended use (for example in the .travis.yml script) -sudo apt $UNATTENDED install \ - aptitude \ - git \ - pkg-config \ - ruby \ - autoconf \ - libtool \ - cmake \ - make \ - gcc \ - g++ \ - gettext \ - openjdk-8-jre-headless \ +sudo apt-get update +sudo apt-get $UNATTENDED install \ + aptitude \ + git \ + pkg-config \ + ruby \ + autoconf \ + libtool \ + cmake \ + make \ + gcc \ + g++ \ + gettext \ + openjdk-8-jre-headless \ tree diff --git a/buildScripts/getDevLibraries b/buildScripts/getDevLibraries index eab6818..05638c3 100755 --- a/buildScripts/getDevLibraries +++ b/buildScripts/getDevLibraries @@ -6,14 +6,15 @@ # set the bash environment variable 'UNATTENDED' to '--assume-yes' for # unattended use (for example in the .travis.yml script) -sudo apt $UNATTENDED install \ - libcairo-dev \ - libspiro-dev \ - libpng-dev \ - libjpeg-dev \ - poppler-data \ - libpango1.0-dev \ - liblcms2-dev \ - libxml2-dev \ +sudo apt-get update +sudo apt-get $UNATTENDED install \ + libcairo-dev \ + libspiro-dev \ + libpng-dev \ + libjpeg-dev \ + poppler-data \ + libpango1.0-dev \ + liblcms2-dev \ + libxml2-dev \ libuninameslist-dev From be3ebe2dddc140624c5a410f9c9c4b0800a92e96 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 25 Nov 2019 22:17:08 +0000 Subject: [PATCH 039/128] corrected travis 7 --- buildScripts/getDevLibraries | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildScripts/getDevLibraries b/buildScripts/getDevLibraries index 05638c3..9636ffe 100755 --- a/buildScripts/getDevLibraries +++ b/buildScripts/getDevLibraries @@ -16,5 +16,5 @@ sudo apt-get $UNATTENDED install \ libpango1.0-dev \ liblcms2-dev \ libxml2-dev \ - libuninameslist-dev - + libuninameslist-dev \ + python-def From c4a7a9fb034036eda0a773ae4b65e35ae25e4c99 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 07:20:17 +0000 Subject: [PATCH 040/128] corrected travis 8 --- buildScripts/getDevLibraries | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/getDevLibraries b/buildScripts/getDevLibraries index 9636ffe..ab2b7aa 100755 --- a/buildScripts/getDevLibraries +++ b/buildScripts/getDevLibraries @@ -17,4 +17,4 @@ sudo apt-get $UNATTENDED install \ liblcms2-dev \ libxml2-dev \ libuninameslist-dev \ - python-def + python-dev From ca690632e9273421f03f77ed9d31fe3ada6408b8 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 07:52:30 +0000 Subject: [PATCH 041/128] check for existing docker commands before trying to create docker --- buildScripts/createDockerImage | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/buildScripts/createDockerImage b/buildScripts/createDockerImage index f9f2cda..226aa08 100755 --- a/buildScripts/createDockerImage +++ b/buildScripts/createDockerImage @@ -2,33 +2,38 @@ # This bash script creates a docker image from an existing pdf2htmlEX -source buildScripts/versionEnvs +if [ -x "$(which docker)" ]; then -source buildScripts/dockerFunctions + source buildScripts/versionEnvs -mkdir -p imageBuild/dockerDir + source buildScripts/dockerFunctions -cd pdf2htmlEX/build + mkdir -p imageBuild/dockerDir -sudo rm -rf install_manifest.txt + cd pdf2htmlEX/build -make install DESTDIR=../../imageBuild/dockerDir + sudo rm -rf install_manifest.txt -cd ../../imageBuild/dockerDir + make install DESTDIR=../../imageBuild/dockerDir -copy_deps + cd ../../imageBuild/dockerDir -delete_blacklisted + copy_deps -cat >> Dockerfile <> Dockerfile < Date: Tue, 26 Nov 2019 08:43:41 +0000 Subject: [PATCH 042/128] corrected travis 9 --- .travis.yml | 7 +++++++ buildScripts/getDevLibraries | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 32e5583..b8cae24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,13 @@ sudo: true os: - linux # - osx +# - windows + +# for windows *test* of AppImage +# see https://docs.travis-ci.com/user/build-matrix/#using-different-programming-languages-per-job +# and https://discourse.appimage.org/t/run-appimage-on-windows/177 +# and https://docs.travis-ci.com/user/reference/windows/ +# why fuse is not possible on windows: https://superuser.com/questions/179436/is-it-possible-to-use-fuse-with-windows dist: bionic diff --git a/buildScripts/getDevLibraries b/buildScripts/getDevLibraries index ab2b7aa..6631536 100755 --- a/buildScripts/getDevLibraries +++ b/buildScripts/getDevLibraries @@ -17,4 +17,4 @@ sudo apt-get $UNATTENDED install \ liblcms2-dev \ libxml2-dev \ libuninameslist-dev \ - python-dev + libpython-dev From 6e44db6518e1323eb2e4e85cc86a51315a4a7fd3 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 09:07:03 +0000 Subject: [PATCH 043/128] corrected travis 10 --- .travis.yml | 1 + buildScripts/getDevLibraries | 6 ++++-- buildScripts/travisEnvs | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b8cae24..91101a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ compiler: gcc env: global: - UNATTENDED="--assume-yes" + - FORCE_REINSTALL="--reinstall" #addons: # apt: diff --git a/buildScripts/getDevLibraries b/buildScripts/getDevLibraries index 6631536..a32a956 100755 --- a/buildScripts/getDevLibraries +++ b/buildScripts/getDevLibraries @@ -16,5 +16,7 @@ sudo apt-get $UNATTENDED install \ libpango1.0-dev \ liblcms2-dev \ libxml2-dev \ - libuninameslist-dev \ - libpython-dev + libuninameslist-dev + +sudo apt-get $UNATTENDED $FORCE_REINSTALL install \ + libpython2.7-dev diff --git a/buildScripts/travisEnvs b/buildScripts/travisEnvs index 35d2199..3f8da7a 100644 --- a/buildScripts/travisEnvs +++ b/buildScripts/travisEnvs @@ -1,3 +1,3 @@ export MAKE_PARALLEL="-j `nproc`" - +export FORCE_REINSTALL=--reinstall From 0fdb4212c719e91bfe07c43281a74762e5733e96 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 09:44:53 +0000 Subject: [PATCH 044/128] corrected travis 11 --- buildScripts/buildFontforge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 139d466..3c96ca8 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -16,4 +16,4 @@ do patch -p 1 < $APATCHFILE done -make $MAKE_PARALLEL +make $MAKE_PARALLEL VERBOSE=1 From 496e7f26d79a5d064d64e5d3645e9872d542d162 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 09:45:56 +0000 Subject: [PATCH 045/128] corrected travis 12 --- buildScripts/buildFontforge | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 3c96ca8..f8b96d8 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -16,4 +16,7 @@ do patch -p 1 < $APATCHFILE done + +tree /usr/include/python2.7 + make $MAKE_PARALLEL VERBOSE=1 From 948e523201702a3528b65851494a318899415d2c Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 09:54:05 +0000 Subject: [PATCH 046/128] corrected travis 13 --- buildScripts/buildFontforge | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index f8b96d8..3eb1400 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -19,4 +19,8 @@ done tree /usr/include/python2.7 -make $MAKE_PARALLEL VERBOSE=1 +make -n +make + +#make $MAKE_PARALLEL + From 67db9afabf7eaf3ccbe57234504ee3e470c1e3e1 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 09:55:05 +0000 Subject: [PATCH 047/128] corrected travis 14 --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 91101a9..81da3e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,9 +86,6 @@ script: - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - ./buildScripts/getBuildTools || travis_terminate 1; - ./buildScripts/getDevLibraries || travis_terminate 1; - - ./buildScripts/getPoppler || travis_terminate 1; - - ./buildScripts/buildPoppler || travis_terminate 1; - - ./buildScripts/installPoppler || travis_terminate 1; - ./buildScripts/getFontforge || travis_terminate 1; - ./buildScripts/buildFontforge || travis_terminate 1; - ./buildScripts/installFontforge || travis_terminate 1; @@ -97,3 +94,7 @@ script: - ./buildScripts/createAppImage || travis_terminate 1; - ./buildScripts/createDockerImage || travis_terminate 1; - docker push $DOCKER_USERNAME/pdf2htmlex + +# - ./buildScripts/getPoppler || travis_terminate 1; +# - ./buildScripts/buildPoppler || travis_terminate 1; +# - ./buildScripts/installPoppler || travis_terminate 1; From 23d9686096fb2edf0e7958a8bee05950d2634c25 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 10:13:40 +0000 Subject: [PATCH 048/128] corrected travis 15 --- buildScripts/buildFontforge | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 3eb1400..5f19194 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -19,7 +19,10 @@ done tree /usr/include/python2.7 +cd fontforge make -n + +cd .. make #make $MAKE_PARALLEL From df1f265592dae0cd2356a2a06edb1a901af9b555 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 10:18:08 +0000 Subject: [PATCH 049/128] corrected travis 16 --- buildScripts/buildFontforge | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 5f19194..0ee7d26 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -6,7 +6,7 @@ source buildScripts/versionEnvs cd fontforge ./bootstrap -./configure +./configure --disable-silent-rules # Apply any patches required for fontforge raw sources before we make # @@ -19,10 +19,10 @@ done tree /usr/include/python2.7 -cd fontforge -make -n +#cd fontforge +#make -n +#cd .. -cd .. make #make $MAKE_PARALLEL From d6420613d977c26b4a68f340cb363129b8638c22 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 10:49:39 +0000 Subject: [PATCH 050/128] corrected travis 17 --- buildScripts/buildFontforge | 2 ++ buildScripts/fontforgeConfig.site | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 buildScripts/fontforgeConfig.site diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 0ee7d26..520842a 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -4,6 +4,8 @@ source buildScripts/versionEnvs +export CONFIG_SITE=$(pwd)/buildScripts/fontforgeConfig.site + cd fontforge ./bootstrap ./configure --disable-silent-rules diff --git a/buildScripts/fontforgeConfig.site b/buildScripts/fontforgeConfig.site new file mode 100644 index 0000000..567ff41 --- /dev/null +++ b/buildScripts/fontforgeConfig.site @@ -0,0 +1,6 @@ +# This autotools config.site file add the python2.7 include files which are +# for some reason missed in the standard fontforge configuration on +# travisCI + +CFLAGS=$CFLAGS -I/usr/include/python2.7 + From d22652e5ba0b6b9660a9cc47a16f5adfb2aa0dc5 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 10:54:21 +0000 Subject: [PATCH 051/128] corrected travis 18 --- buildScripts/buildFontforge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 520842a..db680e2 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -4,7 +4,7 @@ source buildScripts/versionEnvs -export CONFIG_SITE=$(pwd)/buildScripts/fontforgeConfig.site +export CONFIG_SITE=/home/travis/build/pdf2htmlEX/buildScripts/fontforgeConfig.site cd fontforge ./bootstrap From 7a74250679b4fc4ecedafd635d92bddcf69f00a2 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 11:19:49 +0000 Subject: [PATCH 052/128] corrected travis 19 --- buildScripts/buildFontforge | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index db680e2..81d5340 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -6,6 +6,8 @@ source buildScripts/versionEnvs export CONFIG_SITE=/home/travis/build/pdf2htmlEX/buildScripts/fontforgeConfig.site +pkg-config --cflags python + cd fontforge ./bootstrap ./configure --disable-silent-rules From de1be14b03fee2c78e5a74b34d793907d115526b Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 11:33:53 +0000 Subject: [PATCH 053/128] corrected travis 20 --- buildScripts/buildFontforge | 1 + 1 file changed, 1 insertion(+) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 81d5340..8d0910e 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -7,6 +7,7 @@ source buildScripts/versionEnvs export CONFIG_SITE=/home/travis/build/pdf2htmlEX/buildScripts/fontforgeConfig.site pkg-config --cflags python +pkg-config --cflags python-2.7 cd fontforge ./bootstrap From 73f0eb7191de6a983825b0b01794089e1003ddba Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 11:45:58 +0000 Subject: [PATCH 054/128] corrected travis 21 --- buildScripts/buildFontforge | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 8d0910e..ff4a29f 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -13,6 +13,12 @@ cd fontforge ./bootstrap ./configure --disable-silent-rules +echo "" +echo "-------------------------------" +cat config.log +echo "-------------------------------" +echo "" + # Apply any patches required for fontforge raw sources before we make # for APATCHFILE in $(ls ../patches/fontforge-$FONTFORGE_VERSION-*) From 34d53bdb753f3cb9677c35838af4273a827d0bd7 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 12:03:23 +0000 Subject: [PATCH 055/128] corrected travis 22 --- buildScripts/fontforgeConfig.site | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/fontforgeConfig.site b/buildScripts/fontforgeConfig.site index 567ff41..4c8361b 100644 --- a/buildScripts/fontforgeConfig.site +++ b/buildScripts/fontforgeConfig.site @@ -2,5 +2,5 @@ # for some reason missed in the standard fontforge configuration on # travisCI -CFLAGS=$CFLAGS -I/usr/include/python2.7 +PYTHON_CFLAGS=$PYTHON_CFLAGS -I/usr/include/python2.7 From ec7d6d9379266caed455c7d4ba19736f2025f741 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 12:13:27 +0000 Subject: [PATCH 056/128] corrected travis 23 --- buildScripts/buildFontforge | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index ff4a29f..e57731f 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -19,6 +19,13 @@ cat config.log echo "-------------------------------" echo "" +echo "" +echo "-------------------------------" +cat fontforge/Makefile +echo "-------------------------------" +echo "" + + # Apply any patches required for fontforge raw sources before we make # for APATCHFILE in $(ls ../patches/fontforge-$FONTFORGE_VERSION-*) From 0792e570a5ad53b55bd9c46f6cf78329c3806187 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 12:36:10 +0000 Subject: [PATCH 057/128] corrected travis 24 --- buildScripts/buildFontforge | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index e57731f..7954663 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -6,8 +6,14 @@ source buildScripts/versionEnvs export CONFIG_SITE=/home/travis/build/pdf2htmlEX/buildScripts/fontforgeConfig.site +echo "" +echo "-------------------------------" pkg-config --cflags python pkg-config --cflags python-2.7 +echo $PYTHON_CFLAGS +echo $PYTHON_LIBS +echo "-------------------------------" +echo "" cd fontforge ./bootstrap From d65e6ff66ebd3907135163d29889673b614c75a3 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 12:55:53 +0000 Subject: [PATCH 058/128] corrected travis 25 --- buildScripts/buildFontforge | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 7954663..5b6d78f 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -4,7 +4,14 @@ source buildScripts/versionEnvs -export CONFIG_SITE=/home/travis/build/pdf2htmlEX/buildScripts/fontforgeConfig.site + +# This is a work-around to fix TravisCI's declaration of PYTHON_CFLAGS +# which is then honoured exactly as is by the fontforge bootstrap and +# configure steps +# +if [ -n "$PYTHON_CFLAGS" ] ; then + export PYTHON_CFLAGS="$(pkg-config --cflags python) $PYTHON_CFLAGS" +fi echo "" echo "-------------------------------" @@ -40,7 +47,6 @@ do patch -p 1 < $APATCHFILE done - tree /usr/include/python2.7 #cd fontforge From aa66683277e14843994faf49a72668b4b9c045bd Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 13:10:52 +0000 Subject: [PATCH 059/128] corrected travis 26 --- .travis.yml | 6 +++--- buildScripts/buildFontforge | 36 ++++++++----------------------- buildScripts/fontforgeConfig.site | 6 ------ buildScripts/getDevLibraries | 6 ++---- buildScripts/travisEnvs | 1 - 5 files changed, 14 insertions(+), 41 deletions(-) delete mode 100644 buildScripts/fontforgeConfig.site diff --git a/.travis.yml b/.travis.yml index 81da3e7..43790e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,6 +86,9 @@ script: - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - ./buildScripts/getBuildTools || travis_terminate 1; - ./buildScripts/getDevLibraries || travis_terminate 1; + - ./buildScripts/getPoppler || travis_terminate 1; + - ./buildScripts/buildPoppler || travis_terminate 1; + - ./buildScripts/installPoppler || travis_terminate 1; - ./buildScripts/getFontforge || travis_terminate 1; - ./buildScripts/buildFontforge || travis_terminate 1; - ./buildScripts/installFontforge || travis_terminate 1; @@ -95,6 +98,3 @@ script: - ./buildScripts/createDockerImage || travis_terminate 1; - docker push $DOCKER_USERNAME/pdf2htmlex -# - ./buildScripts/getPoppler || travis_terminate 1; -# - ./buildScripts/buildPoppler || travis_terminate 1; -# - ./buildScripts/installPoppler || travis_terminate 1; diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 5b6d78f..40ca338 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -7,37 +7,27 @@ source buildScripts/versionEnvs # This is a work-around to fix TravisCI's declaration of PYTHON_CFLAGS # which is then honoured exactly as is by the fontforge bootstrap and -# configure steps +# configure steps. +# +# see: https://github.com/travis-ci/travis-ci/issues/5301 (unfixed) # if [ -n "$PYTHON_CFLAGS" ] ; then export PYTHON_CFLAGS="$(pkg-config --cflags python) $PYTHON_CFLAGS" fi echo "" +echo "PYTHON_CFLAGS: echo "-------------------------------" -pkg-config --cflags python -pkg-config --cflags python-2.7 echo $PYTHON_CFLAGS -echo $PYTHON_LIBS echo "-------------------------------" echo "" +# Can use "configure --disable-silent-rules" to debug configuration/make +# problems +# cd fontforge ./bootstrap -./configure --disable-silent-rules - -echo "" -echo "-------------------------------" -cat config.log -echo "-------------------------------" -echo "" - -echo "" -echo "-------------------------------" -cat fontforge/Makefile -echo "-------------------------------" -echo "" - +./configure # Apply any patches required for fontforge raw sources before we make # @@ -47,13 +37,5 @@ do patch -p 1 < $APATCHFILE done -tree /usr/include/python2.7 - -#cd fontforge -#make -n -#cd .. - -make - -#make $MAKE_PARALLEL +make $MAKE_PARALLEL diff --git a/buildScripts/fontforgeConfig.site b/buildScripts/fontforgeConfig.site deleted file mode 100644 index 4c8361b..0000000 --- a/buildScripts/fontforgeConfig.site +++ /dev/null @@ -1,6 +0,0 @@ -# This autotools config.site file add the python2.7 include files which are -# for some reason missed in the standard fontforge configuration on -# travisCI - -PYTHON_CFLAGS=$PYTHON_CFLAGS -I/usr/include/python2.7 - diff --git a/buildScripts/getDevLibraries b/buildScripts/getDevLibraries index a32a956..6631536 100755 --- a/buildScripts/getDevLibraries +++ b/buildScripts/getDevLibraries @@ -16,7 +16,5 @@ sudo apt-get $UNATTENDED install \ libpango1.0-dev \ liblcms2-dev \ libxml2-dev \ - libuninameslist-dev - -sudo apt-get $UNATTENDED $FORCE_REINSTALL install \ - libpython2.7-dev + libuninameslist-dev \ + libpython-dev diff --git a/buildScripts/travisEnvs b/buildScripts/travisEnvs index 3f8da7a..f9e4553 100644 --- a/buildScripts/travisEnvs +++ b/buildScripts/travisEnvs @@ -1,3 +1,2 @@ export MAKE_PARALLEL="-j `nproc`" -export FORCE_REINSTALL=--reinstall From 73408eab6ac2970c64823a7ad76e5f3c2ca4853d Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 13:18:21 +0000 Subject: [PATCH 060/128] corrected travis 27 --- buildScripts/buildFontforge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 40ca338..cd2a9b1 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -16,7 +16,7 @@ if [ -n "$PYTHON_CFLAGS" ] ; then fi echo "" -echo "PYTHON_CFLAGS: +echo "PYTHON_CFLAGS:" echo "-------------------------------" echo $PYTHON_CFLAGS echo "-------------------------------" From 7b6826584555cb436010cb13abcbf9f94eb95fa7 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 13:41:13 +0000 Subject: [PATCH 061/128] corrected travis 28 --- buildScripts/createAppImage | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index c86c0f2..e04900e 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -4,6 +4,10 @@ source buildScripts/versionEnvs +# For appimage output plugin +# +export VERSION=$PDF2HTMLEX_VERSION + mkdir -p imageBuild/appDir/usr/lib/ cd pdf2htmlEX/build @@ -30,6 +34,3 @@ chmod a+x $LINUX_DEPLOY_APP_IMAGE -i ../pdf2htmlEX/logo/pdf2htmlEX.svg \ --appdir=appDir \ --output appimage - -mv pdf2htmlEX-$MACHINE_ARCH.AppImage \ - pdf2htmlEX-$PDF2HTMLEX_VERSION-$MACHINE_ARCH.AppImage From 342a7569cc34b84637ac768d66563a5a89e580f8 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 17:13:58 +0000 Subject: [PATCH 062/128] travis test release of appImage --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index 43790e9..25f530e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -98,3 +98,13 @@ script: - ./buildScripts/createDockerImage || travis_terminate 1; - docker push $DOCKER_USERNAME/pdf2htmlex +deploy: + provider: releases + api_key: + secure: ALWKAkgeLSPS4ULyTtxU50ZmSICEafCirCQ1YmuVTqe9nrc8E9Jm+4QaBlab5k6v90EpzNvZBnMOiT8cT1Wp2lqJzcGdGMcG49mhRvirdYhXgWuHYnygVgkxEhgejXcQaEiaGPDV3Y1k9MuiAVr8ApjUvIMlY4Hg1y0r7/rqR2fYmen+f+6a87bp5PptwakC9bfoYb92651d0TbugFfKT6TGKlE2jGlQ6On1alzLQ2DXA8coUjwpp4NcDD8OhnYGN/VZWkqckaBrMrHwjJ5FTfy5MGBOqCLzNix8sCGLEeCKkKC8J0nniNJ7+KOu9LJ2uIezKYfaUOJV0kik7F9ErvxjbfSRieako2yaSOR8X39aicTtpbyoXPRSKDU4WYX56vt4Dx7aNrYtP5b/UwWGXZa9MK7rNGJ+hiMDO1AzuyXirzR4RaJXCyC8n5W9ahBZBHCMqd5gMg5sMGPNj3Rgt34+R+nGYssum5wvr+6IKNl57sIoZFCgqviBrw2gJOCqlgOcEk/4ZSehWnXPCk6Gzxvkqkt/dmp8pJLNyvMaWcEZ6CXNHDU8MZS7bASo8Z7eAYvmX0MMjVty8J47expVaJ8M3OFHu6lE6tU8wwfd+Igr2TlWcixqaa3hDMgS+ghwdiZbYuMdR1AyZnEqK3xwvXXPPXrqRsB9xHtczLibkjY= + file: pdf2htmlEX-newBuildSystem-x86_64.AppImage + skip_cleanup: true + on: + repo: stephengaito/pdf2htmlEX + branch: newBuildSystem + From db644bd1a86453cafbeaa84c99634c7f085aedad Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 26 Nov 2019 19:43:56 +0000 Subject: [PATCH 063/128] travis test of release appImage 2 --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 25f530e..37db6b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,7 @@ env: global: - UNATTENDED="--assume-yes" - FORCE_REINSTALL="--reinstall" + - TRAVIS_TAG="test-$PDF2HTMLEX_VERSION-$(date +%Y_%m_%d-%H_%M_%S)" #addons: # apt: @@ -105,6 +106,6 @@ deploy: file: pdf2htmlEX-newBuildSystem-x86_64.AppImage skip_cleanup: true on: + tags: true repo: stephengaito/pdf2htmlEX - branch: newBuildSystem From 891900c99d35abc9a4d36906e294f3316c8ca488 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 08:50:34 +0000 Subject: [PATCH 064/128] test travisci 1 --- .travis.yml | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index 37db6b2..be6fbb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -84,28 +84,32 @@ matrix: # - os: osx # Until the build passes, then re-enable. script: - - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - - ./buildScripts/getBuildTools || travis_terminate 1; - - ./buildScripts/getDevLibraries || travis_terminate 1; - - ./buildScripts/getPoppler || travis_terminate 1; - - ./buildScripts/buildPoppler || travis_terminate 1; - - ./buildScripts/installPoppler || travis_terminate 1; - - ./buildScripts/getFontforge || travis_terminate 1; - - ./buildScripts/buildFontforge || travis_terminate 1; - - ./buildScripts/installFontforge || travis_terminate 1; - - ./buildScripts/buildPdf2htmlEX || travis_terminate 1; - - ./buildScripts/installPdf2htmlEX || travis_terminate 1; - - ./buildScripts/createAppImage || travis_terminate 1; - - ./buildScripts/createDockerImage || travis_terminate 1; - - docker push $DOCKER_USERNAME/pdf2htmlex + - echo $TRAVIS_TAG + - echo $TRAVIS_BRANCH + - echo $TRAVIS_BUILD_DIR + - echo $HOME +# - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin +# - ./buildScripts/getBuildTools || travis_terminate 1; +# - ./buildScripts/getDevLibraries || travis_terminate 1; +# - ./buildScripts/getPoppler || travis_terminate 1; +# - ./buildScripts/buildPoppler || travis_terminate 1; +# - ./buildScripts/installPoppler || travis_terminate 1; +# - ./buildScripts/getFontforge || travis_terminate 1; +# - ./buildScripts/buildFontforge || travis_terminate 1; +# - ./buildScripts/installFontforge || travis_terminate 1; +# - ./buildScripts/buildPdf2htmlEX || travis_terminate 1; +# - ./buildScripts/installPdf2htmlEX || travis_terminate 1; +# - ./buildScripts/createAppImage || travis_terminate 1; +# - ./buildScripts/createDockerImage || travis_terminate 1; +# - docker push $DOCKER_USERNAME/pdf2htmlex -deploy: - provider: releases - api_key: - secure: ALWKAkgeLSPS4ULyTtxU50ZmSICEafCirCQ1YmuVTqe9nrc8E9Jm+4QaBlab5k6v90EpzNvZBnMOiT8cT1Wp2lqJzcGdGMcG49mhRvirdYhXgWuHYnygVgkxEhgejXcQaEiaGPDV3Y1k9MuiAVr8ApjUvIMlY4Hg1y0r7/rqR2fYmen+f+6a87bp5PptwakC9bfoYb92651d0TbugFfKT6TGKlE2jGlQ6On1alzLQ2DXA8coUjwpp4NcDD8OhnYGN/VZWkqckaBrMrHwjJ5FTfy5MGBOqCLzNix8sCGLEeCKkKC8J0nniNJ7+KOu9LJ2uIezKYfaUOJV0kik7F9ErvxjbfSRieako2yaSOR8X39aicTtpbyoXPRSKDU4WYX56vt4Dx7aNrYtP5b/UwWGXZa9MK7rNGJ+hiMDO1AzuyXirzR4RaJXCyC8n5W9ahBZBHCMqd5gMg5sMGPNj3Rgt34+R+nGYssum5wvr+6IKNl57sIoZFCgqviBrw2gJOCqlgOcEk/4ZSehWnXPCk6Gzxvkqkt/dmp8pJLNyvMaWcEZ6CXNHDU8MZS7bASo8Z7eAYvmX0MMjVty8J47expVaJ8M3OFHu6lE6tU8wwfd+Igr2TlWcixqaa3hDMgS+ghwdiZbYuMdR1AyZnEqK3xwvXXPPXrqRsB9xHtczLibkjY= - file: pdf2htmlEX-newBuildSystem-x86_64.AppImage - skip_cleanup: true - on: - tags: true - repo: stephengaito/pdf2htmlEX +#deploy: +# provider: releases +# api_key: +# secure: ALWKAkgeLSPS4ULyTtxU50ZmSICEafCirCQ1YmuVTqe9nrc8E9Jm+4QaBlab5k6v90EpzNvZBnMOiT8cT1Wp2lqJzcGdGMcG49mhRvirdYhXgWuHYnygVgkxEhgejXcQaEiaGPDV3Y1k9MuiAVr8ApjUvIMlY4Hg1y0r7/rqR2fYmen+f+6a87bp5PptwakC9bfoYb92651d0TbugFfKT6TGKlE2jGlQ6On1alzLQ2DXA8coUjwpp4NcDD8OhnYGN/VZWkqckaBrMrHwjJ5FTfy5MGBOqCLzNix8sCGLEeCKkKC8J0nniNJ7+KOu9LJ2uIezKYfaUOJV0kik7F9ErvxjbfSRieako2yaSOR8X39aicTtpbyoXPRSKDU4WYX56vt4Dx7aNrYtP5b/UwWGXZa9MK7rNGJ+hiMDO1AzuyXirzR4RaJXCyC8n5W9ahBZBHCMqd5gMg5sMGPNj3Rgt34+R+nGYssum5wvr+6IKNl57sIoZFCgqviBrw2gJOCqlgOcEk/4ZSehWnXPCk6Gzxvkqkt/dmp8pJLNyvMaWcEZ6CXNHDU8MZS7bASo8Z7eAYvmX0MMjVty8J47expVaJ8M3OFHu6lE6tU8wwfd+Igr2TlWcixqaa3hDMgS+ghwdiZbYuMdR1AyZnEqK3xwvXXPPXrqRsB9xHtczLibkjY= +# file: pdf2htmlEX-newBuildSystem-x86_64.AppImage +# skip_cleanup: true +# on: +# tags: true +# repo: stephengaito/pdf2htmlEX From cb0e2e8d0897260f4da0c54442524d477e1b6d03 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 08:53:28 +0000 Subject: [PATCH 065/128] test travisci 2 --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index be6fbb0..586e6e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ env: global: - UNATTENDED="--assume-yes" - FORCE_REINSTALL="--reinstall" - - TRAVIS_TAG="test-$PDF2HTMLEX_VERSION-$(date +%Y_%m_%d-%H_%M_%S)" + - TRAVIS_TAG="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" #addons: # apt: @@ -88,6 +88,8 @@ script: - echo $TRAVIS_BRANCH - echo $TRAVIS_BUILD_DIR - echo $HOME + - pwd + - ls -la # - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin # - ./buildScripts/getBuildTools || travis_terminate 1; # - ./buildScripts/getDevLibraries || travis_terminate 1; From f849507a9fb006ca3cb6654f7823019c802d55df Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 08:56:21 +0000 Subject: [PATCH 066/128] test travisci 3 --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 586e6e5..b950e8c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,6 +90,9 @@ script: - echo $HOME - pwd - ls -la + - cd + - pwd + - ls -la # - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin # - ./buildScripts/getBuildTools || travis_terminate 1; # - ./buildScripts/getDevLibraries || travis_terminate 1; From eaa43586766bf52e22528045c54d8f2fb0b1d40f Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 09:00:20 +0000 Subject: [PATCH 067/128] test travisci 4 --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index b950e8c..381f3c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -93,6 +93,9 @@ script: - cd - pwd - ls -la + - cd build + - pwd + - ls -la # - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin # - ./buildScripts/getBuildTools || travis_terminate 1; # - ./buildScripts/getDevLibraries || travis_terminate 1; From 50b19819312d4c000dc78971b3a27302f1e42c0b Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 09:02:22 +0000 Subject: [PATCH 068/128] test travisci 5 --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 381f3c1..8af436e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -96,6 +96,9 @@ script: - cd build - pwd - ls -la + - cd [secure] + - pwd + - ls -la # - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin # - ./buildScripts/getBuildTools || travis_terminate 1; # - ./buildScripts/getDevLibraries || travis_terminate 1; From 14f63e0153da2f2e5df85c6d89c2fd587d0b6c7d Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 09:05:46 +0000 Subject: [PATCH 069/128] test travisci 6 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8af436e..e1c34ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -96,7 +96,7 @@ script: - cd build - pwd - ls -la - - cd [secure] + - cd $TRAVIS_BUILD_DIR - pwd - ls -la # - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin From 6b44ed74719723479741751e4608c117c045a076 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 09:20:07 +0000 Subject: [PATCH 070/128] test travisci 7 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e1c34ff..96174a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ env: global: - UNATTENDED="--assume-yes" - FORCE_REINSTALL="--reinstall" - - TRAVIS_TAG="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" +# - TRAVIS_TAG="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" #addons: # apt: From aedf075ebfe9ccd9d135658461b2adee06fa2b83 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 10:01:51 +0000 Subject: [PATCH 071/128] test travisci 8 --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 96174a9..475ef99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ env: global: - UNATTENDED="--assume-yes" - FORCE_REINSTALL="--reinstall" -# - TRAVIS_TAG="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" + - UPLOADTOOL_SUFFIX="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" #addons: # apt: @@ -88,6 +88,11 @@ script: - echo $TRAVIS_BRANCH - echo $TRAVIS_BUILD_DIR - echo $HOME + - echo $TRAVIS_COMMIT + - echo $TRAVIS_REPO_SLUG + - echo $GITHUB_TOKEN + - echo $UPLOADTOOL_SUFFIX + - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh - pwd - ls -la - cd @@ -99,6 +104,7 @@ script: - cd $TRAVIS_BUILD_DIR - pwd - ls -la + - cat upload.sh # - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin # - ./buildScripts/getBuildTools || travis_terminate 1; # - ./buildScripts/getDevLibraries || travis_terminate 1; From 72dc72625d48a36845f5cfadf45ddb792349b658 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 12:24:03 +0000 Subject: [PATCH 072/128] travis full test --- .travis.yml | 55 +++++++++++++------------------------ buildScripts/createAppImage | 6 ++++ 2 files changed, 25 insertions(+), 36 deletions(-) diff --git a/.travis.yml b/.travis.yml index 475ef99..ef82ba6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,11 +20,15 @@ services: compiler: gcc +branches: + except: # do not build tags that we create using the upload.sh script + - /^(?i:continuous.*)$/ + env: global: - UNATTENDED="--assume-yes" - FORCE_REINSTALL="--reinstall" - - UPLOADTOOL_SUFFIX="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" +# - UPLOADTOOL_SUFFIX="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" #addons: # apt: @@ -84,41 +88,20 @@ matrix: # - os: osx # Until the build passes, then re-enable. script: - - echo $TRAVIS_TAG - - echo $TRAVIS_BRANCH - - echo $TRAVIS_BUILD_DIR - - echo $HOME - - echo $TRAVIS_COMMIT - - echo $TRAVIS_REPO_SLUG - - echo $GITHUB_TOKEN - - echo $UPLOADTOOL_SUFFIX - - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh - - pwd - - ls -la - - cd - - pwd - - ls -la - - cd build - - pwd - - ls -la - - cd $TRAVIS_BUILD_DIR - - pwd - - ls -la - - cat upload.sh -# - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin -# - ./buildScripts/getBuildTools || travis_terminate 1; -# - ./buildScripts/getDevLibraries || travis_terminate 1; -# - ./buildScripts/getPoppler || travis_terminate 1; -# - ./buildScripts/buildPoppler || travis_terminate 1; -# - ./buildScripts/installPoppler || travis_terminate 1; -# - ./buildScripts/getFontforge || travis_terminate 1; -# - ./buildScripts/buildFontforge || travis_terminate 1; -# - ./buildScripts/installFontforge || travis_terminate 1; -# - ./buildScripts/buildPdf2htmlEX || travis_terminate 1; -# - ./buildScripts/installPdf2htmlEX || travis_terminate 1; -# - ./buildScripts/createAppImage || travis_terminate 1; -# - ./buildScripts/createDockerImage || travis_terminate 1; -# - docker push $DOCKER_USERNAME/pdf2htmlex + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + - ./buildScripts/getBuildTools || travis_terminate 1; + - ./buildScripts/getDevLibraries || travis_terminate 1; + - ./buildScripts/getPoppler || travis_terminate 1; + - ./buildScripts/buildPoppler || travis_terminate 1; + - ./buildScripts/installPoppler || travis_terminate 1; + - ./buildScripts/getFontforge || travis_terminate 1; + - ./buildScripts/buildFontforge || travis_terminate 1; + - ./buildScripts/installFontforge || travis_terminate 1; + - ./buildScripts/buildPdf2htmlEX || travis_terminate 1; + - ./buildScripts/installPdf2htmlEX || travis_terminate 1; + - ./buildScripts/createAppImage || travis_terminate 1; + - ./buildScripts/createDockerImage || travis_terminate 1; + - docker push $DOCKER_USERNAME/pdf2htmlex #deploy: # provider: releases diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index e04900e..dbc9298 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -34,3 +34,9 @@ chmod a+x $LINUX_DEPLOY_APP_IMAGE -i ../pdf2htmlEX/logo/pdf2htmlEX.svg \ --appdir=appDir \ --output appimage + +wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh + +bash upload.sh pdf2htmlEX*.AppImage + + From 633b67144b404c70a4f913aff560e48ae29ea62d Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 12:53:22 +0000 Subject: [PATCH 073/128] travis full test 1 --- .travis.yml | 1 + buildScripts/createDockerImage | 4 ++-- buildScripts/reportEnvs | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100755 buildScripts/reportEnvs diff --git a/.travis.yml b/.travis.yml index ef82ba6..5310be5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,6 +89,7 @@ matrix: script: - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + - ./buildScripts/reportEnvs || travis_terminate 1; - ./buildScripts/getBuildTools || travis_terminate 1; - ./buildScripts/getDevLibraries || travis_terminate 1; - ./buildScripts/getPoppler || travis_terminate 1; diff --git a/buildScripts/createDockerImage b/buildScripts/createDockerImage index 226aa08..d2247f6 100755 --- a/buildScripts/createDockerImage +++ b/buildScripts/createDockerImage @@ -26,12 +26,12 @@ if [ -x "$(which docker)" ]; then FROM $DOCKER_FROM COPY ./ / RUN ldconfig -ENTRYPOINT ["/usr/bin/pdf2htmlEX"] +ENTRYPOINT ["/usr/local/bin/pdf2htmlEX"] DOCKERFILE_HERE_DOC cd .. - docker build -t stephengaito/pdf2htmlex:test-`date +%Y%m%d-%H.%M.%S` dockerDir + docker build -t stephengaito/pdf2htmlex:test-`date +%Y_%m_%d-%H_%M_%S` dockerDir else echo "Docker is not installed... skipping creation of a docker image." diff --git a/buildScripts/reportEnvs b/buildScripts/reportEnvs new file mode 100755 index 0000000..bac508a --- /dev/null +++ b/buildScripts/reportEnvs @@ -0,0 +1,22 @@ +#!/bin/bash + +# This bash script reports the more important TRAVIS environment variables + +echo "TravisCI env:" +echo " tag: [$TARVIS_TAG]" +echo " branch: [$TARVIS_BRANCH]" +echo " commit: [$TARVIS_COMMIT]" +echo " build dir: [$TRAVIS_BUILD_DIR]" +echo " repo slug: [$TRAVIS_REPO_SLUG]" + +echo "UploadTool env:" +echo " suffix: [$UPLOADTOOL_SUFFIX]" + +source ./buildScripts/versionEnvs + +echo "pdf2htmlEX env:" +echo " poppler: [$POPPLER_VERSION]" +echo " fontforge: [$FONTFORGE_VERSION]" +echo " pdf2htmlEX: [$PDF2HTMLEX_VERSION]" +echo " docker from: [$DOCKER_FROM]" +echo "machine arch: [$MACHINE_ARCH]" From c52278a8fb57bcc42750ff1081d18f37f937732c Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 15:22:02 +0000 Subject: [PATCH 074/128] travis full test 2 --- .travis.yml | 2 +- buildScripts/reportEnvs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5310be5..51f1f68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ env: global: - UNATTENDED="--assume-yes" - FORCE_REINSTALL="--reinstall" -# - UPLOADTOOL_SUFFIX="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" + - UPLOADTOOL_SUFFIX="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" #addons: # apt: diff --git a/buildScripts/reportEnvs b/buildScripts/reportEnvs index bac508a..28e34d1 100755 --- a/buildScripts/reportEnvs +++ b/buildScripts/reportEnvs @@ -3,9 +3,9 @@ # This bash script reports the more important TRAVIS environment variables echo "TravisCI env:" -echo " tag: [$TARVIS_TAG]" -echo " branch: [$TARVIS_BRANCH]" -echo " commit: [$TARVIS_COMMIT]" +echo " tag: [$TRAVIS_TAG]" +echo " branch: [$TRAVIS_BRANCH]" +echo " commit: [$TRAVIS_COMMIT]" echo " build dir: [$TRAVIS_BUILD_DIR]" echo " repo slug: [$TRAVIS_REPO_SLUG]" From 606d8a987952d4f8d170178c3e98547f36472712 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 15:41:47 +0000 Subject: [PATCH 075/128] travis full test 3 --- .travis.yml | 2 +- buildScripts/createAppImage | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 51f1f68..5310be5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ env: global: - UNATTENDED="--assume-yes" - FORCE_REINSTALL="--reinstall" - - UPLOADTOOL_SUFFIX="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" +# - UPLOADTOOL_SUFFIX="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" #addons: # apt: diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index dbc9298..a4971af 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -6,7 +6,7 @@ source buildScripts/versionEnvs # For appimage output plugin # -export VERSION=$PDF2HTMLEX_VERSION +export VERSION="$PDF2HTMLEX_VERSION-$(date +%Y_%m_%d-%H_%M_%S)" mkdir -p imageBuild/appDir/usr/lib/ From acb14e9900764c0e1e80859882c09c63cabea291 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 16:44:08 +0000 Subject: [PATCH 076/128] travis full test 4 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5310be5..3a5ef3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ env: global: - UNATTENDED="--assume-yes" - FORCE_REINSTALL="--reinstall" -# - UPLOADTOOL_SUFFIX="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" +## - UPLOADTOOL_SUFFIX="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" #addons: # apt: From c5d5799b13d3aa96bcc53760ba6c3bd32f542650 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 17:33:15 +0000 Subject: [PATCH 077/128] travis full test 5 --- buildScripts/createAppImage | 1 + 1 file changed, 1 insertion(+) diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index a4971af..e26a26b 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -7,6 +7,7 @@ source buildScripts/versionEnvs # For appimage output plugin # export VERSION="$PDF2HTMLEX_VERSION-$(date +%Y_%m_%d-%H_%M_%S)" +export UPLOADTOOL_BODY="This is the development/testing release of the pdf2htmlEX AppImage. You can download the AppImage and 'just run it'. See: https://appimage.org/ " mkdir -p imageBuild/appDir/usr/lib/ From 4006c6ebc9b5418561db385ded78f94d15caa76e Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 27 Nov 2019 17:34:24 +0000 Subject: [PATCH 078/128] travis full test 6 --- buildScripts/createAppImage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index e26a26b..3a6b788 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -7,7 +7,7 @@ source buildScripts/versionEnvs # For appimage output plugin # export VERSION="$PDF2HTMLEX_VERSION-$(date +%Y_%m_%d-%H_%M_%S)" -export UPLOADTOOL_BODY="This is the development/testing release of the pdf2htmlEX AppImage. You can download the AppImage and 'just run it'. See: https://appimage.org/ " +export UPLOADTOOL_BODY="This is the development/testing release of the pdf2htmlEX AppImage.\n\nYou can download the AppImage and 'just run it'.\n\nSee: https://appimage.org/ " mkdir -p imageBuild/appDir/usr/lib/ From 7f4f72fb05a09df4c80daffd1ceb9d1ed65f81ce Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 28 Nov 2019 09:07:49 +0000 Subject: [PATCH 079/128] refactored upload --- .travis.yml => .travis.yml.off | 10 ++---- buildScripts/createAppImage | 7 +--- buildScripts/createDockerImage | 2 +- buildScripts/getPdf2htmlEX | 10 +++--- buildScripts/reportEnvs | 27 ++++++++------ buildScripts/travisEnvs | 1 + buildScripts/uploadRelease | 65 ++++++++++++++++++++++++++++++++++ buildScripts/versionEnvs | 11 ++++-- 8 files changed, 100 insertions(+), 33 deletions(-) rename .travis.yml => .travis.yml.off (92%) create mode 100755 buildScripts/uploadRelease diff --git a/.travis.yml b/.travis.yml.off similarity index 92% rename from .travis.yml rename to .travis.yml.off index 3a5ef3a..0cfce99 100644 --- a/.travis.yml +++ b/.travis.yml.off @@ -24,12 +24,6 @@ branches: except: # do not build tags that we create using the upload.sh script - /^(?i:continuous.*)$/ -env: - global: - - UNATTENDED="--assume-yes" - - FORCE_REINSTALL="--reinstall" -## - UPLOADTOOL_SUFFIX="test-$TRAVIS_BRANCH-$(date +%Y_%m_%d-%H_%M_%S)" - #addons: # apt: # update: true @@ -88,7 +82,7 @@ matrix: # - os: osx # Until the build passes, then re-enable. script: - - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + - ./buildScripts/travisEnvs || travis_terminate 1; - ./buildScripts/reportEnvs || travis_terminate 1; - ./buildScripts/getBuildTools || travis_terminate 1; - ./buildScripts/getDevLibraries || travis_terminate 1; @@ -102,7 +96,7 @@ script: - ./buildScripts/installPdf2htmlEX || travis_terminate 1; - ./buildScripts/createAppImage || travis_terminate 1; - ./buildScripts/createDockerImage || travis_terminate 1; - - docker push $DOCKER_USERNAME/pdf2htmlex + - ./buildScripts/uploadRelease || travis_terminate 1; #deploy: # provider: releases diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index 3a6b788..3fcbe5a 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -6,8 +6,7 @@ source buildScripts/versionEnvs # For appimage output plugin # -export VERSION="$PDF2HTMLEX_VERSION-$(date +%Y_%m_%d-%H_%M_%S)" -export UPLOADTOOL_BODY="This is the development/testing release of the pdf2htmlEX AppImage.\n\nYou can download the AppImage and 'just run it'.\n\nSee: https://appimage.org/ " +export VERSION="$PDF2HTMLEX_BRANCH-$BUILD_TIME" mkdir -p imageBuild/appDir/usr/lib/ @@ -36,8 +35,4 @@ chmod a+x $LINUX_DEPLOY_APP_IMAGE --appdir=appDir \ --output appimage -wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh - -bash upload.sh pdf2htmlEX*.AppImage - diff --git a/buildScripts/createDockerImage b/buildScripts/createDockerImage index d2247f6..82d33fc 100755 --- a/buildScripts/createDockerImage +++ b/buildScripts/createDockerImage @@ -31,7 +31,7 @@ DOCKERFILE_HERE_DOC cd .. - docker build -t stephengaito/pdf2htmlex:test-`date +%Y_%m_%d-%H_%M_%S` dockerDir + docker build -t $DOCKER_USERNAME/pdf2htmlex:-`date +%Y_%m_%d-%H_%M_%S` dockerDir else echo "Docker is not installed... skipping creation of a docker image." diff --git a/buildScripts/getPdf2htmlEX b/buildScripts/getPdf2htmlEX index a3a375d..2232ad1 100755 --- a/buildScripts/getPdf2htmlEX +++ b/buildScripts/getPdf2htmlEX @@ -3,14 +3,14 @@ # This bash script automates the process of getting the original pdf2htmlEX # source -PDF2HTMLEX_VERSION=newBuildSystem +PDF2HTMLEX_BRANCH=newBuildSystem -wget https://codeload.github.com/stephengaito/pdf2htmlEX/zip/$PDF2HTMLEX_VERSION +wget https://codeload.github.com/stephengaito/pdf2htmlEX/zip/$PDF2HTMLEX_BRANCH -mv $PDF2HTMLEX_VERSION $PDF2HTMLEX_VERSION.zip +mv $PDF2HTMLEX_BRANCH $PDF2HTMLEX_BRANCH.zip sudo apt install unzip -unzip $PDF2HTMLEX_VERSION.zip +unzip $PDF2HTMLEX_BRANCH.zip -mv pdf2htmlEX-$PDF2HTMLEX_VERSION pdf2htmlEX +mv pdf2htmlEX-$PDF2HTMLEX_BRANCH pdf2htmlEX diff --git a/buildScripts/reportEnvs b/buildScripts/reportEnvs index 28e34d1..2ad9167 100755 --- a/buildScripts/reportEnvs +++ b/buildScripts/reportEnvs @@ -3,20 +3,25 @@ # This bash script reports the more important TRAVIS environment variables echo "TravisCI env:" -echo " tag: [$TRAVIS_TAG]" -echo " branch: [$TRAVIS_BRANCH]" -echo " commit: [$TRAVIS_COMMIT]" -echo " build dir: [$TRAVIS_BUILD_DIR]" -echo " repo slug: [$TRAVIS_REPO_SLUG]" +echo " tag: [$TRAVIS_TAG]" +echo " branch: [$TRAVIS_BRANCH]" +echo " commit: [$TRAVIS_COMMIT]" +echo " build dir: [$TRAVIS_BUILD_DIR]" +echo " repo slug: [$TRAVIS_REPO_SLUG]" echo "UploadTool env:" -echo " suffix: [$UPLOADTOOL_SUFFIX]" +echo " suffix: [$UPLOADTOOL_SUFFIX]" source ./buildScripts/versionEnvs echo "pdf2htmlEX env:" -echo " poppler: [$POPPLER_VERSION]" -echo " fontforge: [$FONTFORGE_VERSION]" -echo " pdf2htmlEX: [$PDF2HTMLEX_VERSION]" -echo " docker from: [$DOCKER_FROM]" -echo "machine arch: [$MACHINE_ARCH]" +echo " poppler: [$POPPLER_VERSION]" +echo " fontforge: [$FONTFORGE_VERSION]" +echo " pdf2htmlEX: [$PDF2HTMLEX_BRANCH]" +echo " machine arch: [$MACHINE_ARCH]" + +echo "release env:" +echo " build time: [$BUILD_TIME]" +echo " docker from: [$DOCKER_FROM]" +echo " docker name: [$DOCKER_NAME]" +echo "appImage name: [$APPIMAGE_NAME]" diff --git a/buildScripts/travisEnvs b/buildScripts/travisEnvs index f9e4553..ce997c5 100644 --- a/buildScripts/travisEnvs +++ b/buildScripts/travisEnvs @@ -1,2 +1,3 @@ +export UNATTENDED="--assume-yes" export MAKE_PARALLEL="-j `nproc`" diff --git a/buildScripts/uploadRelease b/buildScripts/uploadRelease new file mode 100755 index 0000000..33f342f --- /dev/null +++ b/buildScripts/uploadRelease @@ -0,0 +1,65 @@ +#!/bin/bash + +# This bash script uploads the pdf2htmlEX release artefacts +# +# We EXPECT the following environment variables to be set: +# GITHUB_TOKEN +# DOCKER_USERNAME +# +# You can OPTIONALLY set the following environment variables: +# DOCKER_PASSWORD (if not set you will be asked for your password) +# UPLOADTOOL_BODY (the text of the github release message) +# + +################################## +# upload github release artefacts +# + +if [ -n "$GITHUB_TOKEN" ]; then + wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh + + echo $BUILD_TIME > buildTime + + echo $APPIMAGE_NAME > appImageName + + echo $DOCKER_NAME > dockerImageName + + if [ -z "$UPLOADTOOL_BODY" ]; then + export UPLOADTOOL_BODY=< Date: Thu, 28 Nov 2019 09:15:56 +0000 Subject: [PATCH 080/128] corrected doItAll --- buildScripts/doItAll | 9 ++++++++- buildScripts/reportEnvs | 32 +++++++++++++++++--------------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/buildScripts/doItAll b/buildScripts/doItAll index aee2d2f..7eef747 100755 --- a/buildScripts/doItAll +++ b/buildScripts/doItAll @@ -3,7 +3,12 @@ # This bash script builds the complete pdf2htmlEX application LOCALLY # (It does not create the AppImage or Docker images) -export UNATTENDED=--assume-yes +# Adjust the following two environment variables to suit your needs +# +export UNATTENDED="--assume-yes" +export MAKE_PARALLEL="-j $(nproc)" + +./buildScripts/reportEnvs || { echo 'reportEnvs FAILED' ; exit 1 ; } ./buildScripts/getBuildTools || { echo 'getBuildTools FAILED' ; exit 1 ; } @@ -28,3 +33,5 @@ export UNATTENDED=--assume-yes ./buildScripts/createAppImage || { echo 'createAppImage FAILED' ; exit 1 ; } ./buildScripts/createDockerImage || { echo 'createDockerImage FAILED' ; exit 1 ; } + +./buildScripts/uploadRelease || { echo 'uploadRelease FAILED' ; exit 1 ; } diff --git a/buildScripts/reportEnvs b/buildScripts/reportEnvs index 2ad9167..f174f1e 100755 --- a/buildScripts/reportEnvs +++ b/buildScripts/reportEnvs @@ -3,25 +3,27 @@ # This bash script reports the more important TRAVIS environment variables echo "TravisCI env:" -echo " tag: [$TRAVIS_TAG]" -echo " branch: [$TRAVIS_BRANCH]" -echo " commit: [$TRAVIS_COMMIT]" -echo " build dir: [$TRAVIS_BUILD_DIR]" -echo " repo slug: [$TRAVIS_REPO_SLUG]" +echo " tag: [$TRAVIS_TAG]" +echo " branch: [$TRAVIS_BRANCH]" +echo " commit: [$TRAVIS_COMMIT]" +echo " build dir: [$TRAVIS_BUILD_DIR]" +echo " repo slug: [$TRAVIS_REPO_SLUG]" -echo "UploadTool env:" -echo " suffix: [$UPLOADTOOL_SUFFIX]" +echo "Build env:" +echo " unattended: [$UNATTENEDED]" +echo " make parallel: [$MAKE_PARALLEL]" source ./buildScripts/versionEnvs echo "pdf2htmlEX env:" -echo " poppler: [$POPPLER_VERSION]" -echo " fontforge: [$FONTFORGE_VERSION]" -echo " pdf2htmlEX: [$PDF2HTMLEX_BRANCH]" -echo " machine arch: [$MACHINE_ARCH]" +echo " poppler: [$POPPLER_VERSION]" +echo " fontforge: [$FONTFORGE_VERSION]" +echo " pdf2htmlEX: [$PDF2HTMLEX_BRANCH]" +echo " machine arch: [$MACHINE_ARCH]" echo "release env:" -echo " build time: [$BUILD_TIME]" -echo " docker from: [$DOCKER_FROM]" -echo " docker name: [$DOCKER_NAME]" -echo "appImage name: [$APPIMAGE_NAME]" +echo " build time: [$BUILD_TIME]" +echo " docker from: [$DOCKER_FROM]" +echo " docker name: [$DOCKER_NAME]" +echo " appImage name: [$APPIMAGE_NAME]" +echo "uploadTool suffix: [$UPLOADTOOL_SUFFIX]" From 24631e31ab1d4ae71fd9fccf65947e31164d3d31 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 28 Nov 2019 10:28:03 +0000 Subject: [PATCH 081/128] begun refactoring travis for tests as well as builds --- .travis.yml.off | 36 +++++++++++++----------------------- buildScripts/doItAll | 8 ++++++++ buildScripts/doItAllTravis | 24 ++++++++++++++++++++++++ buildScripts/reportEnvs | 2 +- buildScripts/travisEnvs | 3 --- buildScripts/versionEnvs | 4 +++- testScripts/doItAll | 5 +++++ testScripts/doItAllTravis | 5 +++++ 8 files changed, 59 insertions(+), 28 deletions(-) create mode 100755 buildScripts/doItAllTravis delete mode 100644 buildScripts/travisEnvs create mode 100644 testScripts/doItAll create mode 100644 testScripts/doItAllTravis diff --git a/.travis.yml.off b/.travis.yml.off index 0cfce99..d5d6d23 100644 --- a/.travis.yml.off +++ b/.travis.yml.off @@ -2,10 +2,6 @@ language: cpp sudo: true -os: - - linux -# - osx -# - windows # for windows *test* of AppImage # see https://docs.travis-ci.com/user/build-matrix/#using-different-programming-languages-per-job @@ -13,8 +9,6 @@ os: # and https://docs.travis-ci.com/user/reference/windows/ # why fuse is not possible on windows: https://superuser.com/questions/179436/is-it-possible-to-use-fuse-with-windows -dist: bionic - services: - docker @@ -81,23 +75,19 @@ matrix: # allow_failures: # - os: osx # Until the build passes, then re-enable. -script: - - ./buildScripts/travisEnvs || travis_terminate 1; - - ./buildScripts/reportEnvs || travis_terminate 1; - - ./buildScripts/getBuildTools || travis_terminate 1; - - ./buildScripts/getDevLibraries || travis_terminate 1; - - ./buildScripts/getPoppler || travis_terminate 1; - - ./buildScripts/buildPoppler || travis_terminate 1; - - ./buildScripts/installPoppler || travis_terminate 1; - - ./buildScripts/getFontforge || travis_terminate 1; - - ./buildScripts/buildFontforge || travis_terminate 1; - - ./buildScripts/installFontforge || travis_terminate 1; - - ./buildScripts/buildPdf2htmlEX || travis_terminate 1; - - ./buildScripts/installPdf2htmlEX || travis_terminate 1; - - ./buildScripts/createAppImage || travis_terminate 1; - - ./buildScripts/createDockerImage || travis_terminate 1; - - ./buildScripts/uploadRelease || travis_terminate 1; - +jobs: + include: + - stage: build + os: + - linux + dist: bionic + script: ./buildScripts/doItAllTravis + - stage: test + os: + - linux + - osx + - windows + script: ./testScripts/doItAllTravis #deploy: # provider: releases # api_key: diff --git a/buildScripts/doItAll b/buildScripts/doItAll index 7eef747..3ced38f 100755 --- a/buildScripts/doItAll +++ b/buildScripts/doItAll @@ -8,6 +8,14 @@ export UNATTENDED="--assume-yes" export MAKE_PARALLEL="-j $(nproc)" +# choose one of the following... +# +export PDF2HTMLEX_BRANCH=newBuildSystem +# export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)" + +################ +# do the build + ./buildScripts/reportEnvs || { echo 'reportEnvs FAILED' ; exit 1 ; } ./buildScripts/getBuildTools || { echo 'getBuildTools FAILED' ; exit 1 ; } diff --git a/buildScripts/doItAllTravis b/buildScripts/doItAllTravis new file mode 100755 index 0000000..83c5631 --- /dev/null +++ b/buildScripts/doItAllTravis @@ -0,0 +1,24 @@ +#!/bin/bash + +# This bash script builds everyting on an TravisCI worker + +export UNATTENDED="--assume-yes" +export MAKE_PARALLEL="-j $(nproc)" + +export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)" + +./buildScripts/reportEnvs || travis_terminate 1; +./buildScripts/getBuildTools || travis_terminate 1; +./buildScripts/getDevLibraries || travis_terminate 1; +./buildScripts/getPoppler || travis_terminate 1; +./buildScripts/buildPoppler || travis_terminate 1; +./buildScripts/installPoppler || travis_terminate 1; +./buildScripts/getFontforge || travis_terminate 1; +./buildScripts/buildFontforge || travis_terminate 1; +./buildScripts/installFontforge || travis_terminate 1; +./buildScripts/buildPdf2htmlEX || travis_terminate 1; +./buildScripts/installPdf2htmlEX || travis_terminate 1; +./buildScripts/createAppImage || travis_terminate 1; +./buildScripts/createDockerImage || travis_terminate 1; +./buildScripts/uploadRelease || travis_terminate 1; + diff --git a/buildScripts/reportEnvs b/buildScripts/reportEnvs index f174f1e..084c173 100755 --- a/buildScripts/reportEnvs +++ b/buildScripts/reportEnvs @@ -10,7 +10,7 @@ echo " build dir: [$TRAVIS_BUILD_DIR]" echo " repo slug: [$TRAVIS_REPO_SLUG]" echo "Build env:" -echo " unattended: [$UNATTENEDED]" +echo " unattended: [$UNATTENDED]" echo " make parallel: [$MAKE_PARALLEL]" source ./buildScripts/versionEnvs diff --git a/buildScripts/travisEnvs b/buildScripts/travisEnvs deleted file mode 100644 index ce997c5..0000000 --- a/buildScripts/travisEnvs +++ /dev/null @@ -1,3 +0,0 @@ - -export UNATTENDED="--assume-yes" -export MAKE_PARALLEL="-j `nproc`" diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index 5d2c618..126d567 100644 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -9,7 +9,9 @@ export POPPLER_VERSION=poppler-0.81.0 #export FONTFORGE_VERSION=20190801 export FONTFORGE_VERSION=20170731 -export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)" +if [ -n "$PDF2HTMLEX_BRANCH" ]; then + export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)" +fi export MACHINE_ARCH="$(uname -m)" diff --git a/testScripts/doItAll b/testScripts/doItAll new file mode 100644 index 0000000..d10b213 --- /dev/null +++ b/testScripts/doItAll @@ -0,0 +1,5 @@ +#!/bin/bash + +# This bash script automates the tests + + diff --git a/testScripts/doItAllTravis b/testScripts/doItAllTravis new file mode 100644 index 0000000..f01339e --- /dev/null +++ b/testScripts/doItAllTravis @@ -0,0 +1,5 @@ +#!/bin/bash + +# This bash script automates the tests on a TravisCI worker + + From d640bd83f0cb2a6a9568cdb4f3db9b3a55831c83 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 28 Nov 2019 10:32:42 +0000 Subject: [PATCH 082/128] corrected versionEnvs --- buildScripts/versionEnvs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index 126d567..2bd720e 100644 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -9,7 +9,7 @@ export POPPLER_VERSION=poppler-0.81.0 #export FONTFORGE_VERSION=20190801 export FONTFORGE_VERSION=20170731 -if [ -n "$PDF2HTMLEX_BRANCH" ]; then +if [ -z "$PDF2HTMLEX_BRANCH" ]; then export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)" fi From a693e3d33c2fd0d646f95b60f986b7214d73a98d Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 28 Nov 2019 10:34:38 +0000 Subject: [PATCH 083/128] corrected versionEnvs --- buildScripts/versionEnvs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index 2bd720e..e34c479 100644 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -21,6 +21,6 @@ export DOCKER_FROM=ubuntu:18.04 export DOCKER_NAME="$DOCKER_USERNAME/pdf2htmlex:$PDF2HTMLEX_BRANCH-$BUILD_TIME" -export APPIMAGE_NAME="pdf2htmlEX-$PDF2HTML_BRANCH-$BUILD_TIME-$MACHINE_ARCH.AppImage" +export APPIMAGE_NAME="pdf2htmlEX-$PDF2HTMLEX_BRANCH-$BUILD_TIME-$MACHINE_ARCH.AppImage" From bf9fe5cfc10df8cfaf220e47264f7922c25863ed Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 28 Nov 2019 12:04:22 +0000 Subject: [PATCH 084/128] started using reSourceVersionEnvs --- .travis.yml.off | 4 ++-- buildScripts/buildFontforge | 3 +-- buildScripts/createAppImage | 2 +- buildScripts/createDockerImage | 2 +- buildScripts/doItAll | 1 + buildScripts/getFontforge | 2 +- buildScripts/getPoppler | 2 +- buildScripts/reportEnvs | 2 +- buildScripts/uploadRelease | 12 ++++++++++-- buildScripts/versionEnvs | 11 ++++++++++- testScripts/doItAll | 27 +++++++++++++++++++++++++++ 11 files changed, 56 insertions(+), 12 deletions(-) diff --git a/.travis.yml.off b/.travis.yml.off index d5d6d23..c2c1291 100644 --- a/.travis.yml.off +++ b/.travis.yml.off @@ -85,8 +85,8 @@ jobs: - stage: test os: - linux - - osx - - windows + #- osx + #- windows script: ./testScripts/doItAllTravis #deploy: # provider: releases diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index cd2a9b1..8639556 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -2,8 +2,7 @@ # This bash script build FontForge -source buildScripts/versionEnvs - +source buildScripts/reSourceVersionEnvs # This is a work-around to fix TravisCI's declaration of PYTHON_CFLAGS # which is then honoured exactly as is by the fontforge bootstrap and diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index 3fcbe5a..399d862 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -2,7 +2,7 @@ # This bash script creates an AppImage for pdf2htmlEX -source buildScripts/versionEnvs +source ./buildScripts/reSourceVersionEnvs # For appimage output plugin # diff --git a/buildScripts/createDockerImage b/buildScripts/createDockerImage index 82d33fc..d4da534 100755 --- a/buildScripts/createDockerImage +++ b/buildScripts/createDockerImage @@ -4,7 +4,7 @@ if [ -x "$(which docker)" ]; then - source buildScripts/versionEnvs + source buildScripts/reSourceVersionEnvs source buildScripts/dockerFunctions diff --git a/buildScripts/doItAll b/buildScripts/doItAll index 3ced38f..66eb2a1 100755 --- a/buildScripts/doItAll +++ b/buildScripts/doItAll @@ -7,6 +7,7 @@ # export UNATTENDED="--assume-yes" export MAKE_PARALLEL="-j $(nproc)" +export TRAVIS_REPO_SLUG=stephengaito/pdf2htmlEX # choose one of the following... # diff --git a/buildScripts/getFontforge b/buildScripts/getFontforge index 0db0b23..402aee9 100755 --- a/buildScripts/getFontforge +++ b/buildScripts/getFontforge @@ -2,7 +2,7 @@ # This bash script gets and unpacks the latest fontforge AppImage -source buildScripts/versionEnvs +source buildScripts/reSourceVersionEnvs FONTFORGE_SRC=$FONTFORGE_VERSION.tar.gz diff --git a/buildScripts/getPoppler b/buildScripts/getPoppler index ce9474f..a6888d7 100755 --- a/buildScripts/getPoppler +++ b/buildScripts/getPoppler @@ -2,7 +2,7 @@ # This bash script gets and unpacks the latest Poppler source code -source buildScripts/versionEnvs +source buildScripts/reSourceVersionEnvs echo "Getting poppler version: $POPPLER_VERSION" diff --git a/buildScripts/reportEnvs b/buildScripts/reportEnvs index 084c173..941d538 100755 --- a/buildScripts/reportEnvs +++ b/buildScripts/reportEnvs @@ -13,7 +13,7 @@ echo "Build env:" echo " unattended: [$UNATTENDED]" echo " make parallel: [$MAKE_PARALLEL]" -source ./buildScripts/versionEnvs +source ./buildScripts/reSourceVersionEnvs echo "pdf2htmlEX env:" echo " poppler: [$POPPLER_VERSION]" diff --git a/buildScripts/uploadRelease b/buildScripts/uploadRelease index 33f342f..8a90567 100755 --- a/buildScripts/uploadRelease +++ b/buildScripts/uploadRelease @@ -11,10 +11,14 @@ # UPLOADTOOL_BODY (the text of the github release message) # +source ./buildScripts/reSourceVersionEnvs + ################################## # upload github release artefacts # +cd imageBuild + if [ -n "$GITHUB_TOKEN" ]; then wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh @@ -34,10 +38,14 @@ See: https://appimage.org/ for details RELEASE_MESSAGE fi - bash upload.sh $APPIMAGE_NAME appImageName dockerImageName + bash upload.sh \ + $($APPIMAGE_NAME) \ + ../appImageName \ + ../dockerImageName \ + ../buildTime else - echo "GITHUG_TOKEN not set... so we can not upload release artefacts." + echo "GITHUB_TOKEN not set... so we can not upload release artefacts." fi ################################## diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index e34c479..065efb7 100644 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -23,4 +23,13 @@ export DOCKER_NAME="$DOCKER_USERNAME/pdf2htmlex:$PDF2HTMLEX_BRANCH-$BUILD_TIME" export APPIMAGE_NAME="pdf2htmlEX-$PDF2HTMLEX_BRANCH-$BUILD_TIME-$MACHINE_ARCH.AppImage" - +echo > buildScripts/reSourceVersionEnvs < Date: Thu, 28 Nov 2019 12:21:58 +0000 Subject: [PATCH 085/128] corrected reSourceVersionEnvs --- buildScripts/createDockerImage | 2 +- buildScripts/doItAll | 2 ++ buildScripts/doItAllTravis | 1 + buildScripts/versionEnvs | 19 +++++++++---------- 4 files changed, 13 insertions(+), 11 deletions(-) mode change 100644 => 100755 buildScripts/versionEnvs diff --git a/buildScripts/createDockerImage b/buildScripts/createDockerImage index d4da534..160684c 100755 --- a/buildScripts/createDockerImage +++ b/buildScripts/createDockerImage @@ -22,7 +22,7 @@ if [ -x "$(which docker)" ]; then delete_blacklisted - cat >> Dockerfile < Dockerfile < buildScripts/reSourceVersionEnvs < buildScripts/reSourceVersionEnvs +echo "export FONTFORGE_VERSION=\"$FONTFORGE_VERSION\"" >> buildScripts/reSourceVersionEnvs +echo "export PDF2HTMLEX_BRANCH=\"$PDF2HTMLEX_BRANCH\"" >> buildScripts/reSourceVersionEnvs +echo "export MACHINE_ARCH=\"$MACHINE_ARCH\"" >> buildScripts/reSourceVersionEnvs +echo "export BUILD_TIME=\"$BUILD_TIME\"" >> buildScripts/reSourceVersionEnvs +echo "export DOCKER_FROM=\"$DOCKER_FROM\"" >> buildScripts/reSourceVersionEnvs +echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> buildScripts/reSourceVersionEnvs +echo "export APPIMAGE_NAME=\"$APPIMAGE_NAME\"" >> buildScripts/reSourceVersionEnvs + From 8fe76e30862348dc32b55846187b5a0283305542 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 28 Nov 2019 13:04:03 +0000 Subject: [PATCH 086/128] penultimage build tools --- buildScripts/createDockerImage | 2 +- buildScripts/uploadRelease | 13 ++++--------- buildScripts/versionEnvs | 1 + testScripts/doItAll | 18 +++++++++++------- testScripts/doItAllTravis | 29 ++++++++++++++++++++++++++++- 5 files changed, 45 insertions(+), 18 deletions(-) diff --git a/buildScripts/createDockerImage b/buildScripts/createDockerImage index 160684c..14ceb55 100755 --- a/buildScripts/createDockerImage +++ b/buildScripts/createDockerImage @@ -31,7 +31,7 @@ DOCKERFILE_HERE_DOC cd .. - docker build -t $DOCKER_USERNAME/pdf2htmlex:-`date +%Y_%m_%d-%H_%M_%S` dockerDir + docker build -t $DOCKER_USERNAME/pdf2htmlex:$PDF2THMLEX_BRANCH-$BUILD_TIME dockerDir else echo "Docker is not installed... skipping creation of a docker image." diff --git a/buildScripts/uploadRelease b/buildScripts/uploadRelease index 8a90567..c39427a 100755 --- a/buildScripts/uploadRelease +++ b/buildScripts/uploadRelease @@ -8,7 +8,6 @@ # # You can OPTIONALLY set the following environment variables: # DOCKER_PASSWORD (if not set you will be asked for your password) -# UPLOADTOOL_BODY (the text of the github release message) # source ./buildScripts/reSourceVersionEnvs @@ -28,21 +27,15 @@ if [ -n "$GITHUB_TOKEN" ]; then echo $DOCKER_NAME > dockerImageName - if [ -z "$UPLOADTOOL_BODY" ]; then - export UPLOADTOOL_BODY=<> buildScripts/reSourceV echo "export DOCKER_FROM=\"$DOCKER_FROM\"" >> buildScripts/reSourceVersionEnvs echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> buildScripts/reSourceVersionEnvs echo "export APPIMAGE_NAME=\"$APPIMAGE_NAME\"" >> buildScripts/reSourceVersionEnvs +echo "export TRAVIS_REPO_SLUG=\"$TRAVIS_REPO_SLUG\"" >> buildScripts/reSourceVersionEnvs diff --git a/testScripts/doItAll b/testScripts/doItAll index 665279a..a10e143 100644 --- a/testScripts/doItAll +++ b/testScripts/doItAll @@ -2,17 +2,21 @@ # This bash script automates the tests +mkdir -p testDir + +cd testDir + wget https://github.com/stephengaito/pdf2htmlEX/releases/download/continuous/appImageName -export APP_IMAGE_NAME=$(cat appImageName) +export APPIMAGE_NAME=$(cat appImageName) -wget https://github.com/stephengaito/pdf2htmlEX/releases/download/continuous/$APP_IMAGE_NAME +wget https://github.com/stephengaito/pdf2htmlEX/releases/download/continuous/$APPIMAGE_NAME -chmod a+x $APP_IMAGE_NAME +chmod a+x $APPIMAGE_NAME -if ! ./$APP_IMAGE_NAME --version ; then +if ! ./$APPIMAGE_NAME --version ; then echo "COULD NOT run the AppImage" - exit(-1) + exit 1 fi if [ -x "$(which docker)" ]; then @@ -22,8 +26,8 @@ if [ -x "$(which docker)" ]; then export DOCKER_IMAGE_NAME=$(cat dockerImageName) if ! docker run $DOCKER_IMAGE_NAME --version ; then - echo "COULD NOT run the AppImage" - exit(-1) + echo "COULD NOT run the Docker Image" + exit 1 fi fi diff --git a/testScripts/doItAllTravis b/testScripts/doItAllTravis index f01339e..695fd75 100644 --- a/testScripts/doItAllTravis +++ b/testScripts/doItAllTravis @@ -1,5 +1,32 @@ #!/bin/bash -# This bash script automates the tests on a TravisCI worker +# This bash script automates the tests + +wget https://github.com/stephengaito/pdf2htmlEX/releases/download/continuous/appImageName + +export APPIMAGE_NAME=$(cat appImageName) + +wget https://github.com/stephengaito/pdf2htmlEX/releases/download/continuous/$APPIMAGE_NAME + +chmod a+x $APPIMAGE_NAME + +if ! ./$APPIMAGE_NAME --version ; then + echo "COULD NOT run the AppImage" + exit 1 +fi + +if [ -x "$(which docker)" ]; then + + wget https://github.com/stephengaito/pdf2htmlEX/releases/download/continuous/dockerImageName + + export DOCKER_IMAGE_NAME=$(cat dockerImageName) + + if ! docker run $DOCKER_IMAGE_NAME --version ; then + echo "COULD NOT run the Docker Image" + exit 1 + fi + +fi + From 1000742831885404a0fd87a260eb1368a0cdcebd Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 28 Nov 2019 13:49:35 +0000 Subject: [PATCH 087/128] corrected build and upload --- buildScripts/createDockerImage | 2 +- buildScripts/uploadRelease | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/buildScripts/createDockerImage b/buildScripts/createDockerImage index 14ceb55..70a7962 100755 --- a/buildScripts/createDockerImage +++ b/buildScripts/createDockerImage @@ -31,7 +31,7 @@ DOCKERFILE_HERE_DOC cd .. - docker build -t $DOCKER_USERNAME/pdf2htmlex:$PDF2THMLEX_BRANCH-$BUILD_TIME dockerDir + docker build -t $DOCKER_USERNAME/pdf2htmlex:$PDF2HTMLEX_BRANCH-$BUILD_TIME dockerDir else echo "Docker is not installed... skipping creation of a docker image." diff --git a/buildScripts/uploadRelease b/buildScripts/uploadRelease index c39427a..fb618ed 100755 --- a/buildScripts/uploadRelease +++ b/buildScripts/uploadRelease @@ -35,6 +35,14 @@ You can download the AppImage and 'just run it'. See: https://appimage.org/ for details RELEASE_MESSAGE + echo "" + echo "---------------------------------------------------------------" + echo "upload tool body: + echo "---------------------------------------------------------------" + echo $UPLOADTOOL_BODY + echo "---------------------------------------------------------------" + echo "" + bash upload.sh $APPIMAGE_NAME appImageName dockerImageName buildTime else From e00def0bb6295bd70eadda80a59edf745e100b8f Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 28 Nov 2019 14:07:07 +0000 Subject: [PATCH 088/128] correded createDockerImage --- buildScripts/createDockerImage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/createDockerImage b/buildScripts/createDockerImage index 70a7962..ce6f169 100755 --- a/buildScripts/createDockerImage +++ b/buildScripts/createDockerImage @@ -31,7 +31,7 @@ DOCKERFILE_HERE_DOC cd .. - docker build -t $DOCKER_USERNAME/pdf2htmlex:$PDF2HTMLEX_BRANCH-$BUILD_TIME dockerDir + docker build -t $DOCKER_NAME dockerDir else echo "Docker is not installed... skipping creation of a docker image." From b17931b4fcafed1dfa71b9d6c983bab3441104be Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 28 Nov 2019 17:23:26 +0000 Subject: [PATCH 089/128] attempting to use new github upload tool --- buildScripts/getBuildTools | 1 + buildScripts/uploadRelease | 27 ++--- buildScripts/uploadReleaseMessage | 6 + buildScripts/uploadReleaseTool | 191 ++++++++++++++++++++++++++++++ 4 files changed, 207 insertions(+), 18 deletions(-) create mode 100644 buildScripts/uploadReleaseMessage create mode 100755 buildScripts/uploadReleaseTool diff --git a/buildScripts/getBuildTools b/buildScripts/getBuildTools index d4f29c6..d4e5c58 100755 --- a/buildScripts/getBuildTools +++ b/buildScripts/getBuildTools @@ -19,5 +19,6 @@ sudo apt-get $UNATTENDED install \ g++ \ gettext \ openjdk-8-jre-headless \ + jp \ tree diff --git a/buildScripts/uploadRelease b/buildScripts/uploadRelease index fb618ed..4653f29 100755 --- a/buildScripts/uploadRelease +++ b/buildScripts/uploadRelease @@ -19,7 +19,13 @@ source ./buildScripts/reSourceVersionEnvs cd imageBuild if [ -n "$GITHUB_TOKEN" ]; then - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh + + echo "machine api.github.com" > $HOME/.netrc + echo " login $GITHUB_USERNAME" >> $HOME/.netrc + echo " password $GITHUB_TOKEN" >> $HOME/.netrc + echo "machine uploads.github.com" >> $HOME/.netrc + echo " login $GITHUB_USERNAME" >> $HOME/.netrc + echo " password $GITHUB_TOKEN" >> $HOME/.netrc echo $BUILD_TIME > buildTime @@ -27,23 +33,8 @@ if [ -n "$GITHUB_TOKEN" ]; then echo $DOCKER_NAME > dockerImageName - export UPLOADTOOL_BODY=< [] [-- ...]" >&2; +} + +if [ "$1" = "-h" -o "$1" = "--help" ]; then + usage + cat >&2 <\`: ":user/:name" of the repository. For example, "foca/mpp". + * \`\`: Name of the tag for this release. For example, "v1.0.0". + * \`\`: Optional suffix for the release name. + +You can pass a list of files to upload as release assets by giving them after a +\`--\` argument. + +If you supply text on \`STDIN\` it will be used as the release notes. + +EXAMPLES: + + $ $0 foca/mpp v1.0.0 -- pkg/*.tar.gz + + Creates a release named "mpp v1.0.0" and adds any tar.gz file in + \`./pkg\` as an asset. + + $ $0 foca/mpp v1.0.1 "Bugfixes" -- pkg/*.tar.gz < notes.md + + Creates a release named "mpp v1.0.1: Bugfixes", adds any tar.gz + file in \`./pkg\` as an asset, and uses the contents of \`notes.md\` + as the release notes. + +NOTE: + +This uses your \`.netrc\` file to authenticate with GitHub. In order to run the +script, make sure you have **both** \`api.github.com\` and \`upload.github.com\` in +this file. For example: + +machine api.github.com + login foca + password +machine uploads.github.com + login foca + password + +Generate this access token at https://github.com/settings/tokens and make sure +it has access to the \`"repo"\` scope. +EOS + exit 1; +fi + +[ -n "$2" ] || (usage; exit 1); + +REPO="$1" +shift + +TAG="$1" +shift + +NAME="$(basename "$REPO") ${TAG}" +if [ -n "$1" -a "$1" != "--" ]; then + NAME="${NAME}: $1"; + shift +fi + +BODY="$(cat ./buildScripts/uploadReleaseMessage)" + +if [ "$1" = "--" -a "$#" -ge "2" ]; then + shift + ASSETS="$@" +fi + +echo "looking for an existing 'continuous' release" + +response=$( + curl --fail \ + --netrc \ + --silent \ + --location \ + --request "GET" \ + "https://api.github.com/repos/${REPO}/releases" +) + +releaseID=$(echo $response | jq '.[] | select(.tag_name == "continuous") | .id') + +if [ -n "$releaseID" ] ; then + + echo "deleting an existing 'continuous' release" + response=$( + curl --fail \ + --netrc \ + --silent \ + --location \ + --request "DELETE" \ + "https://api.github.com/repos/${REPO}/releases/$releaseID" + ) + +fi + +echo "looking for an existing 'continuous' tag" + +response=$( + curl --fail \ + --netrc \ + --silent \ + --location \ + --request "GET" \ + "https://api.github.com/repos/${REPO}/git/matching-refs/tags/continuous" +) + +tagURL=$(echo $response | jq '.[].url') +tagURL="${tagURL%\"}" +tagURL="${tagURL#\"}" + +if [ -n "$tagURL" ]; then + echo "deleting an existing 'continuous' tag" + response=$( + curl --fail \ + --netrc \ + --silent \ + --location \ + --request "DELETE" \ + $tagURL + ) +fi + +payload=$( + jq --null-input \ + --arg tag "$TAG" \ + --arg name "$NAME" \ + --arg body "$BODY" \ + '{ tag_name: $tag, name: $name, body: $body, draft: false, prerelease: true }' +) + +response=$( + curl --fail \ + --netrc \ + --silent \ + --location \ + --data "$payload" \ + "https://api.github.com/repos/${REPO}/releases" +) + +upload_url="$(echo "$response" | jq -r .upload_url | sed -e "s/{?name,label}//")" + +for file in $ASSETS; do + echo "" + echo "uploading $file" + curl --netrc \ + --silent \ + --header "Content-Type:application/gzip" \ + --data-binary "@$file" \ + "$upload_url?name=$(basename "$file")" + echo "" +done + +# The above was taken from: +# https://gist.github.com/foca/38d82e93e32610f5241709f8d5720156 +# on 2019-11-28 +# and has been altered to delete the "continuous" tag/release +# as well as using the ./buildScripts/uploadReleaseMessage +# by Stephen Gaito +# it has been used under the following (MIT-like) license: + +# Copyright (c) 2016 Nicolas Sanguinetti +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. From 69b18fdab3b645224a1f3935223782d69bba4e76 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 28 Nov 2019 17:30:45 +0000 Subject: [PATCH 090/128] updated documentation for uploadReleaseTool --- buildScripts/uploadReleaseTool | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildScripts/uploadReleaseTool b/buildScripts/uploadReleaseTool index 8e8fe81..de18d73 100755 --- a/buildScripts/uploadReleaseTool +++ b/buildScripts/uploadReleaseTool @@ -163,6 +163,8 @@ done # https://gist.github.com/foca/38d82e93e32610f5241709f8d5720156 # on 2019-11-28 # and has been altered to delete the "continuous" tag/release +# using: https://developer.github.com/v3/git/refs/ +# and: https://developer.github.com/v3/repos/releases/ # as well as using the ./buildScripts/uploadReleaseMessage # by Stephen Gaito # it has been used under the following (MIT-like) license: From ce93fa036d2c06066d21c78ee9ceb238dac5bca1 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 28 Nov 2019 18:27:43 +0000 Subject: [PATCH 091/128] corrected build scripts --- buildScripts/doItAll | 1 - buildScripts/getBuildTools | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/buildScripts/doItAll b/buildScripts/doItAll index 6e510f0..b434a06 100755 --- a/buildScripts/doItAll +++ b/buildScripts/doItAll @@ -45,4 +45,3 @@ export PDF2HTMLEX_BRANCH=newBuildSystem ./buildScripts/createDockerImage || { echo 'createDockerImage FAILED' ; exit 1 ; } -./buildScripts/uploadRelease || { echo 'uploadRelease FAILED' ; exit 1 ; } diff --git a/buildScripts/getBuildTools b/buildScripts/getBuildTools index d4e5c58..91156df 100755 --- a/buildScripts/getBuildTools +++ b/buildScripts/getBuildTools @@ -19,6 +19,6 @@ sudo apt-get $UNATTENDED install \ g++ \ gettext \ openjdk-8-jre-headless \ - jp \ + jq \ tree From cd88751cf379cbb399cbfcbeaff3a5bf4ab3430e Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 28 Nov 2019 19:13:40 +0000 Subject: [PATCH 092/128] corrected release upload --- buildScripts/uploadRelease | 5 ++++- buildScripts/uploadReleaseTool | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/buildScripts/uploadRelease b/buildScripts/uploadRelease index 4653f29..126102c 100755 --- a/buildScripts/uploadRelease +++ b/buildScripts/uploadRelease @@ -33,7 +33,10 @@ if [ -n "$GITHUB_TOKEN" ]; then echo $DOCKER_NAME > dockerImageName - ./buildScripts/uploadReleaseTool "$REPO_SLUG" "continuous" "Latest release" \ + echo ../buildScripts/uploadReleaseTool "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \ + -- $APPIMAGE_NAME appImageName dockerImageName buildTime + + ../buildScripts/uploadReleaseTool "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \ -- $APPIMAGE_NAME appImageName dockerImageName buildTime else diff --git a/buildScripts/uploadReleaseTool b/buildScripts/uploadReleaseTool index de18d73..f60d8a9 100755 --- a/buildScripts/uploadReleaseTool +++ b/buildScripts/uploadReleaseTool @@ -57,18 +57,21 @@ fi [ -n "$2" ] || (usage; exit 1); REPO="$1" +echo "Repository: [$REPO]" shift TAG="$1" +echo " Tag: [$TAG]" shift NAME="$(basename "$REPO") ${TAG}" if [ -n "$1" -a "$1" != "--" ]; then NAME="${NAME}: $1"; + echo " Name: [$NAME]" shift fi -BODY="$(cat ./buildScripts/uploadReleaseMessage)" +BODY="$(cat ../buildScripts/uploadReleaseMessage)" if [ "$1" = "--" -a "$#" -ge "2" ]; then shift From 41e8218f6576d3f75bc9bc6406db7bdc3249e7e4 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 29 Nov 2019 07:28:23 +0000 Subject: [PATCH 093/128] refactored upload process --- buildScripts/buildInstallLocally | 41 ++++++++++ buildScripts/{doItAll => doItAllLocally} | 1 - buildScripts/uploadRelease | 96 ++++++++++++++++-------- buildScripts/versionEnvs | 1 - 4 files changed, 104 insertions(+), 35 deletions(-) create mode 100755 buildScripts/buildInstallLocally rename buildScripts/{doItAll => doItAllLocally} (97%) diff --git a/buildScripts/buildInstallLocally b/buildScripts/buildInstallLocally new file mode 100755 index 0000000..4c0a3d3 --- /dev/null +++ b/buildScripts/buildInstallLocally @@ -0,0 +1,41 @@ +#!/bin/bash + +# This bash script builds the complete pdf2htmlEX application LOCALLY +# (It does not create the AppImage or Docker images) + +# Adjust the following two environment variables to suit your needs +# +export UNATTENDED="--assume-yes" +export MAKE_PARALLEL="-j $(nproc)" + +# choose one of the following... +# +export PDF2HTMLEX_BRANCH=newBuildSystem +# export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)" + +################ +# do the build + +./buildScripts/versionEnvs || { echo 'versionEnvs FAILED' ; exit 1 ; } + +./buildScripts/reportEnvs || { echo 'reportEnvs FAILED' ; exit 1 ; } + +./buildScripts/getBuildTools || { echo 'getBuildTools FAILED' ; exit 1 ; } + +./buildScripts/getDevLibraries || { echo 'getDevLibraries FAILED' ; exit 1 ; } + +./buildScripts/getPoppler || { echo 'getPoppler FAILED' ; exit 1 ; } + +./buildScripts/buildPoppler || { echo 'buildPoppler FAILED' ; exit 1 ; } + +./buildScripts/installPoppler || { echo 'installPoppler FAILED' ; exit 1 ; } + +./buildScripts/getFontforge || { echo 'getFontforge FAILED' ; exit 1 ; } + +./buildScripts/buildFontforge || { echo 'buildFontforge FAILED' ; exit 1 ; } + +./buildScripts/installFontforge || { echo 'installFontforge FAILED' ; exit 1 ; } + +./buildScripts/buildPdf2htmlEX || { echo 'buildPdf2htmlEX FAILED' ; exit 1 ; } + +./buildScripts/installPdf2htmlEX || { echo 'installPdf2htmlEX FAILED' ; exit 1 ; } diff --git a/buildScripts/doItAll b/buildScripts/doItAllLocally similarity index 97% rename from buildScripts/doItAll rename to buildScripts/doItAllLocally index b434a06..adeefcf 100755 --- a/buildScripts/doItAll +++ b/buildScripts/doItAllLocally @@ -7,7 +7,6 @@ # export UNATTENDED="--assume-yes" export MAKE_PARALLEL="-j $(nproc)" -export TRAVIS_REPO_SLUG=stephengaito/pdf2htmlEX # choose one of the following... # diff --git a/buildScripts/uploadRelease b/buildScripts/uploadRelease index 126102c..4b52d3c 100755 --- a/buildScripts/uploadRelease +++ b/buildScripts/uploadRelease @@ -16,54 +16,84 @@ source ./buildScripts/reSourceVersionEnvs # upload github release artefacts # +# begin by gathering the required environment variables +# + +if [ -z "$GITHUB_USERNAME" ]; then + echo "" + read -p "Enter the GitHub upload username: " GITHUB_USERNAME + echo "" + if [ -z "$GITHUB_USERNAME" ]; then + echo "GITHUB_USERNAME not set... so we can not upload release artefacts." + exit 1 + fi +fi + +if [ -z "$GITHUB_TOKEN" ]; then + echo "" + read -p "Enter the GitHub upload token/password: " GITHUB_TOKEN + echo "" + if [ -z "$GITHUB_TOKEN" ]; then + echo "GITHUB_TOKEN not set... so we can not upload release artefacts." + exit 1 + fi +fi + +if [ -z "$TRAVIS_REPO_SLUG" ]; then + echo "" + read -p "Enter the GitHub repository (user/proj): " TRAVIS_REPO_SLUG + echo "" + if [ -z "$TRAVIS_REPO_SLUG" ]; then + echo "TRAVIS_REPO_SLUG (Github repository) not set... so we can not upload release artefacts." + exit 1 + fi +fi + cd imageBuild -if [ -n "$GITHUB_TOKEN" ]; then +echo "machine api.github.com" > $HOME/.netrc +echo " login $GITHUB_USERNAME" >> $HOME/.netrc +echo " password $GITHUB_TOKEN" >> $HOME/.netrc +echo "machine uploads.github.com" >> $HOME/.netrc +echo " login $GITHUB_USERNAME" >> $HOME/.netrc +echo " password $GITHUB_TOKEN" >> $HOME/.netrc - echo "machine api.github.com" > $HOME/.netrc - echo " login $GITHUB_USERNAME" >> $HOME/.netrc - echo " password $GITHUB_TOKEN" >> $HOME/.netrc - echo "machine uploads.github.com" >> $HOME/.netrc - echo " login $GITHUB_USERNAME" >> $HOME/.netrc - echo " password $GITHUB_TOKEN" >> $HOME/.netrc +echo $BUILD_TIME > buildTime +echo $APPIMAGE_NAME > appImageName +echo $DOCKER_NAME > dockerImageName - echo $BUILD_TIME > buildTime +echo ../buildScripts/uploadReleaseTool "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \ + -- $APPIMAGE_NAME appImageName dockerImageName buildTime - echo $APPIMAGE_NAME > appImageName +../buildScripts/uploadReleaseTool "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \ + -- $APPIMAGE_NAME appImageName dockerImageName buildTime - echo $DOCKER_NAME > dockerImageName - - echo ../buildScripts/uploadReleaseTool "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \ - -- $APPIMAGE_NAME appImageName dockerImageName buildTime - - ../buildScripts/uploadReleaseTool "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \ - -- $APPIMAGE_NAME appImageName dockerImageName buildTime - -else - echo "GITHUB_TOKEN not set... so we can not upload release artefacts." -fi ################################## # push docker image # if [ -x "$(which docker)" ]; then - if [ -n "$DOCKER_USERNAME" ]; then - - if [ -z "$DOCKER_PASSWORD" ]; then - echo "" - echo "Please type your the Docker hub password" - docker login -u "$DOCKER_USERNAME" - else - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + if [ -z "$DOCKER_USERNAME" ]; then + echo "" + read -p "Enter the Docker usernane): " DOCKER_USERNAME + echo "" + if [ -z "$DOCKER_USERNAME" ]; then + echo "DOCKER_USERNAME not set... so we do not know where to push image." + exit 1 fi - - docker push $DOCKER_USERNAME/pdf2htmlex - - else - echo "DOCKER_USERNAME not set... so we do not know where to push image." fi + if [ -z "$DOCKER_PASSWORD" ]; then + echo "" + echo "Please type your the Docker hub password" + docker login -u "$DOCKER_USERNAME" + else + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + fi + + docker push $DOCKER_USERNAME/pdf2htmlex + else echo "Docker is not installed... skipping upload of docker image." fi diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index 9103687..0c11cf9 100755 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -31,5 +31,4 @@ echo "export BUILD_TIME=\"$BUILD_TIME\"" >> buildScripts/reSourceV echo "export DOCKER_FROM=\"$DOCKER_FROM\"" >> buildScripts/reSourceVersionEnvs echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> buildScripts/reSourceVersionEnvs echo "export APPIMAGE_NAME=\"$APPIMAGE_NAME\"" >> buildScripts/reSourceVersionEnvs -echo "export TRAVIS_REPO_SLUG=\"$TRAVIS_REPO_SLUG\"" >> buildScripts/reSourceVersionEnvs From b207b8ea485f87d0faf5e7c81bfbf69052ab259a Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 29 Nov 2019 09:11:32 +0000 Subject: [PATCH 094/128] refactored to provide build stage headers and improved the upload function --- buildScripts/buildFontforge | 6 + buildScripts/buildPdf2htmlEX | 6 + buildScripts/buildPdf2htmlEXClang | 6 + buildScripts/buildPoppler | 6 + buildScripts/createAppImage | 6 + buildScripts/createDockerImage | 6 + buildScripts/getBuildTools | 7 ++ buildScripts/getDevLibraries | 7 ++ buildScripts/getFontforge | 8 ++ buildScripts/getPdf2htmlEX | 8 ++ buildScripts/getPoppler | 8 ++ buildScripts/installFontforge | 8 ++ buildScripts/installPdf2htmlEX | 8 ++ buildScripts/installPoppler | 7 ++ buildScripts/uploadRelease | 23 +++- buildScripts/uploadReleaseDSL | 194 +++++++++++++++++++++++++++++ buildScripts/uploadReleaseTool | 196 ------------------------------ 17 files changed, 308 insertions(+), 202 deletions(-) create mode 100755 buildScripts/uploadReleaseDSL delete mode 100755 buildScripts/uploadReleaseTool diff --git a/buildScripts/buildFontforge b/buildScripts/buildFontforge index 8639556..f2d5823 100755 --- a/buildScripts/buildFontforge +++ b/buildScripts/buildFontforge @@ -4,6 +4,12 @@ source buildScripts/reSourceVersionEnvs +echo "" +echo "-------------------------------------------------------------------" +echo "BUILDING FontForge" +echo "-------------------------------------------------------------------" +echo "" + # This is a work-around to fix TravisCI's declaration of PYTHON_CFLAGS # which is then honoured exactly as is by the fontforge bootstrap and # configure steps. diff --git a/buildScripts/buildPdf2htmlEX b/buildScripts/buildPdf2htmlEX index efbc54d..1d49382 100755 --- a/buildScripts/buildPdf2htmlEX +++ b/buildScripts/buildPdf2htmlEX @@ -2,6 +2,12 @@ # This bash script builds pdf2htmlEX +echo "" +echo "-------------------------------------------------------------------" +echo "BUILDING pdf2htmlEX (using gcc)" +echo "-------------------------------------------------------------------" +echo "" + cd pdf2htmlEX mkdir build cd build diff --git a/buildScripts/buildPdf2htmlEXClang b/buildScripts/buildPdf2htmlEXClang index 6d0b7ee..3ea3a3f 100755 --- a/buildScripts/buildPdf2htmlEXClang +++ b/buildScripts/buildPdf2htmlEXClang @@ -2,6 +2,12 @@ # This bash script builds pdf2htmlEX using Clang (if it is installed) +echo "" +echo "-------------------------------------------------------------------" +echo "BUILDING pdf2htmlEX (using CLang)" +echo "-------------------------------------------------------------------" +echo "" + cd pdf2htmlEX mkdir build cd build diff --git a/buildScripts/buildPoppler b/buildScripts/buildPoppler index 711fbd3..52df3e9 100755 --- a/buildScripts/buildPoppler +++ b/buildScripts/buildPoppler @@ -2,6 +2,12 @@ # This bash script builds the latest poppler +echo "" +echo "-------------------------------------------------------------------" +echo "BUILDING Poppler" +echo "-------------------------------------------------------------------" +echo "" + cd poppler mkdir build cd build diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index 399d862..5321e1e 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -4,6 +4,12 @@ source ./buildScripts/reSourceVersionEnvs +echo "" +echo "-------------------------------------------------------------------" +echo "CREATING pdf2htmlEX AppImage" +echo "-------------------------------------------------------------------" +echo "" + # For appimage output plugin # export VERSION="$PDF2HTMLEX_BRANCH-$BUILD_TIME" diff --git a/buildScripts/createDockerImage b/buildScripts/createDockerImage index ce6f169..8945c71 100755 --- a/buildScripts/createDockerImage +++ b/buildScripts/createDockerImage @@ -2,6 +2,12 @@ # This bash script creates a docker image from an existing pdf2htmlEX +echo "" +echo "-------------------------------------------------------------------" +echo "CREATING pdf2htmlEX Docker Image" +echo "-------------------------------------------------------------------" +echo "" + if [ -x "$(which docker)" ]; then source buildScripts/reSourceVersionEnvs diff --git a/buildScripts/getBuildTools b/buildScripts/getBuildTools index 91156df..92e42fd 100755 --- a/buildScripts/getBuildTools +++ b/buildScripts/getBuildTools @@ -5,6 +5,13 @@ # set the bash environment variable 'UNATTENDED' to '--assume-yes' for # unattended use (for example in the .travis.yml script) +echo "" +echo "-------------------------------------------------------------------" +echo "INSTALLING Build Tools (using APT)" +echo " (UNATTENDED: [$UNATTENDED])" +echo "-------------------------------------------------------------------" +echo "" + sudo apt-get update sudo apt-get $UNATTENDED install \ aptitude \ diff --git a/buildScripts/getDevLibraries b/buildScripts/getDevLibraries index 6631536..37b80f5 100755 --- a/buildScripts/getDevLibraries +++ b/buildScripts/getDevLibraries @@ -6,6 +6,13 @@ # set the bash environment variable 'UNATTENDED' to '--assume-yes' for # unattended use (for example in the .travis.yml script) +echo "" +echo "-------------------------------------------------------------------" +echo "INSTALLING development libraries (using APT)" +echo " (UNATTENDED: [$UNATTENDED])" +echo "-------------------------------------------------------------------" +echo "" + sudo apt-get update sudo apt-get $UNATTENDED install \ libcairo-dev \ diff --git a/buildScripts/getFontforge b/buildScripts/getFontforge index 402aee9..1ad7bab 100755 --- a/buildScripts/getFontforge +++ b/buildScripts/getFontforge @@ -2,6 +2,14 @@ # This bash script gets and unpacks the latest fontforge AppImage +echo "" +echo "-------------------------------------------------------------------" +echo "GETTING FontForge sources (using wget)" +echo " (FONTFORGE_VERSION: [$FONTFORGE_VERSION])" +echo "-------------------------------------------------------------------" +echo "" + + source buildScripts/reSourceVersionEnvs FONTFORGE_SRC=$FONTFORGE_VERSION.tar.gz diff --git a/buildScripts/getPdf2htmlEX b/buildScripts/getPdf2htmlEX index 2232ad1..5c988d6 100755 --- a/buildScripts/getPdf2htmlEX +++ b/buildScripts/getPdf2htmlEX @@ -5,6 +5,14 @@ PDF2HTMLEX_BRANCH=newBuildSystem +echo "" +echo "-------------------------------------------------------------------" +echo "GETTING pdf2htmlEX sources (using wget)" +echo " (PDF2HTMLEX_BRANCH: [$PDF2HTMLEX_BRANCH])" +echo "-------------------------------------------------------------------" +echo "" + + wget https://codeload.github.com/stephengaito/pdf2htmlEX/zip/$PDF2HTMLEX_BRANCH mv $PDF2HTMLEX_BRANCH $PDF2HTMLEX_BRANCH.zip diff --git a/buildScripts/getPoppler b/buildScripts/getPoppler index a6888d7..ca25e1c 100755 --- a/buildScripts/getPoppler +++ b/buildScripts/getPoppler @@ -4,6 +4,14 @@ source buildScripts/reSourceVersionEnvs +echo "" +echo "-------------------------------------------------------------------" +echo "GETTING Poppler source code (using wget)" +echo " (POPPLER_VERSION: [$POPPLER_VERSION])" +echo "-------------------------------------------------------------------" +echo "" + + echo "Getting poppler version: $POPPLER_VERSION" rm -rf $POPPLER_VERSION.tar.xz diff --git a/buildScripts/installFontforge b/buildScripts/installFontforge index 77c2058..1ea43f9 100755 --- a/buildScripts/installFontforge +++ b/buildScripts/installFontforge @@ -1,5 +1,13 @@ #!/bin/bash +echo "" +echo "-------------------------------------------------------------------" +echo "INSTALLING FontForge locally" +echo " (UNATTENDED: [$UNATTENDED])" +echo "-------------------------------------------------------------------" +echo "" + + if [ -z "$UNATTENDED" ] ; then echo "WARNING: this may over-write any existing" echo "FontForge version you have installed on your system." diff --git a/buildScripts/installPdf2htmlEX b/buildScripts/installPdf2htmlEX index 4193c6b..c3b861e 100755 --- a/buildScripts/installPdf2htmlEX +++ b/buildScripts/installPdf2htmlEX @@ -1,5 +1,13 @@ #!/bin/bash +echo "" +echo "-------------------------------------------------------------------" +echo "INSTALLING pdf2htmlEX locally" +echo " (UNATTENDED: [$UNATTENDED])" +echo "-------------------------------------------------------------------" +echo "" + + if [ -z "$UNATTENDED" ] ; then echo "This installation assumes you have 'sudo' privileges" diff --git a/buildScripts/installPoppler b/buildScripts/installPoppler index ec97f26..2ae5b15 100755 --- a/buildScripts/installPoppler +++ b/buildScripts/installPoppler @@ -2,6 +2,13 @@ # This bash script installs Poppler into the local system +echo "" +echo "-------------------------------------------------------------------" +echo "INSTALLING Poppler locally" +echo " (UNATTENDED: [$UNATTENDED])" +echo "-------------------------------------------------------------------" +echo "" + if [ -z "$UNATTENDED" ] ; then echo "WARNING: this may over-write any existing" diff --git a/buildScripts/uploadRelease b/buildScripts/uploadRelease index 4b52d3c..fefc3c3 100755 --- a/buildScripts/uploadRelease +++ b/buildScripts/uploadRelease @@ -11,6 +11,14 @@ # source ./buildScripts/reSourceVersionEnvs +source ./buildScripts/uploadReleaseDSL + +echo "" +echo "-------------------------------------------------------------------" +echo "UPLOADING pdf2htmlEX AppImage and Docker Images" +echo "-------------------------------------------------------------------" +echo "" + ################################## # upload github release artefacts @@ -58,16 +66,19 @@ echo "machine uploads.github.com" >> $HOME/.netrc echo " login $GITHUB_USERNAME" >> $HOME/.netrc echo " password $GITHUB_TOKEN" >> $HOME/.netrc -echo $BUILD_TIME > buildTime +echo $BUILD_TIME > buildTime echo $APPIMAGE_NAME > appImageName -echo $DOCKER_NAME > dockerImageName +echo $DOCKER_NAME > dockerImageName -echo ../buildScripts/uploadReleaseTool "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \ - -- $APPIMAGE_NAME appImageName dockerImageName buildTime +deleteReleaseByTag "$TRAVIS_REPO_SLUG" "continuous" -../buildScripts/uploadReleaseTool "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \ - -- $APPIMAGE_NAME appImageName dockerImageName buildTime +createNewRelease "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \ + ../buildScripts/uploadReleaseMessage +uploadAnAsset $upload_url appImageName "text/plain" +uploadAnAsset $upload_url buildTime "text/plain" +uploadAnAsset $upload_url dockerImageName "text/plain" +uploadAnAsset $upload_url $APPIMAGE_NAME "application/zip" ################################## # push docker image diff --git a/buildScripts/uploadReleaseDSL b/buildScripts/uploadReleaseDSL new file mode 100755 index 0000000..3d36db6 --- /dev/null +++ b/buildScripts/uploadReleaseDSL @@ -0,0 +1,194 @@ +#!/usr/bin/env bash + +# This bash script is a collection of functions to interact with the GitHub +# release and git/tag APIs. It essentially provides a bash based DSL for +# uploading GitHub release artefacts. + +# NOTE-1: These functions make use of your ".netrc" file to authenticate +# with GitHub. In order to use these functions, make sure you have **both** +# "api.github.com" and "upload.github.com" in this file. For example: +# +# machine api.github.com +# login foca +# password +# machine uploads.github.com +# login foca +# password +# +# You can generate the required access token at +# https://github.com/settings/tokens +# Make sure this access token has access to the "repo" scope. +# +# NOTE-2: These functions require the "jq" library to parse the JSON +# returned by the GitHub APIs. + +############################# +function deleteReleaseByTag { + + [ -n "$1" ] || (echo "deleteReleaseByTag: missing repository"; exit 1); + [ -n "$2" ] || (echo "deleteReleaseByTag: missing releaseTag"; exit 1); + + REPO=$1 + releaseTag=$2 + + echo "" + echo "deleting the release tagged $releaseTag" + echo " from the repository $REPO" + echo "" + + echo "looking for an existing '$releaseTag' release in the repo $REPO" + + response=$( + curl --fail \ + --netrc \ + --silent \ + --location \ + --request "GET" \ + "https://api.github.com/repos/${REPO}/releases" + ) + + releaseID=$(echo $response | jq '.[] | select(.tag_name == "$releaseTag") | .id') + + if [ -n "$releaseID" ] ; then + + echo "deleting an existing '$releaseTag' release in the repo $REPO" + response=$( + curl --fail \ + --netrc \ + --silent \ + --location \ + --request "DELETE" \ + "https://api.github.com/repos/${REPO}/releases/$releaseID" + ) + + fi + + echo "looking for an existing '$releaseTag' git/tag in the repo $REPO" + + response=$( + curl --fail \ + --netrc \ + --silent \ + --location \ + --request "GET" \ + "https://api.github.com/repos/${REPO}/git/matching-refs/tags/$releaseTag" + ) + + tagURL=$(echo $response | jq '.[].url') + tagURL="${tagURL%\"}" + tagURL="${tagURL#\"}" + + if [ -n "$tagURL" ]; then + echo "deleting an existing '$releaseTag' git/tag in the repo $REPO" + response=$( + curl --fail \ + --netrc \ + --silent \ + --location \ + --request "DELETE" \ + $tagURL + ) + fi +} + +########################### +function createNewRelease { +# returns: upload_url (envVar) + + [ -n "$1" ] || (echo "createNewRelease: missing repository"; exit 1); + [ -n "$2" ] || (echo "createNewRelease: missing releaseTag"; exit 1); + [ -n "$3" ] || (echo "createNewRelease: missing release name"; exit 1); + [ -n "$4" ] || (echo "createNewRelease: missing release description filename"; exit 1); + + REPO=$1 + TAG=$2 + NAME=$3 + BODY=$(cat $4) + + echo "" + echo "Creating a new release in the repository $REPO" + echo " with tag $TAG" + echo " and name $NAME" + echo " using the message in the file $4" + echo "--------------------------------------------------------------" + echo $BODY + echo "--------------------------------------------------------------" + + payload=$( + jq --null-input \ + --arg tag "$TAG" \ + --arg name "$NAME" \ + --arg body "$BODY" \ + '{ tag_name: $tag, name: $name, body: $body, draft: false, prerelease: true }' + ) + + response=$( + curl --fail \ + --netrc \ + --silent \ + --location \ + --data "$payload" \ + "https://api.github.com/repos/${REPO}/releases" + ) + + upload_url="$(echo "$response" | jq -r .upload_url | sed -e "s/{?name,label}//")" +} + +######################## +function uploadAnAsset { + + [ -n "$1" ] || (echo "uploadAnAsset: missing upload url"; exit 1); + [ -n "$2" ] || (echo "uploadAnAsset: missing file name"; exit 1); + [ -n "$3" ] || (echo "uploadAnAsset: missing file type"; exit 1); + + upload_url=$1 + file=$2 + fileType=$3 + + echo "" + echo "uploading the asset $file" + echo " of type $fileType" + + curl --netrc \ + --silent \ + --header "Content-Type:$fileType" \ + --data-binary "@$file" \ + "$upload_url?name=$(basename "$file")" + echo "" +} + +# The above has been heavily modified into a collection of bash functions +# by Stephen Gaito working on the pdf2htmlEX project. +# +# It has been based upon the code in: +# https://gist.github.com/foca/38d82e93e32610f5241709f8d5720156 +# on 2019-11-28 +# +# The relevant GitHub API can be found at: +# https://developer.github.com/v3/git/refs/ +# https://developer.github.com/v3/repos/releases/ +# +# The original code has been used under the following (MIT-like) license: + +# Copyright (c) 2016 Nicolas Sanguinetti +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. diff --git a/buildScripts/uploadReleaseTool b/buildScripts/uploadReleaseTool deleted file mode 100755 index f60d8a9..0000000 --- a/buildScripts/uploadReleaseTool +++ /dev/null @@ -1,196 +0,0 @@ -#!/usr/bin/env bash - -set -e -[ -z "$DEBUG" ] || set -x; - -usage() { - echo "$0 [] [-- ...]" >&2; -} - -if [ "$1" = "-h" -o "$1" = "--help" ]; then - usage - cat >&2 <\`: ":user/:name" of the repository. For example, "foca/mpp". - * \`\`: Name of the tag for this release. For example, "v1.0.0". - * \`\`: Optional suffix for the release name. - -You can pass a list of files to upload as release assets by giving them after a -\`--\` argument. - -If you supply text on \`STDIN\` it will be used as the release notes. - -EXAMPLES: - - $ $0 foca/mpp v1.0.0 -- pkg/*.tar.gz - - Creates a release named "mpp v1.0.0" and adds any tar.gz file in - \`./pkg\` as an asset. - - $ $0 foca/mpp v1.0.1 "Bugfixes" -- pkg/*.tar.gz < notes.md - - Creates a release named "mpp v1.0.1: Bugfixes", adds any tar.gz - file in \`./pkg\` as an asset, and uses the contents of \`notes.md\` - as the release notes. - -NOTE: - -This uses your \`.netrc\` file to authenticate with GitHub. In order to run the -script, make sure you have **both** \`api.github.com\` and \`upload.github.com\` in -this file. For example: - -machine api.github.com - login foca - password -machine uploads.github.com - login foca - password - -Generate this access token at https://github.com/settings/tokens and make sure -it has access to the \`"repo"\` scope. -EOS - exit 1; -fi - -[ -n "$2" ] || (usage; exit 1); - -REPO="$1" -echo "Repository: [$REPO]" -shift - -TAG="$1" -echo " Tag: [$TAG]" -shift - -NAME="$(basename "$REPO") ${TAG}" -if [ -n "$1" -a "$1" != "--" ]; then - NAME="${NAME}: $1"; - echo " Name: [$NAME]" - shift -fi - -BODY="$(cat ../buildScripts/uploadReleaseMessage)" - -if [ "$1" = "--" -a "$#" -ge "2" ]; then - shift - ASSETS="$@" -fi - -echo "looking for an existing 'continuous' release" - -response=$( - curl --fail \ - --netrc \ - --silent \ - --location \ - --request "GET" \ - "https://api.github.com/repos/${REPO}/releases" -) - -releaseID=$(echo $response | jq '.[] | select(.tag_name == "continuous") | .id') - -if [ -n "$releaseID" ] ; then - - echo "deleting an existing 'continuous' release" - response=$( - curl --fail \ - --netrc \ - --silent \ - --location \ - --request "DELETE" \ - "https://api.github.com/repos/${REPO}/releases/$releaseID" - ) - -fi - -echo "looking for an existing 'continuous' tag" - -response=$( - curl --fail \ - --netrc \ - --silent \ - --location \ - --request "GET" \ - "https://api.github.com/repos/${REPO}/git/matching-refs/tags/continuous" -) - -tagURL=$(echo $response | jq '.[].url') -tagURL="${tagURL%\"}" -tagURL="${tagURL#\"}" - -if [ -n "$tagURL" ]; then - echo "deleting an existing 'continuous' tag" - response=$( - curl --fail \ - --netrc \ - --silent \ - --location \ - --request "DELETE" \ - $tagURL - ) -fi - -payload=$( - jq --null-input \ - --arg tag "$TAG" \ - --arg name "$NAME" \ - --arg body "$BODY" \ - '{ tag_name: $tag, name: $name, body: $body, draft: false, prerelease: true }' -) - -response=$( - curl --fail \ - --netrc \ - --silent \ - --location \ - --data "$payload" \ - "https://api.github.com/repos/${REPO}/releases" -) - -upload_url="$(echo "$response" | jq -r .upload_url | sed -e "s/{?name,label}//")" - -for file in $ASSETS; do - echo "" - echo "uploading $file" - curl --netrc \ - --silent \ - --header "Content-Type:application/gzip" \ - --data-binary "@$file" \ - "$upload_url?name=$(basename "$file")" - echo "" -done - -# The above was taken from: -# https://gist.github.com/foca/38d82e93e32610f5241709f8d5720156 -# on 2019-11-28 -# and has been altered to delete the "continuous" tag/release -# using: https://developer.github.com/v3/git/refs/ -# and: https://developer.github.com/v3/repos/releases/ -# as well as using the ./buildScripts/uploadReleaseMessage -# by Stephen Gaito -# it has been used under the following (MIT-like) license: - -# Copyright (c) 2016 Nicolas Sanguinetti -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. From c50bc7ecfa7b2ba1dce919b8be89d6baf2679da7 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 29 Nov 2019 09:43:07 +0000 Subject: [PATCH 095/128] refactored upload scripts --- buildScripts/createAppImage | 3 ++ buildScripts/createDockerImage | 26 ++++++++++ buildScripts/uploadDockerImage | 48 +++++++++++++++++++ .../{uploadRelease => uploadGitHubRelease} | 2 +- ...ploadReleaseDSL => uploadGitHubReleaseDSL} | 0 ...easeMessage => uploadGitHubReleaseMessage} | 0 buildScripts/uploadImages | 13 +++++ buildScripts/versionEnvs | 18 +++---- 8 files changed, 100 insertions(+), 10 deletions(-) create mode 100755 buildScripts/uploadDockerImage rename buildScripts/{uploadRelease => uploadGitHubRelease} (98%) rename buildScripts/{uploadReleaseDSL => uploadGitHubReleaseDSL} (100%) rename buildScripts/{uploadReleaseMessage => uploadGitHubReleaseMessage} (100%) create mode 100644 buildScripts/uploadImages diff --git a/buildScripts/createAppImage b/buildScripts/createAppImage index 5321e1e..4ebebd6 100755 --- a/buildScripts/createAppImage +++ b/buildScripts/createAppImage @@ -13,6 +13,9 @@ echo "" # For appimage output plugin # export VERSION="$PDF2HTMLEX_BRANCH-$BUILD_TIME" +export APPIMAGE_NAME="pdf2htmlEX-$PDF2HTMLEX_BRANCH-$BUILD_TIME-$MACHINE_ARCH.AppImage" + +echo "export APPIMAGE_NAME=\"$APPIMAGE_NAME\"" >> buildScripts/reSourceVersionEnvs mkdir -p imageBuild/appDir/usr/lib/ diff --git a/buildScripts/createDockerImage b/buildScripts/createDockerImage index 8945c71..71e2287 100755 --- a/buildScripts/createDockerImage +++ b/buildScripts/createDockerImage @@ -14,6 +14,32 @@ if [ -x "$(which docker)" ]; then source buildScripts/dockerFunctions +if [ -z "$DOCKER_FROM" ]; then + echo "" + read -p "Enter the docker image for the 'from' base: " DOCKER_FROM + echo "" + if [ -z "$DOCKER_FROM" ]; then + echo "DOCKER_FROM not set... so we can not build the docker image" + exit 1 + fi +fi + +if [ -z "$DOCKER_USERNAME" ]; then + echo "" + read -p "Enter a docker username: " DOCKER_USERNAME + echo "" + if [ -z "$DOCKER_USERNAME" ]; then + echo "DOCKER_USERNAME not set... so we can not build the docker image" + exit 1 + fi +fi + +export DOCKER_NAME="$DOCKER_USERNAME/pdf2htmlex:$PDF2HTMLEX_BRANCH-$BUILD_TIME" + +echo "export DOCKER_FROM=\"$DOCKER_FROM\"" >> buildScripts/reSourceVersionEnvs +echo "export DOCKER_USERNAME=\"$DOCKER_USERNAME\"" >> buildScripts/reSourceVersionEnvs +echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> buildScripts/reSourceVersionEnvs + mkdir -p imageBuild/dockerDir cd pdf2htmlEX/build diff --git a/buildScripts/uploadDockerImage b/buildScripts/uploadDockerImage new file mode 100755 index 0000000..13fe66f --- /dev/null +++ b/buildScripts/uploadDockerImage @@ -0,0 +1,48 @@ +#!/bin/bash + +# This bash script uploads the pdf2htmlEX docker image to docker hub +# +# We EXPECT the following environment variables to be set: +# DOCKER_USERNAME +# +# You can OPTIONALLY set the following environment variables: +# DOCKER_PASSWORD (if not set you will be asked for your password) +# + +source ./buildScripts/reSourceVersionEnvs + +echo "" +echo "-------------------------------------------------------------------" +echo "UPLOADING pdf2htmlEX Docker Image to Docker Hub" +echo "-------------------------------------------------------------------" +echo "" + +################################## +# push docker image +# +if [ -x "$(which docker)" ]; then + + if [ -z "$DOCKER_USERNAME" ]; then + echo "" + read -p "Enter the Docker usernane): " DOCKER_USERNAME + echo "" + if [ -z "$DOCKER_USERNAME" ]; then + echo "DOCKER_USERNAME not set... so we do not know where to push image." + exit 1 + fi + fi + + if [ -z "$DOCKER_PASSWORD" ]; then + echo "" + echo "Please type your the Docker hub password" + docker login -u "$DOCKER_USERNAME" + else + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + fi + + docker push $DOCKER_USERNAME/pdf2htmlex + +else + echo "Docker is not installed... skipping upload of docker image." +fi + diff --git a/buildScripts/uploadRelease b/buildScripts/uploadGitHubRelease similarity index 98% rename from buildScripts/uploadRelease rename to buildScripts/uploadGitHubRelease index fefc3c3..0f6b35e 100755 --- a/buildScripts/uploadRelease +++ b/buildScripts/uploadGitHubRelease @@ -73,7 +73,7 @@ echo $DOCKER_NAME > dockerImageName deleteReleaseByTag "$TRAVIS_REPO_SLUG" "continuous" createNewRelease "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \ - ../buildScripts/uploadReleaseMessage + ../buildScripts/uploadGitHubReleaseMessage uploadAnAsset $upload_url appImageName "text/plain" uploadAnAsset $upload_url buildTime "text/plain" diff --git a/buildScripts/uploadReleaseDSL b/buildScripts/uploadGitHubReleaseDSL similarity index 100% rename from buildScripts/uploadReleaseDSL rename to buildScripts/uploadGitHubReleaseDSL diff --git a/buildScripts/uploadReleaseMessage b/buildScripts/uploadGitHubReleaseMessage similarity index 100% rename from buildScripts/uploadReleaseMessage rename to buildScripts/uploadGitHubReleaseMessage diff --git a/buildScripts/uploadImages b/buildScripts/uploadImages new file mode 100644 index 0000000..8941229 --- /dev/null +++ b/buildScripts/uploadImages @@ -0,0 +1,13 @@ +#!/bin/bash + +# This bash script uploads already existing pdf2htmlEX AppImage and Docker +# Images + +################ +# do the uploads + +./buildScripts/uploadGitHubRelease || { echo 'uploadGitHubRelease FAILED' ; exit 1 ; } + +./buildScripts/uploadDockerImage || { echo 'uploadDockerImage FAILED' ; exit 1 ; } + + diff --git a/buildScripts/versionEnvs b/buildScripts/versionEnvs index 0c11cf9..ccc0093 100755 --- a/buildScripts/versionEnvs +++ b/buildScripts/versionEnvs @@ -11,24 +11,24 @@ export FONTFORGE_VERSION=20170731 if [ -z "$PDF2HTMLEX_BRANCH" ]; then export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)" + if [ -z "$PDF2HTMLEX_BRANCH" ]; then + echo "" + read -p "Enter the pdf2htmlEX branch or version: " PDF2HTMLEX_BRANCH + echo "" + if [ -z "$PDF2HTMLEX_BRANCH" ]; then + echo "PDF2HTMLEX_BRANCH not set... so we can not build anything." + exit 1 + fi + fi fi export MACHINE_ARCH="$(uname -m)" export BUILD_TIME="$(date +%Y_%m_%d-%H_%M_%S)" -export DOCKER_FROM=ubuntu:18.04 - -export DOCKER_NAME="$DOCKER_USERNAME/pdf2htmlex:$PDF2HTMLEX_BRANCH-$BUILD_TIME" - -export APPIMAGE_NAME="pdf2htmlEX-$PDF2HTMLEX_BRANCH-$BUILD_TIME-$MACHINE_ARCH.AppImage" - echo "export POPPLER_VERSION=\"$POPPLER_VERSION\"" > buildScripts/reSourceVersionEnvs echo "export FONTFORGE_VERSION=\"$FONTFORGE_VERSION\"" >> buildScripts/reSourceVersionEnvs echo "export PDF2HTMLEX_BRANCH=\"$PDF2HTMLEX_BRANCH\"" >> buildScripts/reSourceVersionEnvs echo "export MACHINE_ARCH=\"$MACHINE_ARCH\"" >> buildScripts/reSourceVersionEnvs echo "export BUILD_TIME=\"$BUILD_TIME\"" >> buildScripts/reSourceVersionEnvs -echo "export DOCKER_FROM=\"$DOCKER_FROM\"" >> buildScripts/reSourceVersionEnvs -echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> buildScripts/reSourceVersionEnvs -echo "export APPIMAGE_NAME=\"$APPIMAGE_NAME\"" >> buildScripts/reSourceVersionEnvs From f2e7a432ba23eddab8bd68bba064938b909fec6e Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 29 Nov 2019 09:43:57 +0000 Subject: [PATCH 096/128] corrected doItAllLocally --- buildScripts/doItAllLocally | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/doItAllLocally b/buildScripts/doItAllLocally index adeefcf..d7c1351 100755 --- a/buildScripts/doItAllLocally +++ b/buildScripts/doItAllLocally @@ -1,7 +1,7 @@ #!/bin/bash # This bash script builds the complete pdf2htmlEX application LOCALLY -# (It does not create the AppImage or Docker images) +# (It creates local versions of the AppImage or Docker images) # Adjust the following two environment variables to suit your needs # From cbcbc879c967314cc5e7f2fa9528c7fd950ca7ac Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 29 Nov 2019 09:57:32 +0000 Subject: [PATCH 097/128] refactored overall bulid process scripts --- buildScripts/createImages | 14 +++++++++++ buildScripts/doItAllLocally | 46 ------------------------------------- buildScripts/uploadImages | 2 ++ 3 files changed, 16 insertions(+), 46 deletions(-) create mode 100644 buildScripts/createImages delete mode 100755 buildScripts/doItAllLocally diff --git a/buildScripts/createImages b/buildScripts/createImages new file mode 100644 index 0000000..7b3a205 --- /dev/null +++ b/buildScripts/createImages @@ -0,0 +1,14 @@ +#!/bin/bash + +# This bash script creates the pdf2htmlEX AppImage and Docker Images + +################# +# do the creation + +./buildScripts/reportEnvs || { echo 'reportEnvs FAILED' ; exit 1 ; } + +./buildScripts/createAppImage || { echo 'createAppImage FAILED' ; exit 1 ; } + +./buildScripts/createDockerImage || { echo 'createDockerImage FAILED' ; exit 1 ; } + + diff --git a/buildScripts/doItAllLocally b/buildScripts/doItAllLocally deleted file mode 100755 index d7c1351..0000000 --- a/buildScripts/doItAllLocally +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -# This bash script builds the complete pdf2htmlEX application LOCALLY -# (It creates local versions of the AppImage or Docker images) - -# Adjust the following two environment variables to suit your needs -# -export UNATTENDED="--assume-yes" -export MAKE_PARALLEL="-j $(nproc)" - -# choose one of the following... -# -export PDF2HTMLEX_BRANCH=newBuildSystem -# export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)" - -################ -# do the build - -./buildScripts/versionEnvs || { echo 'versionEnvs FAILED' ; exit 1 ; } - -./buildScripts/reportEnvs || { echo 'reportEnvs FAILED' ; exit 1 ; } - -./buildScripts/getBuildTools || { echo 'getBuildTools FAILED' ; exit 1 ; } - -./buildScripts/getDevLibraries || { echo 'getDevLibraries FAILED' ; exit 1 ; } - -./buildScripts/getPoppler || { echo 'getPoppler FAILED' ; exit 1 ; } - -./buildScripts/buildPoppler || { echo 'buildPoppler FAILED' ; exit 1 ; } - -./buildScripts/installPoppler || { echo 'installPoppler FAILED' ; exit 1 ; } - -./buildScripts/getFontforge || { echo 'getFontforge FAILED' ; exit 1 ; } - -./buildScripts/buildFontforge || { echo 'buildFontforge FAILED' ; exit 1 ; } - -./buildScripts/installFontforge || { echo 'installFontforge FAILED' ; exit 1 ; } - -./buildScripts/buildPdf2htmlEX || { echo 'buildPdf2htmlEX FAILED' ; exit 1 ; } - -./buildScripts/installPdf2htmlEX || { echo 'installPdf2htmlEX FAILED' ; exit 1 ; } - -./buildScripts/createAppImage || { echo 'createAppImage FAILED' ; exit 1 ; } - -./buildScripts/createDockerImage || { echo 'createDockerImage FAILED' ; exit 1 ; } - diff --git a/buildScripts/uploadImages b/buildScripts/uploadImages index 8941229..63b3b30 100644 --- a/buildScripts/uploadImages +++ b/buildScripts/uploadImages @@ -6,6 +6,8 @@ ################ # do the uploads +./buildScripts/reportEnvs || { echo 'reportEnvs FAILED' ; exit 1 ; } + ./buildScripts/uploadGitHubRelease || { echo 'uploadGitHubRelease FAILED' ; exit 1 ; } ./buildScripts/uploadDockerImage || { echo 'uploadDockerImage FAILED' ; exit 1 ; } From af9c57800c0e76e9d65998f0d6b263efa7fa78d9 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 29 Nov 2019 12:11:03 +0000 Subject: [PATCH 098/128] corrected scripts --- buildScripts/createImages | 0 buildScripts/getFontforge | 5 ++--- buildScripts/uploadGitHubRelease | 32 +------------------------------- 3 files changed, 3 insertions(+), 34 deletions(-) mode change 100644 => 100755 buildScripts/createImages diff --git a/buildScripts/createImages b/buildScripts/createImages old mode 100644 new mode 100755 diff --git a/buildScripts/getFontforge b/buildScripts/getFontforge index 1ad7bab..7059eea 100755 --- a/buildScripts/getFontforge +++ b/buildScripts/getFontforge @@ -2,6 +2,8 @@ # This bash script gets and unpacks the latest fontforge AppImage +source buildScripts/reSourceVersionEnvs + echo "" echo "-------------------------------------------------------------------" echo "GETTING FontForge sources (using wget)" @@ -9,9 +11,6 @@ echo " (FONTFORGE_VERSION: [$FONTFORGE_VERSION])" echo "-------------------------------------------------------------------" echo "" - -source buildScripts/reSourceVersionEnvs - FONTFORGE_SRC=$FONTFORGE_VERSION.tar.gz rm -rf $FONTFORGE_SRC diff --git a/buildScripts/uploadGitHubRelease b/buildScripts/uploadGitHubRelease index 0f6b35e..445ca91 100755 --- a/buildScripts/uploadGitHubRelease +++ b/buildScripts/uploadGitHubRelease @@ -11,7 +11,7 @@ # source ./buildScripts/reSourceVersionEnvs -source ./buildScripts/uploadReleaseDSL +source ./buildScripts/uploadGitHubReleaseDSL echo "" echo "-------------------------------------------------------------------" @@ -79,33 +79,3 @@ uploadAnAsset $upload_url appImageName "text/plain" uploadAnAsset $upload_url buildTime "text/plain" uploadAnAsset $upload_url dockerImageName "text/plain" uploadAnAsset $upload_url $APPIMAGE_NAME "application/zip" - -################################## -# push docker image -# -if [ -x "$(which docker)" ]; then - - if [ -z "$DOCKER_USERNAME" ]; then - echo "" - read -p "Enter the Docker usernane): " DOCKER_USERNAME - echo "" - if [ -z "$DOCKER_USERNAME" ]; then - echo "DOCKER_USERNAME not set... so we do not know where to push image." - exit 1 - fi - fi - - if [ -z "$DOCKER_PASSWORD" ]; then - echo "" - echo "Please type your the Docker hub password" - docker login -u "$DOCKER_USERNAME" - else - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - fi - - docker push $DOCKER_USERNAME/pdf2htmlex - -else - echo "Docker is not installed... skipping upload of docker image." -fi - From 8d4b3486883b94e8af68427c450646cc49f1d574 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 29 Nov 2019 12:35:49 +0000 Subject: [PATCH 099/128] updated uploadGitHub scripts --- buildScripts/uploadGitHubRelease | 15 ++++++------ buildScripts/uploadGitHubReleaseDSL | 38 ++++++++++++++++++++--------- 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/buildScripts/uploadGitHubRelease b/buildScripts/uploadGitHubRelease index 445ca91..b0d23bb 100755 --- a/buildScripts/uploadGitHubRelease +++ b/buildScripts/uploadGitHubRelease @@ -11,6 +11,7 @@ # source ./buildScripts/reSourceVersionEnvs +cp ./buildScripts/reSourceVersionEnvs imageBuild/buildInfo.sh source ./buildScripts/uploadGitHubReleaseDSL echo "" @@ -66,16 +67,16 @@ echo "machine uploads.github.com" >> $HOME/.netrc echo " login $GITHUB_USERNAME" >> $HOME/.netrc echo " password $GITHUB_TOKEN" >> $HOME/.netrc -echo $BUILD_TIME > buildTime -echo $APPIMAGE_NAME > appImageName -echo $DOCKER_NAME > dockerImageName +echo $APPIMAGE_NAME > appImageName.txt +echo $DOCKER_NAME > dockerImageName.txt deleteReleaseByTag "$TRAVIS_REPO_SLUG" "continuous" createNewRelease "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \ ../buildScripts/uploadGitHubReleaseMessage -uploadAnAsset $upload_url appImageName "text/plain" -uploadAnAsset $upload_url buildTime "text/plain" -uploadAnAsset $upload_url dockerImageName "text/plain" -uploadAnAsset $upload_url $APPIMAGE_NAME "application/zip" +uploadAnAsset $upload_url "appImageName.txt" "text/plain" +uploadAnAsset $upload_url "buildInfo.sh" "text/plain" +uploadAnAsset $upload_url "dockerImageName.txt" "text/plain" +uploadAnAsset $upload_url $APPIMAGE_NAME "application/zip" + diff --git a/buildScripts/uploadGitHubReleaseDSL b/buildScripts/uploadGitHubReleaseDSL index 3d36db6..3a0207a 100755 --- a/buildScripts/uploadGitHubReleaseDSL +++ b/buildScripts/uploadGitHubReleaseDSL @@ -47,20 +47,29 @@ function deleteReleaseByTag { "https://api.github.com/repos/${REPO}/releases" ) - releaseID=$(echo $response | jq '.[] | select(.tag_name == "$releaseTag") | .id') + releaseID=$(echo $response | \ + jq --arg releaseTag $releaseTag \ + '.[] | select(.tag_name == $releaseTag) | .id') + + echo "" + echo "releaseID(s): $releaseID" + echo "" if [ -n "$releaseID" ] ; then - echo "deleting an existing '$releaseTag' release in the repo $REPO" - response=$( - curl --fail \ - --netrc \ - --silent \ - --location \ - --request "DELETE" \ - "https://api.github.com/repos/${REPO}/releases/$releaseID" - ) - + for aReleaseID in $releaseID + do + echo "deleting an existing '$releaseTag'($aReleaseID) release in the repo $REPO" + response=$( + curl --fail \ + --netrc \ + --silent \ + --location \ + --request "DELETE" \ + "https://api.github.com/repos/${REPO}/releases/$aReleaseID" + ) + done + echo "" fi echo "looking for an existing '$releaseTag' git/tag in the repo $REPO" @@ -131,7 +140,12 @@ function createNewRelease { "https://api.github.com/repos/${REPO}/releases" ) - upload_url="$(echo "$response" | jq -r .upload_url | sed -e "s/{?name,label}//")" + upload_url="$(echo "$response" | \ + jq -r .upload_url | sed -e "s/{?name,label}//")" + + echo "" + echo "upload_url:" + echo $upload_url } ######################## From 75f8a94d70323a63589eaa950164073862b4b6b8 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 3 Dec 2019 06:34:35 +0000 Subject: [PATCH 100/128] updated gitignore as part of work on homeBrew formula --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f1f1335..c082415 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +brewFormula fontforge *.tar.* poppler From b0c06bcfffef737f20cbe73ee3be7862b182ea12 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 3 Dec 2019 18:36:56 +0000 Subject: [PATCH 101/128] build on osx using homebrew --- .travis.yml.off => .travis.yml | 20 ++++++++++++-------- LICENSE | 28 +++++++++++++++------------- 2 files changed, 27 insertions(+), 21 deletions(-) rename .travis.yml.off => .travis.yml (91%) diff --git a/.travis.yml.off b/.travis.yml similarity index 91% rename from .travis.yml.off rename to .travis.yml index c2c1291..08ef055 100644 --- a/.travis.yml.off +++ b/.travis.yml @@ -2,7 +2,6 @@ language: cpp sudo: true - # for windows *test* of AppImage # see https://docs.travis-ci.com/user/build-matrix/#using-different-programming-languages-per-job # and https://discourse.appimage.org/t/run-appimage-on-windows/177 @@ -45,8 +44,10 @@ branches: # - liblcms2-dev # - libxml2-dev # - libuninameslist-dev -# homebrew: -# packages: + homebrew: + taps: pdf2htmlEX/homebrew-brewTap + packages: + - pdf2html-new # - autoconf # - pkg-config # - git @@ -77,17 +78,20 @@ matrix: jobs: include: - - stage: build + - stage: build-linux os: - linux dist: bionic script: ./buildScripts/doItAllTravis - - stage: test - os: - - linux + - stage: build-osx + os: + - osx +# - stage: test +# os: +# - linux #- osx #- windows - script: ./testScripts/doItAllTravis +# script: ./testScripts/doItAllTravis #deploy: # provider: releases # api_key: diff --git a/LICENSE b/LICENSE index 0665c92..90c48ff 100644 --- a/LICENSE +++ b/LICENSE @@ -1,23 +1,25 @@ pdf2htmlEX (https://github.com/coolwanglu/pdf2htmlEX) Copyright (c) 2012-2014 Lu Wang and other contributors -pdf2htmlEX, as a whole package, is licensed under GPLv3 (or any later version). +pdf2htmlEX, as a whole package, is licensed under GPLv3 (or any later +version). -Files in share/ and logo/ are released under relaxed licenses, -read the respective `LICENSE` file in the folders for details. +Files in pdf2htmlEX/share/ pdf2htmlEX/logo/ and pdf2htmlEX/brewFormual are +released under relaxed licenses, read the respective `LICENSE` file in +these folders for details. ----- GPLv3 -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the Free +Software Foundation, either version 3 of the License, or (at your option) +any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see . +You should have received a copy of the GNU General Public License along +with this program. If not, see . From 385108fceb68b0126d836a723348b80b6fc2a0a2 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 3 Dec 2019 19:15:21 +0000 Subject: [PATCH 102/128] corrected upload scripts --- .travis.yml | 4 ++++ buildScripts/doItAllTravis | 32 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 08ef055..c6c5cc3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,10 @@ branches: except: # do not build tags that we create using the upload.sh script - /^(?i:continuous.*)$/ +env: + global: + - DOCKER_FROM="ubuntu:18.04" + #addons: # apt: # update: true diff --git a/buildScripts/doItAllTravis b/buildScripts/doItAllTravis index f4a5a37..821583f 100755 --- a/buildScripts/doItAllTravis +++ b/buildScripts/doItAllTravis @@ -7,19 +7,19 @@ export MAKE_PARALLEL="-j $(nproc)" export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)" -./buildScripts/versionEnvs || travis_terminate 1; -./buildScripts/reportEnvs || travis_terminate 1; -./buildScripts/getBuildTools || travis_terminate 1; -./buildScripts/getDevLibraries || travis_terminate 1; -./buildScripts/getPoppler || travis_terminate 1; -./buildScripts/buildPoppler || travis_terminate 1; -./buildScripts/installPoppler || travis_terminate 1; -./buildScripts/getFontforge || travis_terminate 1; -./buildScripts/buildFontforge || travis_terminate 1; -./buildScripts/installFontforge || travis_terminate 1; -./buildScripts/buildPdf2htmlEX || travis_terminate 1; -./buildScripts/installPdf2htmlEX || travis_terminate 1; -./buildScripts/createAppImage || travis_terminate 1; -./buildScripts/createDockerImage || travis_terminate 1; -./buildScripts/uploadRelease || travis_terminate 1; - +./buildScripts/versionEnvs || travis_terminate 1; +./buildScripts/reportEnvs || travis_terminate 1; +./buildScripts/getBuildTools || travis_terminate 1; +./buildScripts/getDevLibraries || travis_terminate 1; +./buildScripts/getPoppler || travis_terminate 1; +./buildScripts/buildPoppler || travis_terminate 1; +./buildScripts/installPoppler || travis_terminate 1; +./buildScripts/getFontforge || travis_terminate 1; +./buildScripts/buildFontforge || travis_terminate 1; +./buildScripts/installFontforge || travis_terminate 1; +./buildScripts/buildPdf2htmlEX || travis_terminate 1; +./buildScripts/installPdf2htmlEX || travis_terminate 1; +./buildScripts/createAppImage || travis_terminate 1; +./buildScripts/createDockerImage || travis_terminate 1; +./buildScripts/uploadGitHubRelease || travis_terminate 1; +./buildScripts/uploadDockerImage || travis_terminate 1; From a45238f91fa8035a457090a93b284e3b52ccd568 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 3 Dec 2019 19:39:47 +0000 Subject: [PATCH 103/128] retry osx travis build --- .travis.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index c6c5cc3..5f0e31a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,10 +48,10 @@ env: # - liblcms2-dev # - libxml2-dev # - libuninameslist-dev - homebrew: - taps: pdf2htmlEX/homebrew-brewTap - packages: - - pdf2html-new +# homebrew: +# taps: pdf2htmlEX/homebrew-brewTap +# packages: +# - pdf2html-new # - autoconf # - pkg-config # - git @@ -82,14 +82,17 @@ matrix: jobs: include: - - stage: build-linux - os: - - linux - dist: bionic - script: ./buildScripts/doItAllTravis +# - stage: build-linux +# os: +# - linux +# dist: bionic +# script: ./buildScripts/doItAllTravis - stage: build-osx os: - osx + script: + - brew tap pdf2htmlEX/homebrew-brewTaps + - brew install pdf2htmlex-new # - stage: test # os: # - linux From e022417d6748c9ffa6466d215550eb6875d64ee2 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 3 Dec 2019 21:09:00 +0000 Subject: [PATCH 104/128] retry osx travis build 1 --- .travis.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5f0e31a..961f6ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,20 +8,12 @@ sudo: true # and https://docs.travis-ci.com/user/reference/windows/ # why fuse is not possible on windows: https://superuser.com/questions/179436/is-it-possible-to-use-fuse-with-windows -services: - - docker - compiler: gcc branches: except: # do not build tags that we create using the upload.sh script - /^(?i:continuous.*)$/ -env: - global: - - DOCKER_FROM="ubuntu:18.04" - -#addons: # apt: # update: true # packages: @@ -49,7 +41,6 @@ env: # - libxml2-dev # - libuninameslist-dev # homebrew: -# taps: pdf2htmlEX/homebrew-brewTap # packages: # - pdf2html-new # - autoconf @@ -85,13 +76,20 @@ jobs: # - stage: build-linux # os: # - linux +# env: +# global: +# - DOCKER_FROM="ubuntu:18.04" +# services: +# - docker # dist: bionic # script: ./buildScripts/doItAllTravis - stage: build-osx os: - osx + addons: + homebrew: + taps: pdf2htmlEX/homebrew-brewTap script: - - brew tap pdf2htmlEX/homebrew-brewTaps - brew install pdf2htmlex-new # - stage: test # os: From ede3cd8961b1b85c0968121797ee89f61a5d35f6 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 3 Dec 2019 21:27:24 +0000 Subject: [PATCH 105/128] retry osx travis build 2 --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 961f6ab..317d787 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,8 +89,11 @@ jobs: addons: homebrew: taps: pdf2htmlEX/homebrew-brewTap + packages: + - pdf2htmlex-new script: - - brew install pdf2htmlex-new + - pwd + - ls # - stage: test # os: # - linux From 96fd4c90d6061939cad26240c04424c75bb9a328 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Tue, 3 Dec 2019 21:27:59 +0000 Subject: [PATCH 106/128] retry osx travis build 3 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 317d787..bb945b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,6 +88,7 @@ jobs: - osx addons: homebrew: + update: true taps: pdf2htmlEX/homebrew-brewTap packages: - pdf2htmlex-new From 39b667404b83d650f545dfb760eb23c5fb5bc259 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 4 Dec 2019 12:06:17 +0000 Subject: [PATCH 107/128] refactored travis build scripts for linux and osx work --- .travis.yml => .travis.yml.off | 3 ++- buildScripts/{doItAllTravis => travisLinuxDoItAll} | 2 +- buildScripts/travisOsxDoItAll | 9 +++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) rename .travis.yml => .travis.yml.off (97%) rename buildScripts/{doItAllTravis => travisLinuxDoItAll} (93%) create mode 100644 buildScripts/travisOsxDoItAll diff --git a/.travis.yml b/.travis.yml.off similarity index 97% rename from .travis.yml rename to .travis.yml.off index bb945b8..733a793 100644 --- a/.travis.yml +++ b/.travis.yml.off @@ -82,7 +82,7 @@ jobs: # services: # - docker # dist: bionic -# script: ./buildScripts/doItAllTravis +# script: ./buildScripts/travisLinuxDoItAll - stage: build-osx os: - osx @@ -95,6 +95,7 @@ jobs: script: - pwd - ls + - pdf2htmlEX --version # - stage: test # os: # - linux diff --git a/buildScripts/doItAllTravis b/buildScripts/travisLinuxDoItAll similarity index 93% rename from buildScripts/doItAllTravis rename to buildScripts/travisLinuxDoItAll index 821583f..1abfed3 100755 --- a/buildScripts/doItAllTravis +++ b/buildScripts/travisLinuxDoItAll @@ -1,6 +1,6 @@ #!/bin/bash -# This bash script builds everyting on an TravisCI worker +# This bash script builds everyting on an TravisCI Linux (Ubunutu) worker export UNATTENDED="--assume-yes" export MAKE_PARALLEL="-j $(nproc)" diff --git a/buildScripts/travisOsxDoItAll b/buildScripts/travisOsxDoItAll new file mode 100644 index 0000000..5614704 --- /dev/null +++ b/buildScripts/travisOsxDoItAll @@ -0,0 +1,9 @@ +#!/bin/bash + +# This bash script builds everyting on an TravisCI Mac OSx worker + +rvm use 2.6 --install --binary +brew tap pdf2htmlEX/homebrew-brewTap +brew update +brew install pdf2htmlex-new +rvm use $TRAVIS_RUBY_VERSION # optionally, switch back to the Ruby version you need. From 3522bea042178840d1f04cb00a07416dbdb8a8ed Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 4 Dec 2019 12:08:47 +0000 Subject: [PATCH 108/128] correcte OSx script --- buildScripts/{travisOsxDoItAll => travisOSxDoItAll} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename buildScripts/{travisOsxDoItAll => travisOSxDoItAll} (100%) mode change 100644 => 100755 diff --git a/buildScripts/travisOsxDoItAll b/buildScripts/travisOSxDoItAll old mode 100644 new mode 100755 similarity index 100% rename from buildScripts/travisOsxDoItAll rename to buildScripts/travisOSxDoItAll From c8fb950ae8a5aeb89518f388eafbf9e133b44e3f Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 4 Dec 2019 13:26:26 +0000 Subject: [PATCH 109/128] updated travis homebrew build script --- .travis.yml.off => .travis.yml | 6 +----- .../{travisOSxDoItAll => travisHomeBrewDoItAll} | 4 ++++ buildScripts/travisLinuxBrewDoItAll | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) rename .travis.yml.off => .travis.yml (96%) rename buildScripts/{travisOSxDoItAll => travisHomeBrewDoItAll} (58%) create mode 100755 buildScripts/travisLinuxBrewDoItAll diff --git a/.travis.yml.off b/.travis.yml similarity index 96% rename from .travis.yml.off rename to .travis.yml index 733a793..089f0e7 100644 --- a/.travis.yml.off +++ b/.travis.yml @@ -89,12 +89,8 @@ jobs: addons: homebrew: update: true - taps: pdf2htmlEX/homebrew-brewTap - packages: - - pdf2htmlex-new script: - - pwd - - ls + - ./buildScripts/travisHomeBrewDoItAll - pdf2htmlEX --version # - stage: test # os: diff --git a/buildScripts/travisOSxDoItAll b/buildScripts/travisHomeBrewDoItAll similarity index 58% rename from buildScripts/travisOSxDoItAll rename to buildScripts/travisHomeBrewDoItAll index 5614704..e3b7326 100755 --- a/buildScripts/travisOSxDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -2,6 +2,10 @@ # This bash script builds everyting on an TravisCI Mac OSx worker +# See: +# https://docs.travis-ci.com/user/installing-dependencies/#using-homebrew-without-addon-on-older-macos-images +# For details on obtaining/using the correct ruby version for homebrew. + rvm use 2.6 --install --binary brew tap pdf2htmlEX/homebrew-brewTap brew update diff --git a/buildScripts/travisLinuxBrewDoItAll b/buildScripts/travisLinuxBrewDoItAll new file mode 100755 index 0000000..e105eb9 --- /dev/null +++ b/buildScripts/travisLinuxBrewDoItAll @@ -0,0 +1,14 @@ +#!/bin/bash + +# This bash script builds everyting on an TravisCI Mac OSx worker + +# See: +# https://docs.travis-ci.com/user/installing-dependencies/#using-homebrew-without-addon-on-older-macos-images +# For details on obtaining/using the correct ruby version for homebrew. + +sudo apt-get update +sudo apt-get install gcc-5 # many of the linuxBrew bottles are compiled with gcc-5 + +brew tap pdf2htmlEX/homebrew-brewTap +brew update +brew install pdf2htmlex-new -s --cc=gcc-5 From e9ec3744551495b685c6968e141a3a8b5556d12d Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 4 Dec 2019 13:34:04 +0000 Subject: [PATCH 110/128] updated homeBrew script --- buildScripts/travisLinuxBrewDoItAll | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/buildScripts/travisLinuxBrewDoItAll b/buildScripts/travisLinuxBrewDoItAll index e105eb9..642fe16 100755 --- a/buildScripts/travisLinuxBrewDoItAll +++ b/buildScripts/travisLinuxBrewDoItAll @@ -6,9 +6,14 @@ # https://docs.travis-ci.com/user/installing-dependencies/#using-homebrew-without-addon-on-older-macos-images # For details on obtaining/using the correct ruby version for homebrew. -sudo apt-get update -sudo apt-get install gcc-5 # many of the linuxBrew bottles are compiled with gcc-5 - brew tap pdf2htmlEX/homebrew-brewTap brew update + +# many of the linuxBrew bottles are compiled with gcc-5 so we need to +# explicity install it! +# +brew install gcc@5 + +# Now use brew to install pdf2htmlEX (and its dependencies) +# brew install pdf2htmlex-new -s --cc=gcc-5 From d5ec2a38ea2fabca71927aa58e73ffcc838f620f Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 4 Dec 2019 14:11:58 +0000 Subject: [PATCH 111/128] updated linuxbrew script --- buildScripts/travisLinuxBrewDoItAll | 8 -------- 1 file changed, 8 deletions(-) diff --git a/buildScripts/travisLinuxBrewDoItAll b/buildScripts/travisLinuxBrewDoItAll index 642fe16..7cd342f 100755 --- a/buildScripts/travisLinuxBrewDoItAll +++ b/buildScripts/travisLinuxBrewDoItAll @@ -8,12 +8,4 @@ brew tap pdf2htmlEX/homebrew-brewTap brew update - -# many of the linuxBrew bottles are compiled with gcc-5 so we need to -# explicity install it! -# -brew install gcc@5 - -# Now use brew to install pdf2htmlEX (and its dependencies) -# brew install pdf2htmlex-new -s --cc=gcc-5 From ac797cb2d95c1de784e0f934d47c562ec13cdad2 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 4 Dec 2019 17:49:50 +0000 Subject: [PATCH 112/128] updated brew scripts --- buildScripts/travisHomeBrewDoItAll | 2 +- buildScripts/travisLinuxBrewDoItAll | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index e3b7326..6c260bd 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -6,7 +6,7 @@ # https://docs.travis-ci.com/user/installing-dependencies/#using-homebrew-without-addon-on-older-macos-images # For details on obtaining/using the correct ruby version for homebrew. -rvm use 2.6 --install --binary +rvm use $brew_ruby brew tap pdf2htmlEX/homebrew-brewTap brew update brew install pdf2htmlex-new diff --git a/buildScripts/travisLinuxBrewDoItAll b/buildScripts/travisLinuxBrewDoItAll index 7cd342f..f8fa8e1 100755 --- a/buildScripts/travisLinuxBrewDoItAll +++ b/buildScripts/travisLinuxBrewDoItAll @@ -6,6 +6,6 @@ # https://docs.travis-ci.com/user/installing-dependencies/#using-homebrew-without-addon-on-older-macos-images # For details on obtaining/using the correct ruby version for homebrew. -brew tap pdf2htmlEX/homebrew-brewTap brew update -brew install pdf2htmlex-new -s --cc=gcc-5 +brew tap pdf2htmlEX/homebrew-brewTap +brew install pdf2htmlex-new From 45836b7ab4ad31b4373d8401f58acaf0caafa085 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Wed, 4 Dec 2019 22:12:13 +0000 Subject: [PATCH 113/128] corrected homebrew scripts --- .travis.yml | 2 +- buildScripts/travisHomeBrewDoItAll | 2 -- buildScripts/{travisLinuxDoItAll => travisLinuxAptDoItAll} | 0 3 files changed, 1 insertion(+), 3 deletions(-) rename buildScripts/{travisLinuxDoItAll => travisLinuxAptDoItAll} (100%) diff --git a/.travis.yml b/.travis.yml index 089f0e7..3be96fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,7 +82,7 @@ jobs: # services: # - docker # dist: bionic -# script: ./buildScripts/travisLinuxDoItAll +# script: ./buildScripts/travisLinuxAptDoItAll - stage: build-osx os: - osx diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index 6c260bd..7408507 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -6,8 +6,6 @@ # https://docs.travis-ci.com/user/installing-dependencies/#using-homebrew-without-addon-on-older-macos-images # For details on obtaining/using the correct ruby version for homebrew. -rvm use $brew_ruby brew tap pdf2htmlEX/homebrew-brewTap brew update brew install pdf2htmlex-new -rvm use $TRAVIS_RUBY_VERSION # optionally, switch back to the Ruby version you need. diff --git a/buildScripts/travisLinuxDoItAll b/buildScripts/travisLinuxAptDoItAll similarity index 100% rename from buildScripts/travisLinuxDoItAll rename to buildScripts/travisLinuxAptDoItAll From 76a12d3a073d4dae4c93c23cc70a020d23ffb700 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 5 Dec 2019 07:55:00 +0000 Subject: [PATCH 114/128] updated osx_image in travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3be96fc..fee06ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,6 +86,7 @@ jobs: - stage: build-osx os: - osx + osx_image: xcode10.1 addons: homebrew: update: true From 345e931073beead8ee79e16286df507729cef50a Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 5 Dec 2019 07:57:51 +0000 Subject: [PATCH 115/128] updated homebrew script to provide more detail --- buildScripts/travisHomeBrewDoItAll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index 7408507..9f70fc1 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -8,4 +8,4 @@ brew tap pdf2htmlEX/homebrew-brewTap brew update -brew install pdf2htmlex-new +brew install -v pdf2htmlex-new From 79e3d55f477b6a15fcfae2b72d400c04c38f0e8b Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Thu, 5 Dec 2019 08:42:24 +0000 Subject: [PATCH 116/128] updated homebrew script to provide more detail --- buildScripts/travisHomeBrewDoItAll | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index 9f70fc1..f039846 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -6,6 +6,30 @@ # https://docs.travis-ci.com/user/installing-dependencies/#using-homebrew-without-addon-on-older-macos-images # For details on obtaining/using the correct ruby version for homebrew. +echo "-------------------------------------------------" +echo $PATH +echo $LDFLAGS +echo $CPPFLAGS +which clang +echo "-------------------------------------------------" brew tap pdf2htmlEX/homebrew-brewTap +echo "-------------------------------------------------" +echo $PATH +echo $LDFLAGS +echo $CPPFLAGS +which clang +echo "-------------------------------------------------" brew update +echo "-------------------------------------------------" +echo $PATH +echo $LDFLAGS +echo $CPPFLAGS +which clang +echo "-------------------------------------------------" brew install -v pdf2htmlex-new +echo "-------------------------------------------------" +echo $PATH +echo $LDFLAGS +echo $CPPFLAGS +which clang +echo "-------------------------------------------------" From 282f4bf5318d1680e3c06728f5f39c5f245790e0 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 6 Dec 2019 14:50:02 +0000 Subject: [PATCH 117/128] attempt to force python v2.7 --- buildScripts/travisHomeBrewDoItAll | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index f039846..b9f13e2 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -26,6 +26,20 @@ echo $LDFLAGS echo $CPPFLAGS which clang echo "-------------------------------------------------" +brew install -v python@2 +echo "-------------------------------------------------" +echo $PATH +echo $LDFLAGS +echo $CPPFLAGS +which clang +echo "-------------------------------------------------" +brew switch python 2.7 +echo "-------------------------------------------------" +echo $PATH +echo $LDFLAGS +echo $CPPFLAGS +which clang +echo "-------------------------------------------------" brew install -v pdf2htmlex-new echo "-------------------------------------------------" echo $PATH From f20eaa4aae4c70506945e5709a2e310ee6c9bf26 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 6 Dec 2019 15:44:19 +0000 Subject: [PATCH 118/128] attempt to force python v2.7 2 --- buildScripts/travisHomeBrewDoItAll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index b9f13e2..533c4bd 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -33,7 +33,7 @@ echo $LDFLAGS echo $CPPFLAGS which clang echo "-------------------------------------------------" -brew switch python 2.7 +brew switch python 2.7.17 echo "-------------------------------------------------" echo $PATH echo $LDFLAGS From 741e6fdd5d31aba234c44e1927ccd58da8e01c84 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 6 Dec 2019 17:12:59 +0000 Subject: [PATCH 119/128] try tool to extract brew info versions --- buildScripts/travisHomeBrewDoItAll | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index 533c4bd..7ee2e93 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -27,12 +27,15 @@ echo $CPPFLAGS which clang echo "-------------------------------------------------" brew install -v python@2 +brew install jq echo "-------------------------------------------------" echo $PATH echo $LDFLAGS echo $CPPFLAGS which clang +brew info --json=v1 python@2 | jq '.[].installed' echo "-------------------------------------------------" +brew info python@2 brew switch python 2.7.17 echo "-------------------------------------------------" echo $PATH @@ -40,7 +43,7 @@ echo $LDFLAGS echo $CPPFLAGS which clang echo "-------------------------------------------------" -brew install -v pdf2htmlex-new +#brew install -v pdf2htmlex-new echo "-------------------------------------------------" echo $PATH echo $LDFLAGS From 5b1a711514c03289e177bbbbf4db101a9a20dd40 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 6 Dec 2019 17:17:47 +0000 Subject: [PATCH 120/128] try tool to extract brew info versions 1 --- buildScripts/travisHomeBrewDoItAll | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index 7ee2e93..2f20ad3 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -33,15 +33,18 @@ echo $PATH echo $LDFLAGS echo $CPPFLAGS which clang -brew info --json=v1 python@2 | jq '.[].installed' +python2Version = brew info --json=v1 python@2 | jq '.[].installed[].version' +echo $python2Version echo "-------------------------------------------------" brew info python@2 -brew switch python 2.7.17 +brew switch python $python2Version echo "-------------------------------------------------" echo $PATH echo $LDFLAGS echo $CPPFLAGS which clang +which python +python --version echo "-------------------------------------------------" #brew install -v pdf2htmlex-new echo "-------------------------------------------------" From 1a7ac1f7b7a23af080de09bd132886e80d95df07 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 6 Dec 2019 17:21:37 +0000 Subject: [PATCH 121/128] try tool to extract brew info versions 2 --- buildScripts/travisHomeBrewDoItAll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index 2f20ad3..8a4e9ea 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -33,7 +33,7 @@ echo $PATH echo $LDFLAGS echo $CPPFLAGS which clang -python2Version = brew info --json=v1 python@2 | jq '.[].installed[].version' +export python2Version=$(brew info --json=v1 python@2 | jq '.[].installed[].version') echo $python2Version echo "-------------------------------------------------" brew info python@2 From b9998d6ef2a6c9320c55cd98783d7138ba25e445 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 6 Dec 2019 17:32:16 +0000 Subject: [PATCH 122/128] try tool to extract brew info versions 3 --- buildScripts/travisHomeBrewDoItAll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index 8a4e9ea..7ad182d 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -33,7 +33,7 @@ echo $PATH echo $LDFLAGS echo $CPPFLAGS which clang -export python2Version=$(brew info --json=v1 python@2 | jq '.[].installed[].version') +export python2Version=$(brew info --json=v1 python@2 | jq '.[].installed[].version' | tr -d '"') echo $python2Version echo "-------------------------------------------------" brew info python@2 From f70211f8c9ab83d5dd397b777af15cde70707764 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 6 Dec 2019 17:39:22 +0000 Subject: [PATCH 123/128] try tool to extract brew info versions 4 --- buildScripts/travisHomeBrewDoItAll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index 7ad182d..664de13 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -37,7 +37,7 @@ export python2Version=$(brew info --json=v1 python@2 | jq '.[].installed[].versi echo $python2Version echo "-------------------------------------------------" brew info python@2 -brew switch python $python2Version +brew switch python@2 $python2Version echo "-------------------------------------------------" echo $PATH echo $LDFLAGS From 8e5b3ab0c8caf7ccbf7f2b8a693159bd728fbf57 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 6 Dec 2019 17:52:05 +0000 Subject: [PATCH 124/128] try tool to extract brew info versions 4 --- buildScripts/travisHomeBrewDoItAll | 1 + 1 file changed, 1 insertion(+) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index 664de13..01bf25f 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -44,6 +44,7 @@ echo $LDFLAGS echo $CPPFLAGS which clang which python +ls -la $(which python) python --version echo "-------------------------------------------------" #brew install -v pdf2htmlex-new From ab09224d8b0160c7f11351342a1d792d4945f376 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 6 Dec 2019 18:36:39 +0000 Subject: [PATCH 125/128] try tool to extract brew info versions 5 --- buildScripts/travisHomeBrewDoItAll | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index 01bf25f..a405e78 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -43,11 +43,12 @@ echo $PATH echo $LDFLAGS echo $CPPFLAGS which clang +ls -la $(which clang) which python ls -la $(which python) python --version echo "-------------------------------------------------" -#brew install -v pdf2htmlex-new +brew install -v pdf2htmlex-new echo "-------------------------------------------------" echo $PATH echo $LDFLAGS From 3e5082566fd0a29890c585e814c3900c78d495f7 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 6 Dec 2019 19:15:50 +0000 Subject: [PATCH 126/128] try tool to extract brew info versions 6 --- buildScripts/travisHomeBrewDoItAll | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index a405e78..95bee7a 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -54,4 +54,11 @@ echo $PATH echo $LDFLAGS echo $CPPFLAGS which clang +ls -la $(which clang) +which python +ls -la $(which python) +python --version +which pdf2htmlEX +ls -la $(which pdf2htmlEX) +pdf2htmlEX --version echo "-------------------------------------------------" From ac9a469ca8eefa817a72f69ad31647e774df4c59 Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Fri, 6 Dec 2019 19:54:43 +0000 Subject: [PATCH 127/128] try tool to extract brew info versions 7 --- buildScripts/travisHomeBrewDoItAll | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/buildScripts/travisHomeBrewDoItAll b/buildScripts/travisHomeBrewDoItAll index 95bee7a..cbc2879 100755 --- a/buildScripts/travisHomeBrewDoItAll +++ b/buildScripts/travisHomeBrewDoItAll @@ -26,6 +26,7 @@ echo $LDFLAGS echo $CPPFLAGS which clang echo "-------------------------------------------------" +brew install llvm brew install -v python@2 brew install jq echo "-------------------------------------------------" @@ -33,9 +34,13 @@ echo $PATH echo $LDFLAGS echo $CPPFLAGS which clang +export llvmVersion=$(brew info --json=v1 llvm | jq '.[].installed[].version' | tr -d '"') +echo $llvmVersion export python2Version=$(brew info --json=v1 python@2 | jq '.[].installed[].version' | tr -d '"') echo $python2Version echo "-------------------------------------------------" +brew info llvm +brew switch llvm $llvmVersion brew info python@2 brew switch python@2 $python2Version echo "-------------------------------------------------" From d6ac2b4a6a0e6548a99224f89ecb12f6daa7969d Mon Sep 17 00:00:00 2001 From: Stephen Gaito Date: Mon, 9 Dec 2019 07:35:00 +0000 Subject: [PATCH 128/128] turned travis off for the moment --- .travis.yml => .travis.yml.off | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .travis.yml => .travis.yml.off (100%) diff --git a/.travis.yml b/.travis.yml.off similarity index 100% rename from .travis.yml rename to .travis.yml.off