diff --git a/bin/dialog.md b/bin/dialog.md index ee0304cf162b9a80dd9454673e7e4f3598979568..f208ea7a03f6770f947c09f5657b13a9c950a672 100644 --- a/bin/dialog.md +++ b/bin/dialog.md @@ -177,10 +177,11 @@ As a last resort, it will attempt to fall back to **zenity**(1), # ENVIRONMENT -`STEAM_RUNTIME` +`STEAM_RUNTIME_SCOUT`, `STEAM_RUNTIME` : If set to an absolute path to the `LD_LIBRARY_PATH`-based Steam Runtime 1.0 (scout), that version will be used in preference to the typical `~/.steam/root/ubuntu12_32/steam-runtime`. + `STEAM_RUNTIME_SCOUT` is preferred if both are set. `STEAM_RUNTIME_DIALOG_UI` : If set to a command, attempt to use it as a higher priority than diff --git a/bin/dialog.sh b/bin/dialog.sh index c407efb4422fecd1fd2b11b077d2b2e2fb459037..fb1f7649b130ee66cd5cb609f5cb775cd0d87714 100755 --- a/bin/dialog.sh +++ b/bin/dialog.sh @@ -116,7 +116,7 @@ xterm_fallback () { } detect_scout_ldlp () { - for dir in "${1-}" ~/.steam/root/ubuntu12_32/steam-runtime; do + for dir in "${STEAM_RUNTIME_SCOUT-}" "${1-}" ~/.steam/root/ubuntu12_32/steam-runtime; do if [ -n "$dir" ] && [ -x "$dir/amd64/usr/bin/zenity" ]; then echo "$dir" return 0 @@ -389,7 +389,7 @@ main () { if [ -z "$is_slr" ] \ && ldlp_runtime=$(detect_scout_ldlp "$ldlp_runtime") \ ; then - debug "LDLP runtime detected" + debug "LDLP runtime detected at $ldlp_runtime" for program in \ ~/.steam/root/ubuntu12_64/steam-dialog-ui \ diff --git a/bin/launch-options.sh b/bin/launch-options.sh index 7a1d60dfc181a7b7464d2f525b2ca96ef949c3d1..df64d864b333c72c7147d81d68abb54a4d9a4d79 100755 --- a/bin/launch-options.sh +++ b/bin/launch-options.sh @@ -34,6 +34,8 @@ main () { me="${me##*/}" default_path="/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" + # Intentionally not STEAM_RUNTIME_SCOUT: we want the LDLP runtime + # that we were previously running in, if any steam_runtime="${STEAM_RUNTIME-}" # Undo any weird environment before we start running external diff --git a/bin/logger.md b/bin/logger.md index 24665afd95ed03577ea8a9bd2cd4d8930a1f1462..4f849999732fdadc35d8069ede7b7fdfb71baeee 100644 --- a/bin/logger.md +++ b/bin/logger.md @@ -19,7 +19,7 @@ srt-logger - record logs [**--**] [*COMMAND* [*ARGUMENTS...*]] -**source "${STEAM_RUNTIME}/usr/libexec/steam-runtime-tools-0/logger-0.bash"** +**source "${STEAM_RUNTIME_SCOUT}/usr/libexec/steam-runtime-tools-0/logger-0.bash"** [*OPTIONS*] **srt-logger --mkfifo** diff --git a/bin/urlopen.c b/bin/urlopen.c index d2112757d43a00e2e5fdccdc8a448d922729033b..efdaba4b88486a19f1fad4c2722b06017d491e60 100644 --- a/bin/urlopen.c +++ b/bin/urlopen.c @@ -147,6 +147,9 @@ open_with_portal (const char *uri_or_filename, } } +/* + * Returns: %TRUE if running inside a LD_LIBRARY_PATH runtime + */ static gboolean is_ldlp_runtime (void) { diff --git a/docs/shared-paths.md b/docs/shared-paths.md index a4bfae1cf279a8b56f5f960f99d87efb3c5a747b..75ab290c6eb32f583b1906ea67a19499524f75ff 100644 --- a/docs/shared-paths.md +++ b/docs/shared-paths.md @@ -230,6 +230,7 @@ the container: * `/boot` * `/root` * `$STEAM_RUNTIME` +* `$STEAM_RUNTIME_SCOUT` ## The home directory diff --git a/pressure-vessel/pressure-vessel-unruntime b/pressure-vessel/pressure-vessel-unruntime index d5857242e5a581b23e3e6ac602cba53d860e35ab..86dd9664ea9278e2d9c574409b8a6fd9c9b9ed30 100755 --- a/pressure-vessel/pressure-vessel-unruntime +++ b/pressure-vessel/pressure-vessel-unruntime @@ -58,6 +58,8 @@ if [ -n "${PATH-}" ]; then set -- "--env-if-host=PATH=$PATH" "$@" fi +# Intentionally not STEAM_RUNTIME_SCOUT: we want the LDLP runtime +# that we were previously running in, if any if [ -n "${STEAM_RUNTIME-}" ]; then set -- "--env-if-host=STEAM_RUNTIME=$STEAM_RUNTIME" "$@" fi diff --git a/pressure-vessel/wrap-setup.c b/pressure-vessel/wrap-setup.c index 8bac27bd7a4f445a2997de30f50b7fa90ab25ae0..2dc46ccf31c086dfbd6a450c19265a8ed4e3054c 100644 --- a/pressure-vessel/wrap-setup.c +++ b/pressure-vessel/wrap-setup.c @@ -1154,6 +1154,7 @@ static const EnvMount known_required_env[] = { "STEAM_COMPAT_TOOL_PATH", ENV_MOUNT_FLAGS_DEPRECATED }, { "STEAM_COMPAT_TOOL_PATHS", ENV_MOUNT_FLAGS_COLON_DELIMITED }, { "STEAM_EXTRA_COMPAT_TOOLS_PATHS", ENV_MOUNT_FLAGS_COLON_DELIMITED }, + { "STEAM_RUNTIME_SCOUT", ENV_MOUNT_FLAGS_NONE }, { "XDG_CACHE_HOME", ENV_MOUNT_FLAGS_IF_HOME_SHARED }, { "XDG_CONFIG_HOME", ENV_MOUNT_FLAGS_IF_HOME_SHARED }, { "XDG_DATA_HOME", ENV_MOUNT_FLAGS_IF_HOME_SHARED },