summaryrefslogtreecommitdiff
path: root/src/SMAPI.Installer
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-07-06 22:26:09 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-07-06 22:26:09 -0400
commitd51ffe58f7b7450cd4c4a7ee3d8b4da1cf55e7e4 (patch)
treeec19cdd7567125e47cfd49c7c044fc09f09f6b2f /src/SMAPI.Installer
parent8e9237bdd7ec179975c9be5e28c811b42007e707 (diff)
parentbcb9e25d8666d2c1384515063ffbf987c36b8b0e (diff)
downloadSMAPI-d51ffe58f7b7450cd4c4a7ee3d8b4da1cf55e7e4.tar.gz
SMAPI-d51ffe58f7b7450cd4c4a7ee3d8b4da1cf55e7e4.tar.bz2
SMAPI-d51ffe58f7b7450cd4c4a7ee3d8b4da1cf55e7e4.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Installer')
-rw-r--r--src/SMAPI.Installer/InteractiveInstaller.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/SMAPI.Installer/InteractiveInstaller.cs b/src/SMAPI.Installer/InteractiveInstaller.cs
index 19cefd32..fd1a6047 100644
--- a/src/SMAPI.Installer/InteractiveInstaller.cs
+++ b/src/SMAPI.Installer/InteractiveInstaller.cs
@@ -54,6 +54,7 @@ namespace StardewModdingApi.Installer
yield return GetInstallPath("smapi-internal");
yield return GetInstallPath("steam_appid.txt");
+#if SMAPI_DEPRECATED
// obsolete
yield return GetInstallPath("libgdiplus.dylib"); // before 3.13 (macOS only)
yield return GetInstallPath(Path.Combine("Mods", ".cache")); // 1.3-1.4
@@ -82,6 +83,7 @@ namespace StardewModdingApi.Installer
foreach (DirectoryInfo modDir in modsDir.EnumerateDirectories())
yield return Path.Combine(modDir.FullName, ".cache"); // 1.4–1.7
}
+#endif
yield return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley", "ErrorLogs"); // remove old log files
}
@@ -451,6 +453,7 @@ namespace StardewModdingApi.Installer
}
// find target folder
+ // ReSharper disable once ConditionalAccessQualifierIsNonNullableAccordingToAPIContract -- avoid error if the Mods folder has invalid mods, since they're not validated yet
ModFolder? targetMod = targetMods.FirstOrDefault(p => p.Manifest?.UniqueID?.Equals(sourceMod.Manifest.UniqueID, StringComparison.OrdinalIgnoreCase) == true);
DirectoryInfo defaultTargetFolder = new(Path.Combine(paths.ModsPath, sourceMod.Directory.Name));
DirectoryInfo targetFolder = targetMod?.Directory ?? defaultTargetFolder;
@@ -477,8 +480,10 @@ namespace StardewModdingApi.Installer
File.WriteAllText(paths.ApiConfigPath, text);
}
+#if SMAPI_DEPRECATED
// remove obsolete appdata mods
this.InteractivelyRemoveAppDataMods(paths.ModsDir, bundledModsDir);
+#endif
}
}
Console.WriteLine();
@@ -805,6 +810,7 @@ namespace StardewModdingApi.Installer
}
}
+#if SMAPI_DEPRECATED
/// <summary>Interactively move mods out of the app data directory.</summary>
/// <param name="properModsDir">The directory which should contain all mods.</param>
/// <param name="packagedModsDir">The installer directory containing packaged mods.</param>
@@ -887,6 +893,7 @@ namespace StardewModdingApi.Installer
directory.Delete(recursive: true);
}
}
+#endif
/// <summary>Get whether a file or folder should be copied from the installer files.</summary>
/// <param name="entry">The file or folder info.</param>