From bb4b60ce61920ecc0edbf370c3dd9e3d5d560378 Mon Sep 17 00:00:00 2001 From: Sudo-Ivan Date: Wed, 14 Jan 2026 19:30:17 -0600 Subject: [PATCH] Add Wine environment setup for building Windows applications - Introduced a new job step in the build workflow to set up a Wine environment. - Downloaded and installed Windows Python and Git within Wine. - Configured Wine to install necessary build dependencies using pip. - Enhanced the build process for the Electron app targeting Windows platforms. --- .gitea/workflows/build.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 33dbea9..b3801ce 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -108,6 +108,29 @@ jobs: continue-on-error: true run: task build-flatpak + - name: Setup Wine Environment + env: + WINEDEBUG: -all + WINEARCH: win64 + run: | + echo "Downloading Windows Python and Git..." + wget -q https://www.python.org/ftp/python/3.13.1/python-3.13.1-amd64.exe + wget -q https://github.com/git-for-windows/git/releases/download/v2.52.0.windows.1/Git-2.52.0-64-bit.exe + + echo "Initializing Wine prefix..." + wine wineboot --init + + echo "Installing Python 3.13 into Wine..." + wine python-3.13.1-amd64.exe /quiet InstallAllUsers=1 TargetDir=C:\Python313 PrependPath=1 + + echo "Installing Git into Wine..." + wine Git-2.52.0-64-bit.exe /VERYSILENT /NORESTART + + echo "Installing build dependencies in Wine Python..." + wine C:/Python313/python.exe -m pip install --upgrade pip + wine C:/Python313/python.exe -m pip install cx_Freeze poetry + wine C:/Python313/python.exe -m pip install -r requirements.txt + - name: Build Electron App (Windows EXE and NSIS) env: WINEDEBUG: -all