From bccb65c655d486e6cee85a24bff7747f2c9b1300 Mon Sep 17 00:00:00 2001 From: gOOvER <116325+gOOvER@users.noreply.github.com> Date: Thu, 26 Dec 2024 09:06:01 +0100 Subject: [PATCH] experimental wine mono download from github --- .github/workflows/depotdl.yml | 2 +- depotdl/entrypoint.sh | 52 +++++++++++++++++++++++ {wine/depotdl => depotdl/wine}/Dockerfile | 0 3 files changed, 53 insertions(+), 1 deletion(-) rename {wine/depotdl => depotdl/wine}/Dockerfile (100%) diff --git a/.github/workflows/depotdl.yml b/.github/workflows/depotdl.yml index 7273a34..22b2a71 100644 --- a/.github/workflows/depotdl.yml +++ b/.github/workflows/depotdl.yml @@ -23,7 +23,7 @@ jobs: matrix: distro: - debian - #- wine + - wine steps: - uses: actions/checkout@v4 diff --git a/depotdl/entrypoint.sh b/depotdl/entrypoint.sh index 57bb672..5c19bc9 100644 --- a/depotdl/entrypoint.sh +++ b/depotdl/entrypoint.sh @@ -60,6 +60,58 @@ else echo -e "${BLUE}---------------------------------------------------------------${NC}" fi +# Wine Part +if [[ $XVFB == 1 ]]; then + Xvfb :0 -screen 0 ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}x${DISPLAY_DEPTH} & +fi + +# Install necessary to run packages +echo -e "${BLUE}---------------------------------------------------------------------${NC}" +echo -e "${RED}First launch will throw some errors. Ignore them${NC}" +echo -e "${BLUE}---------------------------------------------------------------------${NC}" +mkdir -p $WINEPREFIX + +# Check if wine-gecko required and install it if so +if [[ $WINETRICKS_RUN =~ gecko ]]; then + echo -e "${BLUE}---------------------------------------------------------------------${NC}" + echo -e "${YELLOW}Installing Wine Gecko${NC}" + echo -e "${BLUE}---------------------------------------------------------------------${NC}" + WINETRICKS_RUN=${WINETRICKS_RUN/gecko} + + if [ ! -f "$WINEPREFIX/gecko_x86.msi" ]; then + wget -q -O $WINEPREFIX/gecko_x86.msi http://dl.winehq.org/wine/wine-gecko/2.47.4/wine_gecko-2.47.4-x86.msi + fi + + if [ ! -f "$WINEPREFIX/gecko_x86_64.msi" ]; then + wget -q -O $WINEPREFIX/gecko_x86_64.msi http://dl.winehq.org/wine/wine-gecko/2.47.4/wine_gecko-2.47.4-x86_64.msi + fi + + wine msiexec /i $WINEPREFIX/gecko_x86.msi /qn /quiet /norestart /log $WINEPREFIX/gecko_x86_install.log + wine msiexec /i $WINEPREFIX/gecko_x86_64.msi /qn /quiet /norestart /log $WINEPREFIX/gecko_x86_64_install.log +fi + +# Check if wine-mono required and install it if so +if [[ $WINETRICKS_RUN =~ mono ]]; then + echo -e "${BLUE}---------------------------------------------------------------------${NC}" + echo -e "${YELLOW}Installing Wine Mono${NC}" + echo -e "${BLUE}---------------------------------------------------------------------${NC}" + WINETRICKS_RUN=${WINETRICKS_RUN/mono} + + if [ ! -f "$WINEPREFIX/mono.msi" ]; then + curl -sLOJ -o $WINEPREFIX/mono.msi $(curl -s https://api.github.com/repos/madewokherd/wine-mono/releases/latest | grep browser_download_url | cut -d\" -f4 | egrep x86.msi) + fi + + wine msiexec /i $WINEPREFIX/mono.msi /qn /quiet /norestart /log $WINEPREFIX/mono_install.log +fi + +# List and install other packages +for trick in $WINETRICKS_RUN; do + echo -e "${BLUE}---------------------------------------------------------------------${NC}" + echo -e "${YELLOW}Installing: ${NC} ${GREEN} $trick ${NC}" + echo -e "${BLUE}---------------------------------------------------------------------${NC}" + winetricks -q $trick +done + # Replace Startup Variables MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') echo -e ":/home/container$ ${MODIFIED_STARTUP}" diff --git a/wine/depotdl/Dockerfile b/depotdl/wine/Dockerfile similarity index 100% rename from wine/depotdl/Dockerfile rename to depotdl/wine/Dockerfile