From 2216e37726874af6ab164dbbaef454eb0f2218d0 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 6 Mar 2022 19:55:32 -0500 Subject: rework launch script argument parsing (#832) This commit... * replaces the internal `--no-reopen-terminal` arg with a documented `--use-current-shell` arg that works on Linux too; * replaces the new SKIP_TERMINAL environment variable with the existing SMAPI_NO_TERMINAL one; * moves argument parsing out of the 'initial setup' section (so it's easier for players to edit if needed); * simplfies argument parsing (no need to support short opt names or add arguments for the default behavior); * fixes arguments not parsed after the first unrecognized argument, so `--unknown --no-terminal` would still open a terminal. --- docs/technical/smapi.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'docs/technical') diff --git a/docs/technical/smapi.md b/docs/technical/smapi.md index d9aad875..7da1e0f1 100644 --- a/docs/technical/smapi.md +++ b/docs/technical/smapi.md @@ -38,18 +38,20 @@ or testing and may change without warning. On Linux/macOS, see _environment vari argument | purpose -------- | ------- -`--no-terminal` | SMAPI won't write anything to the console window. (Messages will still be written to the log file.) +`--no-terminal` | The SMAPI launcher won't try to open a terminal window, and SMAPI won't log anything to the console. (Messages will still be written to the log file.) +`--use-current-shell` | The SMAPI launcher won't try to open a terminal window, but SMAPI will still log to the console. (Messages will still be written to the log file.) `--mods-path` | The path to search for mods, if not the standard `Mods` folder. This can be a path relative to the game folder (like `--mods-path "Mods (test)"`) or an absolute path. ### Environment variables -The above SMAPI arguments don't work on Linux/macOS due to the way the game launcher works. You can -set temporary environment variables instead. For example: +The above SMAPI arguments may not work on Linux/macOS due to the way the game launcher works. You +can set temporary environment variables instead. For example: > SMAPI_MODS_PATH="Mods (multiplayer)" /path/to/StardewValley environment variable | purpose -------------------- | ------- -`SMAPI_NO_TERMINAL` | Equivalent to `--no-terminal` above. `SMAPI_MODS_PATH` | Equivalent to `--mods-path` above. +`SMAPI_NO_TERMINAL` | Equivalent to `--no-terminal` above. +`SMAPI_USE_CURRENT_SHELL` | Equivalent to `--use-current-shell` above. ### Compile flags SMAPI uses a small number of conditional compilation constants, which you can set by editing the -- cgit