fix(workflow): enhance Windows build process by adding missing dependencies and using xvfb-run
Desktop Client Build / Resolve Build Metadata (push) Successful in 30s
Desktop Client Build / Build Desktop Client (push) Successful in 23m52s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 46s

This commit is contained in:
2026-05-06 23:13:53 +08:00
parent fcc9df0d34
commit e24f1f0802
+12 -4
View File
@@ -395,13 +395,20 @@ jobs:
if: needs.resolve.outputs.build_win == 'true'
run: |
set -eu
if command -v wine >/dev/null 2>&1; then
if command -v wine >/dev/null 2>&1 && command -v xvfb-run >/dev/null 2>&1; then
wine --version
exit 0
if dpkg --print-foreign-architectures | grep -qx i386 && dpkg -s wine32:i386 >/dev/null 2>&1; then
exit 0
fi
fi
dpkg --add-architecture i386
apt-get update
apt-get install -y --no-install-recommends wine64 wine
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
wine \
wine64 \
wine32:i386 \
xvfb
wine --version
- name: Build unsigned desktop packages
@@ -421,7 +428,8 @@ jobs:
fi
if [ "${BUILD_WIN}" = "true" ]; then
pnpm exec electron-builder --win zip ${WIN_ARCH_FLAGS} --publish never -c.win.target=zip -c.extraMetadata.version="${CLIENT_VERSION}"
xvfb-run -a --server-args="-screen 0 1024x768x24" \
pnpm exec electron-builder --win zip ${WIN_ARCH_FLAGS} --publish never -c.win.target=zip -c.extraMetadata.version="${CLIENT_VERSION}"
fi
- name: Collect desktop artifacts