diff options
| -rw-r--r-- | README.md | 19 | ||||
| -rwxr-xr-x | bin/build-dist | 2 | ||||
| -rw-r--r-- | embroider.py | 4 | ||||
| -rw-r--r-- | embroider_simulate.py | 3 | ||||
| -rw-r--r-- | messages.po | 12 | ||||
| -rw-r--r-- | stub.py | 16 |
6 files changed, 44 insertions, 12 deletions
@@ -1,10 +1,11 @@ # ink/stitch: An Inkscape extension for designing machine embroidery patterns +* February 22, 2018: **Windows support added!** * February 5, 2018: Portuguese (pt_PT) translation added! [Want to help translate?](LOCALIZATION.md) * January 5, 2018: Default DPI changed to 96, to match Inkscape. * January 3, 2018: Project renamed from `inkscape-embroidery` to **ink/stitch** -* **NEW January 1, 2018:** [video demo of the new live stitch preview feature](https://youtu.be/QY9NcLN3oJM) -* **NEW December 6, 2017:** [video demo of how to use the extension](https://www.youtube.com/watch?v=qXntE1X1RIw) +* January 1, 2018: [video demo of the new live stitch preview feature](https://youtu.be/QY9NcLN3oJM) +* December 6, 2017: [video demo of how to use the extension](https://www.youtube.com/watch?v=qXntE1X1RIw) ## Introduction **Want to design embroidery pattern files (PES, DST, etc) using free, open source software? Hate all the other options? Try this one.** @@ -15,9 +16,19 @@ So I wrote one. Okay, not really. I'm pretty terrible at GUIs, but I found this nifty inkscape extension that was created and hacked on by a couple of other folks. It was pretty rudimentary, but it got the job done, and more importantly, it was super hackable. I hacked the hell out of it, and at this point **ink/stitch is a viable entry-level machine embroidery design tool**. -## Quick Setup On Ubuntu 14.04 or later (and derivative Linux distributions) +## Quick Setup On Ubuntu and Windows -Download the [latest release](https://github.com/lexelby/inkstitch/releases/latest), the `inkscape-*.tar.gz` file. Decompress this archive directly into `~/.config/inkscape/extensions`, for example: +First, download the right release archive for your platform from the [latest release](https://github.com/lexelby/inkstitch/releases/latest). + +* **Linux**: `inkstitch-[VERSION]-Linux-x86_64.tar.gz` + * Currently supports most 64-bit Linux systems from the last couple of years. + * 32-bit support coming soon. +* **Windows**: `inkstitch-[VERSION]-win32.zip` + * Supports 32-bit and 64-bit Windows + +In Inkscape, go to Preferences and look under System. Next to "User Extensions" is a folder. Decompress the archive you downloaded directly into this folder. + +For example, on Linux: ``` $ cd ~/.config/inkscape/extensions diff --git a/bin/build-dist b/bin/build-dist index fa933780..8fa4b59f 100755 --- a/bin/build-dist +++ b/bin/build-dist @@ -32,7 +32,7 @@ pyinstaller_args+="-p inkscape-0.92.2/share/extensions " mkdir -p dist/inkstitch/bin for extension in "$@"; do if [ "$BUILD" = "windows" ]; then - wine c:\\Python\\scripts\\pyinstaller.exe --windowed $pyinstaller_args ${extension}.py + 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 diff --git a/embroider.py b/embroider.py index 1c65ef4d..dfc7c7c9 100644 --- a/embroider.py +++ b/embroider.py @@ -1718,6 +1718,10 @@ class Embroider(inkex.Effect): if os.path.exists(source): move_if_exists(path, suffix + 1) + + if os.path.exists(dest): + os.remove(dest) + os.rename(source, dest) move_if_exists(output_path) diff --git a/embroider_simulate.py b/embroider_simulate.py index 5340dda7..d1407249 100644 --- a/embroider_simulate.py +++ b/embroider_simulate.py @@ -233,6 +233,9 @@ class EmbroiderySimulator(wx.Frame): if self.on_close_hook: self.on_close_hook() + # If we keep a reference here, wx crashes when the process exits. + self.canvas = None + self.Destroy() def stop(self): diff --git a/messages.po b/messages.po index c7794f31..ea85b66b 100644 --- a/messages.po +++ b/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-02-19 20:13-0500\n" +"POT-Creation-Date: 2018-02-21 21:46-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -183,20 +183,20 @@ msgid "" "Seeing a 'no such option' message? Please restart Inkscape to fix." msgstr "" -#: embroider.py:1743 +#: embroider.py:1747 msgid "No embroiderable paths selected." msgstr "" -#: embroider.py:1745 +#: embroider.py:1749 msgid "No embroiderable paths found in document." msgstr "" -#: embroider.py:1746 +#: embroider.py:1750 msgid "" "Tip: use Path -> Object to Path to convert non-paths before embroidering." msgstr "" -#: embroider.py:1758 +#: embroider.py:1762 msgid "Embroidery" msgstr "" @@ -296,7 +296,7 @@ msgid "" "Preset \"%s\" already exists. Please use another name or press \"Overwrite\"" msgstr "" -#: embroider_simulate.py:303 +#: embroider_simulate.py:306 msgid "Embroidery Simulation" msgstr "" @@ -2,6 +2,7 @@ import sys import os +import subprocess # ink/stitch # @@ -27,4 +28,17 @@ binary_path = os.path.join("inkstitch", "bin", binary_name) args = sys.argv[:] args[0] = binary_path -os.execv(binary_path, args) +# os.execve works here for Linux, but only this seems to get the +# extension output to Inkscape on Windows +extension = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) +stdout, stderr = extension.communicate() + +stdout = stdout.strip() +if stdout: + print stdout.strip(), + +stderr = stderr.strip() +if stderr: + print >> sys.stderr, stderr.strip(), + +sys.exit(extension.returncode) |
