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 From b4e979cc991a0c2a45ad986210108edd2d43e43d Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 6 Apr 2022 22:46:19 -0400 Subject: fix all warnings to simplify migration to nullable annotations (#837) --- docs/technical/mod-package.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/technical') diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index 5e408168..4c31f69b 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -414,6 +414,7 @@ when you compile it. ## Release notes ## Upcoming release * Added detection for Xbox app game folders. +* Internal refactoring. ## 4.0.0 Released 30 November 2021. -- cgit From 6b05296e71c32abd158f354eeeaf1e135e72e6e2 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 7 Apr 2022 01:51:50 -0400 Subject: migrate mod build package to .NET 5 to allow full nullable annotations (#837) --- docs/technical/mod-package.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs/technical') diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index 4c31f69b..6123b28f 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -413,9 +413,19 @@ when you compile it. ## Release notes ## Upcoming release +* Migrated from .NET Standard 2.0 to .NET 5.0. * Added detection for Xbox app game folders. * Internal refactoring. +**Troubleshooting:** +Due to the framework change, you might see build errors like _task failed unexpectedly_ that mentions `System.Runtime Version=5.0.0`. If so: + +1. Make sure you have Visual Studio 2022 or later. +2. Exit all instances of Visual Studio. +3. Delete the hidden `.vs` folder in your solution folder. +4. Delete the `bin` and `obj` folders in each project folder. +5. Reopen the solution and rebuild, and now it should work fine. + ## 4.0.0 Released 30 November 2021. -- cgit From 238045ba9c5937f684cad3c55a8f9b9c2733e45f Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 7 Apr 2022 22:19:48 -0400 Subject: reverse mod build package migration to .NET 5 (#837) The migrated package didn't work consistently in VIsual Studio, so this suppresses nullable annotations in .NET Standard instead. --- docs/technical/mod-package.md | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'docs/technical') diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index 6123b28f..4c31f69b 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -413,19 +413,9 @@ when you compile it. ## Release notes ## Upcoming release -* Migrated from .NET Standard 2.0 to .NET 5.0. * Added detection for Xbox app game folders. * Internal refactoring. -**Troubleshooting:** -Due to the framework change, you might see build errors like _task failed unexpectedly_ that mentions `System.Runtime Version=5.0.0`. If so: - -1. Make sure you have Visual Studio 2022 or later. -2. Exit all instances of Visual Studio. -3. Delete the hidden `.vs` folder in your solution folder. -4. Delete the `bin` and `obj` folders in each project folder. -5. Reopen the solution and rebuild, and now it should work fine. - ## 4.0.0 Released 30 November 2021. -- cgit From 288ef5dc0715339a3a0bf89975a6db7ab7408e2b Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 9 Apr 2022 12:03:30 -0400 Subject: add environment variable form of new CLI args, update docs --- docs/technical/smapi.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs/technical') diff --git a/docs/technical/smapi.md b/docs/technical/smapi.md index 7da1e0f1..e117db2f 100644 --- a/docs/technical/smapi.md +++ b/docs/technical/smapi.md @@ -33,11 +33,12 @@ argument | purpose `--uninstall` | Preselects the uninstall action, skipping the prompt asking what the user wants to do. `--game-path "path"` | Specifies the full path to the folder containing the Stardew Valley executable, skipping automatic detection and any prompt to choose a path. If the path is not valid, the installer displays an error. -SMAPI itself recognises two arguments **on Windows only**, but these are intended for internal use +SMAPI itself recognises five arguments **on Windows only**, but these are intended for internal use or testing and may change without warning. On Linux/macOS, see _environment variables_ below. argument | purpose -------- | ------- +`--developer-mode`
`--developer-mode-off` | Enable or disable features intended for mod developers. Currently this only makes `TRACE`-level messages appear in the console. `--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. @@ -49,6 +50,7 @@ can set temporary environment variables instead. For example: environment variable | purpose -------------------- | ------- +`SMAPI_DEVELOPER_MODE` | Equivalent to `--developer-mode` and `--developer-mode-off` above. The value must be `true` or `false`. `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. -- cgit From eb125f1994c605704be384ffdcf4da64b88d9405 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 14 Apr 2022 18:14:08 -0400 Subject: fix assembly version conflict error in mod build package --- docs/technical/mod-package.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/technical') diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index 4c31f69b..b29f3f72 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -414,6 +414,7 @@ when you compile it. ## Release notes ## Upcoming release * Added detection for Xbox app game folders. +* Fixed "_conflicts between different versions of Microsoft.Win32.Registry_" warnings in recent SMAPI versions. * Internal refactoring. ## 4.0.0 -- cgit From 43c875c4c225ad248790c29f3abcb787cbbd2d7f Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 14 Apr 2022 19:21:18 -0400 Subject: prepare mod build package 4.0.1 for release --- docs/technical/mod-package.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs/technical') diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index b29f3f72..c632af84 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -412,7 +412,9 @@ The NuGet package is generated automatically in `StardewModdingAPI.ModBuildConfi when you compile it. ## Release notes -## Upcoming release +## 4.0.1 +Released 14 April 2022. + * Added detection for Xbox app game folders. * Fixed "_conflicts between different versions of Microsoft.Win32.Registry_" warnings in recent SMAPI versions. * Internal refactoring. -- cgit From 9939061615c41fabca004bf8f5b6f2b018a40b06 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 19 Apr 2022 19:26:12 -0400 Subject: fix typo --- docs/technical/smapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/technical') diff --git a/docs/technical/smapi.md b/docs/technical/smapi.md index e117db2f..789ea20b 100644 --- a/docs/technical/smapi.md +++ b/docs/technical/smapi.md @@ -83,7 +83,7 @@ folder before compiling. ## Prepare a release ### On any platform **⚠ Ideally we'd have one set of instructions for all platforms. The instructions in this section -will produce a fully functional release for all supported platfrms, _except_ that the application +will produce a fully functional release for all supported platforms, _except_ that the application icon for SMAPI on Windows will disappear due to [.NET runtime bug 3828](https://github.com/dotnet/runtime/issues/3828). Until that's fixed, see the _[on Windows](#on-windows)_ section below to create a build that retains the icon.** -- cgit From f507bd0f9cebe68fa2adf176740a0d00b3e6f884 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 29 Apr 2022 22:55:12 -0400 Subject: set SMAPI version from main build script --- docs/technical/smapi.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'docs/technical') diff --git a/docs/technical/smapi.md b/docs/technical/smapi.md index 789ea20b..4d75aef2 100644 --- a/docs/technical/smapi.md +++ b/docs/technical/smapi.md @@ -120,8 +120,10 @@ Windows](#on-windows)_ section below to create a build that retains the icon.** 2. Launch the game through the Steam UI. ### Prepare the release -1. Run `build/unix/set-smapi-version.sh` to set the SMAPI version. Make sure you use a [semantic - version](https://semver.org). Recommended format: +1. Run `build/unix/prepare-install-package.sh VERSION_HERE` to create the release package in the + root `bin` folder. + + Make sure you use a [semantic version](https://semver.org). Recommended format: build type | format | example :--------- | :----------------------- | :------ @@ -129,9 +131,6 @@ Windows](#on-windows)_ section below to create a build that retains the icon.** prerelease | `-beta.` | `4.0.0-beta.20251230` release | `` | `4.0.0` -2. Run `build/unix/prepare-install-package.sh` to create the release package in the root `bin` - folder. - ### On Windows #### First-time setup 1. Set up Windows Subsystem for Linux (WSL): @@ -147,8 +146,10 @@ Windows](#on-windows)_ section below to create a build that retains the icon.** ``` ### Prepare the release -1. Run `build/windows/set-smapi-version.ps1` in PowerShell to set the SMAPI version. Make sure you - use a [semantic version](https://semver.org). Recommended format: +1. Run `build/windows/prepare-install-package.ps1 VERSION_HERE` in PowerShell to create the release + package folders in the root `bin` folder. + + Make sure you use a [semantic version](https://semver.org). Recommended format: build type | format | example :--------- | :----------------------- | :------ @@ -156,12 +157,9 @@ Windows](#on-windows)_ section below to create a build that retains the icon.** prerelease | `-beta.` | `4.0.0-beta.20251230` release | `` | `4.0.0` -2. Run `build/windows/prepare-install-package.ps1` in PowerShell to create the release package - folders in the root `bin` folder. - -3. Launch WSL and run this script: +2. Launch WSL and run this script: ```bash - # edit to match the build created in steps 1-2 + # edit to match the build created in steps 1 # In WSL, `/mnt/c/example` accesses `C:\example` on the Windows filesystem. version="4.0.0" binFolder="/mnt/e/source/_Stardew/SMAPI/bin" -- cgit From 0e4aa65708df7ca4096b9019428d9fccabd37384 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 1 May 2022 17:33:41 -0400 Subject: fix crossplatform build scripts --- docs/technical/smapi.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/technical') diff --git a/docs/technical/smapi.md b/docs/technical/smapi.md index 4d75aef2..44b6e49f 100644 --- a/docs/technical/smapi.md +++ b/docs/technical/smapi.md @@ -166,5 +166,8 @@ Windows](#on-windows)_ section below to create a build that retains the icon.** build/windows/finalize-install-package.sh "$version" "$binFolder" ``` +Note: to prepare a test Windows-only build, you can pass `--windows-only` in the first step and +skip the second one. + ## Release notes See [release notes](../release-notes.md). -- cgit