mirror of
https://github.com/Phantop/appdwarf.git
synced 2025-01-08 13:17:24 +00:00
wine: add -p option to include prefix in image
needs fuse-overlayfs for many programs to work properly
This commit is contained in:
parent
e05f9223d0
commit
8bdf108297
24
apps/mkwine
24
apps/mkwine
|
@ -2,11 +2,33 @@
|
|||
. "$(dirname "$0")"/appmk
|
||||
part0
|
||||
VER=Kron4ek/Wine-Builds
|
||||
[ "$1" = "-p" ] && PREFIX=1 && 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" || true
|
||||
t=winetricks; wget -O"$DIR"/bin/$t github.com/$t/$t/raw/master/src/$t
|
||||
chmod +x "$DIR"/bin/$t
|
||||
appb
|
||||
|
||||
if [ $PREFIX ]; then
|
||||
WINEPREFIX="$DIR/prefix" "$DIR/bin/wineboot"
|
||||
cat > "$DIR/AppRun" << 'EOF'
|
||||
#!/bin/sh
|
||||
export PATH="$APPDIR"/bin:"$PATH"
|
||||
export LD_LIBRARY_PATH="$APPDIR"/lib64:"$APPDIR"/lib:"$LD_LIBRARY_PATH"
|
||||
|
||||
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"
|
||||
|
||||
"$APPDIR/bin/$(basename "$ARGV0")" "$@"
|
||||
|
||||
fusermount -quz "$APPDIR.prefix"
|
||||
rmdir "$APPDIR.prefix"
|
||||
EOF
|
||||
chmod +x "$DIR/AppRun"
|
||||
else
|
||||
appb
|
||||
fi
|
||||
|
||||
part9
|
||||
|
|
Loading…
Reference in a new issue