diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index fada83c..d9c8366 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -9,7 +9,7 @@ jobs: flatpak: runs-on: ubuntu-latest container: - image: bilelmoussaoui/flatpak-github-actions:gnome-47 + image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48 options: --privileged steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/pyinstaller-linux.yml b/.github/workflows/pyinstaller-linux.yml new file mode 100644 index 0000000..0446641 --- /dev/null +++ b/.github/workflows/pyinstaller-linux.yml @@ -0,0 +1,25 @@ +name: PyInstaller Build Linux + +on: + push: + branches: [main] + pull_request: + +jobs: + pyinstaller-linux: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: python3-gi gir1.2-gtk-4.0 gir1.2-adw-1 + version: 0 + - run: pip install pyinstaller + - run: pip install . + - run: pyinstaller yafi.spec + working-directory: pyinstaller + - name: Upload PyInstaller Artifact + uses: actions/upload-artifact@v4 + with: + path: pyinstaller/dist/YAFI + name: yafi-linux-${{ github.sha }} diff --git a/pyinstaller/winyafi.py b/pyinstaller/entrypoint.py similarity index 93% rename from pyinstaller/winyafi.py rename to pyinstaller/entrypoint.py index f71916c..3cd7bbc 100644 --- a/pyinstaller/winyafi.py +++ b/pyinstaller/entrypoint.py @@ -1,5 +1,5 @@ -import os -os.environ["GDK_SCALE"] = "2" - -from yafi import main -main() +import os +os.environ["GDK_SCALE"] = "2" + +from yafi import main +main() diff --git a/pyinstaller/winyafi.spec b/pyinstaller/yafi.spec similarity index 85% rename from pyinstaller/winyafi.spec rename to pyinstaller/yafi.spec index a3f6335..747b261 100755 --- a/pyinstaller/winyafi.spec +++ b/pyinstaller/yafi.spec @@ -1,44 +1,44 @@ -# -*- mode: python ; coding: utf-8 -*- -from PyInstaller.utils.hooks import collect_data_files - -datas = [('LpcCrOSEC.bin', '.')] -datas += collect_data_files('yafi') - - -a = Analysis( - ['winyafi.py'], - pathex=[], - binaries=[], - datas=datas, - hiddenimports=['cros_ec_python'], - hookspath=[], - hooksconfig={"gi":{"module-versions": {"Gtk": "4.0"}}}, - runtime_hooks=[], - excludes=[], - noarchive=False, - optimize=2, -) -pyz = PYZ(a.pure) - -exe = EXE( - pyz, - a.scripts, - a.binaries, - a.datas, - [], - name='winyafi', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=False, - disable_windowed_traceback=False, - argv_emulation=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None, - icon=['yafi.ico'], - uac_admin=True, -) +# -*- mode: python ; coding: utf-8 -*- +from PyInstaller.utils.hooks import collect_data_files +import os + +datas = [('LpcCrOSEC.bin', '.')] if os.path.exists('LpcCrOSEC.bin') else [] +datas += collect_data_files('yafi') + + +a = Analysis( + ['entrypoint.py'], + pathex=[], + binaries=[], + datas=datas, + hiddenimports=['cros_ec_python'], + hookspath=[], + hooksconfig={"gi":{"module-versions": {"Gtk": "4.0"}}}, + runtime_hooks=[], + excludes=[], + noarchive=False, + optimize=2, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='YAFI', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, + icon=['yafi.ico'], +)