From 2c278b970385486232b2c2727ab74c20e7730921 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 22 Jan 2017 22:52:41 -0500 Subject: add support for setting a custom game path globally --- README.md | 49 ++++++++++++++++++++++++++++++++++++------------- build/smapi.targets | 8 +++++++- 2 files changed, 43 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index f3be04b3..f472049c 100644 --- a/README.md +++ b/README.md @@ -63,28 +63,51 @@ This will deploy your mod files into the game directory, launch SMAPI, and attac ## Troubleshoot ### "Failed to find the game install path" -If you see this error: +That error means the package couldn't figure out where the game is installed. You need to specify +the game location yourself. There's two ways to do that: -> Failed to find the game install path automatically; edit the *.csproj file and manually add a -> <GamePath> setting with the full directory path containing the Stardew Valley executable. +* **Option 1: set the path in the project file.** + _(You'll need to do it for every project that uses the package.)_ + 1. Get the folder path containing the Stardew Valley `.exe` file. + 2. Add this to your `.csproj` file under the ` + PATH_HERE + + ``` -1. Get the full folder path containing the Stardew Valley executable. -2. Add this to your `.csproj` file under the ` - C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley - - ``` + 3. Replace `PATH_HERE` with your custom game install path. + +* **Option 2: set the path globally.** + _This will apply to every project that uses version 1.5+ of package._ + + 1. Get the full folder path containing the Stardew Valley executable. + 2. Create this file path: + + platform | path + --------- | ---- + Linux/Mac | `~/stardewvalley.targets` + Windows | `%USERPROFILE%\stardewvalley.targets` + + 3. Save the file with this content: + + ```xml + + + PATH_HERE + + + ``` + + 4. Replace `PATH_HERE` with your custom game install path. The configuration will check your custom path first, then fall back to the default paths (so it'll still compile on a different computer). ## Versions 1.5 (upcoming): +* Added support for setting a custom game path globally. * Added default GOG path on Mac. 1.4: diff --git a/build/smapi.targets b/build/smapi.targets index ed513846..de3420d1 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -1,4 +1,10 @@ + + + + @@ -94,6 +100,6 @@ #######--> - + \ No newline at end of file -- cgit