From bb24a490844af14c55f537d0bf26565d8fc8a3e1 Mon Sep 17 00:00:00 2001 From: LemonPi314 <49930425+LemonPi314@users.noreply.github.com> Date: Sun, 13 Mar 2022 14:54:51 -0400 Subject: [PATCH] Add x86 build workflow --- .../workflows/pyinstaller-build-windows.yaml | 32 +++++++++++++++ build-x86.spec | 40 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 build-x86.spec diff --git a/.github/workflows/pyinstaller-build-windows.yaml b/.github/workflows/pyinstaller-build-windows.yaml index 3c2707c..e21b737 100644 --- a/.github/workflows/pyinstaller-build-windows.yaml +++ b/.github/workflows/pyinstaller-build-windows.yaml @@ -18,12 +18,19 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.9 + architecture: x64 - name: Install Dependencies run: | python -m pip install --upgrade pip wheel setuptools pyinstaller (test -f requirements.txt && pip install -r requirements.txt) || echo "'requirements.txt' does not exist, skipping dependency installation" + # temporary + - name: print python version + run: | + python --version + where.exe pyinstaller + - name: Install UPX run: | Invoke-WebRequest https://github.com/upx/upx/releases/download/v3.96/upx-3.96-win64.zip -OutFile ./upx-3.96-win64.zip @@ -38,6 +45,31 @@ jobs: run: | Copy-Item ./dist/windows/dvd-screensaver.exe -Destination ./dist/windows/dvd-screensaver.scr + - name: Set Up Python Environment (x86) + uses: actions/setup-python@v2 + with: + python-version: 3.9 + architecture: x86 + + - name: Install Dependencies (x86) + run: | + python -m pip install --upgrade pip wheel setuptools pyinstaller + (test -f requirements.txt && pip install -r requirements.txt) || echo "'requirements.txt' does not exist, skipping dependency installation" + + # temporary + - name: print python version (x86) + run: | + python --version + where.exe pyinstaller + + - name: Build Windows Executable (x86) + run: | + pyinstaller --clean -y --dist ./dist/windows --upx-dir . build-x86.spec + + - name: Create SCR File (x86) + run: | + Copy-Item ./dist/windows/dvd-screensaver-x86.exe -Destination ./dist/windows/dvd-screensaver-x86.scr + - name: Release uses: softprops/action-gh-release@v1 with: diff --git a/build-x86.spec b/build-x86.spec new file mode 100644 index 0000000..75b035f --- /dev/null +++ b/build-x86.spec @@ -0,0 +1,40 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis(['dvd-screensaver.py', 'config.py'], + pathex=[], + binaries=[], + datas=[('images', 'images')], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) + +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='dvd-screensaver-x86', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, + disable_windowed_traceback=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None )