fix(workflow): enhance Windows build process by adding missing dependencies and using xvfb-run
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user