From 6fdb29d806eddd17f0ac33401781f7df58639075 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 10 Jan 2019 19:30:11 -0500 Subject: drop support for old versions of SMAPI and Visual Studio in mod build package --- src/SMAPI.ModBuildConfig/build/smapi.targets | 2 -- src/SMAPI.ModBuildConfig/package.nuspec | 8 +++----- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index e6c3fa57..99011629 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -102,7 +102,6 @@ $(GamePath)\smapi-internal\StardewModdingAPI.Toolkit.CoreInterfaces.dll - $(GamePath)\StardewModdingAPI.Toolkit.CoreInterfaces.dll false true @@ -142,7 +141,6 @@ $(GamePath)\smapi-internal\StardewModdingAPI.Toolkit.CoreInterfaces.dll - $(GamePath)\StardewModdingAPI.Toolkit.CoreInterfaces.dll false true diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index 21693828..1d73c4a1 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -2,7 +2,7 @@ Pathoschild.Stardew.ModBuildConfig - 2.2 + 2.2.1 Build package for SMAPI mods Pathoschild Pathoschild @@ -12,10 +12,8 @@ https://raw.githubusercontent.com/Pathoschild/SMAPI/develop/src/SMAPI.ModBuildConfig/assets/nuget-icon.png Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For Stardew Valley 1.3 or later. - 2.2: - - Added support for SMAPI 2.8+ (still compatible with earlier versions). - - Added default game paths for 32-bit Windows. - - Fixed valid manifests marked invalid in some cases. + 2.2.1: + - Dropped support for very old versions of SMAPI and Visual Studio. -- cgit From 0ba8325708d6eea6bb60121d85d4cad8ab4e7787 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 9 Feb 2019 19:16:54 -0500 Subject: fix Newtonsoft.Json.pdb not ignored for release zips --- src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs | 1 + src/SMAPI.ModBuildConfig/package.nuspec | 1 + 2 files changed, 2 insertions(+) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs index e03683d0..4af3100f 100644 --- a/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs +++ b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs @@ -129,6 +129,7 @@ namespace StardewModdingAPI.ModBuildConfig.Framework // Json.NET (bundled into SMAPI) || this.EqualsInvariant(file.Name, "Newtonsoft.Json.dll") + || this.EqualsInvariant(file.Name, "Newtonsoft.Json.pdb") || this.EqualsInvariant(file.Name, "Newtonsoft.Json.xml") // code analysis files diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index 1d73c4a1..d054fd1a 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -14,6 +14,7 @@ 2.2.1: - Dropped support for very old versions of SMAPI and Visual Studio. + - Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly. -- cgit From 34633cfed9efb8a53b148584c1b3909bac69372f Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 29 Mar 2019 23:58:06 -0400 Subject: bundle assets folder into mods by default --- .../Framework/ModFileManager.cs | 28 ++++++++++++++++++---- src/SMAPI.ModBuildConfig/package.nuspec | 1 + 2 files changed, 24 insertions(+), 5 deletions(-) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs index 4af3100f..6c11b0fe 100644 --- a/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs +++ b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text.RegularExpressions; using StardewModdingAPI.Toolkit.Serialisation; using StardewModdingAPI.Toolkit.Serialisation.Models; +using StardewModdingAPI.Toolkit.Utilities; namespace StardewModdingAPI.ModBuildConfig.Framework { @@ -61,18 +62,33 @@ namespace StardewModdingAPI.ModBuildConfig.Framework hasProjectTranslations = true; } + // project assets folder + bool hasAssetsFolder = false; + DirectoryInfo assetsFolder = new DirectoryInfo(Path.Combine(projectDir, "assets")); + if (assetsFolder.Exists) + { + foreach (FileInfo file in assetsFolder.EnumerateFiles("*", SearchOption.AllDirectories)) + { + string relativePath = PathUtilities.GetRelativePath(projectDir, file.FullName); + this.Files[relativePath] = file; + } + hasAssetsFolder = true; + } + // build output DirectoryInfo buildFolder = new DirectoryInfo(targetDir); foreach (FileInfo file in buildFolder.EnumerateFiles("*", SearchOption.AllDirectories)) { - // get relative paths - string relativePath = file.FullName.Replace(buildFolder.FullName, ""); - string relativeDirPath = file.Directory.FullName.Replace(buildFolder.FullName, ""); + // get path info + string relativePath = PathUtilities.GetRelativePath(buildFolder.FullName, file.FullName); + string[] segments = PathUtilities.GetSegments(relativePath); - // prefer project manifest/i18n files + // prefer project manifest/i18n/assets files if (hasProjectManifest && this.EqualsInvariant(relativePath, this.ManifestFileName)) continue; - if (hasProjectTranslations && this.EqualsInvariant(relativeDirPath, "i18n")) + if (hasProjectTranslations && this.EqualsInvariant(segments[0], "i18n")) + continue; + if (hasAssetsFolder && this.EqualsInvariant(segments[0], "assets")) continue; // handle ignored files @@ -149,6 +165,8 @@ namespace StardewModdingAPI.ModBuildConfig.Framework /// The string to compare with. private bool EqualsInvariant(string str, string other) { + if (str == null) + return other == null; return str.Equals(other, StringComparison.InvariantCultureIgnoreCase); } } diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index d054fd1a..b308413f 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -13,6 +13,7 @@ Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For Stardew Valley 1.3 or later. 2.2.1: + - If the project contains an `assets` folder, its contents are now included in the mod automatically. - Dropped support for very old versions of SMAPI and Visual Studio. - Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly. -- cgit From 80741d3d2da39fed43e9208df85318de9bc7e1d2 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 30 Mar 2019 01:32:54 -0400 Subject: update NuGet package version & release notes --- src/SMAPI.ModBuildConfig/StardewModdingAPI.ModBuildConfig.csproj | 6 ++++++ src/SMAPI.ModBuildConfig/package.nuspec | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/StardewModdingAPI.ModBuildConfig.csproj b/src/SMAPI.ModBuildConfig/StardewModdingAPI.ModBuildConfig.csproj index 44f0a3e7..870973a0 100644 --- a/src/SMAPI.ModBuildConfig/StardewModdingAPI.ModBuildConfig.csproj +++ b/src/SMAPI.ModBuildConfig/StardewModdingAPI.ModBuildConfig.csproj @@ -28,6 +28,12 @@ + + + mod-build-config.md + + + diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index b308413f..eb967bc0 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -2,7 +2,7 @@ Pathoschild.Stardew.ModBuildConfig - 2.2.1 + 3.0.0 Build package for SMAPI mods Pathoschild Pathoschild @@ -10,9 +10,9 @@ https://github.com/Pathoschild/SMAPI/blob/develop/LICENSE.txt https://github.com/Pathoschild/SMAPI/blob/develop/docs/mod-build-config.md#readme https://raw.githubusercontent.com/Pathoschild/SMAPI/develop/src/SMAPI.ModBuildConfig/assets/nuget-icon.png - Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For Stardew Valley 1.3 or later. + Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For SMAPI 2.11 or later. - 2.2.1: + 3.0.0: - If the project contains an `assets` folder, its contents are now included in the mod automatically. - Dropped support for very old versions of SMAPI and Visual Studio. - Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly. -- cgit From ee132828437c156207ddfc1cbc15339a6852c2fe Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 15 Apr 2019 22:13:10 -0400 Subject: update for new DLL in SDV 1.4 (#638) --- src/SMAPI.ModBuildConfig/build/smapi.targets | 10 ++++++++++ src/SMAPI.ModBuildConfig/package.nuspec | 1 + 2 files changed, 11 insertions(+) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index 99011629..e3211466 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -95,6 +95,11 @@ false true + + $(GamePath)\StardewValley.GameData.dll + false + true + $(GamePath)\StardewModdingAPI.exe false @@ -134,6 +139,11 @@ false true + + $(GamePath)\StardewValley.GameData.dll + false + true + $(GamePath)\StardewModdingAPI.exe false diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index eb967bc0..b6ef98f0 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -13,6 +13,7 @@ Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For SMAPI 2.11 or later. 3.0.0: + - Updated for Stardew Valley 1.4. - If the project contains an `assets` folder, its contents are now included in the mod automatically. - Dropped support for very old versions of SMAPI and Visual Studio. - Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly. -- cgit From aa7e4b9c36bf14656493ee0a7ab2dab394a3cf64 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 18 Apr 2019 22:42:04 -0400 Subject: add new DLL to SMAPI references, support older game versions in package, fix name on Linux/Mac (#638) --- src/SMAPI.ModBuildConfig/build/smapi.targets | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index e3211466..f703477f 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -95,7 +95,7 @@ false true - + $(GamePath)\StardewValley.GameData.dll false true @@ -113,7 +113,7 @@ $(GamePath)\xTile.dll false - False + false true @@ -131,7 +131,7 @@ $(GamePath)\MonoGame.Framework.dll false - False + false true @@ -139,8 +139,8 @@ false true - - $(GamePath)\StardewValley.GameData.dll + + $(GamePath)\StardewValley.GameData.MonoGame.dll false true -- cgit From b887ecb30b4c41d58c6211ea00423f8259eebef5 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 18 Apr 2019 22:46:00 -0400 Subject: fix not applied to files matched by convention, update readme --- .../Framework/ModFileManager.cs | 97 ++++++++++++---------- src/SMAPI.ModBuildConfig/package.nuspec | 1 + 2 files changed, 56 insertions(+), 42 deletions(-) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs index 6c11b0fe..e67a18c1 100644 --- a/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs +++ b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs @@ -41,13 +41,63 @@ namespace StardewModdingAPI.ModBuildConfig.Framework if (!Directory.Exists(targetDir)) throw new UserErrorException("Could not create mod package because no build output was found."); + // collect files + foreach (Tuple entry in this.GetPossibleFiles(projectDir, targetDir)) + { + string relativePath = entry.Item1; + FileInfo file = entry.Item2; + + if (!this.ShouldIgnore(file, relativePath, ignoreFilePatterns)) + this.Files[relativePath] = file; + } + + // check for required files + if (validateRequiredModFiles) + { + // manifest + if (!this.Files.ContainsKey(this.ManifestFileName)) + throw new UserErrorException($"Could not create mod package because no {this.ManifestFileName} was found in the project or build output."); + + // DLL + // ReSharper disable once SimplifyLinqExpression + if (!this.Files.Any(p => !p.Key.EndsWith(".dll"))) + throw new UserErrorException("Could not create mod package because no .dll file was found in the project or build output."); + } + } + + /// Get the files in the mod package. + public IDictionary GetFiles() + { + return new Dictionary(this.Files, StringComparer.InvariantCultureIgnoreCase); + } + + /// Get a semantic version from the mod manifest. + /// The manifest is missing or invalid. + public string GetManifestVersion() + { + if (!this.Files.TryGetValue(this.ManifestFileName, out FileInfo manifestFile) || !new JsonHelper().ReadJsonFileIfExists(manifestFile.FullName, out Manifest manifest)) + throw new InvalidOperationException($"The mod does not have a {this.ManifestFileName} file."); // shouldn't happen since we validate in constructor + + return manifest.Version.ToString(); + } + + + /********* + ** Private methods + *********/ + /// Get all files to include in the mod folder, not accounting for ignore patterns. + /// The folder containing the project files. + /// The folder containing the build output. + /// Returns tuples containing the relative path within the mod folder, and the file to copy to it. + private IEnumerable> GetPossibleFiles(string projectDir, string targetDir) + { // project manifest bool hasProjectManifest = false; { - FileInfo manifest = new FileInfo(Path.Combine(projectDir, "manifest.json")); + FileInfo manifest = new FileInfo(Path.Combine(projectDir, this.ManifestFileName)); if (manifest.Exists) { - this.Files[this.ManifestFileName] = manifest; + yield return Tuple.Create(this.ManifestFileName, manifest); hasProjectManifest = true; } } @@ -58,7 +108,7 @@ namespace StardewModdingAPI.ModBuildConfig.Framework if (translationsFolder.Exists) { foreach (FileInfo file in translationsFolder.EnumerateFiles()) - this.Files[Path.Combine("i18n", file.Name)] = file; + yield return Tuple.Create(Path.Combine("i18n", file.Name), file); hasProjectTranslations = true; } @@ -70,7 +120,7 @@ namespace StardewModdingAPI.ModBuildConfig.Framework foreach (FileInfo file in assetsFolder.EnumerateFiles("*", SearchOption.AllDirectories)) { string relativePath = PathUtilities.GetRelativePath(projectDir, file.FullName); - this.Files[relativePath] = file; + yield return Tuple.Create(relativePath, file); } hasAssetsFolder = true; } @@ -91,48 +141,11 @@ namespace StardewModdingAPI.ModBuildConfig.Framework if (hasAssetsFolder && this.EqualsInvariant(segments[0], "assets")) continue; - // handle ignored files - if (this.ShouldIgnore(file, relativePath, ignoreFilePatterns)) - continue; - // add file - this.Files[relativePath] = file; - } - - // check for required files - if (validateRequiredModFiles) - { - // manifest - if (!this.Files.ContainsKey(this.ManifestFileName)) - throw new UserErrorException($"Could not create mod package because no {this.ManifestFileName} was found in the project or build output."); - - // DLL - // ReSharper disable once SimplifyLinqExpression - if (!this.Files.Any(p => !p.Key.EndsWith(".dll"))) - throw new UserErrorException("Could not create mod package because no .dll file was found in the project or build output."); + yield return Tuple.Create(relativePath, file); } } - /// Get the files in the mod package. - public IDictionary GetFiles() - { - return new Dictionary(this.Files, StringComparer.InvariantCultureIgnoreCase); - } - - /// Get a semantic version from the mod manifest. - /// The manifest is missing or invalid. - public string GetManifestVersion() - { - if (!this.Files.TryGetValue(this.ManifestFileName, out FileInfo manifestFile) || !new JsonHelper().ReadJsonFileIfExists(manifestFile.FullName, out Manifest manifest)) - throw new InvalidOperationException($"The mod does not have a {this.ManifestFileName} file."); // shouldn't happen since we validate in constructor - - return manifest.Version.ToString(); - } - - - /********* - ** Private methods - *********/ /// Get whether a build output file should be ignored. /// The file to check. /// The file's relative path in the package. diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index b6ef98f0..79a4f008 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -17,6 +17,7 @@ - If the project contains an `assets` folder, its contents are now included in the mod automatically. - Dropped support for very old versions of SMAPI and Visual Studio. - Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly. + - Fixed `<IgnoreModFilePatterns>` not working for `i18n` files. -- cgit From 6f63bd00248fd90649718a1a77926a48f2df0e51 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 21 Apr 2019 13:23:33 -0400 Subject: update nuspec for alpha release --- src/SMAPI.ModBuildConfig/Properties/AssemblyInfo.cs | 4 ++-- src/SMAPI.ModBuildConfig/package.nuspec | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/Properties/AssemblyInfo.cs b/src/SMAPI.ModBuildConfig/Properties/AssemblyInfo.cs index e051bfbd..255ce509 100644 --- a/src/SMAPI.ModBuildConfig/Properties/AssemblyInfo.cs +++ b/src/SMAPI.ModBuildConfig/Properties/AssemblyInfo.cs @@ -2,5 +2,5 @@ using System.Reflection; [assembly: AssemblyTitle("SMAPI.ModBuildConfig")] [assembly: AssemblyDescription("")] -[assembly: AssemblyVersion("2.2.0")] -[assembly: AssemblyFileVersion("2.2.0")] +[assembly: AssemblyVersion("3.0.0")] +[assembly: AssemblyFileVersion("3.0.0")] diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index 79a4f008..f66a3504 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -2,12 +2,13 @@ Pathoschild.Stardew.ModBuildConfig - 3.0.0 + 3.0.0-alpha.20190419 Build package for SMAPI mods Pathoschild Pathoschild false - https://github.com/Pathoschild/SMAPI/blob/develop/LICENSE.txt + MIT + https://github.com/Pathoschild/SMAPI/blob/develop/docs/mod-build-config.md#readme https://raw.githubusercontent.com/Pathoschild/SMAPI/develop/src/SMAPI.ModBuildConfig/assets/nuget-icon.png Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For SMAPI 2.11 or later. -- cgit From abffdc2dab2a1c03904427b251acac9d800e0912 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 24 Apr 2019 23:45:34 -0400 Subject: simplify project names --- .../SMAPI.ModBuildConfig.csproj | 40 ++++++++++++++++++++++ .../StardewModdingAPI.ModBuildConfig.csproj | 40 ---------------------- 2 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj delete mode 100644 src/SMAPI.ModBuildConfig/StardewModdingAPI.ModBuildConfig.csproj (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj new file mode 100644 index 00000000..f39a1555 --- /dev/null +++ b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj @@ -0,0 +1,40 @@ + + + + SMAPI.ModBuildConfig + SMAPI.ModBuildConfig + net45 + false + latest + x86 + false + + + + + + + + + mod-build-config.md + + + + + + + + + + + + + + mod-build-config.md + + + + + + + diff --git a/src/SMAPI.ModBuildConfig/StardewModdingAPI.ModBuildConfig.csproj b/src/SMAPI.ModBuildConfig/StardewModdingAPI.ModBuildConfig.csproj deleted file mode 100644 index 870973a0..00000000 --- a/src/SMAPI.ModBuildConfig/StardewModdingAPI.ModBuildConfig.csproj +++ /dev/null @@ -1,40 +0,0 @@ - - - - StardewModdingAPI.ModBuildConfig - StardewModdingAPI.ModBuildConfig - net45 - false - latest - x86 - false - - - - - - - - - mod-build-config.md - - - - - - - - - - - - - - mod-build-config.md - - - - - - - -- cgit From e18ffc009d4fd56b200b0bb13b671940c9fadbc7 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 25 Apr 2019 00:50:26 -0400 Subject: update mods + mod build package for smapi-internal changes --- src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj | 1 + src/SMAPI.ModBuildConfig/build/smapi.targets | 14 +++++++------- src/SMAPI.ModBuildConfig/package.nuspec | 6 +++--- 3 files changed, 11 insertions(+), 10 deletions(-) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj index f39a1555..0af8eef9 100644 --- a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj +++ b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj @@ -36,5 +36,6 @@ + diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index f703477f..c8f60c65 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -2,7 +2,7 @@ - + + - - $(DeployModFolderName) - $(DeployModZipTo) - - + $(MSBuildProjectName) $(TargetDir) True -- cgit From d5a7465b0219c3d736b1ac5aff1758ba41887fcc Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 11 Jun 2019 20:23:20 -0400 Subject: add mod build features for new csproj format --- src/SMAPI.ModBuildConfig/build/smapi.targets | 7 +++++++ src/SMAPI.ModBuildConfig/package.nuspec | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index 79a491e7..e9209a45 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -13,6 +13,13 @@ + + x86 + x86 + + + $(AssemblySearchPaths);{GAC} + $(MSBuildProjectName) $(TargetDir) diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index c6ee6503..28bcf807 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -2,7 +2,7 @@ Pathoschild.Stardew.ModBuildConfig - 3.0.0-alpha.20190426 + 3.0.0-alpha.20190611 Build package for SMAPI mods Pathoschild Pathoschild @@ -16,6 +16,9 @@ 3.0.0: - Updated for SMAPI 3.0 and Stardew Valley 1.4. - If the project contains an `assets` folder, its contents are now included in the mod automatically. + - For projects using the new `.csproj` format: + - platform target is now set to x86 automatically to avoid mismatching platform target warnings; + - added GAC to assembly search paths to fix references to XNA Framework. - Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly. - Fixed `<IgnoreModFilePatterns>` not working for `i18n` files. - Dropped support for older versions of SMAPI and Visual Studio. -- cgit From 93551c094139d4446ef5c4fc69bcda26e49e62bd Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 13 Jun 2019 18:19:27 -0400 Subject: add temporary backwards compatibility for SDV 1.3.36 in mod build package --- src/SMAPI.ModBuildConfig/build/smapi.targets | 10 ++++++++-- src/SMAPI.ModBuildConfig/package.nuspec | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index e9209a45..103e996a 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -98,7 +98,7 @@ false true - + $(GamePath)\StardewValley.GameData.dll false true @@ -112,6 +112,9 @@ $(GamePath)\smapi-internal\SMAPI.Toolkit.CoreInterfaces.dll false true + + + $(GamePath)\smapi-internal\StardewModdingAPI.Toolkit.CoreInterfaces.dll $(GamePath)\xTile.dll @@ -142,7 +145,7 @@ false true - + $(GamePath)\StardewValley.GameData.MonoGame.dll false true @@ -156,6 +159,9 @@ $(GamePath)\smapi-internal\SMAPI.Toolkit.CoreInterfaces.dll false true + + + $(GamePath)\smapi-internal\StardewModdingAPI.Toolkit.CoreInterfaces.dll $(GamePath)\xTile.dll diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index 28bcf807..e82bded4 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -2,7 +2,7 @@ Pathoschild.Stardew.ModBuildConfig - 3.0.0-alpha.20190611 + 3.0.0-beta.2 Build package for SMAPI mods Pathoschild Pathoschild @@ -14,7 +14,7 @@ Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For SMAPI 2.11 or later. 3.0.0: - - Updated for SMAPI 3.0 and Stardew Valley 1.4. + - Updated for SMAPI 3.0 and Stardew Valley 1.4. (The beta is backwards-compatible with previous versions.) - If the project contains an `assets` folder, its contents are now included in the mod automatically. - For projects using the new `.csproj` format: - platform target is now set to x86 automatically to avoid mismatching platform target warnings; -- cgit From 480b307e6220e5a503f02ed857873ec8a0720e91 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 16 Jun 2019 14:18:30 -0400 Subject: include PDB files in mod builds by default --- src/SMAPI.ModBuildConfig/build/smapi.targets | 4 ++++ src/SMAPI.ModBuildConfig/package.nuspec | 1 + 2 files changed, 5 insertions(+) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index 103e996a..f797b0d1 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -17,6 +17,10 @@ x86 x86 + + pdbonly + true + $(AssemblySearchPaths);{GAC} diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index e82bded4..d7860ee1 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -19,6 +19,7 @@ - For projects using the new `.csproj` format: - platform target is now set to x86 automatically to avoid mismatching platform target warnings; - added GAC to assembly search paths to fix references to XNA Framework. + - Builds now include `.pdb` files by default, to enable line numbers in error stack traces. - Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly. - Fixed `<IgnoreModFilePatterns>` not working for `i18n` files. - Dropped support for older versions of SMAPI and Visual Studio. -- cgit From 2cf2b6706f9e31775b1afe05980cfaed96ab1690 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 17 Jun 2019 18:52:03 -0400 Subject: move game detection into toolkit for reuse --- src/SMAPI.ModBuildConfig/build/smapi.targets | 3 ++- src/SMAPI.ModBuildConfig/package.nuspec | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index f797b0d1..7d29da0b 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -29,6 +29,7 @@ $(TargetDir) True True + True False @@ -129,7 +130,7 @@ - + Program $(GamePath)\StardewModdingAPI.exe $(GamePath) diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index d7860ee1..37d7959e 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -20,6 +20,7 @@ - platform target is now set to x86 automatically to avoid mismatching platform target warnings; - added GAC to assembly search paths to fix references to XNA Framework. - Builds now include `.pdb` files by default, to enable line numbers in error stack traces. + - You can now optionally disable game debugging config. - Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly. - Fixed `<IgnoreModFilePatterns>` not working for `i18n` files. - Dropped support for older versions of SMAPI and Visual Studio. -- cgit From ffe5bc1d4d6ba797a76856b3c98dd853d8f90086 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 17 Jun 2019 18:52:19 -0400 Subject: remove temporary backwards-compat in mod build package --- src/SMAPI.ModBuildConfig/build/smapi.targets | 10 ++-------- src/SMAPI.ModBuildConfig/package.nuspec | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index 7d29da0b..c24990d5 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -103,7 +103,7 @@ false true - + $(GamePath)\StardewValley.GameData.dll false true @@ -117,9 +117,6 @@ $(GamePath)\smapi-internal\SMAPI.Toolkit.CoreInterfaces.dll false true - - - $(GamePath)\smapi-internal\StardewModdingAPI.Toolkit.CoreInterfaces.dll $(GamePath)\xTile.dll @@ -150,7 +147,7 @@ false true - + $(GamePath)\StardewValley.GameData.MonoGame.dll false true @@ -164,9 +161,6 @@ $(GamePath)\smapi-internal\SMAPI.Toolkit.CoreInterfaces.dll false true - - - $(GamePath)\smapi-internal\StardewModdingAPI.Toolkit.CoreInterfaces.dll $(GamePath)\xTile.dll diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index 37d7959e..976b3420 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -2,7 +2,7 @@ Pathoschild.Stardew.ModBuildConfig - 3.0.0-beta.2 + 3.0.0-beta.3 Build package for SMAPI mods Pathoschild Pathoschild @@ -14,7 +14,7 @@ Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For SMAPI 2.11 or later. 3.0.0: - - Updated for SMAPI 3.0 and Stardew Valley 1.4. (The beta is backwards-compatible with previous versions.) + - Updated for SMAPI 3.0 and Stardew Valley 1.4. - If the project contains an `assets` folder, its contents are now included in the mod automatically. - For projects using the new `.csproj` format: - platform target is now set to x86 automatically to avoid mismatching platform target warnings; -- cgit From b3e4162f7cb4d855f7c36def4657209cbd18ba52 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 18 Jun 2019 23:10:11 -0400 Subject: move logic into separate .targets file file for reuse --- .../SMAPI.ModBuildConfig.csproj | 1 + src/SMAPI.ModBuildConfig/build/smapi.targets | 49 ++-------------------- 2 files changed, 5 insertions(+), 45 deletions(-) (limited to 'src/SMAPI.ModBuildConfig') diff --git a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj index 0af8eef9..70636937 100644 --- a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj +++ b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj @@ -15,6 +15,7 @@ + mod-build-config.md diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index c24990d5..10ef73af 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -1,17 +1,12 @@ - + + + - - - - - x86 @@ -33,42 +28,6 @@ False - - - - - - $(HOME)/GOG Games/Stardew Valley/game - $(HOME)/.steam/steam/steamapps/common/Stardew Valley - $(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\GalaxyClient\Games\Stardew Valley - C:\Program Files\GOG Galaxy\Games\Stardew Valley - C:\Program Files\Steam\steamapps\common\Stardew Valley - - C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley - C:\Program Files (x86)\GOG Galaxy\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)) - - - <_SteamLibraryPath>$([MSBuild]::GetRegistryValueFromView('HKEY_CURRENT_USER\SOFTWARE\Valve\Steam', 'SteamPath', null, RegistryView.Registry32)) - $(_SteamLibraryPath)\steamapps\common\Stardew Valley - - - - $(MSBuildProjectName) $(TargetDir) - True - True - True - False + true + true + true + false @@ -86,7 +86,7 @@ - + Program $(GamePath)\StardewModdingAPI.exe $(GameP