diff options
Diffstat (limited to 'bin/build-dist')
| -rwxr-xr-x | bin/build-dist | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/bin/build-dist b/bin/build-dist index 4f134aab..8fa4b59f 100755 --- a/bin/build-dist +++ b/bin/build-dist @@ -2,9 +2,11 @@ site_packages="$(python -c "import os; print(os.path.dirname(os.__file__) + '/site-packages')")" -# pyinstaller misses these two -pyinstaller_args+="--add-binary /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so:. " -pyinstaller_args+="--add-binary /usr/lib/x86_64-linux-gnu/libproxy.so.1:. " +if [ "$TRAVIS_OS_NAME" = "linux" -a "$BUILD" != "windows" ]; then + # pyinstaller misses these two + pyinstaller_args+="--add-binary /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so:. " + pyinstaller_args+="--add-binary /usr/lib/x86_64-linux-gnu/libproxy.so.1:. " +fi # This one's tricky. ink/stitch doesn't actually _use_ gi.repository.Gtk, # but it does use GTK (through wxPython). pyinstaller has some special @@ -15,17 +17,27 @@ pyinstaller_args+="--add-binary /usr/lib/x86_64-linux-gnu/libproxy.so.1:. " # above! pyinstaller_args+="--hidden-import gi.repository.Gtk " -# This lets pyinstaller see inkex.py, etc. -pyinstaller_args+="-p /usr/share/inkscape/extensions " +# mac and windows build seem to miss wx and libembroidery import +pyinstaller_args+="--hidden-import wx --hidden-import libembroidery " + +if [ -d windows-libembroidery ]; then + pyinstaller_args+="-p windows-libembroidery " +else + pyinstaller_args+="-p embroidermodder/experimental/python/binding " +fi -# for libembroidery -pyinstaller_args+="-p embroidermodder/experimental/python/binding " +# This lets pyinstaller see inkex.py, etc. +pyinstaller_args+="-p inkscape-0.92.2/share/extensions " mkdir -p dist/inkstitch/bin for extension in "$@"; do - # 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; + 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 |
