From aef3138cddeff78a7e5ead4f225017d95fbf7955 Mon Sep 17 00:00:00 2001 From: Pepe44DEV Date: Sun, 6 Sep 2026 22:45:43 +0000 Subject: [PATCH] CI: Windows-Build und Installer ueber Wine-Docker-Image (kein Windows-Runner noetig) --- .gitea/workflows/build.yml | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 52f4ee5..f95d771 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -8,34 +8,22 @@ on: jobs: build: - runs-on: windows-latest + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Install dependencies + - name: Build EXE + Installer (Wine) run: | - python -m pip install --upgrade pip - python -m pip install -r requirements-build.txt - python scripts\make_icon.py - - - name: Build EXE (PyInstaller) - run: | - python -m PyInstaller --noconfirm --clean --onefile --windowed --name PulseGate --icon assets\pulsegate.ico desktop\pulsegate_desktop.py - Get-Item dist\PulseGate.exe | Select-Object FullName, Length - - - name: Install Inno Setup - shell: bash - run: | - choco install innosetup --no-progress --yes - - - name: Build installer - run: iscc installer\installer.iss + docker pull cdrx/pyinstaller-windows:python3 + docker run --rm -v "$(pwd):/src" -e SRCDIR=/src cdrx/pyinstaller-windows:python3 \ + "pyinstaller --clean -y --noconfirm --onefile --windowed --name PulseGate --icon assets/pulsegate.ico --distpath dist/windows --workpath /tmp desktop/pulsegate_desktop.py; \ + cp dist/windows/PulseGate.exe dist/PulseGate.exe; \ + apt-get update -qq >/dev/null 2>&1 && apt-get install -y -qq xvfb >/dev/null 2>&1; \ + curl -sL -o /tmp/is.exe https://github.com/jrsoftware/issrc/releases/download/is-7_1_0/innosetup-7.1.0-x64.exe; \ + xvfb-run -a wine /tmp/is.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART; \ + cd /src/installer && xvfb-run -a wine '/wine/drive_c/Program Files/Inno Setup 7/ISCC.exe' 'Z:\src\installer\installer.iss'; \ + chown -R $(id -u):$(id -g) /src/dist /src/installer/output" - name: Upload artifacts uses: actions/upload-artifact@v4