Make PRESSURE_VESSEL_SHELL=instead work in session mode
When running a native Linux game (a single one-shot command), you can use PRESSURE_VESSEL_SHELL=instead
to explore the container before running the game. This is really, really convenient in practice. It's implemented by wrapping an xterm and a shell script around the actual game command:
pv-wrap
\- bwrap
\- pv-adverb
\- xterm -e blah blah blah
\- game
When running a Windows game under Proton, there are zero or more setup commands (installscript) multiplexed through a pressure-vessel-launcher
server, each one initiated by a -launch
command (the run
verb), and then a final -launch --terminate
command for the main game (the waitforexitandrun
verb):
pv-wrap
\- bwrap
\- pv-adverb
\- pv-launcher <-IPC--------------<--\
\- pv-adverb |
\- game ^
|
pv-launch --terminate --->-----------------/
We have to put pressure-vessel-wrap
in --batch
mode, which suppresses PRESSURE_VESSEL_SHELL
and PRESSURE_VESSEL_TERMINAL
, to run the -launcher
- otherwise there would be no launcher, only the xterm, and the setup and main commands wouldn't be able to run.
Native Linux games can also be forced to run in the "session" mode like Proton games, in which case we start the -launcher
and then run the game with a single -launch --terminate
command (so it behaves the same as a Proton game with no setup/installscript steps). This has the same limitations as Proton games.
For games in "session mode", we should move the xterm and shell script wrapping so that instead of wrapping the -launcher
, it wraps the game's "main" command, whatever that is:
pv-wrap
\- bwrap
\- pv-adverb
\- pv-launcher <-IPC--------------<--\
\- pv-adverb |
\- xterm -e blah blah blah |
\- game ^
|
pv-launch --terminate --->-----------------/