From 5b7f14d092456a941dbd189e61ed38d9b16d388b Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Mon, 30 Apr 2018 20:13:58 -0400 Subject: adjust bin/build-dist for single-binary world --- bin/build-dist | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) (limited to 'bin/build-dist') diff --git a/bin/build-dist b/bin/build-dist index a1fa82d9..ae4c12d6 100755 --- a/bin/build-dist +++ b/bin/build-dist @@ -34,26 +34,23 @@ pyinstaller_args+="-p inkscape-0.92.2/share/extensions " # output useful debugging info that helps us trace library dependency issues pyinstaller_args+="--log-level DEBUG " -mkdir -p dist/inkstitch/bin -for extension in "$@"; do - if [ "$BUILD" = "windows" ]; then - wine c:\\Python\\scripts\\pyinstaller.exe $pyinstaller_args ${extension}.py - else - # without the LD_LIBRARY_PATH, it seems that pyinstaller can't find all of - # wxpython's shared libraries - LD_LIBRARY_PATH="${site_packages}/wx" pyinstaller $pyinstaller_args ${extension}.py; - fi - - # By default, pyinstaller will treat each of ink/stitch's extensions - # separately. This means it packages a lot of the same shared libraries (like - # wxPython) multiple times. Turns out that we can just copy the contents of - # the directories pyinstaller creates into one and it works fine, eliminating - # the duplication. This significantly decreases the size of the inkstitch - # tarball/zip. - cp -a dist/${extension}/* dist/inkstitch/bin - rm -rf dist/${extension} - - # Inkscape doesn't let us run native binaries as extensions(?!). Instead we - # add this stub script which executes the binaries that pyinstaller creates. - cp stub.py dist/${extension}.py -done +if [ "$BUILD" = "windows" ]; then + wine c:\\Python\\scripts\\pyinstaller.exe $pyinstaller_args inkstitch.py +else + # without the LD_LIBRARY_PATH, it seems that pyinstaller can't find all of + # wxpython's shared libraries + LD_LIBRARY_PATH="${site_packages}/wx" pyinstaller $pyinstaller_args inkstitch.py; +fi + +# pyinstaller put a whole mess of libraries under dist/inkstitch. We'd like +# to put some more user-accessible stuff like examples and palettes in +# folders under inkstitch/ (see ../Makefile) so let's move the pyinstaller +# stuff into its own dir. +shopt -s dotglob +mkdir dist/bin +mv dist/inkstitch/* dist/bin +mv dist/bin dist/inkstitch + +# Inkscape doesn't let us run native binaries as extensions(?!). Instead we +# add this stub script which executes the binary that pyinstaller creates. +cp stub.py dist/inkstitch.py -- cgit v1.2.3 From 5b376d80fcc153c3c2ddf835eb3bd5a55ab5a816 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Wed, 2 May 2018 20:44:57 -0400 Subject: strip debug symbols on Linux --- bin/build-dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/build-dist') diff --git a/bin/build-dist b/bin/build-dist index ae4c12d6..4d73313a 100755 --- a/bin/build-dist +++ b/bin/build-dist @@ -39,7 +39,7 @@ if [ "$BUILD" = "windows" ]; then else # without the LD_LIBRARY_PATH, it seems that pyinstaller can't find all of # wxpython's shared libraries - LD_LIBRARY_PATH="${site_packages}/wx" pyinstaller $pyinstaller_args inkstitch.py; + LD_LIBRARY_PATH="${site_packages}/wx" pyinstaller $pyinstaller_args --strip inkstitch.py; fi # pyinstaller put a whole mess of libraries under dist/inkstitch. We'd like -- cgit v1.2.3