mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-10-23 05:32:22 +00:00
Add Wine setup task and update build workflows
- Introduced a new task for setting up the Wine environment for Windows cross-builds in Taskfile.yml. - Updated build-test.yml and build.yml workflows to include 'xvfb' in the Wine installation command for improved compatibility. - Refactored the Wine setup process in the build workflow to utilize the new task instead of inline commands, enhancing maintainability.
This commit is contained in:
3 files changed
+9
-24
No files matched your search
@@ -40,7 +40,7 @@ jobs:
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y wine32:i386 wine64 patchelf libopusfile0 ffmpeg espeak-ng nsis zip rpm flatpak flatpak-builder elfutils appstream appstream-util
|
||||
sudo apt-get install -y wine32:i386 wine64 xvfb patchelf libopusfile0 ffmpeg espeak-ng nsis zip rpm flatpak flatpak-builder elfutils appstream appstream-util
|
||||
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
# Install runtimes required for Flatpak build
|
||||
flatpak install --user -y flathub org.freedesktop.Platform//24.08 org.freedesktop.Sdk//24.08 org.electronjs.Electron2.BaseApp//24.08
|
||||
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y wine32:i386 wine64 patchelf libopusfile0 ffmpeg espeak-ng nsis zip rpm flatpak flatpak-builder elfutils
|
||||
sudo apt-get install -y wine32:i386 wine64 xvfb patchelf libopusfile0 ffmpeg espeak-ng nsis zip rpm flatpak flatpak-builder elfutils
|
||||
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
|
||||
- name: Setup Task
|
||||
@@ -109,32 +109,12 @@ jobs:
|
||||
run: task dist:fe: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
|
||||
run: task setup:wine
|
||||
|
||||
- name: Build Electron App (Windows EXE and NSIS)
|
||||
env:
|
||||
WINEDEBUG: -all
|
||||
WINE_PYTHON: "wine C:/Python313/python.exe"
|
||||
WINE_PYTHON: "xvfb-run wine C:/Python313/python.exe"
|
||||
run: task dist:win:wine
|
||||
|
||||
- name: Prepare release assets
|
||||
|
||||
@@ -62,6 +62,11 @@ tasks:
|
||||
desc: Install all dependencies (frontend and backend)
|
||||
deps: [deps:fe, deps:be]
|
||||
|
||||
setup:wine:
|
||||
desc: Setup Wine environment for Windows cross-builds
|
||||
cmds:
|
||||
- ./scripts/setup_wine_env.sh
|
||||
|
||||
deps:fe:
|
||||
desc: Install Node.js dependencies
|
||||
cmds:
|
||||
|
||||
Reference in new issue
Block a user