diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-04-30 20:13:58 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-05-01 20:34:51 -0400 |
| commit | 5b7f14d092456a941dbd189e61ed38d9b16d388b (patch) | |
| tree | 8d64d96061285447f225f1060b0a087c0db21f86 /bin/build-dist | |
| parent | dbaaa359f4703a7d8544581397e8b32207397b6e (diff) | |
adjust bin/build-dist for single-binary world
Diffstat (limited to 'bin/build-dist')
| -rwxr-xr-x | bin/build-dist | 43 |
1 files changed, 20 insertions, 23 deletions
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 |
