mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-11-09 16:36:01 +00:00
41 lines
1.1 KiB
Bash
Executable file
41 lines
1.1 KiB
Bash
Executable file
#!/bin/sh
|
|
# shellcheck source=../appdwarf
|
|
SOURCE=1 . "$(which appdwarf)"
|
|
|
|
VER=Kron4ek/Wine-Builds
|
|
[ "$1" = "-p" ] && PREFIX=1 && shift
|
|
[ "$1" = "lutris" ] && VER=lutris/wine && shift
|
|
[ "$1" = "proton" ] && VER=GloriousEggroll/proton-ge-custom && shift
|
|
|
|
LINK=$(curl -L api.github.com/repos/$VER/releases | jq .[0].assets[1] | grep -om1 git.\*tar..z)
|
|
unarc
|
|
mv "$DIR"/wine*/* "$DIR"/GE-Proton*/files/* "$DIR"/lutris*/* "$DIR" || true
|
|
rm -r "$DIR"/lib/wine/i386*
|
|
appb
|
|
|
|
t=winetricks
|
|
wget -O"$DIR"/bin/$t github.com/$t/$t/raw/master/src/$t
|
|
chmod +x "$DIR"/bin/$t
|
|
|
|
apprun() {
|
|
export PATH="$APPDIR"/bin:"$PATH"
|
|
export LD_LIBRARY_PATH="$APPDIR"/lib64:"$APPDIR"/lib:"$LD_LIBRARY_PATH"
|
|
|
|
if [ ! "$WINEPREFIX" ]; then
|
|
mkdir -p "$APPDIR.prefix" ~/.wine/work
|
|
fuse-overlayfs -o "lowerdir=$APPDIR/prefix,upperdir=$HOME/.wine,workdir=$HOME/.wine/work" "$APPDIR.prefix"
|
|
export WINEPREFIX="$APPDIR.prefix"
|
|
fi
|
|
|
|
"$APPDIR/bin/$(basename "$ARGV0")" "$@"
|
|
|
|
fusermount -quz "$APPDIR.prefix"
|
|
rmdir "$APPDIR.prefix"
|
|
}
|
|
if [ "$PREFIX" ]; then
|
|
WINEPREFIX="$DIR/prefix" "$DIR/bin/wine" cmd /c exit
|
|
appb
|
|
fi
|
|
|
|
appmk
|