From 8d9d8341cdd7e78bbb281c1576a434d982126a44 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 3 May 2021 19:42:30 -0400 Subject: [PATCH 1/2] fix installer leaving unneeded StardewModdingAPI-x64.exe file in installer --- docs/release-notes.md | 4 +++ src/SMAPI.Installer/InteractiveInstaller.cs | 31 ++++++++++----------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index b697cd2b..b25be131 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -7,6 +7,10 @@ * Migrated to Harmony 2.0 (see [_migrate to Harmony 2.0_](https://stardewvalleywiki.com/Modding:Migrate_to_Harmony_2.0) for more info). --> +## Upcoming release +* For players: + * Fixed installer leaving unneeded `StardewModdingAPI-x64.exe` file in the game folder. + ## 3.10 Released 03 May 2021 for Stardew Valley 1.5.4 or later. See [release highlights](https://www.patreon.com/posts/50764911). diff --git a/src/SMAPI.Installer/InteractiveInstaller.cs b/src/SMAPI.Installer/InteractiveInstaller.cs index 83ecd257..55e9c064 100644 --- a/src/SMAPI.Installer/InteractiveInstaller.cs +++ b/src/SMAPI.Installer/InteractiveInstaller.cs @@ -45,6 +45,7 @@ namespace StardewModdingApi.Installer yield return GetInstallPath("StardewModdingAPI.exe.mdb"); // Linux/macOS only yield return GetInstallPath("StardewModdingAPI.pdb"); // Windows only yield return GetInstallPath("StardewModdingAPI.xml"); + yield return GetInstallPath("StardewModdingAPI-x64.exe"); // not normally added to game folder, but may be mistakenly added by a manual install yield return GetInstallPath("smapi-internal"); yield return GetInstallPath("steam_appid.txt"); @@ -424,25 +425,23 @@ namespace StardewModdingApi.Installer this.RecursiveCopy(sourceEntry, paths.GameDir); } - if (isWindows64Bit) + // handle 64-bit file { - this.PrintDebug("Making SMAPI 64-bit..."); - FileInfo x64Executable = new FileInfo(Path.Combine(paths.BundleDir.FullName, "StardewModdingAPI-x64.exe")); - if (x64Executable.Exists) + FileInfo x64Executable = new FileInfo(Path.Combine(paths.GameDir.FullName, "StardewModdingAPI-x64.exe")); + if (isWindows64Bit) { - string targetName = "StardewModdingAPI.exe"; - this.InteractivelyDelete(Path.Combine(paths.GameDir.FullName, targetName)); - this.InteractivelyDelete(Path.Combine(paths.GameDir.FullName, x64Executable.Name)); - - this.RecursiveCopy(x64Executable, paths.GameDir); - File.Move(Path.Combine(paths.GamePath, x64Executable.Name), Path.Combine(paths.GamePath, targetName)); - } - else - { - this.PrintError($"Oops! Could not find the required '{x64Executable.Name}' installer file. SMAPI was unable to install correctly."); - Console.ReadLine(); - return; + this.PrintDebug("Making SMAPI 64-bit..."); + if (x64Executable.Exists) + { + string targetPath = Path.Combine(paths.GameDir.FullName, "StardewModdingAPI.exe"); + this.InteractivelyDelete(targetPath); + x64Executable.MoveTo(targetPath); + } + else + this.PrintError($"Oops! Could not find the required '{x64Executable.Name}' installer file. SMAPI may not work correctly."); } + else if (x64Executable.Exists) + x64Executable.Delete(); } // replace mod launcher (if possible) From 6b1c4589e96f25b771ff8ddd4bbdbb9198a0ab9c Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 3 May 2021 19:49:44 -0400 Subject: [PATCH 2/2] prepare for release --- build/common.targets | 2 +- docs/release-notes.md | 6 ++++-- src/SMAPI.Mods.ConsoleCommands/manifest.json | 4 ++-- src/SMAPI.Mods.ErrorHandler/manifest.json | 4 ++-- src/SMAPI.Mods.SaveBackup/manifest.json | 4 ++-- src/SMAPI/Constants.cs | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/build/common.targets b/build/common.targets index 3278a0da..d538cc53 100644 --- a/build/common.targets +++ b/build/common.targets @@ -1,7 +1,7 @@ - 3.10.0 + 3.10.1 SMAPI latest $(AssemblySearchPaths);{GAC} diff --git a/docs/release-notes.md b/docs/release-notes.md index b25be131..caa90d19 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -7,9 +7,11 @@ * Migrated to Harmony 2.0 (see [_migrate to Harmony 2.0_](https://stardewvalleywiki.com/Modding:Migrate_to_Harmony_2.0) for more info). --> -## Upcoming release +## 3.10.1 +Released 03 May 2021 for Stardew Valley 1.5.4 or later. + * For players: - * Fixed installer leaving unneeded `StardewModdingAPI-x64.exe` file in the game folder. + * Fixed installer leaving an unneeded `StardewModdingAPI-x64.exe` file in 32-bit game folders. ## 3.10 Released 03 May 2021 for Stardew Valley 1.5.4 or later. See [release highlights](https://www.patreon.com/posts/50764911). diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json index 10e6733f..e9513309 100644 --- a/src/SMAPI.Mods.ConsoleCommands/manifest.json +++ b/src/SMAPI.Mods.ConsoleCommands/manifest.json @@ -1,9 +1,9 @@ { "Name": "Console Commands", "Author": "SMAPI", - "Version": "3.10.0", + "Version": "3.10.1", "Description": "Adds SMAPI console commands that let you manipulate the game.", "UniqueID": "SMAPI.ConsoleCommands", "EntryDll": "ConsoleCommands.dll", - "MinimumApiVersion": "3.10.0" + "MinimumApiVersion": "3.10.1" } diff --git a/src/SMAPI.Mods.ErrorHandler/manifest.json b/src/SMAPI.Mods.ErrorHandler/manifest.json index ab519781..b0b29379 100644 --- a/src/SMAPI.Mods.ErrorHandler/manifest.json +++ b/src/SMAPI.Mods.ErrorHandler/manifest.json @@ -1,9 +1,9 @@ { "Name": "Error Handler", "Author": "SMAPI", - "Version": "3.10.0", + "Version": "3.10.1", "Description": "Handles some common vanilla errors to log more useful info or avoid breaking the game.", "UniqueID": "SMAPI.ErrorHandler", "EntryDll": "ErrorHandler.dll", - "MinimumApiVersion": "3.10.0" + "MinimumApiVersion": "3.10.1" } diff --git a/src/SMAPI.Mods.SaveBackup/manifest.json b/src/SMAPI.Mods.SaveBackup/manifest.json index 0d421b8f..fea9b62e 100644 --- a/src/SMAPI.Mods.SaveBackup/manifest.json +++ b/src/SMAPI.Mods.SaveBackup/manifest.json @@ -1,9 +1,9 @@ { "Name": "Save Backup", "Author": "SMAPI", - "Version": "3.10.0", + "Version": "3.10.1", "Description": "Automatically backs up all your saves once per day into its folder.", "UniqueID": "SMAPI.SaveBackup", "EntryDll": "SaveBackup.dll", - "MinimumApiVersion": "3.10.0" + "MinimumApiVersion": "3.10.1" } diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index 3c21b205..2e476208 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -61,7 +61,7 @@ namespace StardewModdingAPI internal static int? LogScreenId { get; set; } /// SMAPI's current raw semantic version. - internal static string RawApiVersion = "3.10.0"; + internal static string RawApiVersion = "3.10.1"; } /// Contains SMAPI's constants and assumptions.