mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 13:05:47 +00:00
fix(bionic): start a program outside the prefix from a drive whose root Android lets Wine open
This commit is contained in:
1 parent
f9eeef44ed
commit
e6370e1ff7
2 files changed
+93
No files matched your search
@@ -224,6 +224,32 @@ drive_z() {
|
||||
rm -f "$z" && ln -s / "$z" && echo "$(date +%H:%M:%S) drive z: -> / (was ${old:-missing})"
|
||||
}
|
||||
|
||||
program_drive() {
|
||||
dev=$COMPAT/pfx/dosdevices
|
||||
case "$EXE" in /*) ;; *) return 0 ;; esac
|
||||
[ -d "$dev" ] || return 0
|
||||
dir=${EXE%/*}
|
||||
top=$dir
|
||||
ls "$top" > /dev/null 2>&1 || return 0
|
||||
while [ "$top" != / ]; do
|
||||
up=${top%/*}; up=${up:-/}
|
||||
ls "$up" > /dev/null 2>&1 || break
|
||||
top=$up
|
||||
done
|
||||
[ "$top" = / ] && return 0
|
||||
for l in "$dev"/[a-y]:; do
|
||||
[ -L "$l" ] || continue
|
||||
t=$(readlink "$l"); t=${t%/}
|
||||
case "$t" in /?*) ;; *) continue ;; esac
|
||||
case "$dir/" in "$t"/*) case "$t/" in "$top"/*) return 0 ;; esac ;; esac
|
||||
done
|
||||
for x in d e f g h i j k l m n o p q r t u v w x y; do
|
||||
{ [ -e "$dev/$x:" ] || [ -L "$dev/$x:" ]; } && continue
|
||||
ln -s "$top" "$dev/$x:" && echo "$(date +%H:%M:%S) drive $x: -> $top (Android does not let Wine open Z:'s root)"
|
||||
return 0
|
||||
done
|
||||
}
|
||||
|
||||
prepare_prefix() {
|
||||
P=$COMPAT/pfx
|
||||
drive_z "$P"
|
||||
@@ -344,6 +370,7 @@ if [ $dead -gt 0 ]; then
|
||||
fi
|
||||
|
||||
prepare_prefix
|
||||
program_drive
|
||||
|
||||
# FEX keeps translated code per program in the prefix (AppData/Local/fex-emu/DiskCache) and reuses it with whatever FEX
|
||||
# runs the prefix next. Code cached by another FEX build (DroidDeck-Proton's, or a different FEX picked in the
|
||||
|
||||
Reference in new issue
Block a user