Skip to content
Snippets Groups Projects
Commit 70f2f0d0 authored by Ludovico de Nittis's avatar Ludovico de Nittis
Browse files

Revert "Revert "runtime: Set STEAM_RUNTIME=/ if running in scout"


Setting STEAM_RUNTIME=/ caused configuration changes in libraries like
Pango and GTK, which broke module loading when not in the
LD_LIBRARY_PATH Steam Runtime. We updated the affected libraries' search
paths so it is safe now to reimplement the STEAM_RUNTIME change.

This reverts commit dc71943a.

Signed-off-by: default avatarLudovico de Nittis <ludovico.denittis@collabora.com>
parent 0fd68546
No related branches found
No related tags found
No related merge requests found
Pipeline #4446 passed
......@@ -3225,6 +3225,16 @@ pv_runtime_bind (PvRuntime *self,
self->adverb_in_container = "/run/pressure-vessel/pv-from-host/bin/pressure-vessel-adverb";
}
/* Some games detect that they have been run outside the Steam Runtime
* and try to re-run themselves via Steam. Trick them into thinking
* they are in the LD_LIBRARY_PATH Steam Runtime.
*
* We do not do this for games developed against soldier, because
* backwards compatibility is not a concern for game developers who
* have specifically opted-in to using the newer runtime. */
if (self->is_scout)
flatpak_bwrap_set_env (bwrap, "STEAM_RUNTIME", "/", TRUE);
pv_runtime_set_search_paths (self, bwrap);
return TRUE;
......
......@@ -153,7 +153,11 @@ class TestInsideRuntime(BaseTest):
logger.info(
'LD_LIBRARY_PATH: %r', os.environ.get('LD_LIBRARY_PATH')
)
# No actual *tests* here just yet - we just log what's there.
if os.environ.get('TEST_INSIDE_RUNTIME_IS_SCOUT'):
self.assertEqual(os.environ.get('STEAM_RUNTIME'), '/')
elif os.environ.get('TEST_INSIDE_RUNTIME_IS_SOLDIER'):
self.assertEqual(os.environ.get('STEAM_RUNTIME'), None)
def test_overrides(self) -> None:
if os.getenv('TEST_INSIDE_RUNTIME_IS_COPY'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment