2022-04-13 21:10:51 +00:00
|
|
|
#!/bin/sh
|
2022-01-14 18:41:46 +00:00
|
|
|
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
|
2022-03-24 22:25:24 +00:00
|
|
|
DIR=/tmp/appdwarf/wine
|
2021-12-31 19:37:50 +00:00
|
|
|
mkdir -p $DIR
|
|
|
|
|
2022-01-01 18:11:03 +00:00
|
|
|
LINK="$(curl https://api.github.com/repos/Kron4ek/Wine-Builds/releases | grep -om1 http.\*-staging-tkg-amd64.tar.xz)"
|
2022-06-20 14:43:39 +00:00
|
|
|
[ "$1" = "proton" ] && LINK="$(curl https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases | grep -om1 http.\*tar.gz)" && shift
|
|
|
|
curl -L "$LINK" | bsdtar xf - -C$DIR
|
|
|
|
mv $DIR/wine*/* $DIR/GE-Proton*/files/* $DIR
|
|
|
|
rm -rf $DIR/wine*/ $DIR/GE-Proton*/
|
2021-12-31 19:37:50 +00:00
|
|
|
|
2022-06-20 14:43:39 +00:00
|
|
|
wget -O$DIR/bin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
|
|
|
|
chmod +x $DIR/bin/winetricks
|
2021-12-31 19:37:50 +00:00
|
|
|
|
|
|
|
cat > $DIR/AppRun << 'EOF'
|
2022-04-13 21:10:51 +00:00
|
|
|
#!/bin/sh
|
2022-06-20 14:43:39 +00:00
|
|
|
export WINE="$APPDIR"/bin/wine
|
|
|
|
export WINE64="$WINE"64 WINESERVER="$WINE"server WINETRICKS="$WINE"tricks
|
2021-12-31 19:37:50 +00:00
|
|
|
export DXVK_STATE_CACHE_PATH=~/.cache DXVK_LOG_PATH=none
|
|
|
|
|
2022-06-20 14:43:39 +00:00
|
|
|
[ "$1" = "winetricks" ] && shift && exec "$WINETRICKS" "$@"
|
|
|
|
"$WINE64" "$@"
|
|
|
|
"$WINESERVER" -w
|
2021-12-31 19:37:50 +00:00
|
|
|
EOF
|
|
|
|
chmod +x $DIR/AppRun
|
|
|
|
|
2022-04-13 21:10:51 +00:00
|
|
|
appdwarf $DIR "$@"
|
2021-12-31 19:37:50 +00:00
|
|
|
rm -r $DIR
|
2022-01-01 18:11:03 +00:00
|
|
|
mv $DIR.sh wine
|