diff options
-rw-r--r-- | docs/technical/smapi.md | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/docs/technical/smapi.md b/docs/technical/smapi.md index 4be062e2..f454e99c 100644 --- a/docs/technical/smapi.md +++ b/docs/technical/smapi.md @@ -76,10 +76,48 @@ the debugger attached, so you can intercept errors and step through the code bei doesn't work in MonoDevelop on Linux, unfortunately. ### Preparing a release -To prepare a crossplatform SMAPI release, you'll need to compile it on two platforms. See -[crossplatforming info](https://stardewvalleywiki.com/Modding:Modder_Guide/Test_and_Troubleshoot#Testing_on_all_platforms) -on the wiki for the first-time setup. - +To prepare a crossplatform SMAPI release, you'll need to compile it on two platforms: Windows and +Linux. The instructions below assume you have Windows 11, but you can adapt them for +a different setup if needed. + +#### Initial setup +First-time setup on Windows: +1. [Install Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install). +2. Install the needed software in WSL: + 1. Run `sudo apt update` to update the package list. + 2. Install [the .NET 5 SDK](https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu) + (for Stardew Valley 1.5.5+) or [`mono-complete`](https://www.mono-project.com/download/stable/) + (for earlier versions). + _You can run `lsb_release -a` to get the Ubuntu version number._ + 3. [Install Steam](https://linuxconfig.org/how-to-install-steam-on-ubuntu-20-04-focal-fossa-linux). + 4. Launch `steam` and install the game like usual. + 5. Download and install your preferred IDE. For the [latest standalone Rider + version](https://www.jetbrains.com/help/rider/Installation_guide.html#prerequisites): + ```sh + wget "<download url here>" -O rider-install.tar.gz + sudo tar -xzvf rider-install.tar.gz -C /opt + ln -s "/opt/JetBrains Rider-<version>/bin/rider.sh" + ./rider.sh + ``` + 3. Clone the SMAPI repo in WSL: + ```sh + git clone https://github.com/Pathoschild/SMAPI.git + ``` + +To compile SMAPI in WSL: +1. Run `./rider.sh` to open the Rider GUI. +2. Use the GUI to compile the solution. + +To launch the game: +1. Open a WSL terminal. +2. Run these commands to start Steam: + ```sh + export TERM=xterm + steam + ``` +3. Launch the game through the Steam UI. + +#### Prepare the release 1. 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: @@ -90,8 +128,8 @@ on the wiki for the first-time setup. release | `<version>` | `3.0.0` 2. In Windows: 1. Rebuild the solution with the _release_ solution configuration. - 2. Copy the `bin/SMAPI installer` and `bin/SMAPI installer for developers` folders to Linux/macOS. -4. In Linux/macOS: + 2. Copy the `bin/SMAPI installer` and `bin/SMAPI installer for developers` folders to Linux. +4. In Linux: 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. |