diff --git a/entrypoint.sh b/entrypoint.sh index e2fdb39..24facb6 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -12,12 +12,31 @@ export DOTNET_ROOT=/usr/share/ Xvfb :99 -screen 0 1024x768x16 & export DISPLAY=:99.0 +# Wait for Xvfb to start +sleep 2 + # Initialize Wine prefix if it doesn't exist if [ ! -d "$WINEPREFIX" ]; then echo "Initializing Wine prefix..." wineboot --init - winetricks -q corefonts + + # Wait for wineboot to complete + sleep 5 + + # Install essential Windows components + winetricks -q corefonts vcrun2019 dotnet48 + echo "Wine initialization complete." +else + echo "Wine prefix already exists, checking if it's working..." + # Test if Wine is working properly + if ! wine --version > /dev/null 2>&1; then + echo "Wine prefix seems corrupted, reinitializing..." + rm -rf "$WINEPREFIX" + wineboot --init + sleep 5 + winetricks -q corefonts vcrun2019 dotnet48 + fi fi # print the dotnet version on startup