mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 21:15:43 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5b08ba3bb | ||
|
|
4cc258ef1f | ||
|
|
6b93742e4d | ||
|
|
b9cab09dd4 |
No files matched your search
@@ -35,10 +35,11 @@ GAMESCOPE_COMMIT=8f212644c46460549035971ab914421180f61a7c
|
|||||||
GAMESCOPE_PATCHES="0117-wsi-cache-present-bypass-check.patch 0119-wsi-default-images-under-limiter.patch"
|
GAMESCOPE_PATCHES="0117-wsi-cache-present-bypass-check.patch 0119-wsi-default-images-under-limiter.patch"
|
||||||
VULKAN_HEADERS_TAG=v1.4.341
|
VULKAN_HEADERS_TAG=v1.4.341
|
||||||
# The bionic DroidDeck-Proton layer the pack is made for: linked against (libwayland-client) and checked against, not packed.
|
# The bionic DroidDeck-Proton layer the pack is made for: linked against (libwayland-client) and checked against, not packed.
|
||||||
# Layer v16 (067c719d) plus the ARM64EC code-map fix for 39-bit hosts (d4c9ffa7, run 44291095238).
|
# Layer v18: DroidDeck-Proton 11-14.1 (Valve Wine a47c73f52fd7, as GE-Proton11-14), the build Bannerlator ships; it
|
||||||
LAYER_URL=https://github.com/The412Banner/proton-wine/releases/download/build-bionic-layers-20261118-v16-unwind/DroidDeck-Proton-11.0-12.8-arm64ec.wcp
|
# carries the ARM64EC code-map and unwind fixes the 12.8 layer had (5ebfaa6f, 2515a989, e88fab40).
|
||||||
LAYER_SHA256=3cc74b877bc8707d75aa2cc22e335373b6a6c0b6b1937c7b3c2cd98e55de2e89 # proton-wine d48e30a1 (a188791d + fecf7376 on d4c9ffa7)
|
LAYER_URL=https://github.com/The412Banner/proton-wine/releases/download/build-bionic-layers-20261124-v18/DroidDeck-proton-11.0-14.1-arm64ec.wcp
|
||||||
LAYER_VERSION=12.8
|
LAYER_SHA256=bf94176180e96584185835f9e80b168666f9fa752aa9583cfedb8fe493134ff6 # proton-wine 1a5735e7 (run 45926928349)
|
||||||
|
LAYER_VERSION=14.1
|
||||||
# Packed into the DroidDeck-Bionic tool next to the layer: FEX with Android-built unix libraries, and default
|
# Packed into the DroidDeck-Bionic tool next to the layer: FEX with Android-built unix libraries, and default
|
||||||
# DXVK / VKD3D-Proton (DroidDeck components can swap these in files/lib/wine/{dxvk,vkd3d-proton} later).
|
# DXVK / VKD3D-Proton (DroidDeck components can swap these in files/lib/wine/{dxvk,vkd3d-proton} later).
|
||||||
FEX_URL=https://github.com/The412Banner/Nightlies/releases/download/FEXCore-2611.1/FEXCore-2611.1-unix.wcp
|
FEX_URL=https://github.com/The412Banner/Nightlies/releases/download/FEXCore-2611.1/FEXCore-2611.1-unix.wcp
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# GStreamer plugins packed for winegstreamer (game video/audio), from the imagefs's lib/gstreamer-1.0 by name
|
# GStreamer plugins packed for winegstreamer (game video/audio), from the imagefs's lib/gstreamer-1.0 by name
|
||||||
# (libgst<name>.so): Proton's usual set as far as this imagefs has it (no vpx; videoconvert+videoscale are videoconvertscale).
|
# (libgst<name>.so): Proton's usual set as far as this imagefs has it (no vpx; videoconvert+videoscale are videoconvertscale).
|
||||||
coreelements
|
coreelements
|
||||||
|
debug
|
||||||
app
|
app
|
||||||
audioconvert
|
audioconvert
|
||||||
audiorate
|
audiorate
|
||||||
|
|||||||
@@ -109,6 +109,9 @@ export NTSYNC_SHM=$COMPAT/ntsync-shm
|
|||||||
# DroidDeck's Force SSBS (its glibc libssbs.so preload) is bionic Wine's own WINE_FORCE_SSBS
|
# DroidDeck's Force SSBS (its glibc libssbs.so preload) is bionic Wine's own WINE_FORCE_SSBS
|
||||||
on "${DROIDDECK_FORCE_SSBS:-}" && export WINE_FORCE_SSBS=1
|
on "${DROIDDECK_FORCE_SSBS:-}" && export WINE_FORCE_SSBS=1
|
||||||
export HODLL=libwow64fex.dll WINEDEBUG=err+all,fixme-all
|
export HODLL=libwow64fex.dll WINEDEBUG=err+all,fixme-all
|
||||||
|
# The network adapter list (GetAdaptersAddresses) from the layer's getifaddrs code: its default if_nameindex code never
|
||||||
|
# answered here, and the Paradox Launcher (Europa Universalis IV) waited on it forever.
|
||||||
|
export WINE_NEW_NDIS=${WINE_NEW_NDIS:-1}
|
||||||
export XENVIRONMENT=$TOOL/bionic/Xdefaults
|
export XENVIRONMENT=$TOOL/bionic/Xdefaults
|
||||||
# The adapter's Wayland swapchain gets its buffers back from gamescope later than DroidDeck-Proton's Turnip does;
|
# The adapter's Wayland swapchain gets its buffers back from gamescope later than DroidDeck-Proton's Turnip does;
|
||||||
# with gamescope's default three images the game waits for one about a fifth of the time at high frame rates.
|
# with gamescope's default three images the game waits for one about a fifth of the time at high frame rates.
|
||||||
@@ -306,6 +309,21 @@ if [ "$verb" != runinprefix ] && prefix_busy; then
|
|||||||
fi
|
fi
|
||||||
prefix_busy || rm -f "$NTSYNC_SHM".v*
|
prefix_busy || rm -f "$NTSYNC_SHM".v*
|
||||||
|
|
||||||
|
# Steam's running client, as a game's steam_api checks it: Proton names its steam.exe (the prefix's first program,
|
||||||
|
# alive while the game runs), which this tool does not start. Here the first program is the one Steam started, so a
|
||||||
|
# launcher that starts the game and quits (EU4's dowser.exe) left a game that reported "Steam not detected". The
|
||||||
|
# PID is the one this tool's own prefixes carry.
|
||||||
|
steam_pid() {
|
||||||
|
R=$COMPAT/pfx/user.reg
|
||||||
|
[ -f "$R" ] || return 0
|
||||||
|
awk '/^\[/ { on = index($0, "[Software\\\\Valve\\\\Steam\\\\ActiveProcess]") == 1 }
|
||||||
|
on && /^"PID"=dword:/ && $0 != "\"PID\"=dword:0000fffe" { found = 1 } END { exit !found }' "$R" || return 0
|
||||||
|
awk '/^\[/ { on = index($0, "[Software\\\\Valve\\\\Steam\\\\ActiveProcess]") == 1 }
|
||||||
|
on && /^"PID"=dword:/ { print "\"PID\"=dword:0000fffe"; next } { print }' "$R" > "$R.dd-new.$$" && mv -f "$R.dd-new.$$" "$R" &&
|
||||||
|
echo "$(date +%H:%M:%S) Steam's process ID in the registry set to this tool's"
|
||||||
|
}
|
||||||
|
prefix_busy || steam_pid
|
||||||
|
|
||||||
# Links into a tool that is gone (an older DroidDeck-Bionic, a deleted DroidDeck-Proton) or to a file it no longer has.
|
# Links into a tool that is gone (an older DroidDeck-Bionic, a deleted DroidDeck-Proton) or to a file it no longer has.
|
||||||
# Wine's update cannot write over them, so drivers (network, controller) and other files stay missing. Drop them and
|
# Wine's update cannot write over them, so drivers (network, controller) and other files stay missing. Drop them and
|
||||||
# clear both stamps: prepare_prefix relinks this tool's files and Wine's update puts its own back.
|
# clear both stamps: prepare_prefix relinks this tool's files and Wine's update puts its own back.
|
||||||
|
|||||||
@@ -36,6 +36,21 @@ zpath() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Drive links of the prefix in compatdata folder $1 that name guest paths (DroidDeck-Proton's s: for the Steam library)
|
||||||
|
# -> their Android paths, which this Wine follows. A game's mods on S: were missing otherwise. A session's start
|
||||||
|
# gives them their guest paths back (NativeGuest.relinkPrefixDrives); z: is launch.sh's.
|
||||||
|
android_drives() {
|
||||||
|
local d t a
|
||||||
|
for d in "$1"/pfx/dosdevices/[a-y]:; do
|
||||||
|
[ -L "$d" ] || continue
|
||||||
|
t=$(readlink "$d")
|
||||||
|
case "$t" in /*) ;; *) continue ;; esac
|
||||||
|
a=$(real "$t")
|
||||||
|
[ "$a" = "$t" ] && continue
|
||||||
|
ln -sfn "$a" "$d.dd-new.$$" && mv -fT "$d.dd-new.$$" "$d" && echo "drive ${d##*/} -> $a"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# Where a game launch's log goes in DroidDeck's session folder (Share logs takes that folder): the game's log folder
|
# Where a game launch's log goes in DroidDeck's session folder (Share logs takes that folder): the game's log folder
|
||||||
# when Detailed graphics logs made one (droiddeck-game-env), else a folder of its own; nothing for other verbs
|
# when Detailed graphics logs made one (droiddeck-game-env), else a folder of its own; nothing for other verbs
|
||||||
session_logs() {
|
session_logs() {
|
||||||
@@ -109,6 +124,7 @@ print(" ".join(sorted(n for n in names if re.fullmatch(r"[A-Za-z_][A-Za-z0-9_]*"
|
|||||||
PY
|
PY
|
||||||
)
|
)
|
||||||
export DROIDDECK_BIONIC_KEEP
|
export DROIDDECK_BIONIC_KEEP
|
||||||
|
[ -n "${STEAM_COMPAT_DATA_PATH:-}" ] && android_drives "$STEAM_COMPAT_DATA_PATH" >&2
|
||||||
exec /system/bin/sh "$tool/bionic/launch.sh" "$verb" "$compat" "$exe" ${args[@]+"${args[@]}"} ;;
|
exec /system/bin/sh "$tool/bionic/launch.sh" "$verb" "$compat" "$exe" ${args[@]+"${args[@]}"} ;;
|
||||||
getcompatpath)
|
getcompatpath)
|
||||||
p=$(real "${1:-}")
|
p=$(real "${1:-}")
|
||||||
|
|||||||
@@ -144,6 +144,53 @@ class LaunchLog(unittest.TestCase):
|
|||||||
self.assertIn('DXVK_LOG_PATH=${DXVK_LOG_PATH:-$COMPAT}', text)
|
self.assertIn('DXVK_LOG_PATH=${DXVK_LOG_PATH:-$COMPAT}', text)
|
||||||
|
|
||||||
|
|
||||||
|
class PrefixFromProton(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.tmp = tempfile.TemporaryDirectory()
|
||||||
|
self.addCleanup(self.tmp.cleanup)
|
||||||
|
self.compat = Path(self.tmp.name) / 'compatdata/236850'
|
||||||
|
self.drives = self.compat / 'pfx/dosdevices'
|
||||||
|
self.drives.mkdir(parents=True)
|
||||||
|
|
||||||
|
def test_guest_drive_links_get_android_paths(self):
|
||||||
|
for name, target in (('c:', '../drive_c'), ('s:', '/root/.local/share/Steam'), ('d:', '/mnt/sd/Steam'),
|
||||||
|
('e:', '/storage/emulated/0/Games'), ('z:', '/')):
|
||||||
|
os.symlink(target, self.drives / name)
|
||||||
|
out = proton_function('android_drives "$1"', str(self.compat))
|
||||||
|
links = {p.name: os.readlink(p) for p in self.drives.iterdir()}
|
||||||
|
self.assertEqual({'c:': '../drive_c', 's:': ANDROID + '/root/.local/share/Steam', 'd:': '/storage/1234-5678/Steam/Steam',
|
||||||
|
'e:': '/storage/emulated/0/Games', 'z:': '/'}, links)
|
||||||
|
self.assertEqual(2, len(out.splitlines()))
|
||||||
|
self.assertEqual('', proton_function('android_drives "$1"', str(self.compat)))
|
||||||
|
|
||||||
|
def test_a_prefix_without_drives_is_left_alone(self):
|
||||||
|
self.assertEqual('', proton_function('android_drives "$1"', str(Path(self.tmp.name) / 'compatdata/1')))
|
||||||
|
|
||||||
|
def steam_pid(self, reg):
|
||||||
|
text = LAUNCH.read_text()
|
||||||
|
function = text[text.index('steam_pid() {'):text.index('prefix_busy || steam_pid')]
|
||||||
|
(self.compat / 'pfx/user.reg').write_text(reg)
|
||||||
|
out = subprocess.run(['sh', '-c', function + 'steam_pid'], env=dict(os.environ, COMPAT=str(self.compat)),
|
||||||
|
capture_output=True, text=True, check=True).stdout
|
||||||
|
return out, (self.compat / 'pfx/user.reg').read_text()
|
||||||
|
|
||||||
|
def test_steams_process_id_is_this_tools(self):
|
||||||
|
reg = ('[Software\\\\Valve\\\\Steam\\\\ActiveProcess] 1795314478\n#time=1dd7a2916a0be94\n"PID"=dword:00000020\n'
|
||||||
|
'"SteamPath"="C:\\\\Program Files (x86)\\\\Steam"\n\n[Software\\\\Other] 1\n"PID"=dword:00000020\n')
|
||||||
|
out, after = self.steam_pid(reg)
|
||||||
|
self.assertIn('process ID', out)
|
||||||
|
self.assertEqual(reg.replace('"PID"=dword:00000020', '"PID"=dword:0000fffe', 1), after)
|
||||||
|
out, again = self.steam_pid(after)
|
||||||
|
self.assertEqual(('', after), (out, again))
|
||||||
|
|
||||||
|
def test_a_prefix_without_steams_key_is_unchanged(self):
|
||||||
|
reg = '[Software\\\\Wine] 1\n"PID"=dword:00000020\n'
|
||||||
|
self.assertEqual(('', reg), self.steam_pid(reg))
|
||||||
|
|
||||||
|
def test_the_network_list_uses_getifaddrs(self):
|
||||||
|
self.assertIn('export WINE_NEW_NDIS=${WINE_NEW_NDIS:-1}', LAUNCH.read_text())
|
||||||
|
|
||||||
|
|
||||||
class StorePaths(unittest.TestCase):
|
class StorePaths(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.tmp = tempfile.TemporaryDirectory()
|
self.tmp = tempfile.TemporaryDirectory()
|
||||||
|
|||||||
Reference in new issue
Block a user