Windows Manual Install and Manual Build
Info: For this description we use foo
as a user name. Whenever it occures replace it with your personal windows user name.
Requirements
Install these dependancies to build a local build of inkstitch for windows.
-
Depending on your target arch, select either 32bit or 64 bit version and run the installer. Check “Add Python x.xx to PATH”. This for the bash enviroment to find python. Then click on “Install now”
-
This installs git as well as providing a terminal emulator to run build scripts.
Download Use the default settings during installation.
-
Install LTS 32bit or 64bit version (depending on your target arch). Install with default settings.
-
This provides the compiler to build the windows installer. Use the default settings.
-
This provides make to run the build scripts.
- Download make-3.82.90-20111115.zip
- unzip
- Create the folder C:\Make\bin
- Copy
make.exe
fromDownloads\make-3.82.90-20111115\make-3.82.90-20111115\bin_ix86
toC:\Make\bin
PATHS
The bash environment needs some paths for the installed software. So let’s set it up.
-
Open Windows settings > System > About > Advanced system settings
-
In Advanced Settings click on
Enviroment Vairables
-
In
User variables for [foo]
click on Path (1) and then onEdit...
(2) -
For each of the paths below click on
New
then copy paste the file path:C:\Make\bin C:\Program Files (x86)\Inno Setup 6
-
Now it should look like this:
Enable long names for git
-
In the search bar type
cdm
and choseRun as administrator
. -
Run the following command
git config --system core.longpaths true
-
Close the command prompt, we do not need admin rights after this.
Download Ink/Stitch
-
If you already have an Ink/Stitch version installed uninstall it first to avoid double menu entries in Inkscape.
-
Go to
Edit > Preferences > System
and open your extensions folder.If you do not aim for manual install but want to install a build version do not follow this step, but choose any other directory to where you want to save the project files
-
Right click into the file browser and click on
Git Bash Here
to download Ink/Stitch into the extensions folder -
Run the following commands in the terminal emulator:
git clone https://github.com/inkstitch/inkstitch git clone https://github.com/inkstitch/pyembroidery
Setup Python
- For 32bit run the following commands in the terminal emulator:
python -m pip install --upgrade pip python -m pip install wheel python -m pip install pillow==9.5.0 python -m pip install numpy==1.23.1 python -m pip install scipy==1.9.0 pip install wxPython
- For 64bit run the following commands in the terminal emulator:
python -m pip install --upgrade pip python -m pip install wheel
- Now we are ready to install the rest of the requirements through the Ink/Stitch requirements file
python -m pip install -r inkstitch/requirements.txt
- For debugging with pydevd also run:
python -m pip install pydevd
Manual Install for developing Ink/Stitch
- We prepared everything to finally setup Ink/Stitch itself. In your terminal emulator run:
cd inkstitch make manual
- You can now use the Ink/Stitch installation. Changes to the Python code take effect the next time the extension is run.
- After adding a new template for new Ink/Stitch extensions, run the following command to update the Inskcape menu entries.
make inx
If you are running Ink/Stitch through Inkscape, close and reopen Inkscape after running the command.
Generate a build to test run your update on other Windows systems
- To build Ink/Stitch you’ll need to install pyinstaller.
python -m pip install pyinstaller==5.13.2
-
Ink/Stitch uses 7-zip to zip up the build file. So you need to install it as well. Add it to PATHS as described above as
C:\Program Files\7-Zip
(64bit) orC:\Program Files (x86)\7-Zip
(32bit) -
In the terminal emulator run:
cd inkstitch make distlocal
-
In the file browser you will find the finished builds in the folder
artifacts
Do not install the build version if you have the manual install in the extensions folder or you’ll have duplicated menu entries.
Troubleshooting missing Python modules
If when trying to open Inkstitch, you encounter errors about missing Python modules: ModuleNotFoundError: No module named 'diskcache'
Most likely you will need to tell, Inkscape to use your Python version:
- Within Inkscape, Go to Edit > Preferences > System > User preferences and click on Open.
- In your user preferences folder, locate
preferences.xml
- Close Inkscape
- Open
preferences.xml
with a text editor - Search for
<group id="extensions"
- Add this attribute
python-interpreter="C:\Program Files\Python39\python.exe"
. Substitute the path with yours. You can find the path by runningwhere python
in a command prompt