diff --git a/entrypoint.sh b/entrypoint.sh index 22d0135..f5673d9 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -17,7 +17,7 @@ Xvfb :99 -screen 0 1024x768x16 -ac & export DISPLAY=:99.0 # Wait for Xvfb to start -sleep 3 +sleep 5 # Force reinitialize Wine prefix to ensure it's properly set up echo "Reinitializing Wine prefix to ensure proper setup..." @@ -26,27 +26,27 @@ rm -rf "$WINEPREFIX" # Set Wine architecture to 64-bit export WINEARCH=win64 -# Set Wine to run in headless mode -export WINE_VNC_NOVNC=1 -export WINE_VNC_DEPTH=16 - -# Initialize Wine prefix with minimal configuration +# Initialize Wine prefix synchronously echo "Creating new Wine prefix..." -wineboot --init 2>/dev/null & +wineboot --init -# Wait for wineboot process to complete -sleep 15 +# Wait for initialization to complete +sleep 10 -# Kill any remaining Wine processes -pkill -f wine +# Install basic Windows components +echo "Installing basic Windows components..." +winetricks -q corefonts vcrun2019 -# Try a simple Wine command to verify it works +# Test Wine installation echo "Testing Wine installation..." -timeout 30 wine cmd /c "echo Wine test successful" 2>/dev/null +wine cmd /c "echo Wine test successful" if [ $? -eq 0 ]; then echo "Wine initialization complete and verified." else - echo "Wine test failed, but continuing anyway..." + echo "Wine test failed, trying alternative approach..." + # Try to create a minimal working Wine environment + wine regedit /s /dev/null 2>/dev/null + wine cmd /c "echo Fallback Wine test" fi # print the dotnet version on startup