From 474c76183b601dc9ebd238a9acb69cd71f598af0 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 10 Oct 2022 13:36:11 -0400 Subject: [PATCH 1/2] fix error when Steam .vdf file doesn't exist --- docs/release-notes.md | 4 ++++ src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 7574d62b7..9f50fafa6 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -7,6 +7,10 @@ _If needed, you can update to SMAPI 3.16.0 first and then install the latest version._ --> +## Upcoming release +* For players: + * Fixed installer error on Windows if the Steam library folder exists but doesn't contain Steam's `.vdf` library data file. + ## 3.17.0 Released 09 October 2022 for Stardew Valley 1.5.6 or later. See [release highlights](https://www.patreon.com/posts/73090322). diff --git a/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs b/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs index 66465ffec..1d518738a 100644 --- a/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs +++ b/src/SMAPI.Toolkit/Framework/GameScanning/GameScanner.cs @@ -264,8 +264,12 @@ private IEnumerable GetCustomInstallPaths() if (steamPath == null) return null; - // get raw .vdf data + // get .vdf file path string libraryFoldersPath = Path.Combine(steamPath.Replace('/', '\\'), "steamapps\\libraryfolders.vdf"); + if (!File.Exists(libraryFoldersPath)) + return null; + + // read data using FileStream fileStream = File.OpenRead(libraryFoldersPath); VdfDeserializer deserializer = new(); dynamic libraries = deserializer.Deserialize(fileStream); From 5739745b76d8c339dee6af0123e310dab6ebcf07 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 10 Oct 2022 20:03:01 -0400 Subject: [PATCH 2/2] prepare for release --- build/common.targets | 2 +- docs/release-notes.md | 4 +++- 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, 11 insertions(+), 9 deletions(-) diff --git a/build/common.targets b/build/common.targets index 02cf69bdc..2f1f822ea 100644 --- a/build/common.targets +++ b/build/common.targets @@ -7,7 +7,7 @@ repo. It imports the other MSBuild files as needed. - 3.17.0 + 3.17.1 SMAPI latest $(AssemblySearchPaths);{GAC} diff --git a/docs/release-notes.md b/docs/release-notes.md index 9f50fafa6..9c4fdefc6 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -7,7 +7,9 @@ _If needed, you can update to SMAPI 3.16.0 first and then install the latest version._ --> -## Upcoming release +## 3.17.1 +Released 10 October 2022 for Stardew Valley 1.5.6 or later. + * For players: * Fixed installer error on Windows if the Steam library folder exists but doesn't contain Steam's `.vdf` library data file. diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json index 754e543a8..ecac30bf7 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.17.0", + "Version": "3.17.1", "Description": "Adds SMAPI console commands that let you manipulate the game.", "UniqueID": "SMAPI.ConsoleCommands", "EntryDll": "ConsoleCommands.dll", - "MinimumApiVersion": "3.17.0" + "MinimumApiVersion": "3.17.1" } diff --git a/src/SMAPI.Mods.ErrorHandler/manifest.json b/src/SMAPI.Mods.ErrorHandler/manifest.json index 8f94e5abd..3d7088760 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.17.0", + "Version": "3.17.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.17.0" + "MinimumApiVersion": "3.17.1" } diff --git a/src/SMAPI.Mods.SaveBackup/manifest.json b/src/SMAPI.Mods.SaveBackup/manifest.json index a9401fc30..c2bf5f05d 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.17.0", + "Version": "3.17.1", "Description": "Automatically backs up all your saves once per day into its folder.", "UniqueID": "SMAPI.SaveBackup", "EntryDll": "SaveBackup.dll", - "MinimumApiVersion": "3.17.0" + "MinimumApiVersion": "3.17.1" } diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index 31dafa8eb..ea41a4eef 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -52,7 +52,7 @@ internal static class EarlyConstants internal static int? LogScreenId { get; set; } /// SMAPI's current raw semantic version. - internal static string RawApiVersion = "3.17.0"; + internal static string RawApiVersion = "3.17.1"; } /// Contains SMAPI's constants and assumptions.