Skip to content
Snippets Groups Projects
Commit 02c4966a authored by Simon McVittie's avatar Simon McVittie
Browse files

launch-options: Update for steam-launch-wrapper addition to recent betas


Recent betas of Steam have the steam-launch-wrapper, an exec'd adverb
which runs "inside" the Launch Options (if any) and the reaper, but
"outside" compatibility tools.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 2670aef6
No related branches found
No related tags found
1 merge request!493launch-options: Update for steam-launch-wrapper addition to recent betas
Pipeline #32533 passed
......@@ -259,6 +259,17 @@ class LdlpRuntime(Runtime):
]
class LaunchWrapper(Component):
def __init__(
self,
path, # type: str
home, # type: str
argv, # type: typing.List[str]
): # type: (...) -> None
super().__init__(path, home=home)
self.argv = argv
class Reaper(Component):
def __init__(
self,
......@@ -523,6 +534,7 @@ class Gui:
self.failed = False
self.home = GLib.get_home_dir()
self.app = App(path='', argv=[], home=self.home)
self.launch_wrapper = None # type: typing.Optional[LaunchWrapper]
self.reaper = None # type: typing.Optional[Reaper]
self.default_container_runtime = (
None
......@@ -989,6 +1001,30 @@ class Gui:
argv=reaper_args,
)
if (
len(command_argv) > 2
and command_argv[0].endswith('ubuntu12_32/steam-launch-wrapper')
and '--' in command_argv[:-1]
):
wrapper_args = [] # type: typing.List[str]
while len(command_argv) > 0:
wrapper_args.append(command_argv[0])
command_argv = command_argv[1:]
if wrapper_args[-1] == '--':
break
logger.debug('Detected launch wrapper %s', to_shell(wrapper_args))
logger.debug(
'Remaining arguments: %s', to_shell(command_argv),
)
self.launch_wrapper = LaunchWrapper(
path=command_argv[0],
home=self.home,
argv=wrapper_args,
)
for target in RUNTIMES:
if (
len(command_argv) > 2
......@@ -1709,6 +1745,11 @@ class Gui:
if reaper is not None:
components.append(reaper)
launch_wrapper = self.launch_wrapper
if launch_wrapper is not None:
components.append(launch_wrapper)
selected = self.container_runtime_combo.get_active_id()
if selected is None or not selected or selected == '/':
......
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