From fac19f777377c33efa50f10320fa8b3246688c23 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Mon, 30 Apr 2018 20:26:50 +0100
Subject: [PATCH] Document how runtimes work

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 README.md | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 0a3ca1eaf..4f0f7a431 100644
--- a/README.md
+++ b/README.md
@@ -79,11 +79,11 @@ Instructions for testing
 
 * Configure the launch options for a game in Steam to be:
 
-        /path/to/pressure-vessel-wrap -- %command%
+        /path/to/bin/pressure-vessel-wrap -- %command%
 
 * For interactive testing, if you ran Steam from a shell, you can use:
 
-        /path/to/pressure-vessel-wrap --interactive -- %command%
+        /path/to/bin/pressure-vessel-wrap --interactive -- %command%
 
     The interactive shell's current working directory matches the game's.
     Run `"$@"` in the interactive shell to run the game.
@@ -95,9 +95,27 @@ Instructions for testing
 
     - Run one of:
 
-            /path/to/pressure-vessel-wrap --fake-home=/some/path --interactive -- ./whatever-game
-            /path/to/pressure-vessel-wrap --freedesktop-app-id=com.example.Anything --interactive -- ./whatever-game
-            /path/to/pressure-vessel-wrap --steam-app-id=70 --interactive -- ./whatever-game
+            /path/to/bin/pressure-vessel-wrap --fake-home=/some/path --interactive -- ./whatever-game
+            /path/to/bin/pressure-vessel-wrap --freedesktop-app-id=com.example.Anything --interactive -- ./whatever-game
+            /path/to/bin/pressure-vessel-wrap --steam-app-id=70 --interactive -- ./whatever-game
+
+* To use a runtime instead of the host system, use:
+
+        /path/to/bin/pressure-vessel-wrap --runtime=$HOME/some-runtime -- ./whatever-game
+
+    The runtime can be either:
+
+    - A merged `/usr` containing `bin/bash`, `lib/ld-linux.so.2`,
+      `bin/env`, `share/locale`, `lib/python2.7` and so on
+
+    - A Flatpak runtime such as
+      `~/.local/share/flatpak/runtime/com.valvesoftware.SteamRuntime.Platform/x86_64/scout_beta/active/files`,
+      for example produced by [flatdeb][] (this is a special case of a
+      merged `/usr`)
+
+    - A sysroot containing `bin/bash`, `lib/ld-linux.so.2`,
+      `usr/bin/env`, `usr/share/locale`, `usr/lib/python2.7` and so on,
+      optionally with `bin`, `lib` etc. being symlinks into `usr`
 
 Design constraints
 ------------------
@@ -179,6 +197,9 @@ TODO
 
   [weird behaviour]: https://www.ctrl.blog/entry/flatpak-steamcloud-xdg
 
+* Team Fortress 2 reports an error because it is unable to set the
+  `en_US.UTF-8` locale (but then starts successfully anyway).
+
 Design
 ------
 
-- 
GitLab