Skip to content

Commit

Permalink
Merge branch 'develop' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathoschild committed Jan 6, 2020
2 parents d34f369 + 4895937 commit f976b5c
Show file tree
Hide file tree
Showing 85 changed files with 1,848 additions and 1,013 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ _ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# Rider
.idea/

# NuGet packages
*.nupkg
**/packages/*
Expand All @@ -31,4 +34,4 @@ appsettings.Development.json
src/SMAPI.Web.LegacyRedirects/aws-beanstalk-tools-defaults.json

# Azure generated files
src/SMAPI.Web/Properties/PublishProfiles/smapi-web-release - Web Deploy.pubxml
src/SMAPI.Web/Properties/PublishProfiles/*.pubxml
2 changes: 1 addition & 1 deletion build/common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<!--set properties -->
<PropertyGroup>
<Version>3.0.1</Version>
<Version>3.1.0</Version>
<Product>SMAPI</Product>

<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>
Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ French | ❑ not translated
German | ✓ [fully translated](../src/SMAPI/i18n/de.json)
Hungarian | ❑ not translated
Italian | ❑ not translated
Japanese | ❑ not translated
Japanese | [fully translated](../src/SMAPI/i18n/ja.json)
Korean | ❑ not translated
Portuguese | ❑ not translated
Portuguese | [fully translated](../src/SMAPI/i18n/pt.json)
Russian | ✓ [fully translated](../src/SMAPI/i18n/ru.json)
Spanish | ❑ not translated
Spanish | [fully translated](../src/SMAPI/i18n/es.json)
Turkish | ✓ [fully translated](../src/SMAPI/i18n/tr.json)
46 changes: 45 additions & 1 deletion docs/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,52 @@
&larr; [README](README.md)

# Release notes
## 3.1
Released 05 January 2019 for Stardew Valley 1.4 or later.

* For players:
* Added separate group in 'skipped mods' list for broken dependencies, so it's easier to see what to fix first.
* Added friendly log message for save file-not-found errors.
* Updated for gamepad modes in Stardew Valley 1.4.1.
* Improved performance in some cases.
* Fixed compatibility with Linux Mint 18 (thanks to techge!), Arch Linux, and Linux systems with libhybris-utils installed.
* Fixed memory leak when repeatedly loading a save and returning to title.
* Fixed memory leak when mods reload assets.
* Fixes for Console Commands mod:
* added new clothing items;
* fixed spawning new flooring and rings (thanks to Mizzion!);
* fixed spawning custom rings added by mods;
* Fixed errors when some item data is invalid.
* Updated translations. Thanks to L30Bola (added Portuguese), PlussRolf (added Spanish), and shirutan (added Japanese)!

* For the web UI:
* Added option to edit & reupload in the JSON validator.
* File uploads are now stored in Azure storage instead of Pastebin, due to ongoing Pastebin perfomance issues.
* File uploads now expire after one month.
* Updated the JSON validator for Content Patcher 1.10 and 1.11.
* Fixed JSON validator no longer letting you change format when viewing a file.
* Fixed JSON validator for Content Patcher not requiring `Default` if `AllowBlank` was omitted.
* Fixed log parser not correctly handling content packs with no author (thanks to danvolchek!).
* Fixed main sidebar link pointing to wiki instead of home page.

* For modders:
* Added `World.ChestInventoryChanged` event (thanks to collaboration with wartech0!).
* Added asset propagation for...
* grass textures;
* winter flooring textures;
* `Data\Bundles` changes (for added bundles only);
* `Characters\Farmer\farmer_girl_base_bald`.
* Added paranoid-mode warning for direct `Console` access.
* Improved error messages for `TargetParameterCountException` when using the reflection API.
* `helper.Read/WriteSaveData` can now be used while a save is being loaded (e.g. within a `Specialized.LoadStageChanged` event).
* Removed `DumpMetadata` option. It was only for specific debugging cases, but players would sometimes enable it incorrectly and then report crashes.
* Fixed private textures loaded from content packs not having their `Name` field set.

* For SMAPI developers:
* You can now run local environments without configuring Amazon, Azure, MongoDB, and Pastebin accounts.

## 3.0.1
Released 02 December 2019 for Stardew Valley 1.4.0.1.
Released 02 December 2019 for Stardew Valley 1.4 or later.

* For players:
* Updated for Stardew Valley 1.4.0.1.
Expand Down
4 changes: 2 additions & 2 deletions docs/technical/mod-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ property | description
`$(GamePath)` | The absolute path to the detected game folder.
`$(GameExecutableName)` | The game's executable name for the current OS (`Stardew Valley` on Windows, or `StardewValley` on Linux/Mac).

If you get a build error saying it can't find your game, see [_set the game path_](#set-the-game-path).
If you get a build error saying it can't find your game, see [_custom game path_](#custom-game-path).

### Add assembly references
The package adds assembly references to SMAPI, Stardew Valley, xTile, and MonoGame (Linux/Mac) or XNA
Expand Down Expand Up @@ -228,7 +228,7 @@ or you have multiple installs, you can specify the path yourself. There's two wa
</Project>
```

4. Replace `PATH_HERE` with your game path.
4. Replace `PATH_HERE` with your game's folder path.

* **Option 2: path in the project file.**
_You'll need to do this for each project that uses the package._
Expand Down
16 changes: 8 additions & 8 deletions docs/technical/smapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ flag | purpose
### Compiling from source
Using an official SMAPI release is recommended for most users.

SMAPI uses some C# 7 code, so you'll need at least
[Visual Studio 2017](https://www.visualstudio.com/vs/community/) on Windows,
[MonoDevelop 7.0](https://www.monodevelop.com/) on Linux,
[Visual Studio 2017 for Mac](https://www.visualstudio.com/vs/visual-studio-mac/), or an equivalent
IDE to compile it. It uses build configuration derived from the
[crossplatform mod config](https://github.com/Pathoschild/Stardew.ModBuildConfig#readme) to detect
your current OS automatically and load the correct references. Compile output will be placed in a
`bin` folder at the root of the git repository.
SMAPI often uses the latest C# syntax. You may need the latest version of
[Visual Studio](https://www.visualstudio.com/vs/community/) on Windows,
[MonoDevelop](https://www.monodevelop.com/) on Linux,
[Visual Studio for Mac](https://www.visualstudio.com/vs/visual-studio-mac/), or an equivalent IDE
to compile it. It uses build configuration derived from the
[crossplatform mod config](https://smapi.io/package/readme) to detect your current OS automatically
and load the correct references. Compile output will be 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
Expand Down
73 changes: 39 additions & 34 deletions docs/technical/web.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,21 @@ and update check API.
* [Short URLs](#short-urls)
* [For SMAPI developers](#for-smapi-developers)
* [Local development](#local-development)
* [Deploying to Amazon Beanstalk](#deploying-to-amazon-beanstalk)
* [Production environment](#production-environment)

## Log parser
The log parser provides a web UI for uploading, parsing, and sharing SMAPI logs. The logs are
persisted in a compressed form to Pastebin. The log parser lives at https://smapi.io/log.
The log parser at https://smapi.io/log provides a web UI for uploading, parsing, and sharing SMAPI
logs.

The logs are saved in a compressed form to Amazon Blob storage for 30 days.

## JSON validator
### Overview
The JSON validator provides a web UI for uploading and sharing JSON files, and validating them as
plain JSON or against a predefined format like `manifest.json` or Content Patcher's `content.json`.
The JSON validator lives at https://smapi.io/json.
The JSON validator at https://smapi.io/json provides a web UI for uploading and sharing JSON files,
and validating them as plain JSON or against a predefined format like `manifest.json` or Content
Patcher's `content.json`.

The logs are saved in a compressed form to Amazon Blob storage for 30 days.

### Schema file format
Schema files are defined in `wwwroot/schemas` using the [JSON Schema](https://json-schema.org/)
Expand Down Expand Up @@ -336,43 +340,44 @@ short url | → | target page
A local environment lets you run a complete copy of the web project (including cache database) on
your machine, with no external dependencies aside from the actual mod sites.

Initial setup:

1. [Install MongoDB](https://docs.mongodb.com/manual/administration/install-community/) and add its
`bin` folder to the system PATH.
2. Create a local folder for the MongoDB data (e.g. `C:\dev\smapi-cache`).
3. Enter your credentials in the `appsettings.Development.json` file. You can leave the MongoDB
credentials as-is to use the default local instance; see the next section for the other settings.

To launch the environment:
1. Launch MongoDB from a terminal (change the data path if applicable):
```sh
mongod --dbpath C:\dev\smapi-cache
```
2. Launch `SMAPI.Web` from Visual Studio to run a local version of the site.
<small>(Local URLs will use HTTP instead of HTTPS.)</small>
1. Enter the Nexus credentials in `appsettings.Development.json` . You can leave the other
credentials empty to default to fetching data anonymously, and storing data in-memory and
on disk.
2. Launch `SMAPI.Web` from Visual Studio to run a local version of the site.

### Production environment
A production environment includes the web servers and cache database hosted online for public
access. This section assumes you're creating a new production environment from scratch (not using
the official live environment).
access.

This section assumes you're creating a new environment on Azure, but the app isn't tied to any
Azure services. If you want to host it on a different site, you'll need to adjust the instructions
accordingly.

Initial setup:

1. Launch an empty MongoDB server (e.g. using [MongoDB Atlas](https://www.mongodb.com/cloud/atlas)).
2. Create an AWS Beanstalk .NET environment with these environment properties:
1. Launch an empty MongoDB server (e.g. using [MongoDB Atlas](https://www.mongodb.com/cloud/atlas))
for mod data.
2. Create an Azure Blob storage account for uploaded files.
3. Create an Azure App Services environment running the latest .NET Core on Linux or Windows.
4. Add these application settings in the new App Services environment:

property name | description
------------------------------- | -----------------
`ApiClients.AzureBlobConnectionString` | The connection string for the Azure Blob storage account created in step 2.
`ApiClients.GitHubUsername`<br />`ApiClients.GitHubPassword` | The login credentials for the GitHub account with which to fetch release info. If these are omitted, GitHub will impose much stricter rate limits.
`ApiClients:NexusApiKey` | The [Nexus API authentication key](https://github.com/Pathoschild/FluentNexus#init-a-client).
`MongoDB:ConnectionString` | The connection string for the MongoDB instance.
`MongoDB:Database` | The MongoDB database name (e.g. `smapi` in production or `smapi-edge` in testing environments).

Optional settings:

property name | description
------------------------------- | -----------------
`LogParser:PastebinDevKey` | The [Pastebin developer key](https://pastebin.com/api#1) used to authenticate with the Pastebin API.
`LogParser:PastebinUserKey` | The [Pastebin user key](https://pastebin.com/api#8) used to authenticate with the Pastebin API. Can be left blank to post anonymously.
`ModUpdateCheck:GitHubPassword` | The password with which to authenticate to GitHub when fetching release info.
`ModUpdateCheck:GitHubUsername` | The username with which to authenticate to GitHub when fetching release info.
`MongoDB:Host` | The hostname for the MongoDB instance.
`MongoDB:Username` | The login username for the MongoDB instance.
`MongoDB:Password` | The login password for the MongoDB instance.
`MongoDB:Database` | The database name (e.g. `smapi` in production or `smapi-edge` in testing environments).
`BackgroundServices:Enabled` | Set to `true` to enable background processes like fetching data from the wiki, or false to disable them.
`Site:BetaEnabled` | Set to `true` to show a separate download button if there's a beta version of SMAPI in its GitHub releases.
`Site:BetaBlurb` | If `Site:BetaEnabled` is true and there's a beta version of SMAPI in its GitHub releases, this is shown on the beta download button as explanatory subtext.
`Site:SupporterList` | A list of Patreon supports to credit on the download page.

To deploy updates:
1. Deploy the web project using [AWS Toolkit for Visual Studio](https://aws.amazon.com/visualstudio/).
1. [Deploy the web project from Visual Studio](https://docs.microsoft.com/en-us/visualstudio/deployment/quickstart-deploy-to-azure).
2. If the MongoDB schema changed, delete the MongoDB database. (It'll be recreated automatically.)
6 changes: 3 additions & 3 deletions src/SMAPI.Installer/unix-launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ else
COMMAND="type"
fi

# select terminal (prefer $TERMINAL for overrides and testing, then xterm for best compatibility, then known supported terminals)
for terminal in "$TERMINAL" xterm gnome-terminal kitty terminator xfce4-terminal konsole terminal termite alacritty x-terminal-emulator; do
# select terminal (prefer xterm for best compatibility, then known supported terminals)
for terminal in xterm gnome-terminal kitty terminator xfce4-terminal konsole terminal termite alacritty mate-terminal x-terminal-emulator; do
if $COMMAND "$terminal" 2>/dev/null; then
# Find the true shell behind x-terminal-emulator
if [ "$(basename "$(readlink -f $(which "$terminal"))")" != "x-terminal-emulator" ]; then
Expand Down Expand Up @@ -108,7 +108,7 @@ else
alacritty -e sh -c 'TERM=xterm ./StardewModdingAPI.bin.x86 $*'
fi
;;
xterm|xfce4-terminal|gnome-terminal|terminal|termite)
xterm|xfce4-terminal|gnome-terminal|terminal|termite|mate-terminal)
$LAUNCHTERM -e "sh -c 'TERM=xterm $LAUNCHER'"
;;
konsole)
Expand Down
Loading

0 comments on commit f976b5c

Please sign in to comment.