Refactor entrypoint script by removing Wine setup and testing code

This commit is contained in:
2025-07-07 18:23:12 +02:00
parent dd68165b38
commit 2b951a139a
2 changed files with 1 additions and 79 deletions

View File

@@ -9,44 +9,10 @@ export INTERNAL_IP
export DOTNET_ROOT=/usr/share/
export SUBNAUTICA_INSTALLATION_PATH=/home/container/Subnautica
# Fix X11 permissions
mkdir -p /tmp/.X11-unix
chmod 1777 /tmp/.X11-unix
# Start Xvfb for Wine (virtual display)
Xvfb :99 -screen 0 1024x768x16 -ac &
export DISPLAY=:99.0
sleep 3
# Wine configuration
export WINEARCH=win64
export WINEPREFIX=/home/container/.wine
export WINEDLLOVERRIDES="mscoree,mshtml="
# Check if Wine prefix exists, if not copy from template
if [ ! -d "$WINEPREFIX" ]; then
echo "Wine prefix not found, this should not happen in Docker..."
# Fallback: reinitialize if needed
echo "Reinitializing Wine prefix..."
timeout 60 wine wineboot --init || echo "Wine initialization timed out"
sleep 5
fi
# Test if Wine works
echo "Testing Wine..."
if timeout 10 wine cmd /c "echo Wine works"; then
echo "Wine test successful"
else
echo "Wine test failed, but continuing..."
fi
# Print versions
printf "\033[1m\033[33mcontainer@pelican~ \033[0mdotnet --version\n"
dotnet --version
printf "\033[1m\033[33mcontainer@pelican~ \033[0mwine --version\n"
wine --version
# Replace Startup Variables
MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
echo -e ":/home/container$ ${MODIFIED_STARTUP}"