try it this way

This commit is contained in:
John Kleinschmidt
2026-03-27 08:18:24 -04:00
parent df4a22eae4
commit ef368f377f

View File

@@ -68,21 +68,20 @@ runs:
export WINEPREFIX="$HOME/.wine"
mkdir -p "$WINEPREFIX"
echo "WINEPREFIX=$WINEPREFIX" >> $GITHUB_ENV
# Start a persistent Xvfb server for wine (xvfb-run per-invocation hangs
# because wineserver keeps the X connection alive)
export XDG_RUNTIME_DIR=/tmp/runtime-$(whoami)
echo "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR" >> $GITHUB_ENV
mkdir -p "$XDG_RUNTIME_DIR"
Xvfb :99 -screen 0 1024x768x24 &
export DISPLAY=:99.0
echo "DISPLAY=:99.0" >> $GITHUB_ENV
# Initialize wine prefix to avoid first-run delays during build
"$WINE_PATH" wineboot --init 2>/dev/null || true
"$WINE_PATH" wineboot --update
# Pass wine path to GN so siso can find it regardless of PATH
GN_APPENDED_ARGS="$GN_EXTRA_ARGS v8_wine_path=\"$WINE_PATH\""
# Create a wrapper script so v8_wine_path is a single path without spaces
# (GN_EXTRA_ARGS is split on spaces, so a value like "xvfb-run /usr/bin/wine" breaks GN arg parsing)
WINE_WRAPPER="/usr/local/bin/xvfb-wine"
printf '#!/bin/sh\nxvfb-run %s "$@"\nSTATUS=$?\nwineboot -k\nexit $STATUS\n' "$WINE_PATH" | sudo tee "$WINE_WRAPPER" > /dev/null
sudo chmod +x "$WINE_WRAPPER"
GN_APPENDED_ARGS="$GN_EXTRA_ARGS v8_wine_path=\"$WINE_WRAPPER\""
echo "GN_EXTRA_ARGS=$GN_APPENDED_ARGS" >> $GITHUB_ENV
echo "GN APPENDED_ARGS set with wine path: $GN_APPENDED_ARGS"
export XDG_RUNTIME_DIR=/tmp/runtime-$(whoami)
mkdir -p "$XDG_RUNTIME_DIR"
echo "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR" >> $GITHUB_ENV
echo "DISPLAY=:99.0" >> $GITHUB_ENV
# - name: Download mksnapshot.zip
# shell: bash
# if: ${{ inputs.target-platform == 'win' }}