Skip to content

Commit 514f935

Browse files
committed
re-add deletion of obsolete files in SMAPI installer
These were removed in 77ea201.
1 parent dfff36e commit 514f935

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

docs/release-notes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
[README](README.md)
22

33
# Release notes
4+
## Upcoming release
5+
* For players:
6+
* The installer now deletes obsolete files from very old SMAPI versions again. (This was removed in SMAPI 4.0, but many players still had very old versions.)
7+
48
## 4.0.4
59
Released 29 March 2024 for Stardew Valley 1.6.0 or later.
610

src/SMAPI.Installer/InteractiveInstaller.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,29 @@ private IEnumerable<string> GetUninstallPaths(DirectoryInfo installDir, Director
5353
yield return GetInstallPath("smapi-internal");
5454
yield return GetInstallPath("steam_appid.txt");
5555

56+
// obsolete files
57+
yield return GetInstallPath("libgdiplus.dylib"); // before 3.13 (macOS only)
58+
yield return GetInstallPath(Path.Combine("Mods", ".cache")); // 1.3-1.4
59+
yield return GetInstallPath(Path.Combine("Mods", "TrainerMod")); // before 2.0 (renamed to ConsoleCommands)
60+
yield return GetInstallPath("Mono.Cecil.Rocks.dll"); // 1.3-1.8
61+
yield return GetInstallPath("StardewModdingAPI-settings.json"); // 1.0-1.4
62+
yield return GetInstallPath("StardewModdingAPI.AssemblyRewriters.dll"); // 1.3-2.5.5
63+
yield return GetInstallPath("0Harmony.dll"); // moved in 2.8
64+
yield return GetInstallPath("0Harmony.pdb"); // moved in 2.8
65+
yield return GetInstallPath("Mono.Cecil.dll"); // moved in 2.8
66+
yield return GetInstallPath("Newtonsoft.Json.dll"); // moved in 2.8
67+
yield return GetInstallPath("StardewModdingAPI.config.json"); // moved in 2.8
68+
yield return GetInstallPath("StardewModdingAPI.crash.marker"); // moved in 2.8
69+
yield return GetInstallPath("StardewModdingAPI.metadata.json"); // moved in 2.8
70+
yield return GetInstallPath("StardewModdingAPI.update.marker"); // moved in 2.8
71+
yield return GetInstallPath("StardewModdingAPI.Toolkit.dll"); // moved in 2.8
72+
yield return GetInstallPath("StardewModdingAPI.Toolkit.pdb"); // moved in 2.8
73+
yield return GetInstallPath("StardewModdingAPI.Toolkit.xml"); // moved in 2.8
74+
yield return GetInstallPath("StardewModdingAPI.Toolkit.CoreInterfaces.dll"); // moved in 2.8
75+
yield return GetInstallPath("StardewModdingAPI.Toolkit.CoreInterfaces.pdb"); // moved in 2.8
76+
yield return GetInstallPath("StardewModdingAPI.Toolkit.CoreInterfaces.xml"); // moved in 2.8
77+
yield return GetInstallPath("StardewModdingAPI-x64.exe"); // before 3.13
78+
5679
// old log files
5780
yield return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley", "ErrorLogs");
5881
}

0 commit comments

Comments
 (0)