File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 options : --privileged
1414 steps :
1515 - uses : actions/checkout@v4
16- - uses : flatpak/flatpak-github-actions/flatpak-builder@v6
16+ - name : Build Flatpak
17+ uses : flatpak/flatpak-github-actions/flatpak-builder@v6
1718 with :
1819 bundle : yafi-${{ github.sha }}.flatpak
1920 manifest-path : au.stevetech.yafi.json
Original file line number Diff line number Diff line change 77
88jobs :
99 pyinstaller-linux :
10- runs-on : ubuntu-24.04
10+ runs-on : ubuntu-latest
1111 steps :
1212 - uses : actions/checkout@v4
13- - uses : awalsh128/cache-apt-pkgs-action@latest
13+ # We shouldn't use actions/setup-python since PyGObject is compiled against the system Python
14+ - name : Install System Dependencies
15+ uses : awalsh128/cache-apt-pkgs-action@latest
1416 with :
1517 packages : python3-gi gir1.2-gtk-4.0 gir1.2-adw-1
1618 version : 0
17- - run : pip install pyinstaller
18- - run : pip install .
19- - run : pyinstaller yafi.spec
19+ - name : Install PyInstaller
20+ run : pip install pyinstaller
21+ - name : Build YAFI via Pip
22+ run : pip install .
23+ - name : Build with PyInstaller
24+ run : pyinstaller yafi.spec
2025 working-directory : pyinstaller
2126 - name : Upload PyInstaller Artifact
2227 uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change 1+ name : PyInstaller Build Linux
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+
8+ jobs :
9+ pyinstaller-linux :
10+ runs-on : windows-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ - uses : actions/setup-python@v5
14+ with :
15+ python-version : ' 3.13'
16+ cache : ' pip'
17+
18+ - name : Cache GTK4
19+ id : cache-gtk4
20+ uses : actions/cache@v4
21+ with :
22+ path : C:\gtk
23+ key : Gvsbuild_2025.8.0
24+
25+ - name : Download GTK4 Gvsbuild zip
26+ if : steps.cache-gtk4.outputs.cache-hit != 'true'
27+ run : Start-BitsTransfer -Source https://github.com/wingtk/gvsbuild/releases/download/2025.8.0/GTK4_Gvsbuild_2025.8.0_x64.zip -Destination Gvsbuild.zip
28+
29+ - name : Extract Gvsbuild zip
30+ if : steps.cache-gtk4.outputs.cache-hit != 'true'
31+ run : Expand-Archive -Path Gvsbuild.zip -DestinationPath C:\gtk -Force
32+
33+ - name : Install PyGObject wheel
34+ run : pip install --force-reinstall (Resolve-Path C:\gtk\wheels\PyGObject*.whl) (Resolve-Path C:\gtk\wheels\pycairo*.whl)
35+
36+ - name : Add GTK bin to PATH
37+ run : echo "C:\gtk\bin" | Out-File -Append -Encoding ascii $env:GITHUB_PATH
38+
39+ - name : Install PyInstaller
40+ run : pip install pyinstaller
41+
42+ - name : Build YAFI via Pip
43+ run : pip install .
44+
45+ - name : Build with PyInstaller
46+ run : python -m PyInstaller yafi.spec
47+ working-directory : pyinstaller
48+
49+ - name : Upload PyInstaller Artifact
50+ uses : actions/upload-artifact@v4
51+ with :
52+ path : pyinstaller/dist/YAFI.exe
53+ name : yafi-windows-${{ github.sha }}
Original file line number Diff line number Diff line change 11import os
2- os .environ ["GDK_SCALE" ] = "2"
2+ if os .name == 'nt' and os .environ .get ('GDK_SCALE' ) is None :
3+ import ctypes
4+ scale_factor = ctypes .windll .shcore .GetScaleFactorForDevice (0 )
5+ os .environ ["GDK_SCALE" ] = f"{ scale_factor // 100 } "
36
47from yafi import main
58main ()
You can’t perform that action at this time.
0 commit comments