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

docs: Clarify installation directory behaviour


When writing this document I wasn't sure whether the default working
directory was the top-level install folder or the directory containing
the executable, but by looking at Dota 2 we can see that the answer
is the top-level install folder: Dota 2's executable is in a
subdirectory, but its initial working directory is not.

Add some links to Steam partner documentation (previously only in the
slr-for-game-developers document) to make this a bit clearer.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent f7a5c682
No related branches found
No related tags found
1 merge request!470Update slr-for-game-developers, compat-tool-interface documents
......@@ -194,7 +194,7 @@ Some environment variables are set by Steam, including:
in `$STEAM_COMPAT_DATA_PATH/pfx`.
`STEAM_COMPAT_INSTALL_PATH`
: The absolute path to the game's installation directory, for example
: The absolute path to the game's [install folder][], for example
`/home/you/.local/share/Steam/steamapps/common/Estranged Act I`,
even if the current working directory is a subdirectory of this
(as is the case for Estranged: Act I (261820) for example).
......@@ -241,6 +241,8 @@ scout libraries. After setting up the container, it runs the "inner"
compatibility tool (Proton) with an entirely new `LD_LIBRARY_PATH`
pointing to mixed host and soldier libraries.
[install folder]: https://partner.steamgames.com/doc/store/application/depots
## Native Linux Steam games
This is the simplest situation and can be considered to be the baseline.
......@@ -260,10 +262,23 @@ The game is expected to run in the usual way. Conventionally, it does not
double-fork to put itself in the background, but if it does, any background
processes will be reparented to have the subreaper as their parent.
The current working directory is the working directory configured in the
game's Steam metadata (for example `estrangedact1` for Estranged: Act 1,
261820), or the game's directory (or maybe the executable's directory?)
if unconfigured. The compatibility tool is expected to preserve this
If the game's Steam metadata has a non-empty working directory
(the `Working Dir` in its [Steamworks launch options][]),
then the current working directory is set to that directory before
launching any compatibility tools. For example, Estranged: Act 1
(app ID 261820) has `Working Dir: estrangedact1` and its
[install folder][] is set to `Estranged Act I`, so it runs with
current working directory `.../Estranged Act I/estrangedact1`.
If the working directory is left blank, then the current working directory
is set to the game's top-level [install folder][].
For example, Dota 2 (app ID 570) runs from its top-level install folder
`dota 2 beta`, even though its main executable is in the `game`
subdirectory.
[Steamworks launch options]: https://partner.steamgames.com/doc/sdk/uploading
Either way, the compatibility tool is expected to preserve this
working directory when running the actual game.
The environment variable `STEAM_COMPAT_SESSION_ID` is not set.
......
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