Enhance entrypoint script: add wait time for Xvfb and ensure Wine components are installed correctly during initialization
This commit is contained in:
@@ -12,12 +12,31 @@ export DOTNET_ROOT=/usr/share/
|
|||||||
Xvfb :99 -screen 0 1024x768x16 &
|
Xvfb :99 -screen 0 1024x768x16 &
|
||||||
export DISPLAY=:99.0
|
export DISPLAY=:99.0
|
||||||
|
|
||||||
|
# Wait for Xvfb to start
|
||||||
|
sleep 2
|
||||||
|
|
||||||
# Initialize Wine prefix if it doesn't exist
|
# Initialize Wine prefix if it doesn't exist
|
||||||
if [ ! -d "$WINEPREFIX" ]; then
|
if [ ! -d "$WINEPREFIX" ]; then
|
||||||
echo "Initializing Wine prefix..."
|
echo "Initializing Wine prefix..."
|
||||||
wineboot --init
|
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."
|
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
|
fi
|
||||||
|
|
||||||
# print the dotnet version on startup
|
# print the dotnet version on startup
|
||||||
|
Reference in New Issue
Block a user