summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-dist43
-rwxr-xr-xbin/gen-input-inx2
2 files changed, 21 insertions, 24 deletions
diff --git a/bin/build-dist b/bin/build-dist
index a1fa82d9..4d73313a 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 --strip 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
diff --git a/bin/gen-input-inx b/bin/gen-input-inx
index 918adfb9..5f21ce84 100755
--- a/bin/gen-input-inx
+++ b/bin/gen-input-inx
@@ -37,7 +37,7 @@ def main():
for format, description in libembroidery_input_formats():
inx = template.render(format=format, description=description)
- with open("inx/embroider_input_%s.inx" % format.upper(), 'w') as inx_file:
+ with open("inx/inkstitch_input_%s.inx" % format.upper(), 'w') as inx_file:
inx_file.write(inx)