From 556fe0734f2287f2160727ebd2a91c81dd3b8cfa Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Tue, 21 Nov 2023 21:34:26 +0100 Subject: [PATCH 01/13] Remove cairosvg from windows build. Since #1387 we use wxPython.svg. cairosvg, cffi and cairocffi not longer needed for projectlayer.py and became obsolete. --- .github/workflows/buildpackage-win.yml | 63 ++++++++++---------------- VERSION | 6 ++- buildinstructions.txt | 7 +-- release_windows.bat | 46 ++++++++++++------- requirements.txt | 7 +-- 5 files changed, 65 insertions(+), 64 deletions(-) diff --git a/.github/workflows/buildpackage-win.yml b/.github/workflows/buildpackage-win.yml index 8ca8f8b2c..0696b4cfb 100644 --- a/.github/workflows/buildpackage-win.yml +++ b/.github/workflows/buildpackage-win.yml @@ -14,20 +14,19 @@ jobs: strategy: matrix: os: [windows-latest] - # remove x86 builds for now as there are no snapshot builds of wxPython available - #architecture: [x64, x86] + # supported architecture: [x64, x86] architecture: [x64] - # add python '3.10' because wxPython 4.2 is now available (2022-08-21) # supported versions: ['3.7', '3.8', '3.9','3.10'] python-version: ['3.10'] steps: - name: Checkout uses: actions/checkout@v4 - # Import submodule PrintrunGTK3 - with: - submodules: recursive - + # # Import submodule PrintrunGTK3 + # with #1387 no longer needed 2023-11-20 + # with: + # submodules: recursive + # - name: Set up Python uses: actions/setup-python@v4 with: @@ -35,50 +34,34 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip pyinstaller setuptools wheel simplejson polygon3 cython cffi -r requirements.txt + # remove cffi too + #python -m pip install --upgrade pip pyinstaller setuptools wheel simplejson polygon3 cython cffi -r requirements.txt + python -m pip install --upgrade pip pyinstaller setuptools wheel simplejson polygon3 cython -r requirements.txt - # - name: Update to wxPython Version for x86 and py 3.8 - # # Latest development version for x86 and Python 3.6 is for now (2021-12-18) 4.1.2a1.dev5226+a843ed14 - # # Latest development version for x86 and Python 3.8+3.9 is for now (2022-03-17) 4.1.2a1.dev5226+a843ed14 - # # Remove Python 3.6 - # if: ${{ matrix.architecture == 'x86' && matrix.python-version == '3.8' }} - # run: | - # python -m pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython==4.1.2a1.dev5226+a843ed14 - # - name: Update to wxPython Version for x86 and py 3.9 - # # Latest development version for x86 and Python 3.6 is for now (2021-12-18) 4.1.2a1.dev5226+a843ed14 - # # Latest development version for x86 and Python 3.8+3.9 is for now (2022-03-17) 4.1.2a1.dev5226+a843ed14 - # # Remove Python 3.6 - # if: ${{ matrix.architecture == 'x86' && matrix.python-version == '3.9' }} - # run: | - # python -m pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython==4.1.2a1.dev5226+a843ed14 - # - # + - name: Update to wxPython latest Version for x86 + # Latest development version for x32 and Python 3.7 to 3.10, can be removed if requirements.txt is fixed + # minimum version for x86 needs to be wxPython >= 4.2.1 (2023-11-20) + if: ${{ matrix.architecture == 'x86' && matrix.python-version >= '3.7' }} + run: | + #python -m pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython==4.2.2a1.dev5626+a1184286 + #python -m pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython + python -m pip install -U wxPython - name: Update to wxPython latest Version for x64 # Latest development version for x64 and Python 3.7 to 3.10, can be removed if requirements.txt is fixed if: ${{ matrix.architecture == 'x64' && matrix.python-version >= '3.7' }} run: | - # python -m pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython + #python -m pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython==4.2.2a1.dev5626+a1184286 + #python -m pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython python -m pip install -U wxPython - name: Build Cython ext run: | python setup.py build_ext --inplace - # Build pyinstaller spec depending on GTK3 x32/x64 binaries or w/o GTK3 bundle - # for running Projector. The user can install the GTK3 libraries external and - # set the environment path to the installation manually if the bundle is not - # included or found (last option) via submodules - - name: Make pyinstaller spec with GTK3 x64 bundle - if: ${{ matrix.architecture == 'x64' && hashFiles('PrintrunGTK3/GTK3Windows10-64') != '' }} - run: | - pyi-makespec --hidden-import="pkg_resources.py2_warn" -F --add-binary "PrintrunGTK3/GTK3Windows10-64/*.dll;." --add-data "VERSION;cairocffi" --add-data "VERSION;cairosvg" --add-data "images/*;images" --add-data "*.png;." --add-data "*.ico;." -w -i pronterface.ico pronterface.py - - name: Make pyinstaller spec with GTK3 x32 bundle - if: ${{ matrix.architecture == 'x86' && hashFiles('PrintrunGTK3/GTK3Windows10-32') != '' }} - run: | - pyi-makespec --hidden-import="pkg_resources.py2_warn" -F --add-binary "PrintrunGTK3/GTK3Windows10-32/*.dll;." --add-data "VERSION;cairocffi" --add-data "VERSION;cairosvg" --add-data "images/*;images" --add-data "*.png;." --add-data "*.ico;." -w -i pronterface.ico pronterface.py - - name: Make pyinstaller spec without GTK3 bundle - if: ${{ hashFiles('PrintrunGTK3') == '' }} + + - name: Make pyinstaller spec run: | - pyi-makespec --hidden-import="pkg_resources.py2_warn" -F --add-data "VERSION;cairocffi" --add-data "VERSION;cairosvg" --add-data "images/*;images" --add-data "*.png;." --add-data "*.ico;." -w -i pronterface.ico pronterface.py + #pyi-makespec --hidden-import="pkg_resources.py2_warn" -F --add-data "VERSION;cairocffi" --add-data "images/*;images" --add-data "*.png;." --add-data "*.ico;." -w -i pronterface.ico pronterface.py + pyi-makespec --hidden-import="pkg_resources.py2_warn" -F --add-data "images/*;images" --add-data "*.png;." --add-data "*.ico;." -w -i pronterface.ico pronterface.py - name: Make pyinstaller build run: | pyinstaller --clean pronterface.spec -y diff --git a/VERSION b/VERSION index 3bde0d44e..a55ebd1fa 100644 --- a/VERSION +++ b/VERSION @@ -1,5 +1,7 @@ -This is a dummy file for pyinstaller to compile Pronterface.Cairocffi and cairosvg won't find -the GTK3 runtime libraries needed for running Projector under Windows w / o this file. +This is a dummy file for pyinstaller to compile Pronterface. Cairocffi and cairosvg won't find +the GTK3 runtime libraries needed for running Projector under Windows w/o this file. +Update 2023-11-13: With introducing merge #1387 https ://github.com/kliment/Printrun/pull/1387 + cairosvg is no loger needed. We use wx.svg instead. You can find a suitable version of GTK3 for Windows 10 here : https://github.com/DivingDuck/PrintrunGTK3. For further information please follow the links.PrintrunGTK3 is a submodule of Printrun. diff --git a/buildinstructions.txt b/buildinstructions.txt index 79f3fba71..f31f67ac8 100644 --- a/buildinstructions.txt +++ b/buildinstructions.txt @@ -1,6 +1,6 @@ setup on osx: -(install python 3.6) -(install python extension compile environment, this is automagically done if you have xcode) +(install python 3.10) +(install python extension compile environment, this is automatically done if you have xcode) (install git) git clone http://github.com/kliment/Printrun.git cd Printrun @@ -35,11 +35,12 @@ pyinstaller --clean pronterface.spec -y (optional) codesign -s identityname dist/pronterface.app --deep setup on windows: -(install python 3.6) +(install python 3.10) (install python extension compile environment, see https://wiki.python.org/moin/WindowsCompilers ) (install git) git clone http://github.com/kliment/Printrun.git cd Printrun +git submodule update --init --recursive git pull \path\to\python3\python -m venv v3 v3\Scripts\activate diff --git a/release_windows.bat b/release_windows.bat index 4707f4839..ca4c90fab 100644 --- a/release_windows.bat +++ b/release_windows.bat @@ -28,7 +28,7 @@ rem ** 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 ** In case you use an other Python version, check line 88 to 92 and adjust ** rem ** the parameter accordingly to build your virtual environment. ** rem ** 2. Install C-compiler environment ** rem ** https://wiki.python.org/moin/WindowsCompilers ** @@ -56,7 +56,7 @@ rem ** rem ** https://github.com/wxWidgets/Phoenix/commit/d3bdb14365ca754e83732cccd04e94a2ded5029f rem ** ** rem ** ** -rem ** Author: DivingDuck, 2023-02-02, Status: working ** +rem ** Author: DivingDuck, 2023-11-13, Status: working ** rem ** ** rem ************************************************************************************ rem ************************************************************************************ @@ -89,6 +89,7 @@ if exist v3 ( rem py -3.8 -m venv v3 rem py -3.9 -m venv v3 py -3.10 -m venv v3 + rem py -3.11 -m venv v3 echo ********************************************* echo ****** Activate virtual environment v3 ****** @@ -134,18 +135,19 @@ pip uninstall pyglet -y pip install pyglet==1.5.27 -echo ***************************************************************************** -echo ****** cairosvg workaround, needs to be below 2.6.0 (isn't compatible) ****** -echo ***************************************************************************** +rem echo ***************************************************************************** +rem echo ****** cairosvg workaround, needs to be below 2.6.0 (isn't compatible) ****** +rem echo ***************************************************************************** rem # 2023-01-30 rem cairosvg >=2.6.0 generate a crash problem with locale in module projectlayer.py (Projector), rem so we will stay to 2.5.2 as workaround for now -pip uninstall cairosvg -y -pip install cairosvg==2.5.2 +rem # 2023-11-13 cairosvg is no longer needed. We now use wx.svg. +rem pip uninstall cairosvg -y +rem pip install cairosvg==2.5.2 echo ****************************************************************** -echo ****** Compile G-Code parser gcoder_line.cp??-win_amd64.pyd ****** +echo ****** Compile G-Code parser gcoder_line.cp??-win_amd??.pyd ****** echo ****************************************************************** rem For safety reasons delete existing version first to prevent errors if exist printrun\gcoder_line.cp??-win_amd??.pyd ( @@ -165,7 +167,7 @@ rem The Projector feature of Pronterface need some external DLL binaries from th rem You can build Pronterface with or w/o these binaries. In addition you need rem different binaries depending if you build a Windows 10 x32 or x64 version. rem Remove 'rem' before pyi-makespec for the build of your choice and add 'rem' -rem for all other versions. You can't bundle x32 and x46 into the same Pronterface binary file. +rem for all other versions. You can't bundle x32 and x64 into the same Pronterface binary file. rem Only one active version is allowed. rem **** Default setup: Version 3, GTK3 bundle included for Windows 10 x64 bit. **** @@ -175,21 +177,33 @@ rem Choose this pyi-makespec in case you don't have the GTK3 Toolkit files, or w rem or don't want to bundle these within Pronterface.exe. You can install them separately and rem set the path location via Windows system environment variable (like Path=c:\GTK3\bin). -rem pyi-makespec -F --add-data VERSION;cairocffi --add-data VERSION;cairosvg --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py -rem pyi-makespec -F --add-data VERSION;cairocffi --add-data VERSION;cairosvg --add-data images/*;images --add-data *.png;. --add-data *.ico;. -c -i pronsole.ico pronsole.py +rem pyi-makespec -F --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py +rem pyi-makespec -F --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -c -i pronsole.ico pronsole.py +rem pyi-makespec -F --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i plater.ico plater.py rem Version 2: GTK3 included in Pronterface (Windows10 x32 only) NOT Supported for now (see wxPython remark line 51): rem Choose this pyi-makespec in case you want to include the GTK3 Toolkit files for Windows10 x32 only -rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-32/*.dll;. --add-data VERSION;cairocffi --add-data VERSION;cairosvg --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py -rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-32/*.dll;. --add-data VERSION;cairocffi --add-data VERSION;cairosvg --add-data images/*;images --add-data *.png;. --add-data *.ico;. -c -i pronsole.ico pronsole.py +rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-32/*.dll;. --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py +rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-32/*.dll;. --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -c -i pronsole.ico pronsole.py +rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-32/*.dll;. --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i plater.ico plater.py rem Version 3: GTK3 included in Pronterface (Windows10 x64 only): rem Choose this pyi-makespec in case you want to include the GTK3 Toolkit files for Windows10 x64 only -pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-64/*.dll;. --add-data VERSION;cairocffi --add-data VERSION;cairosvg --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py -pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-64/*.dll;. --add-data VERSION;cairocffi --add-data VERSION;cairosvg --add-data images/*;images --add-data *.png;. --add-data *.ico;. -c -i pronsole.ico pronsole.py -pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-64/*.dll;. --add-data VERSION;cairocffi --add-data VERSION;cairosvg --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i plater.ico plater.py +rem do we need GTK any longer? +rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-64/*.dll;. --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py +rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-64/*.dll;. --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -c -i pronsole.ico pronsole.py +rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-64/*.dll;. --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i plater.ico plater.py +rem test w/o GTK +rem do we need cairocffi any longer? +rem pyi-makespec -F --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py +rem pyi-makespec -F --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -c -i pronsole.ico pronsole.py +rem pyi-makespec -F --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i plater.ico plater.py +rem test w/o GTK and cairocffi +pyi-makespec -F --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py +pyi-makespec -F --add-data images/*;images --add-data *.png;. --add-data *.ico;. -c -i pronsole.ico pronsole.py +pyi-makespec -F --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i plater.ico plater.py echo *************************************************************** echo ****** Build Pronterface, Pronsole and Plater executables ***** diff --git a/requirements.txt b/requirements.txt index d57e6f424..53f08eadc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,9 +2,10 @@ pyserial (>= 3.0) wxPython >= 4.2.0 numpy (>= 1.8.2) pyglet >= 1.1, < 2.0 -cffi -cairocffi -cairosvg >= 1.0.9, < 2.6.0 +# remove because of #1387 +#cffi +#cairocffi +#cairosvg >= 1.0.9, < 2.6.0 psutil (>= 2.1) lxml (>= 2.9.1) appdirs (>= 1.4.0) From 8796b4ab1075ae03a4486346f274a427fa5bcd59 Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Thu, 23 Nov 2023 17:37:38 +0100 Subject: [PATCH 02/13] some clean-up, add Python 3.11 and x86 builds, add in addition pronsole.exe to build process and artifact upload --- .github/workflows/buildpackage-win.yml | 18 ++--- .github/workflows/pypi-win.yml | 2 +- release_windows.bat | 96 +++++--------------------- requirements.txt | 4 -- 4 files changed, 24 insertions(+), 96 deletions(-) diff --git a/.github/workflows/buildpackage-win.yml b/.github/workflows/buildpackage-win.yml index 0696b4cfb..12a1c0d8a 100644 --- a/.github/workflows/buildpackage-win.yml +++ b/.github/workflows/buildpackage-win.yml @@ -15,18 +15,13 @@ jobs: matrix: os: [windows-latest] # supported architecture: [x64, x86] - architecture: [x64] + architecture: [x64, x86] # supported versions: ['3.7', '3.8', '3.9','3.10'] - python-version: ['3.10'] + python-version: ['3.10','3.11'] steps: - name: Checkout uses: actions/checkout@v4 - # # Import submodule PrintrunGTK3 - # with #1387 no longer needed 2023-11-20 - # with: - # submodules: recursive - # - name: Set up Python uses: actions/setup-python@v4 with: @@ -34,8 +29,6 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - # remove cffi too - #python -m pip install --upgrade pip pyinstaller setuptools wheel simplejson polygon3 cython cffi -r requirements.txt python -m pip install --upgrade pip pyinstaller setuptools wheel simplejson polygon3 cython -r requirements.txt - name: Update to wxPython latest Version for x86 @@ -60,11 +53,12 @@ jobs: - name: Make pyinstaller spec run: | - #pyi-makespec --hidden-import="pkg_resources.py2_warn" -F --add-data "VERSION;cairocffi" --add-data "images/*;images" --add-data "*.png;." --add-data "*.ico;." -w -i pronterface.ico pronterface.py pyi-makespec --hidden-import="pkg_resources.py2_warn" -F --add-data "images/*;images" --add-data "*.png;." --add-data "*.ico;." -w -i pronterface.ico pronterface.py + pyi-makespec --hidden-import="pkg_resources.py2_warn" -F --add-data "images/*;images" --add-data "*.png;." --add-data "*.ico;." -c -i pronsole.ico pronsole.py - name: Make pyinstaller build run: | pyinstaller --clean pronterface.spec -y + pyinstaller --clean pronsole.spec -y - name: Configuration for releases if: ${{ github.event_name == 'release' }} @@ -85,4 +79,6 @@ jobs: uses: actions/upload-artifact@v3 with: name: ${{ env.EXE_NAME }}_windows_${{ matrix.architecture }}_py${{ matrix.python-version }} - path: dist/pronterface.exe + path: | + dist/pronterface.exe + dist/pronsole.exe diff --git a/.github/workflows/pypi-win.yml b/.github/workflows/pypi-win.yml index 880e0d3d9..fcee78209 100644 --- a/.github/workflows/pypi-win.yml +++ b/.github/workflows/pypi-win.yml @@ -15,7 +15,7 @@ jobs: matrix: os: [windows-latest] architecture: [x64, x86] - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] steps: - name: Checkout diff --git a/release_windows.bat b/release_windows.bat index ca4c90fab..565de9774 100644 --- a/release_windows.bat +++ b/release_windows.bat @@ -25,38 +25,23 @@ 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 and standard version ** -rem ** for Windows 10) ** +rem ** 1. Install python 64-bit (3.10.x 64-bit is actually preferred ** +rem ** and standard version for Windows 10) ** rem ** https://www.python.org/downloads/release ** -rem ** In case you use an other Python version, check line 88 to 92 and adjust ** +rem ** In case you use an other Python version: Check line 73 to 77 and adjust ** rem ** the parameter accordingly to build your virtual environment. ** rem ** 2. Install C-compiler environment ** rem ** https://wiki.python.org/moin/WindowsCompilers ** rem ** 3. Check for latest repository updates at: ** rem ** http://github.com/kliment/Printrun.git ** -rem ** 4. Projector needs GTK+ for Windows Runtime Environment installed. ** -rem ** There are different compilations, depending on the installed ** -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 ** In case the directory PrintrunGTK3 exist but is empty please run: ** -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 ** rem ** ** rem ** Follow the instructions at section 'Collect all data for build' below ** +rem ** ** +rem ** Remark: Plater stand alone application is experimental only. GUI code need an ** +rem ** update for closing plater window and running processes. For now you ** +rem ** need to terminate the process manually via Task manager. ** rem ** ** -rem ** Remark: wxPython drops support x32 builders. Only x64 versions for now ** -rem ** ** -rem ** https://github.com/wxWidgets/Phoenix/commit/d3bdb14365ca754e83732cccd04e94a2ded5029f -rem ** ** -rem ** ** -rem ** Author: DivingDuck, 2023-11-13, Status: working ** +rem ** Author: DivingDuck, 2023-11-23, Status: working ** rem ** ** rem ************************************************************************************ rem ************************************************************************************ @@ -82,8 +67,8 @@ if exist v3 ( rem Select your Python version below. Remove 'rem' before 'rem py -3.x ...' rem for your Python version of choice and add 'rem' for all other versions. rem Attention: - rem Minimum version for wxPython is >= 4.2 and with this version only - rem Python x64 versions are supported. + rem Minimum version for wxPython is >= 4.2.1. With this version + rem Python x64 and x86 versions are supported. rem py -3.7 -m venv v3 rem py -3.8 -m venv v3 @@ -121,9 +106,9 @@ echo ****** upgrade virtual environment v3 ****** echo ******************************************** pip install --upgrade virtualenv -echo **************************************************** -echo ****** check for and update outdated modules ****** -echo **************************************************** +echo ******************************************************** +echo ****** check for outdated modules and update them ****** +echo ******************************************************** for /F "skip=2 delims= " %%i in ('pip list --outdated') do py -m pip install --upgrade %%i @@ -134,22 +119,10 @@ rem # 2022-11-01 pip uninstall pyglet -y pip install pyglet==1.5.27 - -rem echo ***************************************************************************** -rem echo ****** cairosvg workaround, needs to be below 2.6.0 (isn't compatible) ****** -rem echo ***************************************************************************** -rem # 2023-01-30 -rem cairosvg >=2.6.0 generate a crash problem with locale in module projectlayer.py (Projector), -rem so we will stay to 2.5.2 as workaround for now -rem # 2023-11-13 cairosvg is no longer needed. We now use wx.svg. -rem pip uninstall cairosvg -y -rem pip install cairosvg==2.5.2 - - echo ****************************************************************** echo ****** Compile G-Code parser gcoder_line.cp??-win_amd??.pyd ****** echo ****************************************************************** -rem For safety reasons delete existing version first to prevent errors +rem Delete existing versions first to prevent errors and incompatibilities if exist printrun\gcoder_line.cp??-win_amd??.pyd ( del printrun\gcoder_line.cp??-win_amd??.pyd echo ******************************************************************************** @@ -162,47 +135,9 @@ echo **************************************** echo ****** Collect all data for build ****** echo **************************************** -rem **** Select which version you want to build: **** -rem The Projector feature of Pronterface need some external DLL binaries from the GTK3. -rem You can build Pronterface with or w/o these binaries. In addition you need -rem different binaries depending if you build a Windows 10 x32 or x64 version. -rem Remove 'rem' before pyi-makespec for the build of your choice and add 'rem' -rem for all other versions. You can't bundle x32 and x64 into the same Pronterface binary file. -rem Only one active version is allowed. - -rem **** Default setup: Version 3, GTK3 bundle included for Windows 10 x64 bit. **** - -rem Version 1: With external GTK3 or w/o GTK3 support: -rem Choose this pyi-makespec in case you don't have the GTK3 Toolkit files, or want them stay separately -rem or don't want to bundle these within Pronterface.exe. You can install them separately and -rem set the path location via Windows system environment variable (like Path=c:\GTK3\bin). - -rem pyi-makespec -F --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py -rem pyi-makespec -F --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -c -i pronsole.ico pronsole.py -rem pyi-makespec -F --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i plater.ico plater.py - -rem Version 2: GTK3 included in Pronterface (Windows10 x32 only) NOT Supported for now (see wxPython remark line 51): -rem Choose this pyi-makespec in case you want to include the GTK3 Toolkit files for Windows10 x32 only - -rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-32/*.dll;. --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py -rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-32/*.dll;. --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -c -i pronsole.ico pronsole.py -rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-32/*.dll;. --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i plater.ico plater.py - -rem Version 3: GTK3 included in Pronterface (Windows10 x64 only): -rem Choose this pyi-makespec in case you want to include the GTK3 Toolkit files for Windows10 x64 only - -rem do we need GTK any longer? -rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-64/*.dll;. --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py -rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-64/*.dll;. --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -c -i pronsole.ico pronsole.py -rem pyi-makespec -F --add-binary PrintrunGTK3/GTK3Windows10-64/*.dll;. --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i plater.ico plater.py -rem test w/o GTK -rem do we need cairocffi any longer? -rem pyi-makespec -F --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py -rem pyi-makespec -F --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -c -i pronsole.ico pronsole.py -rem pyi-makespec -F --add-data VERSION;cairocffi --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i plater.ico plater.py -rem test w/o GTK and cairocffi pyi-makespec -F --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py pyi-makespec -F --add-data images/*;images --add-data *.png;. --add-data *.ico;. -c -i pronsole.ico pronsole.py +rem Plater stand alone application is experimental only (See remark). pyi-makespec -F --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i plater.ico plater.py echo *************************************************************** @@ -216,6 +151,7 @@ echo ** Build Pronsole executable ** pyinstaller --clean pronsole.spec -y echo echo ** Build Plater executable ** +rem Plater stand alone application is experimental only (See remark). pyinstaller --clean plater.spec -y diff --git a/requirements.txt b/requirements.txt index 53f08eadc..b645feb82 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,10 +2,6 @@ pyserial (>= 3.0) wxPython >= 4.2.0 numpy (>= 1.8.2) pyglet >= 1.1, < 2.0 -# remove because of #1387 -#cffi -#cairocffi -#cairosvg >= 1.0.9, < 2.6.0 psutil (>= 2.1) lxml (>= 2.9.1) appdirs (>= 1.4.0) From 51d4f315a292b5a9564d8a00d1ab8c0e2187a0d3 Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Thu, 23 Nov 2023 18:06:27 +0100 Subject: [PATCH 03/13] remove x86 and python 3.11 because of error to build pillow --- .github/workflows/buildpackage-win.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildpackage-win.yml b/.github/workflows/buildpackage-win.yml index 12a1c0d8a..60ea57423 100644 --- a/.github/workflows/buildpackage-win.yml +++ b/.github/workflows/buildpackage-win.yml @@ -15,9 +15,9 @@ jobs: matrix: os: [windows-latest] # supported architecture: [x64, x86] - architecture: [x64, x86] + architecture: [x64] # supported versions: ['3.7', '3.8', '3.9','3.10'] - python-version: ['3.10','3.11'] + python-version: ['3.10'] steps: - name: Checkout From ead19cfd7fa3c4027bb8089a67d6e0137f359249 Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Thu, 23 Nov 2023 18:25:31 +0100 Subject: [PATCH 04/13] check for x86 only with Python 3.10 --- .github/workflows/buildpackage-win.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildpackage-win.yml b/.github/workflows/buildpackage-win.yml index 60ea57423..f82a3816e 100644 --- a/.github/workflows/buildpackage-win.yml +++ b/.github/workflows/buildpackage-win.yml @@ -15,7 +15,7 @@ jobs: matrix: os: [windows-latest] # supported architecture: [x64, x86] - architecture: [x64] + architecture: [x86] # supported versions: ['3.7', '3.8', '3.9','3.10'] python-version: ['3.10'] From 12f526dca9ca75cb9d5ec76edc3a3e3b4e6acebb Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Thu, 23 Nov 2023 18:48:10 +0100 Subject: [PATCH 05/13] Test build for Python 3.11 x64 --- .github/workflows/buildpackage-win.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildpackage-win.yml b/.github/workflows/buildpackage-win.yml index f82a3816e..7606d533f 100644 --- a/.github/workflows/buildpackage-win.yml +++ b/.github/workflows/buildpackage-win.yml @@ -15,9 +15,9 @@ jobs: matrix: os: [windows-latest] # supported architecture: [x64, x86] - architecture: [x86] - # supported versions: ['3.7', '3.8', '3.9','3.10'] - python-version: ['3.10'] + architecture: [x64] + # supported versions: ['3.7', '3.8', '3.9','3.10', '3.11'] + python-version: ['3.11'] steps: - name: Checkout From a33fae0622dfd0bc5d660d979dfb6ef1bd058be9 Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Fri, 24 Nov 2023 00:15:54 +0100 Subject: [PATCH 06/13] x86 once more... --- .github/workflows/buildpackage-win.yml | 6 +++--- release_windows.bat | 6 +++++- requirements.txt | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/buildpackage-win.yml b/.github/workflows/buildpackage-win.yml index 7606d533f..746685e51 100644 --- a/.github/workflows/buildpackage-win.yml +++ b/.github/workflows/buildpackage-win.yml @@ -15,9 +15,9 @@ jobs: matrix: os: [windows-latest] # supported architecture: [x64, x86] - architecture: [x64] - # supported versions: ['3.7', '3.8', '3.9','3.10', '3.11'] - python-version: ['3.11'] + architecture: [x86, x64] + # supported versions: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.10'] steps: - name: Checkout diff --git a/release_windows.bat b/release_windows.bat index 565de9774..3bb993bb1 100644 --- a/release_windows.bat +++ b/release_windows.bat @@ -71,9 +71,13 @@ if exist v3 ( rem Python x64 and x86 versions are supported. rem py -3.7 -m venv v3 + rem py -3.8-32 -m venv v3 rem py -3.8 -m venv v3 + rem py -3.9-32 -m venv v3 rem py -3.9 -m venv v3 - py -3.10 -m venv v3 + rem py -3.10-32 -m venv v3 + rem py -3.10 -m venv v3 + py -3.11-32 -m venv v3 rem py -3.11 -m venv v3 echo ********************************************* diff --git a/requirements.txt b/requirements.txt index b645feb82..67acb3ac3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ pyserial (>= 3.0) +pillow < 10.0; sys_platform == 'win32' wxPython >= 4.2.0 numpy (>= 1.8.2) pyglet >= 1.1, < 2.0 From f95a1c27219af6b6d790ee8c1f4ea498b54e901a Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Fri, 15 Dec 2023 02:56:58 +0100 Subject: [PATCH 07/13] more cleanup, add pillow workaround, restrict supported python x86 versions, set py 3.10 x64 as default build version --- release_windows.bat | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/release_windows.bat b/release_windows.bat index 3bb993bb1..31d6770b7 100644 --- a/release_windows.bat +++ b/release_windows.bat @@ -35,13 +35,12 @@ rem ** https://wiki.python.org/moin/WindowsCompilers rem ** 3. Check for latest repository updates at: ** rem ** http://github.com/kliment/Printrun.git ** rem ** ** -rem ** Follow the instructions at section 'Collect all data for build' below ** rem ** ** rem ** Remark: Plater stand alone application is experimental only. GUI code need an ** rem ** update for closing plater window and running processes. For now you ** rem ** need to terminate the process manually via Task manager. ** rem ** ** -rem ** Author: DivingDuck, 2023-11-23, Status: working ** +rem ** Author: DivingDuck, 2023-12-15, Status: working ** rem ** ** rem ************************************************************************************ rem ************************************************************************************ @@ -68,16 +67,16 @@ if exist v3 ( rem for your Python version of choice and add 'rem' for all other versions. rem Attention: rem Minimum version for wxPython is >= 4.2.1. With this version - rem Python x64 and x86 versions are supported. + rem Python x64 (version 3.7 up to 3.11) and + rem Python x86 (version 3.9 up to 3.11) is supported. rem py -3.7 -m venv v3 - rem py -3.8-32 -m venv v3 rem py -3.8 -m venv v3 rem py -3.9-32 -m venv v3 rem py -3.9 -m venv v3 rem py -3.10-32 -m venv v3 - rem py -3.10 -m venv v3 - py -3.11-32 -m venv v3 + py -3.10 -m venv v3 + rem py -3.11-32 -m venv v3 rem py -3.11 -m venv v3 echo ********************************************* @@ -123,6 +122,14 @@ rem # 2022-11-01 pip uninstall pyglet -y pip install pyglet==1.5.27 +echo ************************************************************************** +echo ****** pillow workaround, needs to be below 10.0 (isn't compatible) ****** +echo ************************************************************************** +rem # 2023-12-15 +rem building wxPython 4.2.1 for x86 needs pillow <10.0 +pip uninstall pillow -y +pip install pillow==9.5.0 + echo ****************************************************************** echo ****** Compile G-Code parser gcoder_line.cp??-win_amd??.pyd ****** echo ****************************************************************** From 03b47e2f15d64bf2d9ba200c669746d30b8e87ae Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Mon, 25 Dec 2023 15:10:18 +0100 Subject: [PATCH 08/13] remove submodule PrintrunGTK3 --- .gitmodules | 3 --- PrintrunGTK3 | 1 - 2 files changed, 4 deletions(-) delete mode 160000 PrintrunGTK3 diff --git a/.gitmodules b/.gitmodules index 7296a6536..e69de29bb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "PrintrunGTK3"] - path = PrintrunGTK3 - url = https://github.com/DivingDuck/PrintrunGTK3 diff --git a/PrintrunGTK3 b/PrintrunGTK3 deleted file mode 160000 index e26b8dd02..000000000 --- a/PrintrunGTK3 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e26b8dd02213e8960c6662330c764cc755cce5df From 1f3fbb77bc87af54b782fe370a9c85a4400d2242 Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Mon, 25 Dec 2023 15:38:47 +0100 Subject: [PATCH 09/13] remove leftover file VERSION --- VERSION | 63 --------------------------------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 VERSION diff --git a/VERSION b/VERSION deleted file mode 100644 index a55ebd1fa..000000000 --- a/VERSION +++ /dev/null @@ -1,63 +0,0 @@ -This is a dummy file for pyinstaller to compile Pronterface. Cairocffi and cairosvg won't find -the GTK3 runtime libraries needed for running Projector under Windows w/o this file. -Update 2023-11-13: With introducing merge #1387 https ://github.com/kliment/Printrun/pull/1387 - cairosvg is no loger needed. We use wx.svg instead. - -You can find a suitable version of GTK3 for Windows 10 here : https://github.com/DivingDuck/PrintrunGTK3. -For further information please follow the links.PrintrunGTK3 is a submodule of Printrun. - -The DLL binaries are based on https ://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer -for 64 Bit version and http ://www.tarnyko.net/dl/gtk.htm for 32 Bit version and are not modified. - - Please run following git commands in case you can't find the directory 'PrintrunGTK' in your repository: - git checkout master - git submodule add https ://github.com/DivingDuck/PrintrunGTK3 -git submodule update --init --recursive - -For updating an existing submodule to latest version run : -git submodule update --remote - -Compiling Pronterface manually : -Follow the instructions in release_windows.bat and activate the correct pyi - makespec version depending on your needs. - - -List of DLL's for Projector based on Windows 10 for 64bit program version: --------------------------------------------------------------------------- -https ://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer - https ://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases/download/2021-01-30/gtk3-runtime-3.24.24-2021-01-30-ts-win64.exe - - libbrotlicommon.dll - libbrotlidec.dll - libbz2 - 1.dll - libcairo - 2.dll - libexpat - 1.dll - libfontconfig - 1.dll - libfreetype - 6.dll - libgcc_s_seh - 1.dll - libglib - 2.0 - 0.dll - libgraphite2.dll - libharfbuzz - 0.dll - libiconv - 2.dll - libintl - 8.dll - libpcre - 1.dll - libpixman - 1 - 0.dll - libpng16 - 16.dll - libstdc++ - 6.dll - libwinpthread - 1.dll - zlib1.dll - - - List of DLL's for Projector based on Windows 10 for 32bit program version: - -------------------------------------------------------------------------- - http ://www.tarnyko.net/dl/gtk.htm -http://www.tarnyko.net/repo/gtk3_build_system/gtk+-bundle_3.6.4-20130513_win32.zip - -File list : -libcairo - 2.dll -libexpat - 1.dll -libfontconfig - 1.dll -libfreetype - 6.dll -libpixman - 1 - 0.dll -libpng15 - 15.dll -Remark.txt -zlib1.dll \ No newline at end of file From f67d3fbb4ef98b23941af0d0c89f12fe593b4711 Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Tue, 26 Dec 2023 18:42:52 +0100 Subject: [PATCH 10/13] more clean-up --- README.md | 12 +++++++----- buildinstructions.txt | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cc25be38c..76a3a4a86 100644 --- a/README.md +++ b/README.md @@ -225,7 +225,6 @@ CMD ```cmd > git clone https://github.com/kliment/Printrun.git > cd Printrun -> git submodule update --init --recursive > release_windows.bat ``` @@ -233,15 +232,18 @@ 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) +The script above will clone this repository. 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`. 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 +Running Pronsole works best by running it in WindowsTerminal. You can create a desktop shortcut link to the file pronsole.exe. Then edit the target for your shortcut as shown in belows example: +`%LocalAppData%\Microsoft\WindowsApps\wt.exe --title Pronsole %USERPROFILE%\Downloads\pronterface-test\pronsole.exe` +You need to adjust the path to your location of pronsole.exe. + +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. # USING PRINTRUN diff --git a/buildinstructions.txt b/buildinstructions.txt index f31f67ac8..30d01f7cf 100644 --- a/buildinstructions.txt +++ b/buildinstructions.txt @@ -9,7 +9,6 @@ python3 -m venv v3 . ./v3/bin/activate pip install --upgrade pip pip install --upgrade setuptools -pip install cffi pip install -r requirements.txt pip install cython python setup.py build_ext --inplace @@ -38,17 +37,21 @@ setup on windows: (install python 3.10) (install python extension compile environment, see https://wiki.python.org/moin/WindowsCompilers ) (install git) +(for further informations pls. see script file release_windows.bat where we implemented +an automated build for windows) git clone http://github.com/kliment/Printrun.git cd Printrun -git submodule update --init --recursive git pull \path\to\python3\python -m venv v3 v3\Scripts\activate pip install --upgrade pip pip install --upgrade setuptools -pip install cffi -pip install -r requirements.txt +pip install wheel pip install cython +pip install -r requirements.txt +pip install simplejson +pip install pypiwin32 +pip install polygon3 * please see remark python setup.py build_ext --inplace for running: @@ -58,3 +61,8 @@ for packaging: pip install pyinstaller pyi-makespec -F --add-data images/*;images --add-data *.png;. --add-data *.ico;. -w -i pronterface.ico pronterface.py pyinstaller --clean pronterface.spec -y + +Remark: +The library polygon is free for non commercial use. You can build Pronterface without +this library but then it will run slower. +Please find further details here: https://pypi.org/project/Polygon3/ \ No newline at end of file From 3f74d16018575c86c56f6ce08d38464a1dc61cab Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Wed, 27 Dec 2023 19:41:12 +0100 Subject: [PATCH 11/13] Convert and update file buildinstructions into mark down format --- buildinstructions.md | 93 +++++++++++++++++++++++++++++++++++++++++++ buildinstructions.txt | 68 ------------------------------- 2 files changed, 93 insertions(+), 68 deletions(-) create mode 100644 buildinstructions.md delete mode 100644 buildinstructions.txt diff --git a/buildinstructions.md b/buildinstructions.md new file mode 100644 index 000000000..717c8bd22 --- /dev/null +++ b/buildinstructions.md @@ -0,0 +1,93 @@ +# Build instructions +In general please follow the build instructions as described in [readme.md](readme.md). Here you will find a brief overview about what is needed to build your own development environment without further explanations. +## Setup on OS X +### Prerequisites +* install python 3.10 +* install python extension compile environment, this is automatically done if you have xcode +* install git +### Clone the repository +``` +git clone http://github.com/kliment/Printrun.git +cd Printrun +git pull +``` +### Install and activate the virtual environment +``` +python3 -m venv v3 +. ./v3/bin/activate +``` +### Install and update all required libraries +``` +pip install --upgrade pip +pip install --upgrade setuptools +pip install -r requirements.txt +pip install cython +python setup.py build_ext --inplace +``` + +### For running +`python pronterface.py` + +### For packaging +``` +pip install pyinstaller +pyi-makespec --hidden-import="pkg_resources.py2_warn" -F --add-data images/\*:images --add-data \*.png:. --add-data \*.ico:. -w -i P-face.icns pronterface.py +rm -rf dist +sed -i '' '$ s/.$//' pronterface.spec +cat >> pronterface.spec <[!TIP] Please find further informations about building a development environment and packaging in script [release_windows.bat](release_windows.bat) where we implemented an automated build for windows. + +### Remark: +>[^1] The library **polygon3** is free for non commercial use. You can build Pronterface without this library - but then it will run slower. +>Please find further details regarding license here: https://pypi.org/project/Polygon3/ \ No newline at end of file diff --git a/buildinstructions.txt b/buildinstructions.txt deleted file mode 100644 index 30d01f7cf..000000000 --- a/buildinstructions.txt +++ /dev/null @@ -1,68 +0,0 @@ -setup on osx: -(install python 3.10) -(install python extension compile environment, this is automatically done if you have xcode) -(install git) -git clone http://github.com/kliment/Printrun.git -cd Printrun -git pull -python3 -m venv v3 -. ./v3/bin/activate -pip install --upgrade pip -pip install --upgrade setuptools -pip install -r requirements.txt -pip install cython -python setup.py build_ext --inplace - -for running: -python pronterface.py - -for packaging: -pip install pyinstaller -pyi-makespec --hidden-import="pkg_resources.py2_warn" -F --add-data images/\*:images --add-data \*.png:. --add-data \*.ico:. -w -i P-face.icns pronterface.py -rm -rf dist -sed -i '' '$ s/.$//' pronterface.spec -cat >> pronterface.spec < Date: Wed, 27 Dec 2023 20:26:26 +0100 Subject: [PATCH 12/13] Update buildinstructions.md Correct footnote and file link --- buildinstructions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildinstructions.md b/buildinstructions.md index 717c8bd22..43c085761 100644 --- a/buildinstructions.md +++ b/buildinstructions.md @@ -1,5 +1,5 @@ # Build instructions -In general please follow the build instructions as described in [readme.md](readme.md). Here you will find a brief overview about what is needed to build your own development environment without further explanations. +In general please follow the build instructions as described in [README.md](README.md). Here you will find a brief overview about what is needed to build your own development environment without further explanations. ## Setup on OS X ### Prerequisites * install python 3.10 @@ -89,5 +89,5 @@ pyinstaller --clean pronterface.spec -y >[!TIP] Please find further informations about building a development environment and packaging in script [release_windows.bat](release_windows.bat) where we implemented an automated build for windows. ### Remark: ->[^1] The library **polygon3** is free for non commercial use. You can build Pronterface without this library - but then it will run slower. ->Please find further details regarding license here: https://pypi.org/project/Polygon3/ \ No newline at end of file +>[^1]: The library **polygon3** is free for non commercial use. You can build Pronterface without this library - but then it will run slower. +>Please find further details regarding license here: https://pypi.org/project/Polygon3/ From b49b5b5fcffbdbf84cc15d8d2fdb9de64af2dfe0 Mon Sep 17 00:00:00 2001 From: DivingDuck Date: Tue, 9 Jan 2024 20:29:02 +0100 Subject: [PATCH 13/13] remove Python 3.7 support --- .github/workflows/buildpackage-win.yml | 11 ++++++----- .github/workflows/pypi-win.yml | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/buildpackage-win.yml b/.github/workflows/buildpackage-win.yml index 96e8f12a2..21eb263d7 100644 --- a/.github/workflows/buildpackage-win.yml +++ b/.github/workflows/buildpackage-win.yml @@ -16,7 +16,8 @@ jobs: os: [windows-latest] # supported architecture: [x64, x86] architecture: [x86, x64] - # supported versions: ['3.7', '3.8', '3.9', '3.10', '3.11'] + # supported versions: ['3.8', '3.9', '3.10', '3.11'] + # for x86 only Python 3.9 to 3.11 is supported python-version: ['3.10'] steps: @@ -32,16 +33,16 @@ jobs: python -m pip install --upgrade pip pyinstaller setuptools wheel simplejson polygon3 cython -r requirements.txt - name: Update to wxPython latest Version for x86 - # Latest development version for x32 and Python 3.7 to 3.10, can be removed if requirements.txt is fixed + # Latest development version for x32 and Python 3.9 to 3.11, can be removed if requirements.txt is fixed # minimum version for x86 needs to be wxPython >= 4.2.1 (2023-11-20) - if: ${{ matrix.architecture == 'x86' && matrix.python-version >= '3.7' }} + if: ${{ matrix.architecture == 'x86' && matrix.python-version >= '3.9' }} run: | #python -m pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython==4.2.2a1.dev5626+a1184286 #python -m pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython python -m pip install -U wxPython - name: Update to wxPython latest Version for x64 - # Latest development version for x64 and Python 3.7 to 3.10, can be removed if requirements.txt is fixed - if: ${{ matrix.architecture == 'x64' && matrix.python-version >= '3.7' }} + # Latest development version for x64 and Python 3.8 to 3.11, can be removed if requirements.txt is fixed + if: ${{ matrix.architecture == 'x64' && matrix.python-version >= '3.8' }} run: | #python -m pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython==4.2.2a1.dev5626+a1184286 #python -m pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython diff --git a/.github/workflows/pypi-win.yml b/.github/workflows/pypi-win.yml index c891eb0f7..31a4874e9 100644 --- a/.github/workflows/pypi-win.yml +++ b/.github/workflows/pypi-win.yml @@ -15,7 +15,7 @@ jobs: matrix: os: [windows-latest] architecture: [x64, x86] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - name: Checkout