mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-25 15:56:01 +00:00
Merge commit 'e1a7d527fd412b6bd78833e01fe80f515e324971' into merge/main-into-non-adreno-all
# Conflicts: # .github/workflows/build.yml # app/build.gradle # app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt # app/src/main/java/com/droiddeck/launcher/gpu/DriverPairs.kt # app/src/main/java/com/droiddeck/launcher/gpu/GpuInfo.kt # app/src/main/java/com/droiddeck/launcher/gpu/TurnipDriver.java # app/src/main/java/com/droiddeck/launcher/gpu/TurnipReleases.kt # app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java # app/src/main/java/com/droiddeck/launcher/session/SessionFiles.kt # app/src/main/java/com/droiddeck/launcher/session/SessionService.kt # app/src/main/res/values/strings.xml # app/src/test/java/com/droiddeck/launcher/ui/ComponentsPageProfileTest.kt # tools/build_local.sh # tools/gamescope/PATCHES.md # tools/gamescope/release.env # tools/linuxfs/overlay/usr/local/bin/droiddeck-game-env # tools/linuxfs/preload/netif.c # tools/linuxfs/preload/opens.c # tools/release/runtime_inputs.py
This commit is contained in:
commit
e7b523d653
574 files changed
+41749
-2616
No files matched your search
@@ -74,6 +74,9 @@ bl_store_launch() {
|
||||
}
|
||||
|
||||
bl_run() {
|
||||
if [ -x /usr/local/bin/droiddeck-steamvr-flat ] && /usr/local/bin/droiddeck-steamvr-flat "${verb:-}"; then
|
||||
set -- /usr/local/bin/droiddeck-steamvr-game "$@"
|
||||
fi
|
||||
if [ -n "${BL_STORE_EXIT:-}" ]; then
|
||||
"$@"
|
||||
rc=$?
|
||||
@@ -246,10 +249,32 @@ bl_vacdiag() {
|
||||
"""
|
||||
|
||||
BL_DIRECTAUDIO_SETUP = """
|
||||
bl_is_steam_installscript_target() {
|
||||
local target=${1:-}
|
||||
local steam_root=${STEAM_COMPAT_CLIENT_INSTALL_PATH:-${XDG_DATA_HOME:-$HOME/.local/share}/Steam}
|
||||
local helper="$steam_root/legacycompat/iscriptevaluator.exe"
|
||||
[ -f "$helper" ] && [[ -n "$target" && "$target" -ef "$helper" ]]
|
||||
}
|
||||
|
||||
bl_directaudio() {
|
||||
case "${verb:-}" in
|
||||
run|waitforexitandrun|runinprefix) ;;
|
||||
*) return 0 ;;
|
||||
esac
|
||||
base=$1
|
||||
[ -n "${BL_DIRECTAUDIO:-}" ] || return 0
|
||||
[ -d "$BL_DIRECTAUDIO" ] || return 0
|
||||
if bl_is_steam_installscript_target "${2:-}"; then
|
||||
echo "droiddeck-proton: DirectAudio skipped for Steam's install-script evaluator" >&2
|
||||
return 0
|
||||
fi
|
||||
streamer=$(cat "${XDG_RUNTIME_DIR:-/tmp}/droiddeck-remote-play" 2>/dev/null)
|
||||
if [ -n "$streamer" ] && kill -0 "$streamer" 2>/dev/null; then
|
||||
WINE_AUDIO_DRIVER=pulse
|
||||
export WINE_AUDIO_DRIVER
|
||||
echo "droiddeck-proton: a Remote Play client is connected - game audio goes through PulseAudio so the stream carries it" >&2
|
||||
return 0
|
||||
fi
|
||||
version=$("$base/files/bin-arm64/wine" --version 2>/dev/null)
|
||||
major=${version#wine-}
|
||||
major=${major%%.*}
|
||||
@@ -337,7 +362,7 @@ for name in %s; do
|
||||
done
|
||||
if [ -n "$depot" ]; then
|
||||
bl_components "$depot"
|
||||
bl_directaudio "$depot"
|
||||
bl_directaudio "$depot" "$@"
|
||||
bl_game_cpus
|
||||
bl_idtech3 "$@"
|
||||
bl_vacdiag "$@"
|
||||
@@ -392,7 +417,7 @@ if [ -n "${PROOT_FP_KEY:-}" ] && [ -f "$audit" ]; then
|
||||
esac
|
||||
fi
|
||||
bl_components "$here"
|
||||
bl_directaudio "$here"
|
||||
bl_directaudio "$here" "$@"
|
||||
bl_game_cpus
|
||||
bl_idtech3 "$@"
|
||||
bl_vacdiag "$@"
|
||||
@@ -444,7 +469,12 @@ verb=$1; shift
|
||||
case $verb in
|
||||
getcompatpath | getnativepath) printf '%s\\n' "$1"; exit 0 ;;
|
||||
esac
|
||||
exec /usr/local/bin/droiddeck-fex steam "$verb" "$@"
|
||||
""" + BL_GAME_CPUS_SETUP + """
|
||||
bl_game_cpus
|
||||
if [ -x /usr/local/bin/droiddeck-steamvr-flat ] && /usr/local/bin/droiddeck-steamvr-flat "$verb"; then
|
||||
exec /usr/local/bin/droiddeck-steamvr-game ${BL_TASKSET:-} /usr/local/bin/droiddeck-fex steam "$verb" "$@"
|
||||
fi
|
||||
exec ${BL_TASKSET:-} /usr/local/bin/droiddeck-fex steam "$verb" "$@"
|
||||
"""
|
||||
|
||||
|
||||
@@ -900,24 +930,33 @@ def fex_wanted_marker():
|
||||
return os.path.join(os.environ.get("HOME", "/root"), ".config", "droiddeck", "fex-wanted")
|
||||
|
||||
|
||||
def request_fex(steam_root, asked):
|
||||
def request_app(steam_root, app):
|
||||
import subprocess
|
||||
client = os.path.join(steam_root, "steamrtarm64", "steam")
|
||||
if not os.access(client, os.X_OK):
|
||||
return []
|
||||
try:
|
||||
process = subprocess.Popen([client, "steam://install/%s" % app], stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL, start_new_session=True)
|
||||
except OSError:
|
||||
return []
|
||||
try:
|
||||
process.wait(timeout=REQUEST_HANDOFF_SECONDS)
|
||||
except subprocess.TimeoutExpired:
|
||||
pass
|
||||
return [app]
|
||||
|
||||
|
||||
def request_fex(steam_root, asked):
|
||||
client = os.path.join(steam_root, "steamrtarm64", "steam")
|
||||
missing = fex_missing(steam_root)
|
||||
if not os.access(client, os.X_OK) or any(app in asked for app in missing):
|
||||
return []
|
||||
for app in missing:
|
||||
asked.add(app)
|
||||
try:
|
||||
process = subprocess.Popen([client, "steam://install/%s" % app], stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL, start_new_session=True)
|
||||
except OSError:
|
||||
continue
|
||||
try:
|
||||
process.wait(timeout=REQUEST_HANDOFF_SECONDS)
|
||||
except subprocess.TimeoutExpired:
|
||||
pass
|
||||
return [app]
|
||||
requested = request_app(steam_root, app)
|
||||
if requested:
|
||||
return requested
|
||||
return []
|
||||
|
||||
|
||||
@@ -1021,6 +1060,16 @@ def plan_mapping(current, installed, runnable, default, auto, native=None, picks
|
||||
return changes, kept
|
||||
|
||||
|
||||
def picked_apps(state):
|
||||
picked = state.get("picked", ())
|
||||
return {app for app in picked if isinstance(app, str)} if isinstance(picked, list) else set()
|
||||
|
||||
|
||||
def picked_after(current, changes):
|
||||
return sorted(({app for app, tool in current.items() if tool} - set(changes) |
|
||||
{app for app, tool in changes.items() if tool}) - {"0"}, key=app_order)
|
||||
|
||||
|
||||
def followers(state, current):
|
||||
if "auto" in state:
|
||||
return state["auto"]
|
||||
@@ -1266,6 +1315,8 @@ def register_default(config_path, apps=(), protect=(), default=None, catalog=Non
|
||||
native = native_targets(steam_root, set(apps) | set(picks) | set(managed) | set(native_choices))
|
||||
if linux_tool != FEX_TOOL:
|
||||
native = {app: linux_tool if tool == FEX_TOOL else tool for app, tool in native.items()}
|
||||
for app in picked_apps(state) & set(native):
|
||||
current.setdefault(app, "")
|
||||
changes, auto = plan_mapping(
|
||||
current, apps, names, default, followers(state, current), native, picks,
|
||||
overrides, managed, native_choices)
|
||||
@@ -1276,6 +1327,7 @@ def register_default(config_path, apps=(), protect=(), default=None, catalog=Non
|
||||
write_changed(config_path, text)
|
||||
state["auto"] = {app: tool for app, tool in auto.items() if tool is not NATIVE_CHOICE}
|
||||
state["native_choices"] = sorted(app for app, tool in auto.items() if tool is NATIVE_CHOICE)
|
||||
state["picked"] = picked_after(current, changes)
|
||||
state.pop("native", None)
|
||||
state["tools"] = catalog
|
||||
state.setdefault("default", default)
|
||||
|
||||
Reference in new issue
Block a user