Skip to content

Commit 39c02f0

Browse files
committed
fix: use MSYS2 pre-built packages for Windows build
- Use mingw-w64-x86_64-python-pillow instead of building from source - Add explicit hidden imports for GTK components - Remove redundant Setup Python step (MSYS2 provides Python)
1 parent 8f4d304 commit 39c02f0

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,35 +177,39 @@ jobs:
177177
- name: Checkout
178178
uses: actions/checkout@v4
179179

180-
- name: Setup Python
181-
uses: actions/setup-python@v5
182-
with:
183-
python-version: '3.11'
184-
185180
- name: Setup MSYS2
186181
uses: msys2/setup-msys2@v2
187182
with:
188183
msystem: MINGW64
189184
update: true
190185
install: >-
191186
mingw-w64-x86_64-gtk3
187+
mingw-w64-x86_64-python
192188
mingw-w64-x86_64-python-gobject
193189
mingw-w64-x86_64-python-cairo
190+
mingw-w64-x86_64-python-pillow
194191
mingw-w64-x86_64-python-pip
192+
mingw-w64-x86_64-python-setuptools
195193
196-
- name: Install Python dependencies
194+
- name: Install PyInstaller
197195
shell: msys2 {0}
198196
run: |
199-
pip install pyinstaller pillow
197+
python -m pip install --no-build-isolation pyinstaller
200198
201199
- name: Build with PyInstaller
202200
shell: msys2 {0}
203201
run: |
204-
pyinstaller --onefile --windowed \
202+
python -m PyInstaller --onefile --windowed \
205203
--name clipse-gui-v${{ needs.generate-changelog.outputs.version }}-windows-x86_64 \
206204
--icon=clipse-gui.png \
207205
--hidden-import=gi \
206+
--hidden-import=gi.repository.Gtk \
207+
--hidden-import=gi.repository.Gdk \
208+
--hidden-import=gi.repository.GLib \
209+
--hidden-import=gi.repository.GdkPixbuf \
210+
--hidden-import=gi.repository.Pango \
208211
--collect-all gi \
212+
--collect-submodules gi \
209213
clipse-gui.py
210214
211215
- name: Upload artifact

0 commit comments

Comments
 (0)