From 9be620e2fcdc13c6e6a918323157e21e1fed568f Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 19 Oct 2016 14:33:13 -0400 Subject: extract build configuration from Lookup Anything mod --- stardewvalley.targets | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 stardewvalley.targets diff --git a/stardewvalley.targets b/stardewvalley.targets new file mode 100644 index 00000000..1e71d06a --- /dev/null +++ b/stardewvalley.targets @@ -0,0 +1,51 @@ + + + + C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley + C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley + ~\Library\Application Support\Steam\steamapps\common\Stardew Valley\Contents\MacOS + Program + $(GamePath)\StardewModdingAPI.exe + $(GamePath) + + + + + + + + + $(GamePath)\Stardew Valley.exe + + + $(GamePath)\StardewModdingAPI.exe + + + False + $(GamePath)\xTile.dll + + + + + + + False + $(GamePath)\MonoGame.Framework.dll + + + $(GamePath)\StardewValley.exe + + + $(GamePath)\StardewModdingAPI.exe + + + $(GamePath)\xTile.dll + + + + + + + + + \ No newline at end of file -- cgit From c6dbad2594620f9c25e7e548b813522c1e6c626d Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 19 Oct 2016 14:46:23 -0400 Subject: add license + readme --- LICENSE.txt | 8 ++++++++ README.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 LICENSE.txt create mode 100644 README.md diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..6463a584 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,8 @@ +The MIT License (MIT) +Copyright Pathoschild and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..6ea731d1 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +**Stardew.ModBuildConfig** is an open-source NuGet package which automates the build configuration +for crossplatform [Stardew Valley](http://stardewvalley.net/) mods that use SMAPI. + +The configuration detects the operating system (Linux, Mac, or Windows) and the Stardew Valley +install path, and injects the correct references to Stardew Valley, SMAPI, and XNA/MonoGame. +It also adds a `GamePath` variable which can be used to automate mod installation during testing +if desired. + +## Contents +* [Installation](#installation) +* [Configuration](#configuration) +* [Versions](#versions) +* [See also](#see-also) + +## Installation +### New mod +_TODO_ + +### Migrating an existing mod +_TODO_ + +## Configuration +_TODO_ + +## Versions +_TODO_ + +## See also +_TODO_ +* NuGet package +* Discussion thread \ No newline at end of file -- cgit From 555e0d12241f9bda0262f513fa6bc8c55cc7d5fe Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 19 Oct 2016 18:54:04 -0400 Subject: add NuGet package spec + icon --- assets/nuget-icon.pdn | Bin 0 -> 7401 bytes assets/nuget-icon.png | Bin 0 -> 5054 bytes build/smapi.targets | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ package.nuspec | 20 ++++++++++++++++++++ stardewvalley.targets | 51 -------------------------------------------------- 5 files changed, 71 insertions(+), 51 deletions(-) create mode 100644 assets/nuget-icon.pdn create mode 100644 assets/nuget-icon.png create mode 100644 build/smapi.targets create mode 100644 package.nuspec delete mode 100644 stardewvalley.targets diff --git a/assets/nuget-icon.pdn b/assets/nuget-icon.pdn new file mode 100644 index 00000000..7bd5c0c5 Binary files /dev/null and b/assets/nuget-icon.pdn differ diff --git a/assets/nuget-icon.png b/assets/nuget-icon.png new file mode 100644 index 00000000..611cdf88 Binary files /dev/null and b/assets/nuget-icon.png differ diff --git a/build/smapi.targets b/build/smapi.targets new file mode 100644 index 00000000..1e71d06a --- /dev/null +++ b/build/smapi.targets @@ -0,0 +1,51 @@ + + + + C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley + C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley + ~\Library\Application Support\Steam\steamapps\common\Stardew Valley\Contents\MacOS + Program + $(GamePath)\StardewModdingAPI.exe + $(GamePath) + + + + + + + + + $(GamePath)\Stardew Valley.exe + + + $(GamePath)\StardewModdingAPI.exe + + + False + $(GamePath)\xTile.dll + + + + + + + False + $(GamePath)\MonoGame.Framework.dll + + + $(GamePath)\StardewValley.exe + + + $(GamePath)\StardewModdingAPI.exe + + + $(GamePath)\xTile.dll + + + + + + + + + \ No newline at end of file diff --git a/package.nuspec b/package.nuspec new file mode 100644 index 00000000..5d8e5e52 --- /dev/null +++ b/package.nuspec @@ -0,0 +1,20 @@ + + + + Pathoschild.Stardew.ModdingBuildConfig + 1.0-alpha + MSBuild config for Stardew Valley mods + Pathoschild + Pathoschild + false + https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/master/LICENSE.txt + https://github.com/Pathoschild/Stardew.ModBuildConfig + https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.0/assets/nuget-icon.png + Automates the build configuration for a crossplatform Stardew Valley mod that uses SMAPI. + Initial release + + + + + + \ No newline at end of file diff --git a/stardewvalley.targets b/stardewvalley.targets deleted file mode 100644 index 1e71d06a..00000000 --- a/stardewvalley.targets +++ /dev/null @@ -1,51 +0,0 @@ - - - - C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley - C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley - ~\Library\Application Support\Steam\steamapps\common\Stardew Valley\Contents\MacOS - Program - $(GamePath)\StardewModdingAPI.exe - $(GamePath) - - - - - - - - - $(GamePath)\Stardew Valley.exe - - - $(GamePath)\StardewModdingAPI.exe - - - False - $(GamePath)\xTile.dll - - - - - - - False - $(GamePath)\MonoGame.Framework.dll - - - $(GamePath)\StardewValley.exe - - - $(GamePath)\StardewModdingAPI.exe - - - $(GamePath)\xTile.dll - - - - - - - - - \ No newline at end of file -- cgit From 520c46fbe661acac7f6c7854b71d05f58a06cf64 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 19 Oct 2016 19:26:33 -0400 Subject: expand readme, restructure config --- README.md | 39 +++++++++++++++---------- build/smapi.targets | 82 ++++++++++++++++++++++++++++++----------------------- package.nuspec | 2 +- 3 files changed, 71 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 6ea731d1..564f508e 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,38 @@ **Stardew.ModBuildConfig** is an open-source NuGet package which automates the build configuration for crossplatform [Stardew Valley](http://stardewvalley.net/) mods that use SMAPI. -The configuration detects the operating system (Linux, Mac, or Windows) and the Stardew Valley -install path, and injects the correct references to Stardew Valley, SMAPI, and XNA/MonoGame. -It also adds a `GamePath` variable which can be used to automate mod installation during testing -if desired. +The configuration... -## Contents -* [Installation](#installation) -* [Configuration](#configuration) -* [Versions](#versions) -* [See also](#see-also) +1. detects the operating system (Linux, Mac, or Windows) and the Stardew Valley install path; +2. injects the correct references to Stardew Valley, SMAPI, and XNA/MonoGame; +3. (on Windows) configures Visual Studio so you can launch the game for debugging; +4. and adds a `GamePath` variable which can be used to automate mod installation during testing + if desired. ## Installation -### New mod -_TODO_ +### Creating a new mod +1. Create an empty library project. +2. Reference the `Pathoschild.Stardew.ModBuildConfig` NuGet package. +3. [Write your code](http://canimod.com/guides/creating-a-smapi-mod). +4. Compile on any platform. ### Migrating an existing mod -_TODO_ +1. Remove any references to `Microsoft.Xna.*`, Stardew Valley, `StardewModdingAPI`, and xTile. +2. Reference the `Pathoschild.Stardew.ModBuildConfig` NuGet package. +3. Compile on any platform. ## Configuration -_TODO_ +### Custom game path +If you customised where Stardew Valley is installed, you can add your path to the list to try. -## Versions -_TODO_ +1. Get the full path to the directory containing the Stardew Valley executable. +2. Add this section to your `.csproj` file (anywhere before the added ` + C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley + + ``` ## See also _TODO_ diff --git a/build/smapi.targets b/build/smapi.targets index 1e71d06a..6231650c 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -1,47 +1,57 @@ - + C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley ~\Library\Application Support\Steam\steamapps\common\Stardew Valley\Contents\MacOS - Program - $(GamePath)\StardewModdingAPI.exe - $(GamePath) - - - - - - - $(GamePath)\Stardew Valley.exe - - - $(GamePath)\StardewModdingAPI.exe - - - False - $(GamePath)\xTile.dll - - + + + + + + + + + + $(GamePath)\Stardew Valley.exe + + + $(GamePath)\StardewModdingAPI.exe + + + False + $(GamePath)\xTile.dll + + - - - - False - $(GamePath)\MonoGame.Framework.dll - - - $(GamePath)\StardewValley.exe - - - $(GamePath)\StardewModdingAPI.exe - - - $(GamePath)\xTile.dll - - + + + Program + $(GamePath)\StardewModdingAPI.exe + $(GamePath) + + + + + + + False + $(GamePath)\MonoGame.Framework.dll + + + $(GamePath)\StardewValley.exe + + + $(GamePath)\StardewModdingAPI.exe + + + $(GamePath)\xTile.dll + + + + diff --git a/package.nuspec b/package.nuspec index 5d8e5e52..a000d986 100644 --- a/package.nuspec +++ b/package.nuspec @@ -2,7 +2,7 @@ Pathoschild.Stardew.ModdingBuildConfig - 1.0-alpha + 1.0-alpha2 MSBuild config for Stardew Valley mods Pathoschild Pathoschild -- cgit From e5d38b73720c58b00ea747b66be18f8b735d2e6e Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 19 Oct 2016 20:16:06 -0400 Subject: tweak error text --- build/smapi.targets | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build/smapi.targets b/build/smapi.targets index 6231650c..f38f1585 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -53,9 +53,8 @@ - + - + - \ No newline at end of file -- cgit From 465bd538e476766f1114f915f955e30c9abab944 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 19 Oct 2016 20:43:35 -0400 Subject: add more install paths --- build/smapi.targets | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build/smapi.targets b/build/smapi.targets index f38f1585..7d512a29 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -1,9 +1,18 @@ - C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley + + $(STARDEWVALLEY_DIR) + + + ~/.local/share/Steam/steamapps/common/Stardew Valley + + + ~/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS + + + C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley - ~\Library\Application Support\Steam\steamapps\common\Stardew Valley\Contents\MacOS -- cgit From e3d9894bf353197169fc3e84c973e07cfb5f3aae Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 19 Oct 2016 20:56:48 -0400 Subject: add package links to readme --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 564f508e..c53b1ac3 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@ The configuration... ## Installation ### Creating a new mod 1. Create an empty library project. -2. Reference the `Pathoschild.Stardew.ModBuildConfig` NuGet package. +2. Reference the [`Pathoschild.Stardew.ModBuildConfig` NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModdingBuildConfig). 3. [Write your code](http://canimod.com/guides/creating-a-smapi-mod). 4. Compile on any platform. ### Migrating an existing mod 1. Remove any references to `Microsoft.Xna.*`, Stardew Valley, `StardewModdingAPI`, and xTile. -2. Reference the `Pathoschild.Stardew.ModBuildConfig` NuGet package. +2. Reference the [`Pathoschild.Stardew.ModBuildConfig` NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModdingBuildConfig). 3. Compile on any platform. ## Configuration @@ -35,6 +35,5 @@ If you customised where Stardew Valley is installed, you can add your path to th ``` ## See also -_TODO_ -* NuGet package +* [NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModdingBuildConfig) * Discussion thread \ No newline at end of file -- cgit From 524c56ee757464b5785c4d704d4da1862b173db9 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 19 Oct 2016 22:53:49 -0400 Subject: correct home paths on Linux/Mac --- build/smapi.targets | 4 ++-- package.nuspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/smapi.targets b/build/smapi.targets index 7d512a29..2ca7a829 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -5,10 +5,10 @@ $(STARDEWVALLEY_DIR) - ~/.local/share/Steam/steamapps/common/Stardew Valley + $(HOME)/.local/share/Steam/steamapps/common/Stardew Valley - ~/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS + $(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley diff --git a/package.nuspec b/package.nuspec index a000d986..2f585ab5 100644 --- a/package.nuspec +++ b/package.nuspec @@ -2,7 +2,7 @@ Pathoschild.Stardew.ModdingBuildConfig - 1.0-alpha2 + 1.0-alpha4 MSBuild config for Stardew Valley mods Pathoschild Pathoschild -- cgit From 502559146bfb3cd39ee941245c3f71a7798a0760 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 21 Oct 2016 01:25:21 -0400 Subject: add GOG path on Linux --- build/smapi.targets | 1 + 1 file changed, 1 insertion(+) diff --git a/build/smapi.targets b/build/smapi.targets index 2ca7a829..2c0ca5b7 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -5,6 +5,7 @@ $(STARDEWVALLEY_DIR) + $(HOME)/GOG Games/Stardew Valley/game $(HOME)/.local/share/Steam/steamapps/common/Stardew Valley -- cgit From 8d532e1cabe374a5b8673f07249e2d3848bc1a78 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 21 Oct 2016 01:25:41 -0400 Subject: mention mod builder compatibility in readme --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index c53b1ac3..73aa082a 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,11 @@ If you customised where Stardew Valley is installed, you can add your path to th ``` +### Compatibility with mod builders +The configuration is designed for compatibility with third-party mod compilers. [Silverplum](https://github.com/rumangerst/SilVerPLuM) +is officially supported, and you can inject the `GAMEPATH` environment variable to override the +detected game path. + ## See also * [NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModdingBuildConfig) * Discussion thread \ No newline at end of file -- cgit From f9c107b751476b799a87cf25f9ed2424ab1a4775 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 21 Oct 2016 01:41:26 -0400 Subject: bump to 1.0 --- README.md | 6 +++--- package.nuspec | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 73aa082a..e1b065ec 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@ The configuration... ## Installation ### Creating a new mod 1. Create an empty library project. -2. Reference the [`Pathoschild.Stardew.ModBuildConfig` NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModdingBuildConfig). +2. Reference the [`Pathoschild.Stardew.ModBuildConfig` NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig). 3. [Write your code](http://canimod.com/guides/creating-a-smapi-mod). 4. Compile on any platform. ### Migrating an existing mod 1. Remove any references to `Microsoft.Xna.*`, Stardew Valley, `StardewModdingAPI`, and xTile. -2. Reference the [`Pathoschild.Stardew.ModBuildConfig` NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModdingBuildConfig). +2. Reference the [`Pathoschild.Stardew.ModBuildConfig` NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig). 3. Compile on any platform. ## Configuration @@ -40,5 +40,5 @@ is officially supported, and you can inject the `GAMEPATH` environment variable detected game path. ## See also -* [NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModdingBuildConfig) +* [NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig) * Discussion thread \ No newline at end of file diff --git a/package.nuspec b/package.nuspec index 2f585ab5..05c478de 100644 --- a/package.nuspec +++ b/package.nuspec @@ -1,13 +1,13 @@ - Pathoschild.Stardew.ModdingBuildConfig - 1.0-alpha4 + Pathoschild.Stardew.ModBuildConfig + 1.0 MSBuild config for Stardew Valley mods Pathoschild Pathoschild false - https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/master/LICENSE.txt + https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.0/LICENSE.txt https://github.com/Pathoschild/Stardew.ModBuildConfig https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.0/assets/nuget-icon.png Automates the build configuration for a crossplatform Stardew Valley mod that uses SMAPI. -- cgit From 137d795ab3d01bc132e99e19ba9567fd70f3cec3 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 21 Oct 2016 01:48:57 -0400 Subject: fix package --- package.nuspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.nuspec b/package.nuspec index 05c478de..58701695 100644 --- a/package.nuspec +++ b/package.nuspec @@ -2,7 +2,7 @@ Pathoschild.Stardew.ModBuildConfig - 1.0 + 1.0.1 MSBuild config for Stardew Valley mods Pathoschild Pathoschild @@ -11,10 +11,10 @@ https://github.com/Pathoschild/Stardew.ModBuildConfig https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.0/assets/nuget-icon.png Automates the build configuration for a crossplatform Stardew Valley mod that uses SMAPI. - Initial release + Corrected package structure - + \ No newline at end of file -- cgit From cb9efa4e8266b67ddb5c19a107af389cdedce49c Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 21 Oct 2016 19:42:09 -0400 Subject: add support for platform targeting --- README.md | 55 ++++++++++++++++++++++++++++++++++++++++++++--------- build/smapi.targets | 31 ++++++++++++++++++++++++++---- package.nuspec | 8 ++++---- 3 files changed, 77 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index e1b065ec..b94c118b 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,18 @@ **Stardew.ModBuildConfig** is an open-source NuGet package which automates the build configuration for crossplatform [Stardew Valley](http://stardewvalley.net/) mods that use SMAPI. -The configuration... +## Usage +Basically this package lets you write your mod once, and compile it on any computer. It detects +your current platform (Linux, Mac, or Windows) and game path, and injects the right references +automatically. You can also target a specific platform to create a mod package compatible with that +platform. -1. detects the operating system (Linux, Mac, or Windows) and the Stardew Valley install path; -2. injects the correct references to Stardew Valley, SMAPI, and XNA/MonoGame; -3. (on Windows) configures Visual Studio so you can launch the game for debugging; -4. and adds a `GamePath` variable which can be used to automate mod installation during testing - if desired. +More specifically, the configuration... + +1. detects the operating system and Stardew Valley path; +2. injects the right references to Stardew Valley, SMAPI, and XNA/MonoGame for your platform; +3. configures Visual Studio so you can launch the game for debugging (_Windows only_); +4. and adds a `GamePath` variable which can be used to script mod packaging if desired. ## Installation ### Creating a new mod @@ -23,7 +28,7 @@ The configuration... ## Configuration ### Custom game path -If you customised where Stardew Valley is installed, you can add your path to the list to try. +If you customised where Stardew Valley is installed, you can specify where it is. 1. Get the full path to the directory containing the Stardew Valley executable. 2. Add this section to your `.csproj` file (anywhere before the added ` ``` +The configuration will check your custom path first, then fall back to the default paths. (That way +you can still compile it normally on a different computer.) + +### Target platform +By default the build configuration will target your current platform (e.g. Linux, Mac, or Windows). +If you're compiling it for a different platform (and have the required dependencies installed), you +can manually override the platform detection. + +You can define it... + +* in your `.csproj` (anywhere before the added ` + Windows + + ``` + +* _or_ by setting one of these compile constant: `GAME_PLATFORM_LINUX`, `GAME_PLATFORM_MAC`, or + `GAME_PLATFORM_WINDOWS`. + * In Visual Studio: right-click on the project and choose _Properties_. Click the _Build_ + tab, and enter the constants into the _Conditional compilation symbols_ field. + * In MonoDevelop: right-click on the project and choose _Options. Click the + _Build » Compiler_ tab, and enter the constants into the _Define Symbols_ field. + ### Compatibility with mod builders The configuration is designed for compatibility with third-party mod compilers. [Silverplum](https://github.com/rumangerst/SilVerPLuM) -is officially supported, and you can inject the `GAMEPATH` environment variable to override the -detected game path. +is officially supported, and mod builds can set the following environment variables: + +* `GAMEPATH`: overrides the Stardew Valley install path. +* `GAMEPLATFORM`: overrides the detected platform. Should be only of `Linux`, `Mac`, or `Windows`. + +## Versions +* 1.0: initial release. +* 1.1: added support for targeting platforms. ## See also * [NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig) diff --git a/build/smapi.targets b/build/smapi.targets index 2c0ca5b7..074581b4 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -1,5 +1,23 @@ - + + + + + Linux + Mac + Windows + + + Linux + Mac + Windows + + + $(STARDEWVALLEY_DIR) @@ -16,9 +34,11 @@ C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley - + - + @@ -63,8 +83,11 @@ - + + \ No newline at end of file diff --git a/package.nuspec b/package.nuspec index 58701695..3236e636 100644 --- a/package.nuspec +++ b/package.nuspec @@ -2,16 +2,16 @@ Pathoschild.Stardew.ModBuildConfig - 1.0.1 + 1.1 MSBuild config for Stardew Valley mods Pathoschild Pathoschild false - https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.0/LICENSE.txt + https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.1/LICENSE.txt https://github.com/Pathoschild/Stardew.ModBuildConfig - https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.0/assets/nuget-icon.png + https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.1/assets/nuget-icon.png Automates the build configuration for a crossplatform Stardew Valley mod that uses SMAPI. - Corrected package structure + Added support for targeting platforms. -- cgit From 9db2bbc94168ea4770fb0714f51a6fa813bb9e04 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 24 Oct 2016 10:51:54 -0400 Subject: no longer copy game binaries to build output --- README.md | 2 +- build/smapi.targets | 23 ++++++++++++++++++----- package.nuspec | 8 ++++---- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b94c118b..0894c49d 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ You can define it... `GAME_PLATFORM_WINDOWS`. * In Visual Studio: right-click on the project and choose _Properties_. Click the _Build_ tab, and enter the constants into the _Conditional compilation symbols_ field. - * In MonoDevelop: right-click on the project and choose _Options. Click the + * In MonoDevelop: right-click on the project and choose _Options_. Click the _Build » Compiler_ tab, and enter the constants into the _Define Symbols_ field. ### Compatibility with mod builders diff --git a/build/smapi.targets b/build/smapi.targets index 074581b4..0bd8e0ae 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -41,18 +41,27 @@ - - - + + false + + + false + + + false + $(GamePath)\Stardew Valley.exe + false $(GamePath)\StardewModdingAPI.exe + false - False $(GamePath)\xTile.dll + false + False @@ -67,17 +76,21 @@ - False $(GamePath)\MonoGame.Framework.dll + false + False $(GamePath)\StardewValley.exe + false $(GamePath)\StardewModdingAPI.exe + false $(GamePath)\xTile.dll + false diff --git a/package.nuspec b/package.nuspec index 3236e636..8072ad38 100644 --- a/package.nuspec +++ b/package.nuspec @@ -2,16 +2,16 @@ Pathoschild.Stardew.ModBuildConfig - 1.1 + 1.2 MSBuild config for Stardew Valley mods Pathoschild Pathoschild false - https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.1/LICENSE.txt + https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.2/LICENSE.txt https://github.com/Pathoschild/Stardew.ModBuildConfig - https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.1/assets/nuget-icon.png + https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.2/assets/nuget-icon.png Automates the build configuration for a crossplatform Stardew Valley mod that uses SMAPI. - Added support for targeting platforms. + No longer copies game binaries to build output. -- cgit From d3946c3324cf6fc0c73590b22770da061b025331 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 5 Dec 2016 11:57:12 -0500 Subject: add 'simplify mod development' section, add TOC --- README.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0894c49d..1b106f1c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,12 @@ **Stardew.ModBuildConfig** is an open-source NuGet package which automates the build configuration for crossplatform [Stardew Valley](http://stardewvalley.net/) mods that use SMAPI. +## Contents +* [Usage](#usage) +* [Installation](#installation) +* [Configuration](#configuration) +* [Simplify mod development](#simplify-mod-development) + ## Usage Basically this package lets you write your mod once, and compile it on any computer. It detects your current platform (Linux, Mac, or Windows) and game path, and injects the right references @@ -72,10 +78,40 @@ is officially supported, and mod builds can set the following environment variab * `GAMEPATH`: overrides the Stardew Valley install path. * `GAMEPLATFORM`: overrides the detected platform. Should be only of `Linux`, `Mac`, or `Windows`. +## Simplify mod development +### Package your mod into the game directory automatically +During development, it's helpful to have the mod files packaged into your `Mods` directory automatically each time you build. To do that: + +1. Edit your mod's `.csproj` file. +2. Add this block of code at the bottom, right above the closing `` tag: + + ```cs + + + $(GamePath)\Mods\$(TargetName) + + + + + + + ``` +3. Optionally, edit the `` value to change the name, or add any additional files your mod needs. + +That's it! Each time you build, the files in `\Mods\` will be updated. + +### Debugging +Debugging into your mod code when the game is running is pretty straightforward, since this package injects some of the configuration automatically. To do that: + +1. [Package your mod into the game directory automatically](#package-your-mod-into-the-game-directory-automatically). +2. Launch the project with debugging in Visual Studio or MonoDevelop. + +This will deploy your mod files into the game directory, launch SMAPI, and attach a debugger automatically. Now you can step through your code, set breakpoints, etc. + ## Versions * 1.0: initial release. * 1.1: added support for targeting platforms. ## See also * [NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig) -* Discussion thread \ No newline at end of file +* Discussion thread -- cgit From 0fe3275037b03fefb4e4c09a30097a85a12a3c03 Mon Sep 17 00:00:00 2001 From: Patrick Müssig Date: Tue, 6 Dec 2016 21:04:50 +0100 Subject: add support for non default Stardew Valley pathes (Steam and gog) --- build/smapi.targets | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build/smapi.targets b/build/smapi.targets index 0bd8e0ae..759bd104 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -30,9 +30,11 @@ $(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS - C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley - C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley - + C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley + $([" >$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GOG.com\Games\1453375253}', 'PATH', null,RegistryView.Registry64, RegistryView.Registry32)) + C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley + $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null,RegistryView.Registry64, RegistryView.Registry32)) + C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley - $([" >$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GOG.com\Games\1453375253}', 'PATH', null,RegistryView.Registry64, RegistryView.Registry32)) C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley - $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null,RegistryView.Registry64, RegistryView.Registry32)) - + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GOG.com\Games\1453375253@PATH) + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150@InstallLocation) + C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley - $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GOG.com\Games\1453375253@PATH) - $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150@InstallLocation) + $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\GOG.com\Games\1453375253}', 'PATH', null, RegistryView.Registry32)) + $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null,RegistryView.Registry64, RegistryView.Registry32)) C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley - $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\GOG.com\Games\1453375253}', 'PATH', null, RegistryView.Registry32)) - $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null,RegistryView.Registry64, RegistryView.Registry32)) + $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\GOG.com\Games\1453375253', 'PATH', null, RegistryView.Registry32)) + $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GOG.com\Games\1453375253', 'PATH', null, RegistryView.Registry64) + $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null, RegistryView.Registry64, RegistryView.Registry32)) - - $(STARDEWVALLEY_DIR) - $(HOME)/GOG Games/Stardew Valley/game $(HOME)/.local/share/Steam/steamapps/common/Stardew Valley diff --git a/package.nuspec b/package.nuspec index fb009841..54894d90 100644 --- a/package.nuspec +++ b/package.nuspec @@ -11,7 +11,7 @@ https://github.com/Pathoschild/Stardew.ModBuildConfig https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.3/assets/nuget-icon.png Automates the build configuration for a crossplatform Stardew Valley mod that uses SMAPI. - Fix game path detection on 32-bit Windows. + Fix game path detection on 32-bit Windows; remove support for SilVerPLuM (discontinued). -- cgit From 93dcf1f1e18441a6eeb585d0d77888248370f429 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 10 Jan 2017 17:13:58 -0500 Subject: remove support custom target platform (never used) --- README.md | 24 +----------------------- build/smapi.targets | 17 +++++------------ package.nuspec | 2 +- 3 files changed, 7 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index a02f6f97..bd6feaa2 100644 --- a/README.md +++ b/README.md @@ -48,29 +48,6 @@ If you customised where Stardew Valley is installed, you can specify where it is The configuration will check your custom path first, then fall back to the default paths. (That way you can still compile it normally on a different computer.) -### Target platform -By default the build configuration will target your current platform (e.g. Linux, Mac, or Windows). -If you're compiling it for a different platform (and have the required dependencies installed), you -can manually override the platform detection. - -You can define it... - -* in your `.csproj` (anywhere before the added ` - Windows - - ``` - -* _or_ by setting one of these compile constant: `GAME_PLATFORM_LINUX`, `GAME_PLATFORM_MAC`, or - `GAME_PLATFORM_WINDOWS`. - * In Visual Studio: right-click on the project and choose _Properties_. Click the _Build_ - tab, and enter the constants into the _Conditional compilation symbols_ field. - * In MonoDevelop: right-click on the project and choose _Options_. Click the - _Build » Compiler_ tab, and enter the constants into the _Define Symbols_ field. - ## Simplify mod development ### Package your mod into the game directory automatically During development, it's helpful to have the mod files packaged into your `Mods` directory automatically each time you build. To do that: @@ -105,6 +82,7 @@ This will deploy your mod files into the game directory, launch SMAPI, and attac 1.3: * Fixed non-default game paths on 32-bit Windows. * Removed support for SilVerPLuM (discontinued). +* Removed support for overriding the target platform (never used). 1.2: * Added support for non-default game paths on Windows by reading the registry. diff --git a/build/smapi.targets b/build/smapi.targets index 93588445..3c6717da 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -3,16 +3,9 @@ ## select target OS #######--> - - - Linux - Mac - Windows - - - Linux - Mac - Windows + Linux + Mac + Windows - C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley - C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley + C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley + C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\GOG.com\Games\1453375253', 'PATH', null, RegistryView.Registry32)) $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null, RegistryView.Registry64, RegistryView.Registry32)) diff --git a/package.nuspec b/package.nuspec index 54894d90..5c1f5d1b 100644 --- a/package.nuspec +++ b/package.nuspec @@ -11,7 +11,7 @@ https://github.com/Pathoschild/Stardew.ModBuildConfig https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.3/assets/nuget-icon.png Automates the build configuration for a crossplatform Stardew Valley mod that uses SMAPI. - Fix game path detection on 32-bit Windows; remove support for SilVerPLuM (discontinued). + Fix game path detection on 32-bit Windows; remove support for SilVerPLuM (discontinued); removed support for overriding target platform (never used). -- cgit From 34d2881aeed5afcb8f93853726f8a1f725a592a9 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 10 Jan 2017 17:59:24 -0500 Subject: tweak custom game path section --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index bd6feaa2..83b79ea9 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ for crossplatform [Stardew Valley](http://stardewvalley.net/) mods that use SMAP ## Contents * [Usage](#usage) * [Installation](#installation) -* [Configuration](#configuration) +* [Custom game path](#custom-game-path) * [Simplify mod development](#simplify-mod-development) ## Usage @@ -32,21 +32,21 @@ More specifically, the configuration... 2. Reference the [`Pathoschild.Stardew.ModBuildConfig` NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig). 3. Compile on any platform. -## Configuration -### Custom game path -If you customised where Stardew Valley is installed, you can specify where it is. +## Custom game path +The package should automatically detect your game path. If it can't for some reason, you +can specify it manually. -1. Get the full path to the directory containing the Stardew Valley executable. -2. Add this section to your `.csproj` file (anywhere before the added ` C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley ``` -The configuration will check your custom path first, then fall back to the default paths. (That way -you can still compile it normally on a different computer.) +The configuration will check your custom path first, then fall back to the default paths (so it'll +still compile on a different computer). ## Simplify mod development ### Package your mod into the game directory automatically @@ -55,7 +55,7 @@ During development, it's helpful to have the mod files packaged into your `Mods` 1. Edit your mod's `.csproj` file. 2. Add this block of code at the bottom, right above the closing `` tag: - ```cs + ```xml $(GamePath)\Mods\$(TargetName) -- cgit From db2cc7ef41aa2ce84e1c610db8d5f6cba3092a45 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 11 Jan 2017 13:46:21 -0500 Subject: rewrite readme for simplicity --- README.md | 91 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 83b79ea9..7829cd93 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,36 @@ **Stardew.ModBuildConfig** is an open-source NuGet package which automates the build configuration -for crossplatform [Stardew Valley](http://stardewvalley.net/) mods that use SMAPI. +for [Stardew Valley](http://stardewvalley.net/) [SMAPI](https://github.com/Pathoschild/SMAPI) mods. -## Contents -* [Usage](#usage) -* [Installation](#installation) -* [Custom game path](#custom-game-path) -* [Simplify mod development](#simplify-mod-development) +The package... + +* lets you write your mod once, and compile it on any computer. It detects the current platform + (Linux, Mac, or Windows) and game install path, and injects the right references automatically. +* configures Visual Studio so you can debug into the mod code when the game is running (_Windows + only_). +* packages the mod automatically into the game's mod folder when you build the code (_optional_). -## Usage -Basically this package lets you write your mod once, and compile it on any computer. It detects -your current platform (Linux, Mac, or Windows) and game path, and injects the right references -automatically. You can also target a specific platform to create a mod package compatible with that -platform. -More specifically, the configuration... +## Contents +* [Install](#install) +* [Simplify mod development](#simplify-mod-development) +* [Troubleshoot](#troubleshoot) +* [Versions](#versions) -1. detects the operating system and Stardew Valley path; -2. injects the right references to Stardew Valley, SMAPI, and XNA/MonoGame for your platform; -3. configures Visual Studio so you can launch the game for debugging (_Windows only_); -4. and adds a `GamePath` variable which can be used to script mod packaging if desired. +## Install +**When creating a new mod:** -## Installation -### Creating a new mod 1. Create an empty library project. 2. Reference the [`Pathoschild.Stardew.ModBuildConfig` NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig). 3. [Write your code](http://canimod.com/guides/creating-a-smapi-mod). 4. Compile on any platform. -### Migrating an existing mod -1. Remove any references to `Microsoft.Xna.*`, Stardew Valley, `StardewModdingAPI`, and xTile. +**When migrating an existing mod:** + +1. Remove any project references to `Microsoft.Xna.*`, `MonoGame`, Stardew Valley, + `StardewModdingAPI`, and `xTile`. 2. Reference the [`Pathoschild.Stardew.ModBuildConfig` NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig). 3. Compile on any platform. -## Custom game path -The package should automatically detect your game path. If it can't for some reason, you -can specify it manually. - -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 - - ``` - -The configuration will check your custom path first, then fall back to the default paths (so it'll -still compile on a different computer). - ## Simplify mod development ### Package your mod into the game directory automatically During development, it's helpful to have the mod files packaged into your `Mods` directory automatically each time you build. To do that: @@ -70,22 +53,44 @@ During development, it's helpful to have the mod files packaged into your `Mods` That's it! Each time you build, the files in `\Mods\` will be updated. -### Debugging -Debugging into your mod code when the game is running is pretty straightforward, since this package injects some of the configuration automatically. To do that: +### Debug into the mod code +Stepping into your mod code when the game is running is straightforward, since this package injects the configuration automatically. To do it: 1. [Package your mod into the game directory automatically](#package-your-mod-into-the-game-directory-automatically). 2. Launch the project with debugging in Visual Studio or MonoDevelop. This will deploy your mod files into the game directory, launch SMAPI, and attach a debugger automatically. Now you can step through your code, set breakpoints, etc. +## Troubleshoot +### "Failed to find the game install path" +If you see this error: + +> 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. + +...the package couldn't find your game install path automatically. You'll need to specify the +game location: + +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 + + ``` + +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.3: -* Fixed non-default game paths on 32-bit Windows. +* Fixed detection of non-default game paths on 32-bit Windows. * Removed support for SilVerPLuM (discontinued). -* Removed support for overriding the target platform (never used). +* Removed support for overriding the target platform (no longer needed since SMAPI crossplatforms mods automatically). 1.2: -* Added support for non-default game paths on Windows by reading the registry. +* Added support for non-default game paths on Windows. 1.1: * Added support for overriding the target platform. @@ -95,7 +100,3 @@ This will deploy your mod files into the game directory, launch SMAPI, and attac * Added support for detecting the game path automatically. * Added support for injecting XNA/MonoGame references automatically based on the OS. * Added support for mod builders like SilVerPLuM. - -## See also -* [NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig) -* Discussion thread -- cgit From 6f0900b34c1964a9bd047cef0555d44c63f72343 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 11 Jan 2017 14:06:46 -0500 Subject: update nuspec --- package.nuspec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.nuspec b/package.nuspec index 5c1f5d1b..4f5b47fd 100644 --- a/package.nuspec +++ b/package.nuspec @@ -7,14 +7,14 @@ Pathoschild Pathoschild false - https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.3/LICENSE.txt + https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.4/LICENSE.txt https://github.com/Pathoschild/Stardew.ModBuildConfig - https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.3/assets/nuget-icon.png - Automates the build configuration for a crossplatform Stardew Valley mod that uses SMAPI. - Fix game path detection on 32-bit Windows; remove support for SilVerPLuM (discontinued); removed support for overriding target platform (never used). + https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.4/assets/nuget-icon.png + Automates the build configuration for crossplatform Stardew Valley SMAPI mods. + Fixed detection of non-default game paths on 32-bit Windows; removed support for SilVerPLuM (discontinued); removed support for overriding the target platform (no longer needed). - \ No newline at end of file + -- cgit From 374f89eb688c03960ac81854d01529f111dcb9e4 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 11 Jan 2017 14:43:11 -0500 Subject: fix release notes --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7829cd93..59b1eba7 100644 --- a/README.md +++ b/README.md @@ -84,14 +84,17 @@ The configuration will check your custom path first, then fall back to the defau still compile on a different computer). ## Versions -1.3: +1.4: * Fixed detection of non-default game paths on 32-bit Windows. * Removed support for SilVerPLuM (discontinued). * Removed support for overriding the target platform (no longer needed since SMAPI crossplatforms mods automatically). -1.2: +1.3: * Added support for non-default game paths on Windows. +1.2: +* Exclude game binaries from mod build output. + 1.1: * Added support for overriding the target platform. -- cgit From f37733df11873250233a2cf84a118cfcd37dd643 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 22 Jan 2017 22:18:47 -0500 Subject: Add GOG Mac path Thanks to LeonBlade for the path. --- README.md | 3 +++ build/smapi.targets | 1 + 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 59b1eba7..f3be04b3 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,9 @@ The configuration will check your custom path first, then fall back to the defau still compile on a different computer). ## Versions +1.5 (upcoming): +* Added default GOG path on Mac. + 1.4: * Fixed detection of non-default game paths on 32-bit Windows. * Removed support for SilVerPLuM (discontinued). diff --git a/build/smapi.targets b/build/smapi.targets index 3c6717da..ed513846 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -17,6 +17,7 @@ $(HOME)/.local/share/Steam/steamapps/common/Stardew Valley + /Applications/Stardew Valley.app/Contents/MacOS $(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS -- cgit 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 From f681efd6e7950c5a1b40990904b6bcdc3c04818f Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 22 Jan 2017 22:54:07 -0500 Subject: update nuspec --- package.nuspec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.nuspec b/package.nuspec index 4f5b47fd..5967c2e3 100644 --- a/package.nuspec +++ b/package.nuspec @@ -2,16 +2,16 @@ Pathoschild.Stardew.ModBuildConfig - 1.4 + 1.5 MSBuild config for Stardew Valley mods Pathoschild Pathoschild false - https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.4/LICENSE.txt + https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.5/LICENSE.txt https://github.com/Pathoschild/Stardew.ModBuildConfig - https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.4/assets/nuget-icon.png + https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.5/assets/nuget-icon.png Automates the build configuration for crossplatform Stardew Valley SMAPI mods. - Fixed detection of non-default game paths on 32-bit Windows; removed support for SilVerPLuM (discontinued); removed support for overriding the target platform (no longer needed). + Added support for setting a custom game path globally; added default GOG path on Mac. -- cgit From 8785ebd11749ddcfb2786085535617dcde35eb15 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 5 Jun 2017 14:59:19 -0400 Subject: recommended path override with config instead of per-project setting --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index f472049c..2c392150 100644 --- a/README.md +++ b/README.md @@ -66,20 +66,7 @@ This will deploy your mod files into the game directory, launch SMAPI, and attac 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: -* **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 - - ``` - - 3. Replace `PATH_HERE` with your custom game install path. - -* **Option 2: set the path globally.** +* **Option 1: 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. @@ -105,6 +92,19 @@ the game location yourself. There's two ways to do that: The configuration will check your custom path first, then fall back to the default paths (so it'll still compile on a different computer). +* **Option 2: 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 + + ``` + + 3. Replace `PATH_HERE` with your custom game install path. + ## Versions 1.5 (upcoming): * Added support for setting a custom game path globally. -- cgit From 85a51f23c4eabe816345f504133e0d5cdba0633f Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 5 Jun 2017 15:02:40 -0400 Subject: move release notes into separate file --- README.md | 24 +----------------------- release-notes.md | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 23 deletions(-) create mode 100644 release-notes.md diff --git a/README.md b/README.md index 2c392150..351ebd91 100644 --- a/README.md +++ b/README.md @@ -106,26 +106,4 @@ still compile on a different computer). 3. Replace `PATH_HERE` with your custom game install path. ## Versions -1.5 (upcoming): -* Added support for setting a custom game path globally. -* Added default GOG path on Mac. - -1.4: -* Fixed detection of non-default game paths on 32-bit Windows. -* Removed support for SilVerPLuM (discontinued). -* Removed support for overriding the target platform (no longer needed since SMAPI crossplatforms mods automatically). - -1.3: -* Added support for non-default game paths on Windows. - -1.2: -* Exclude game binaries from mod build output. - -1.1: -* Added support for overriding the target platform. - -1.0: -* Initial release. -* Added support for detecting the game path automatically. -* Added support for injecting XNA/MonoGame references automatically based on the OS. -* Added support for mod builders like SilVerPLuM. +See [release notes](release-notes.md). diff --git a/release-notes.md b/release-notes.md new file mode 100644 index 00000000..91eabb40 --- /dev/null +++ b/release-notes.md @@ -0,0 +1,24 @@ +## Release notes +### 1.5 +* Added support for setting a custom game path globally. +* Added default GOG path on Mac. + +### 1.4 +* Fixed detection of non-default game paths on 32-bit Windows. +* Removed support for SilVerPLuM (discontinued). +* Removed support for overriding the target platform (no longer needed since SMAPI crossplatforms mods automatically). + +### 1.3 +* Added support for non-default game paths on Windows. + +### 1.2 +* Exclude game binaries from mod build output. + +### 1.1 +* Added support for overriding the target platform. + +### 1.0 +* Initial release. +* Added support for detecting the game path automatically. +* Added support for injecting XNA/MonoGame references automatically based on the OS. +* Added support for mod builders like SilVerPLuM. \ No newline at end of file -- cgit From ffc54bed9c8fe063052306b1e1bc138b9848618d Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 5 Jun 2017 17:27:49 -0400 Subject: add .gitignore and .gitattributes --- .gitattributes | 2 ++ .gitignore | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..2c61027a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# always normalise line endings +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..41bf35be --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# Visual Studio cache/options +.vs/ + +# NuGet packages +*.nupkg -- cgit From 66b1b583e5233a4b50b832733d8e2cbc329a70be Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 5 Jun 2017 16:01:08 -0400 Subject: add error if a game folder is detected, but it doesn't contain Stardew Valley or SMAPI --- build/smapi.targets | 3 +++ release-notes.md | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build/smapi.targets b/build/smapi.targets index de3420d1..21989bd1 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -101,5 +101,8 @@ + + + \ No newline at end of file diff --git a/release-notes.md b/release-notes.md index 91eabb40..6ec456bc 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,4 +1,7 @@ ## Release notes +### 1.6 +* Added a build error if a game folder is found, but doesn't contain Stardew Valley or SMAPI. + ### 1.5 * Added support for setting a custom game path globally. * Added default GOG path on Mac. @@ -21,4 +24,4 @@ * Initial release. * Added support for detecting the game path automatically. * Added support for injecting XNA/MonoGame references automatically based on the OS. -* Added support for mod builders like SilVerPLuM. \ No newline at end of file +* Added support for mod builders like SilVerPLuM. -- cgit From ffc339bc29a9b4b08d53a5d147546630116d82d7 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 5 Jun 2017 15:24:53 -0400 Subject: add support for deploying mods to game folder automatically --- README.md | 50 ++++++++++++++++++++++++++------------------------ build/smapi.targets | 25 +++++++++++++++++++++++++ release-notes.md | 1 + 3 files changed, 52 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 351ebd91..115711f3 100644 --- a/README.md +++ b/README.md @@ -32,34 +32,36 @@ The package... 3. Compile on any platform. ## Simplify mod development -### Package your mod into the game directory automatically -During development, it's helpful to have the mod files packaged into your `Mods` directory automatically each time you build. To do that: +### Package your mod into the game folder automatically +You can copy your mod files into the `Mods` folder automatically each time you build, so you don't +need to do it manually: 1. Edit your mod's `.csproj` file. -2. Add this block of code at the bottom, right above the closing `` tag: - - ```xml - - - $(GamePath)\Mods\$(TargetName) - - - - - - - ``` -3. Optionally, edit the `` value to change the name, or add any additional files your mod needs. - -That's it! Each time you build, the files in `\Mods\` will be updated. +2. Add this block under the ` + $(MSBuildProjectName) + + ``` + +That's it! Each time you build, the files in `\Mods\` will be updated with +your `manifest.json`, build output, and any `i18n` files. + +Notes: +* To add custom files, just [add them to the build output](https://stackoverflow.com/a/10828462/262123). +* To customise the folder name, just replace `$(MSBuildProjectName)` with the folder name you want. +* If your project references another mod, make sure the reference is [_not_ marked 'copy local'](https://msdn.microsoft.com/en-us/library/t1zz5y8c(v=vs.100).aspx). ### Debug into the mod code -Stepping into your mod code when the game is running is straightforward, since this package injects the configuration automatically. To do it: +Stepping into your mod code when the game is running is straightforward, since this package injects +the configuration automatically. To do it: -1. [Package your mod into the game directory automatically](#package-your-mod-into-the-game-directory-automatically). +1. [Package your mod into the game folder automatically](#package-your-mod-into-the-game-folder-automatically). 2. Launch the project with debugging in Visual Studio or MonoDevelop. -This will deploy your mod files into the game directory, launch SMAPI, and attach a debugger automatically. Now you can step through your code, set breakpoints, etc. +This will deploy your mod files into the game folder, launch SMAPI, and attach a debugger +automatically. Now you can step through your code, set breakpoints, etc. ## Troubleshoot ### "Failed to find the game install path" @@ -89,9 +91,6 @@ the game location yourself. There's two ways to do that: 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). - * **Option 2: 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. @@ -105,5 +104,8 @@ still compile on a different computer). 3. 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 See [release notes](release-notes.md). diff --git a/build/smapi.targets b/build/smapi.targets index 21989bd1..ea6af723 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -105,4 +105,29 @@ + + + + + + $(GamePath)\Mods\$(DeployModFolderName) + $(ProjectDir)\manifest.json + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/release-notes.md b/release-notes.md index 6ec456bc..ff2734f8 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,5 +1,6 @@ ## Release notes ### 1.6 +* Added support for deploying mod files into `Mods` automatically. * Added a build error if a game folder is found, but doesn't contain Stardew Valley or SMAPI. ### 1.5 -- cgit From f74a0429eccf205ac52f51244a716bab786eab2a Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 5 Jun 2017 17:46:45 -0400 Subject: update nuspec for release --- README.md | 1 - package.nuspec | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 115711f3..c5e01c91 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ The package... only_). * packages the mod automatically into the game's mod folder when you build the code (_optional_). - ## Contents * [Install](#install) * [Simplify mod development](#simplify-mod-development) diff --git a/package.nuspec b/package.nuspec index 5967c2e3..c68d57c6 100644 --- a/package.nuspec +++ b/package.nuspec @@ -2,16 +2,16 @@ Pathoschild.Stardew.ModBuildConfig - 1.5 + 1.6 MSBuild config for Stardew Valley mods Pathoschild Pathoschild false - https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.5/LICENSE.txt - https://github.com/Pathoschild/Stardew.ModBuildConfig - https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.5/assets/nuget-icon.png + https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.6/LICENSE.txt + https://github.com/Pathoschild/Stardew.ModBuildConfig#readme + https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.6/assets/nuget-icon.png Automates the build configuration for crossplatform Stardew Valley SMAPI mods. - Added support for setting a custom game path globally; added default GOG path on Mac. + SMAPI mods are now deployed automatically to your game folder if you set the 'DeployModFolderName' property; added a build error if a game folder is found, but it doesn't contain Stardew Valley or SMAPI. -- cgit From cf6445b8e1cfac6299102582288f5406daa724a5 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 9 Jul 2017 23:29:51 -0400 Subject: improve OS and game path detection to avoid crossplatform issues --- build/smapi.targets | 58 ++++++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/build/smapi.targets b/build/smapi.targets index ea6af723..e2af5d90 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -6,35 +6,36 @@ - - Linux - Mac - Windows - - - - - - $(HOME)/GOG Games/Stardew Valley/game - $(HOME)/.local/share/Steam/steamapps/common/Stardew Valley - - - /Applications/Stardew Valley.app/Contents/MacOS - $(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS - - - C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley - C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley - $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\GOG.com\Games\1453375253', 'PATH', null, RegistryView.Registry32)) - $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null, RegistryView.Registry64, RegistryView.Registry32)) - + + + + Linux + $(HOME)/GOG Games/Stardew Valley/game + $(HOME)/.local/share/Steam/steamapps/common/Stardew Valley + + + + + Mac + /Applications/Stardew Valley.app/Contents/MacOS + $(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS + + + + + Windows + C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley + C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley + $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\GOG.com\Games\1453375253', 'PATH', null, RegistryView.Registry32)) + $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null, RegistryView.Registry64, RegistryView.Registry32)) + + + @@ -99,6 +100,9 @@ ## validate #######--> + + + @@ -107,7 +111,7 @@ -- cgit From 4ca843ee90ed996be60da2b73c4c010335a07171 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 9 Jul 2017 23:30:48 -0400 Subject: update nuspec for release --- package.nuspec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.nuspec b/package.nuspec index c68d57c6..900e2a5b 100644 --- a/package.nuspec +++ b/package.nuspec @@ -2,16 +2,16 @@ Pathoschild.Stardew.ModBuildConfig - 1.6 + 1.6.1 MSBuild config for Stardew Valley mods Pathoschild Pathoschild false - https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.6/LICENSE.txt + https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.6.1/LICENSE.txt https://github.com/Pathoschild/Stardew.ModBuildConfig#readme - https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.6/assets/nuget-icon.png + https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.6.1/assets/nuget-icon.png Automates the build configuration for crossplatform Stardew Valley SMAPI mods. - SMAPI mods are now deployed automatically to your game folder if you set the 'DeployModFolderName' property; added a build error if a game folder is found, but it doesn't contain Stardew Valley or SMAPI. + Improved OS and game path detection. -- cgit From 9beefb65fa0213603c3aa52875d88c0b410dbfd6 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 9 Jul 2017 23:33:08 -0400 Subject: clear GamePlatform if unknown --- build/smapi.targets | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/smapi.targets b/build/smapi.targets index e2af5d90..b2ce5967 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -32,6 +32,11 @@ $([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null, RegistryView.Registry64, RegistryView.Registry32)) + + + + + - + @@ -106,12 +98,12 @@ #######--> - + - - + + @@ -139,4 +131,4 @@ - \ No newline at end of file + -- cgit From 1fa12092c6130fbf8fb9c256f6c23e69c740a841 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 10 Jul 2017 15:45:22 -0400 Subject: combine Linux/Mac paths Mono may report Mac as either 'Unix' or 'OSX', and we don't really need to distinguish them for our purposes anyway. --- build/smapi.targets | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build/smapi.targets b/build/smapi.targets index 3a9c42c1..a544067b 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -9,14 +9,13 @@ ## find platform + game path #######--> - + + $(HOME)/GOG Games/Stardew Valley/game $(HOME)/.local/share/Steam/steamapps/common/Stardew Valley - - - - + + /Applications/Stardew Valley.app/Contents/MacOS $(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS -- cgit From 059c277623b1e1813094fe1a4ae80db432bce0ec Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 10 Jul 2017 15:46:20 -0400 Subject: update nuspec for release --- package.nuspec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.nuspec b/package.nuspec index 900e2a5b..f216803a 100644 --- a/package.nuspec +++ b/package.nuspec @@ -2,16 +2,16 @@ Pathoschild.Stardew.ModBuildConfig - 1.6.1 + 1.6.2 MSBuild config for Stardew Valley mods Pathoschild Pathoschild false - https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.6.1/LICENSE.txt + https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.6.2/LICENSE.txt https://github.com/Pathoschild/Stardew.ModBuildConfig#readme - https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.6.1/assets/nuget-icon.png + https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.6.2/assets/nuget-icon.png Automates the build configuration for crossplatform Stardew Valley SMAPI mods. - Improved OS and game path detection. + Improved OS and game path detection; removed undocumented GamePlatform variable. -- cgit From eca5e56883f3d94e0541710a10e4b2b44d1e38f7 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 27 Jul 2017 19:15:40 -0400 Subject: also reference Microsoft.Xna.Framework.Xact by default --- build/smapi.targets | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/smapi.targets b/build/smapi.targets index a544067b..d95fa887 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -46,6 +46,9 @@ false + + false + $(GamePath)\Stardew Valley.exe false -- cgit From 285c0448fd6f8c90fa05dc668dd27f452fa513ab Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 28 Jul 2017 00:10:32 -0400 Subject: add option to create release zip files (Windows-only) CodeTaskFactory doesn't seem to be available on Linux/Mac. --- README.md | 19 ++++++++-- build/smapi.targets | 104 +++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 102 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index c5e01c91..3c137663 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,10 @@ You can copy your mod files into the `Mods` folder automatically each time you b need to do it manually: 1. Edit your mod's `.csproj` file. -2. Add this block under the `` line: ```xml - - $(MSBuildProjectName) - + $(MSBuildProjectName) ``` That's it! Each time you build, the files in `\Mods\` will be updated with @@ -62,6 +60,19 @@ the configuration automatically. To do it: This will deploy your mod files into the game folder, launch SMAPI, and attach a debugger automatically. Now you can step through your code, set breakpoints, etc. +### Create release zips automatically (Windows-only) +You can create the mod package automatically when you build: + +1. Edit your mod's `.csproj` file. +2. Add this block above the first `` line: + + ```xml + $(SolutionDir)\_releases + ``` + +That's it! Each time you build, the mod files will be zipped into `_releases\.zip`. (You +can change the value to save the zips somewhere else.) + ## Troubleshoot ### "Failed to find the game install path" That error means the package couldn't figure out where the game is installed. You need to specify diff --git a/build/smapi.targets b/build/smapi.targets index d95fa887..b9f7e98e 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -1,6 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + @@ -30,9 +92,10 @@ - + + @@ -95,8 +158,12 @@ + + @@ -110,27 +177,30 @@ - - + + $(GamePath)\Mods\$(DeployModFolderName) - $(ProjectDir)\manifest.json + - + + - + - + + + + + - - - - - + + + -- cgit From 4dd197068ec556d146e7e822b3a22b217c902a95 Mon Sep 17 00:00:00 2001 From: Mike Weaver Date: Thu, 27 Jul 2017 22:06:25 -0600 Subject: mark debugging support as Windows-only in readme (#4) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c137663..96e4415d 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Notes: * To customise the folder name, just replace `$(MSBuildProjectName)` with the folder name you want. * If your project references another mod, make sure the reference is [_not_ marked 'copy local'](https://msdn.microsoft.com/en-us/library/t1zz5y8c(v=vs.100).aspx). -### Debug into the mod code +### Debug into the mod code (Windows Only) Stepping into your mod code when the game is running is straightforward, since this package injects the configuration automatically. To do it: -- cgit From f287ff616e471cf341f8b2cb726842816bdd8d29 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 28 Jul 2017 00:12:26 -0400 Subject: update nuspec --- README.md | 2 +- package.nuspec | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 96e4415d..c261e705 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Notes: * To customise the folder name, just replace `$(MSBuildProjectName)` with the folder name you want. * If your project references another mod, make sure the reference is [_not_ marked 'copy local'](https://msdn.microsoft.com/en-us/library/t1zz5y8c(v=vs.100).aspx). -### Debug into the mod code (Windows Only) +### Debug into the mod code (Windows-only) Stepping into your mod code when the game is running is straightforward, since this package injects the configuration automatically. To do it: diff --git a/package.nuspec b/package.nuspec index f216803a..9abc7251 100644 --- a/package.nuspec +++ b/package.nuspec @@ -2,19 +2,19 @@ Pathoschild.Stardew.ModBuildConfig - 1.6.2 + 1.7 MSBuild config for Stardew Valley mods Pathoschild Pathoschild false - https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.6.2/LICENSE.txt + https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.7/LICENSE.txt https://github.com/Pathoschild/Stardew.ModBuildConfig#readme - https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.6.2/assets/nuget-icon.png + https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.7/assets/nuget-icon.png Automates the build configuration for crossplatform Stardew Valley SMAPI mods. - Improved OS and game path detection; removed undocumented GamePlatform variable. + Added option to create release zips on build; added reference to XNA's XACT library for audio-related mods. - + -- cgit From a10e555095a4f7f0a6858149b3ffd6595fbd24e6 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 28 Jul 2017 11:10:06 -0400 Subject: fix i18n folder being flattened --- build/smapi.targets | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build/smapi.targets b/build/smapi.targets index b9f7e98e..ea0cfffb 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -34,9 +34,13 @@ { foreach (ITaskItem file in Files) { + // get file info string filePath = file.ItemSpec; string entryName = file.GetMetadata("RecursiveDir") + file.GetMetadata("Filename") + file.GetMetadata("Extension"); - + if (new FileInfo(filePath).Directory.Name.Equals("i18n", StringComparison.InvariantCultureIgnoreCase)) + entryName = Path.Combine("i18n", entryName); + + // add to zip using (Stream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read)) using (Stream fileStreamInZip = archive.CreateEntry(entryName).Open()) { @@ -187,8 +191,8 @@ - + @@ -198,9 +202,10 @@ + - + -- cgit From 34eff4b08612f687c32faf8ec1b3363ba9fe0aa0 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 28 Jul 2017 11:21:38 -0400 Subject: fix duplicate manifest/i18n files added to release zip if they're also copied to build output --- build/smapi.targets | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build/smapi.targets b/build/smapi.targets index ea0cfffb..58737fba 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -190,9 +190,13 @@ - - - + + + + + + + -- cgit From 048888e09347b38d19bbac5d1c123ec83acfb367 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 28 Jul 2017 11:26:08 -0400 Subject: update nuspec --- package.nuspec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package.nuspec b/package.nuspec index 9abc7251..b8e96481 100644 --- a/package.nuspec +++ b/package.nuspec @@ -2,16 +2,18 @@ Pathoschild.Stardew.ModBuildConfig - 1.7 + 1.7.1 MSBuild config for Stardew Valley mods Pathoschild Pathoschild false - https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.7/LICENSE.txt + https://github.com/Pathoschild/Stardew.ModBuildConfig/blob/1.7.1/LICENSE.txt https://github.com/Pathoschild/Stardew.ModBuildConfig#readme - https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.7/assets/nuget-icon.png + https://raw.githubusercontent.com/Pathoschild/Stardew.ModBuildConfig/1.7.1/assets/nuget-icon.png Automates the build configuration for crossplatform Stardew Valley SMAPI mods. - Added option to create release zips on build; added reference to XNA's XACT library for audio-related mods. + + 1.7 added an option to create release zips on build and added a reference to XNA's XACT library for audio-related mods. + 1.7.1 fixed an issue where i18n folders were flattened, and ensures that the manifest/i18n files in the project take precedence over those in the build output if both are present. -- cgit From 6f3fc68dafcaaaab59352378a9cdae41040e271a Mon Sep 17 00:00:00 2001 From: Death Date: Sat, 7 Oct 2017 00:58:17 -0500 Subject: Updates exported mod zip files to use a base folder Instead of all of the mod files being in the root directory of the zip file, they are now in /ModName/, making it easier for modders to export upload-ready zip files of their mods. --- build/smapi.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/smapi.targets b/build/smapi.targets index 58737fba..ab7fb71f 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -36,7 +36,7 @@ { // get file info string filePath = file.ItemSpec; - string entryName = file.GetMetadata("RecursiveDir") + file.GetMetadata("Filename") + file.GetMetadata("Extension"); + string entryName = ModName + '/' + file.GetMetadata("RecursiveDir") + file.GetMetadata("Filename") + file.GetMetadata("Extension"); if (new FileInfo(filePath).Directory.Name.Equals("i18n", StringComparison.InvariantCultureIgnoreCase)) entryName = Path.Combine("i18n", entryName); -- cgit From 78e59e1a48e6d9d2583c9adf54422d15e6e7074e Mon Sep 17 00:00:00 2001 From: Death Date: Sat, 7 Oct 2017 17:54:11 -0500 Subject: add version support to zip filenames (#7) --- build/smapi.targets | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/build/smapi.targets b/build/smapi.targets index ab7fb71f..88408994 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -14,8 +14,10 @@ + + data = (IDictionary)new JavaScriptSerializer().DeserializeObject(json); + IDictionary version = (IDictionary)data["Version"]; + + // Store our version numbers for ease of use + int major = (int)version["MajorVersion"]; + int minor = (int)version["MinorVersion"]; + int patch = (int)version["PatchVersion"]; + + string fileName = String.Format("{0}-{1}.{2}.{3}.zip", ModName, major, minor, patch); + // clear old zip file if present - string zipPath = Path.Combine(OutputFolderPath, ModName + ".zip"); + string zipPath = Path.Combine(OutputFolderPath, fileName); if (File.Exists(zipPath)) File.Delete(zipPath); -- cgit From 4d32b37790442b8f19379ac89e72f0ecb161b549 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 7 Oct 2017 20:16:04 -0400 Subject: switch create-zip task to class type to simplify encapsulation --- build/smapi.targets | 138 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 83 insertions(+), 55 deletions(-) diff --git a/build/smapi.targets b/build/smapi.targets index 88408994..3512d042 100644 --- a/build/smapi.targets +++ b/build/smapi.targets @@ -1,6 +1,6 @@