Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove cairosvg and submodule PrintrunGTK3 from windows build process #1400

Merged
merged 15 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 22 additions & 43 deletions .github/workflows/buildpackage-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,74 +14,51 @@ jobs:
strategy:
matrix:
os: [windows-latest]
# remove x86 builds for now as there are no snapshot builds of wxPython available
#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']
# supported architecture: [x64, x86]
architecture: [x86, x64]
# supported versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.10']

steps:
- name: Checkout
uses: actions/checkout@v4
# Import submodule PrintrunGTK3
with:
submodules: recursive

- name: Set up Python
uses: actions/setup-python@v5
with:
architecture: ${{ matrix.architecture }}
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
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 "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' }}
Expand All @@ -102,4 +79,6 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ env.EXE_NAME }}_windows_${{ matrix.architecture }}_py${{ matrix.python-version }}
path: dist/pronterface.exe
path: |
dist/pronterface.exe
dist/pronsole.exe
2 changes: 1 addition & 1 deletion .github/workflows/pypi-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "PrintrunGTK3"]
path = PrintrunGTK3
url = https://github.com/DivingDuck/PrintrunGTK3
1 change: 0 additions & 1 deletion PrintrunGTK3
Submodule PrintrunGTK3 deleted from e26b8d
61 changes: 0 additions & 61 deletions VERSION

This file was deleted.

7 changes: 4 additions & 3 deletions buildinstructions.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line would not be required since there won't be a submodule any more?

git pull
\path\to\python3\python -m venv v3
v3\Scripts\activate
Expand Down
Loading