From afdbe5b784ee0e7b9a3860f9ad4626fe6d3b47fb Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Thu, 2 Feb 2023 18:34:18 +0100 Subject: [PATCH] Update README and release_windows.bat for Windows * README.md: Update windows instructions * release_windows.bat: Update instruction and deactivate echo for wxPython workaround --- README.md | 26 +++++++++++++++++++++----- release_windows.bat | 24 +++++++++++++----------- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index bc8746be5..a3c4538b2 100644 --- a/README.md +++ b/README.md @@ -155,15 +155,31 @@ cd Printrun ### Windows -Download and install [Python 3.6](https://www.python.org/downloads/) and follow the **Python virtual environment** section above except use the following to create and activate the virtual environment and install dependencies: +First download and install [GIT for Windows](https://git-scm.com/downloads), [Python 3.10](https://www.python.org/downloads/) and a [C-compiler environment](https://wiki.python.org/moin/WindowsCompilers/). +For the next steps we need a CMD window or a PowerShell window. You can use Windows Terminal for this as well. +Create and navigate to a directory of your choice where you want to download the source files of this repository and follow the next steps: +CMD ```cmd -> py -3 -m venv venv -> venv\Scripts\activate -> python -m pip install -r requirements.txt -> python pronterface.py +> git clone https://github.com/kliment/Printrun.git +> cd Printrun +> git submodule update --init --recursive +> release_windows.bat ``` +PowerShell: +```ps +> git clone https://github.com/kliment/Printrun.git +> cd Printrun +> git submodule update --init --recursive +> ./release_windows.bat +``` + +The script above will clone this repository and the submodule PrintrunGTK3. The script 'release_windows.bat' will install a virtual environment named v3, download all needed python libraries and compile the binaries for Pronterface.exe and Pronsole.exe. +You will find the files in the new created directory 'dist'. You will find further and more detailed information in the script release_windows.bat. Further information for the linked submodul: [PrintrunGTK3](https://github.com/DivingDuck/PrintrunGTK3) +Run Pronterface or Pronsole from the binary files or from source calling pronterface.py for the GUI version and pronsole.py for the commandline version. + +Run 'release_windows.bat' when ever you make changes or updates. With each new run it will compile the binaries and update all involved libraries in the virtual environment if needed. Delete the virtual environment if you have problems with it. Use 'git submodule update --init --recursive' for updating the submodule ### macOS diff --git a/release_windows.bat b/release_windows.bat index 481cba07c..5bf76e017 100644 --- a/release_windows.bat +++ b/release_windows.bat @@ -25,10 +25,10 @@ rem ** 10. Go to directory .\dist, list files and ends the activity rem ** ** rem ** Steps, you need to do manually before running this batch: ** rem ** ** -rem ** 1. Install python 64-bit (3.10.x is actually preferred version for ** -rem ** Windows 10 and newer) ** -rem ** https://www.python.org/downloads/release/python-379/ ** -rem ** In case you use an other Python version, check line 88 and adjust ** +rem ** 1. Install python 64-bit (3.10.x is actually preferred and standard version ** +rem ** for Windows 10) ** +rem ** https://www.python.org/downloads/release ** +rem ** In case you use an other Python version, check line 91 and adjust ** rem ** the parameter accordingly to build your virtual environment. ** rem ** 2. Install C-compiler environment ** rem ** https://wiki.python.org/moin/WindowsCompilers ** @@ -40,9 +40,11 @@ rem ** Windows version, available. You can find a striped version of GTK3 rem ** with all needed DLL binary files in directory PrintrunGTK. Please run ** rem ** following git commands before you run this batch in case you don't find ** rem ** this directory in your local repository: ** -rem ** git checkout master ** -rem ** git submodule add https://github.com/DivingDuck/PrintrunGTK3 ** -rem ** git submodule update --init --recursive ** +rem ** git checkout master ** +rem ** git submodule add https://github.com/DivingDuck/PrintrunGTK3 ** +rem ** git submodule update --init --recursive ** +rem ** In case the directory PrintrunGTK3 exist but is empty: ** +rem ** git submodule update --init --recursive ** rem ** You can find a listing of all used DLL's in file VERSION as reference and ** rem ** further informations about the linked submodule here: ** rem ** https://github.com/DivingDuck/PrintrunGTK3 ** @@ -54,7 +56,7 @@ rem ** rem ** https://github.com/wxWidgets/Phoenix/commit/d3bdb14365ca754e83732cccd04e94a2ded5029f rem ** ** rem ** ** -rem ** Author: DivingDuck, 2023-01-31, Status: working ** +rem ** Author: DivingDuck, 2023-02-02, Status: working ** rem ** ** rem ************************************************************************************ rem ************************************************************************************ @@ -123,9 +125,9 @@ echo ****** check for and update outdated modules ****** echo **************************************************** for /F "skip=2 delims= " %%i in ('pip list --outdated') do py -m pip install --upgrade %%i -echo **************************************************************************** -echo ****** Bug on wxPython 4.1.x workaround for Python 3.x and Windows 10 ****** -echo **************************************************************************** +rem echo **************************************************************************** +rem echo ****** Bug on wxPython 4.1.x workaround for Python 3.x and Windows 10 ****** +rem echo **************************************************************************** rem wxPython 4.2.0 is available. Snapshot version is not needed now. Hopefully. #2022-08-05 rem pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython