diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-05-03 18:11:31 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-05-03 18:11:31 -0400 |
commit | 5d3d919d490fd414fe9647e566e92c71d7f64509 (patch) | |
tree | e1eab3352287ef04b5de4cdc28b550e255d58c3f /docs/technical | |
parent | c48f6d78cc412c5f2e40a8b460b7b3c1c993c51a (diff) | |
parent | 3447e2f575c2c83af729777e4d37e93f4c2a6467 (diff) | |
download | SMAPI-5d3d919d490fd414fe9647e566e92c71d7f64509.tar.gz SMAPI-5d3d919d490fd414fe9647e566e92c71d7f64509.tar.bz2 SMAPI-5d3d919d490fd414fe9647e566e92c71d7f64509.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'docs/technical')
-rw-r--r-- | docs/technical/mod-package.md | 12 | ||||
-rw-r--r-- | docs/technical/smapi.md | 28 |
2 files changed, 23 insertions, 17 deletions
diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index 8c9c59fb..6d04722c 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -1,7 +1,7 @@ ← [SMAPI](../README.md) The **mod build package** is an open-source NuGet package which automates the MSBuild configuration -for SMAPI mods and related tools. The package is fully compatible with Linux, Mac, and Windows. +for SMAPI mods and related tools. The package is fully compatible with Linux, macOS, and Windows. ## Contents * [Use](#use) @@ -33,7 +33,7 @@ change how these work): * **Add assembly references:** The package adds assembly references to SMAPI, Stardew Valley, xTile, and the game framework - (MonoGame on Linux/Mac, XNA Framework on Windows). It automatically adjusts depending on which OS + (MonoGame on Linux/macOS, XNA Framework on Windows). It automatically adjusts depending on which OS you're compiling it on. If you use [Harmony](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Harmony), it can optionally add a reference to that too. @@ -55,7 +55,7 @@ change how these work): breakpoints](https://docs.microsoft.com/en-us/visualstudio/debugger/using-breakpoints?view=vs-2019) in your code while the game is running, or [make simple changes to the mod code without needing to restart the game](https://docs.microsoft.com/en-us/visualstudio/debugger/edit-and-continue?view=vs-2019). - This is disabled on Linux/Mac due to limitations with the Mono wrapper. + This is disabled on Linux/macOS due to limitations with the Mono wrapper. * **Preconfigure common settings:** The package automatically enables `.pdb` files (so error logs show line numbers to simplify @@ -82,7 +82,7 @@ There are two places you can put them: 1. Open the home folder on your computer (see instructions for [Linux](https://superuser.com/questions/409218/where-is-my-users-home-folder-in-ubuntu), - [MacOS](https://www.cnet.com/how-to/how-to-find-your-macs-home-folder-and-add-it-to-finder/), + [macOS](https://www.cnet.com/how-to/how-to-find-your-macs-home-folder-and-add-it-to-finder/), or [Windows](https://www.computerhope.com/issues/ch000109.htm)). 2. Create a `stardewvalley.targets` file with this content: ```xml @@ -132,7 +132,7 @@ The absolute path to the folder containing the game's installed mods (defaults t <td><code>GameExecutableName</code></td> <td> -The filename for the game's executable (i.e. `StardewValley.exe` on Linux/Mac or +The filename for the game's executable (i.e. `StardewValley.exe` on Linux/macOS or `Stardew Valley.exe` on Windows). This is auto-detected, and you should almost never change this. </td> @@ -484,7 +484,7 @@ Released 05 June 2017. Released 23 January 2017. * Added support for setting a custom game path globally. -* Added default GOG path on Mac. +* Added default GOG path on macOS. ### 1.4 Released 11 January 2017. diff --git a/docs/technical/smapi.md b/docs/technical/smapi.md index e77d9d82..b64239c1 100644 --- a/docs/technical/smapi.md +++ b/docs/technical/smapi.md @@ -33,7 +33,7 @@ argument | purpose `--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 -or testing and may change without warning. On Linux/Mac, see _environment variables_ below. +or testing and may change without warning. On Linux/macOS, see _environment variables_ below. argument | purpose -------- | ------- @@ -41,7 +41,7 @@ argument | purpose `--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/Mac due to the way the game launcher works. You can +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: > SMAPI_MODS_PATH="Mods (multiplayer)" /path/to/StardewValley @@ -56,8 +56,9 @@ SMAPI uses a small number of conditional compilation constants, which you can se flag | purpose ---- | ------- -`SMAPI_FOR_WINDOWS` | Whether SMAPI is being compiled for Windows; if not set, the code assumes Linux/MacOS. Set automatically in `common.targets`. -`SMAPI_FOR_XNA` | Whether SMAPI is being compiled for XNA Framework; if not set, the code assumes MonoGame. Set automatically in `common.targets` with the same value as `SMAPI_FOR_WINDOWS`. +`SMAPI_FOR_WINDOWS` | Whether SMAPI is being compiled for Windows; if not set, the code assumes Linux/macOS. Set automatically in `common.targets`. +`SMAPI_FOR_WINDOWS_64BIT_HACK` | Whether SMAPI is being [compiled for Windows with a 64-bit Linux version of the game](https://github.com/Pathoschild/SMAPI/issues/767). This is highly specialized and shouldn't be used in most cases. False by default. +`SMAPI_FOR_XNA` | Whether SMAPI is being compiled for XNA Framework; if not set, the code assumes MonoGame. Set automatically in `common.targets` with the same value as `SMAPI_FOR_WINDOWS` (unless `SMAPI_FOR_WINDOWS_64BIT_HACK` is set). `HARMONY_2` | Whether to enable experimental Harmony 2.0 support and rewrite existing Harmony 1._x_ mods for compatibility. Note that you need to replace `build/0Harmony.dll` with a Harmony 2.0 build (or switch to a package reference) to use this flag. ## For SMAPI developers @@ -72,7 +73,7 @@ placed in a `bin` folder at the root of the Git repository. ### Debugging a local build Rebuilding the solution in debug mode will copy the SMAPI files into your game folder. Starting -the `SMAPI` project with debugging from Visual Studio (on Mac or Windows) will launch SMAPI with +the `SMAPI` project with debugging from Visual Studio (on macOS or Windows) will launch SMAPI with the debugger attached, so you can intercept errors and step through the code being executed. That doesn't work in MonoDevelop on Linux, unfortunately. @@ -81,7 +82,9 @@ To prepare a crossplatform SMAPI release, you'll need to compile it on two platf [crossplatforming info](https://stardewvalleywiki.com/Modding:Modder_Guide/Test_and_Troubleshoot#Testing_on_all_platforms) on the wiki for the first-time setup. -1. Update the version numbers in `build/common.targets`, `Constants`, and the `manifest.json` for +1. [Install a separate 64-bit version of Stardew Valley](https://github.com/Steviegt6/Stardew64Installer#readme) + on Windows. +2. Update the version numbers in `build/common.targets`, `Constants`, and the `manifest.json` for bundled mods. Make sure you use a [semantic version](https://semver.org). Recommended format: build type | format | example @@ -89,12 +92,15 @@ on the wiki for the first-time setup. dev build | `<version>-alpha.<date>` | `3.0.0-alpha.20171230` prerelease | `<version>-beta.<date>` | `3.0.0-beta.20171230` release | `<version>` | `3.0.0` - -2. In Windows: +3. In Windows: 1. Rebuild the solution with the _release_ solution configuration. - 2. Copy `bin/SMAPI installer` and `bin/SMAPI installer for developers` to Linux/Mac. - -3. In Linux/Mac: + 2. Back up the `bin/SMAPI installer` and `bin/SMAPI installer for developers` folders. + 3. Edit `common.targets` and uncomment the Stardew Valley 64-bit section at the top. + 4. Rebuild the solution again. + 5. Rename the compiled `StardewModdingAPI.exe` file to `StardewModdingAPI-x64.exe`, and copy it + into the `windows-install.dat` files from step ii. + 6. Copy the folders from step ii to Linux/MacOS. +4. In Linux/macOS: 1. Rebuild the solution with the _release_ solution configuration. 2. Add the `windows-install.*` files from Windows to the `bin/SMAPI installer` and `bin/SMAPI installer for developers` folders compiled on Linux. |