Enhance entrypoint script: increase wait time for Xvfb, streamline Wine initialization, and improve Wine test handling
This commit is contained in:
@@ -17,7 +17,7 @@ Xvfb :99 -screen 0 1024x768x16 -ac &
|
|||||||
export DISPLAY=:99.0
|
export DISPLAY=:99.0
|
||||||
|
|
||||||
# Wait for Xvfb to start
|
# Wait for Xvfb to start
|
||||||
sleep 3
|
sleep 5
|
||||||
|
|
||||||
# Force reinitialize Wine prefix to ensure it's properly set up
|
# Force reinitialize Wine prefix to ensure it's properly set up
|
||||||
echo "Reinitializing Wine prefix to ensure proper setup..."
|
echo "Reinitializing Wine prefix to ensure proper setup..."
|
||||||
@@ -26,27 +26,27 @@ rm -rf "$WINEPREFIX"
|
|||||||
# Set Wine architecture to 64-bit
|
# Set Wine architecture to 64-bit
|
||||||
export WINEARCH=win64
|
export WINEARCH=win64
|
||||||
|
|
||||||
# Set Wine to run in headless mode
|
# Initialize Wine prefix synchronously
|
||||||
export WINE_VNC_NOVNC=1
|
|
||||||
export WINE_VNC_DEPTH=16
|
|
||||||
|
|
||||||
# Initialize Wine prefix with minimal configuration
|
|
||||||
echo "Creating new Wine prefix..."
|
echo "Creating new Wine prefix..."
|
||||||
wineboot --init 2>/dev/null &
|
wineboot --init
|
||||||
|
|
||||||
# Wait for wineboot process to complete
|
# Wait for initialization to complete
|
||||||
sleep 15
|
sleep 10
|
||||||
|
|
||||||
# Kill any remaining Wine processes
|
# Install basic Windows components
|
||||||
pkill -f wine
|
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..."
|
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
|
if [ $? -eq 0 ]; then
|
||||||
echo "Wine initialization complete and verified."
|
echo "Wine initialization complete and verified."
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
# print the dotnet version on startup
|
# print the dotnet version on startup
|
||||||
|
Reference in New Issue
Block a user