Skip to content

Commit

Permalink
experimental wine mono download from github
Browse files Browse the repository at this point in the history
  • Loading branch information
gOOvER committed Dec 26, 2024
1 parent 0884fc2 commit bccb65c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/depotdl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
matrix:
distro:
- debian
#- wine
- wine

steps:
- uses: actions/checkout@v4
Expand Down
52 changes: 52 additions & 0 deletions depotdl/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
File renamed without changes.

0 comments on commit bccb65c

Please sign in to comment.