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 Aug 14, 2018
2 parents 60b4119 + 4dd4efc commit 4f28ea3
Show file tree
Hide file tree
Showing 30 changed files with 754 additions and 435 deletions.
4 changes: 2 additions & 2 deletions build/GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Reflection;

[assembly: AssemblyProduct("SMAPI")]
[assembly: AssemblyVersion("2.6.0")]
[assembly: AssemblyFileVersion("2.6.0")]
[assembly: AssemblyVersion("2.7.0")]
[assembly: AssemblyFileVersion("2.7.0")]
29 changes: 29 additions & 0 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
# Release notes
## 2.7
* For players:
* Updated for Stardew Valley 1.3.28.
* Improved how mod issues are listed in the console and log.
* Revamped installer. It now...
* uses a new format that should be more intuitive;
* lets players on Linux/Mac choose the console color scheme (SMAPI will auto-detect it on Windows);
* and validates requirements earlier.
* Fixed custom festival maps always using spring tilesheets.
* Fixed `player_add` command not recognising return scepter.
* Fixed `player_add` command showing fish twice.
* Fixed some SMAPI logs not deleted when starting a new session.

* For modders:
* Added support for `.json` data files in the content API (including Content Patcher).
* Added propagation for asset changes through the content API for...
* child sprites;
* dialogue;
* map tilesheets.
* Added `--mods-path` CLI command-line argument to switch between mod folders.
* All enums are now JSON-serialised by name instead of numeric value. (Previously only a few enums were serialised that way. JSON files which already have numeric enum values will still be parsed fine.)
* Fixed false compatibility error when constructing multidimensional arrays.
* Fixed `.ToSButton()` methods not being public.
* Updated compatibility list.

* For SMAPI developers:
* Dropped support for pre-SMAPI-2.6 update checks in the web API.
_These are no longer useful, even if the player still has earlier versions of SMAPI. Older versions of SMAPI won't launch in Stardew Valley 1.3 (so they won't check for updates), and newer versions of SMAPI/mods won't work with older versions of the game._

## 2.6
* For players:
* Updated for Stardew Valley 1.3.
Expand Down
1 change: 1 addition & 0 deletions docs/technical-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ change without warning.
argument | purpose
-------- | -------
`--no-terminal` | SMAPI won't write anything to the console window. (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.
### Compile flags
SMAPI uses a small number of conditional compilation constants, which you can set by editing the
Expand Down
61 changes: 61 additions & 0 deletions src/SMAPI.Installer/Framework/InstallerPaths.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using System.IO;

namespace StardewModdingAPI.Installer.Framework
{
/// <summary>Manages paths for the SMAPI installer.</summary>
internal class InstallerPaths
{
/*********
** Accessors
*********/
/// <summary>The directory containing the installer files for the current platform.</summary>
public DirectoryInfo PackageDir { get; }

/// <summary>The directory containing the installed game.</summary>
public DirectoryInfo GameDir { get; }

/// <summary>The directory into which to install mods.</summary>
public DirectoryInfo ModsDir { get; }

/// <summary>The full path to the directory containing the installer files for the current platform.</summary>
public string PackagePath => this.PackageDir.FullName;

/// <summary>The full path to the directory containing the installed game.</summary>
public string GamePath => this.GameDir.FullName;

/// <summary>The full path to the directory into which to install mods.</summary>
public string ModsPath => this.ModsDir.FullName;

/// <summary>The full path to the installed SMAPI executable file.</summary>
public string ExecutablePath { get; }

/// <summary>The full path to the vanilla game launcher on Linux/Mac.</summary>
public string UnixLauncherPath { get; }

/// <summary>The full path to the installed SMAPI launcher on Linux/Mac before it's renamed.</summary>
public string UnixSmapiLauncherPath { get; }

/// <summary>The full path to the vanilla game launcher on Linux/Mac after SMAPI is installed.</summary>
public string UnixBackupLauncherPath { get; }


/*********
** Public methods
*********/
/// <summary>Construct an instance.</summary>
/// <param name="packageDir">The directory path containing the installer files for the current platform.</param>
/// <param name="gameDir">The directory path for the installed game.</param>
/// <param name="gameExecutableName">The name of the game's executable file for the current platform.</param>
public InstallerPaths(DirectoryInfo packageDir, DirectoryInfo gameDir, string gameExecutableName)
{
this.PackageDir = packageDir;
this.GameDir = gameDir;
this.ModsDir = new DirectoryInfo(Path.Combine(gameDir.FullName, "Mods"));

this.ExecutablePath = Path.Combine(gameDir.FullName, gameExecutableName);
this.UnixLauncherPath = Path.Combine(gameDir.FullName, "StardewValley");
this.UnixSmapiLauncherPath = Path.Combine(gameDir.FullName, "StardewModdingAPI");
this.UnixBackupLauncherPath = Path.Combine(gameDir.FullName, "StardewValley-original");
}
}
}
Loading

0 comments on commit 4f28ea3

Please sign in to comment.