From 554ad3479e844bba5aad20c673fd5a250ec06f78 Mon Sep 17 00:00:00 2001 From: Tobey Blaber Date: Wed, 16 Sep 2020 20:48:33 +0100 Subject: [PATCH 1/4] Fixes an issue experienced by a user who had Subnautica installed in the following path: `E:\Windows Steam Library\steamapps\common\Subnautica\` --- Data/latest-version.txt | 2 +- Executable/Properties/AssemblyInfo.cs | 4 ++-- Installer/Properties/AssemblyInfo.cs | 4 ++-- Installer/QModsInstallerScript.iss | 2 +- QMMHarmonyShimmer/Properties/AssemblyInfo.cs | 4 ++-- QMMLoader/Properties/AssemblyInfo.cs | 4 ++-- QModManager/Patching/Patcher.cs | 2 +- QModManager/Properties/AssemblyInfo.cs | 4 ++-- QModPluginEmulator/Properties/AssemblyInfo.cs | 4 ++-- QModPluginEmulator/QModPluginGenerator.cs | 2 +- UnityAudioFixer/Properties/AssemblyInfo.cs | 4 ++-- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Data/latest-version.txt b/Data/latest-version.txt index 132d2006..fa13d55b 100644 --- a/Data/latest-version.txt +++ b/Data/latest-version.txt @@ -1 +1 @@ -4.0.2.3 +4.0.3.0 diff --git a/Executable/Properties/AssemblyInfo.cs b/Executable/Properties/AssemblyInfo.cs index a32b02e7..38a7f399 100644 --- a/Executable/Properties/AssemblyInfo.cs +++ b/Executable/Properties/AssemblyInfo.cs @@ -12,5 +12,5 @@ [assembly: ComVisible(false)] -[assembly: AssemblyVersion("4.0.2.3")] -[assembly: AssemblyFileVersion("4.0.2.3")] +[assembly: AssemblyVersion("4.0.3.0")] +[assembly: AssemblyFileVersion("4.0.3.0")] diff --git a/Installer/Properties/AssemblyInfo.cs b/Installer/Properties/AssemblyInfo.cs index abf97baf..6929bbb1 100644 --- a/Installer/Properties/AssemblyInfo.cs +++ b/Installer/Properties/AssemblyInfo.cs @@ -14,5 +14,5 @@ [assembly: Guid("8c6c9a0b-80c4-43d2-89f2-749e6f09fdda")] -[assembly: AssemblyVersion("4.0.2.3")] -[assembly: AssemblyFileVersion("4.0.2.3")] +[assembly: AssemblyVersion("4.0.3.0")] +[assembly: AssemblyFileVersion("4.0.3.0")] diff --git a/Installer/QModsInstallerScript.iss b/Installer/QModsInstallerScript.iss index 7c38d854..af443962 100644 --- a/Installer/QModsInstallerScript.iss +++ b/Installer/QModsInstallerScript.iss @@ -5,7 +5,7 @@ #endif #define Name "QModManager" ; The name of the game will be added after it -#define Version "4.0.2.3" +#define Version "4.0.3.0" #define Author "QModManager" #define URL "https://github.com/QModManager/QModManager" #define SupportURL "https://discord.gg/UpWuWwq" diff --git a/QMMHarmonyShimmer/Properties/AssemblyInfo.cs b/QMMHarmonyShimmer/Properties/AssemblyInfo.cs index f26866df..18bcadf8 100644 --- a/QMMHarmonyShimmer/Properties/AssemblyInfo.cs +++ b/QMMHarmonyShimmer/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.2.3")] -[assembly: AssemblyFileVersion("4.0.2.3")] +[assembly: AssemblyVersion("4.0.3.0")] +[assembly: AssemblyFileVersion("4.0.3.0")] [assembly: NeutralResourcesLanguage("en")] diff --git a/QMMLoader/Properties/AssemblyInfo.cs b/QMMLoader/Properties/AssemblyInfo.cs index 4af4c752..df0901c1 100644 --- a/QMMLoader/Properties/AssemblyInfo.cs +++ b/QMMLoader/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.2.3")] -[assembly: AssemblyFileVersion("4.0.2.3")] +[assembly: AssemblyVersion("4.0.3.0")] +[assembly: AssemblyFileVersion("4.0.3.0")] [assembly: NeutralResourcesLanguage("en")] diff --git a/QModManager/Patching/Patcher.cs b/QModManager/Patching/Patcher.cs index d354a04c..16fa5462 100644 --- a/QModManager/Patching/Patcher.cs +++ b/QModManager/Patching/Patcher.cs @@ -16,7 +16,7 @@ internal static string QModBaseDir { get { - if (Environment.CurrentDirectory.Contains("system32") && Environment.CurrentDirectory.Contains("Windows")) + if (Environment.CurrentDirectory.ToLower().Contains("system32") && Environment.CurrentDirectory.ToLowerInvariant().Contains("windows")) return null; else return Path.Combine(Environment.CurrentDirectory, "QMods"); diff --git a/QModManager/Properties/AssemblyInfo.cs b/QModManager/Properties/AssemblyInfo.cs index a5de9561..c3c91eac 100644 --- a/QModManager/Properties/AssemblyInfo.cs +++ b/QModManager/Properties/AssemblyInfo.cs @@ -13,8 +13,8 @@ [assembly: ComVisible(false)] -[assembly: AssemblyVersion("4.0.2.3")] -[assembly: AssemblyFileVersion("4.0.2.3")] +[assembly: AssemblyVersion("4.0.3.0")] +[assembly: AssemblyFileVersion("4.0.3.0")] [assembly: InternalsVisibleTo("QMMTests")] [assembly: InternalsVisibleTo("QModManager")] diff --git a/QModPluginEmulator/Properties/AssemblyInfo.cs b/QModPluginEmulator/Properties/AssemblyInfo.cs index ff467782..765b05a2 100644 --- a/QModPluginEmulator/Properties/AssemblyInfo.cs +++ b/QModPluginEmulator/Properties/AssemblyInfo.cs @@ -33,8 +33,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.2.3")] -[assembly: AssemblyFileVersion("4.0.2.3")] +[assembly: AssemblyVersion("4.0.3.0")] +[assembly: AssemblyFileVersion("4.0.3.0")] [assembly: NeutralResourcesLanguage("en")] [assembly: InternalsVisibleTo("QModManager.QMMLoader")] diff --git a/QModPluginEmulator/QModPluginGenerator.cs b/QModPluginEmulator/QModPluginGenerator.cs index ee92548c..74de795b 100644 --- a/QModPluginEmulator/QModPluginGenerator.cs +++ b/QModPluginEmulator/QModPluginGenerator.cs @@ -150,7 +150,7 @@ private static void SaveQMMAssemblyCache() private static void ClearBepInExCache() { - if (BepInExCachePath.Contains("system32") || BepInExCachePath.Contains("Windows")) + if (BepInExCachePath.ToLowerInvariant().Contains("system32") && BepInExCachePath.ToLowerInvariant().Contains("windows")) { throw new InvalidOperationException($"BepInEx Cache Path invalid! ({BepInExCachePath})"); } diff --git a/UnityAudioFixer/Properties/AssemblyInfo.cs b/UnityAudioFixer/Properties/AssemblyInfo.cs index 4370f457..bc3b2e08 100644 --- a/UnityAudioFixer/Properties/AssemblyInfo.cs +++ b/UnityAudioFixer/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.2.3")] -[assembly: AssemblyFileVersion("4.0.2.3")] +[assembly: AssemblyVersion("4.0.3.0")] +[assembly: AssemblyFileVersion("4.0.3.0")] From 38373c44d82be4cf30beb2870bd336f2c35b63be Mon Sep 17 00:00:00 2001 From: Tobey Blaber Date: Wed, 16 Sep 2020 20:50:22 +0100 Subject: [PATCH 2/4] Replace `ToLower()` with `ToLowerInvariant()` --- QModManager/Patching/Patcher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QModManager/Patching/Patcher.cs b/QModManager/Patching/Patcher.cs index 16fa5462..0702a0ab 100644 --- a/QModManager/Patching/Patcher.cs +++ b/QModManager/Patching/Patcher.cs @@ -16,7 +16,7 @@ internal static string QModBaseDir { get { - if (Environment.CurrentDirectory.ToLower().Contains("system32") && Environment.CurrentDirectory.ToLowerInvariant().Contains("windows")) + if (Environment.CurrentDirectory.ToLowerInvariant().Contains("system32") && Environment.CurrentDirectory.ToLowerInvariant().Contains("windows")) return null; else return Path.Combine(Environment.CurrentDirectory, "QMods"); From e7185b16a8c3d9e697781c9b5126e437f977d936 Mon Sep 17 00:00:00 2001 From: Tobey Blaber Date: Wed, 16 Sep 2020 22:04:34 +0100 Subject: [PATCH 3/4] Change version to 4.0.2.4 --- Data/latest-version.txt | 2 +- Executable/Properties/AssemblyInfo.cs | 4 ++-- Installer/Properties/AssemblyInfo.cs | 4 ++-- Installer/QModsInstallerScript.iss | 2 +- QMMHarmonyShimmer/Properties/AssemblyInfo.cs | 4 ++-- QMMLoader/Properties/AssemblyInfo.cs | 4 ++-- QModManager/Properties/AssemblyInfo.cs | 4 ++-- QModPluginEmulator/Properties/AssemblyInfo.cs | 4 ++-- UnityAudioFixer/Properties/AssemblyInfo.cs | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Data/latest-version.txt b/Data/latest-version.txt index fa13d55b..2d9d4c25 100644 --- a/Data/latest-version.txt +++ b/Data/latest-version.txt @@ -1 +1 @@ -4.0.3.0 +4.0.2.4 diff --git a/Executable/Properties/AssemblyInfo.cs b/Executable/Properties/AssemblyInfo.cs index 38a7f399..dbc45f41 100644 --- a/Executable/Properties/AssemblyInfo.cs +++ b/Executable/Properties/AssemblyInfo.cs @@ -12,5 +12,5 @@ [assembly: ComVisible(false)] -[assembly: AssemblyVersion("4.0.3.0")] -[assembly: AssemblyFileVersion("4.0.3.0")] +[assembly: AssemblyVersion("4.0.2.4")] +[assembly: AssemblyFileVersion("4.0.2.4")] diff --git a/Installer/Properties/AssemblyInfo.cs b/Installer/Properties/AssemblyInfo.cs index 6929bbb1..b186512f 100644 --- a/Installer/Properties/AssemblyInfo.cs +++ b/Installer/Properties/AssemblyInfo.cs @@ -14,5 +14,5 @@ [assembly: Guid("8c6c9a0b-80c4-43d2-89f2-749e6f09fdda")] -[assembly: AssemblyVersion("4.0.3.0")] -[assembly: AssemblyFileVersion("4.0.3.0")] +[assembly: AssemblyVersion("4.0.2.4")] +[assembly: AssemblyFileVersion("4.0.2.4")] diff --git a/Installer/QModsInstallerScript.iss b/Installer/QModsInstallerScript.iss index af443962..b653fcc8 100644 --- a/Installer/QModsInstallerScript.iss +++ b/Installer/QModsInstallerScript.iss @@ -5,7 +5,7 @@ #endif #define Name "QModManager" ; The name of the game will be added after it -#define Version "4.0.3.0" +#define Version "4.0.2.4" #define Author "QModManager" #define URL "https://github.com/QModManager/QModManager" #define SupportURL "https://discord.gg/UpWuWwq" diff --git a/QMMHarmonyShimmer/Properties/AssemblyInfo.cs b/QMMHarmonyShimmer/Properties/AssemblyInfo.cs index 18bcadf8..b35a8eee 100644 --- a/QMMHarmonyShimmer/Properties/AssemblyInfo.cs +++ b/QMMHarmonyShimmer/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.3.0")] -[assembly: AssemblyFileVersion("4.0.3.0")] +[assembly: AssemblyVersion("4.0.2.4")] +[assembly: AssemblyFileVersion("4.0.2.4")] [assembly: NeutralResourcesLanguage("en")] diff --git a/QMMLoader/Properties/AssemblyInfo.cs b/QMMLoader/Properties/AssemblyInfo.cs index df0901c1..a64ae211 100644 --- a/QMMLoader/Properties/AssemblyInfo.cs +++ b/QMMLoader/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.3.0")] -[assembly: AssemblyFileVersion("4.0.3.0")] +[assembly: AssemblyVersion("4.0.2.4")] +[assembly: AssemblyFileVersion("4.0.2.4")] [assembly: NeutralResourcesLanguage("en")] diff --git a/QModManager/Properties/AssemblyInfo.cs b/QModManager/Properties/AssemblyInfo.cs index c3c91eac..2fb96391 100644 --- a/QModManager/Properties/AssemblyInfo.cs +++ b/QModManager/Properties/AssemblyInfo.cs @@ -13,8 +13,8 @@ [assembly: ComVisible(false)] -[assembly: AssemblyVersion("4.0.3.0")] -[assembly: AssemblyFileVersion("4.0.3.0")] +[assembly: AssemblyVersion("4.0.2.4")] +[assembly: AssemblyFileVersion("4.0.2.4")] [assembly: InternalsVisibleTo("QMMTests")] [assembly: InternalsVisibleTo("QModManager")] diff --git a/QModPluginEmulator/Properties/AssemblyInfo.cs b/QModPluginEmulator/Properties/AssemblyInfo.cs index 765b05a2..c8172c7c 100644 --- a/QModPluginEmulator/Properties/AssemblyInfo.cs +++ b/QModPluginEmulator/Properties/AssemblyInfo.cs @@ -33,8 +33,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.3.0")] -[assembly: AssemblyFileVersion("4.0.3.0")] +[assembly: AssemblyVersion("4.0.2.4")] +[assembly: AssemblyFileVersion("4.0.2.4")] [assembly: NeutralResourcesLanguage("en")] [assembly: InternalsVisibleTo("QModManager.QMMLoader")] diff --git a/UnityAudioFixer/Properties/AssemblyInfo.cs b/UnityAudioFixer/Properties/AssemblyInfo.cs index bc3b2e08..42230ca1 100644 --- a/UnityAudioFixer/Properties/AssemblyInfo.cs +++ b/UnityAudioFixer/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.0.3.0")] -[assembly: AssemblyFileVersion("4.0.3.0")] +[assembly: AssemblyVersion("4.0.2.4")] +[assembly: AssemblyFileVersion("4.0.2.4")] From b4789c9ea1557ca4cda17ffe5a38501eb031b476 Mon Sep 17 00:00:00 2001 From: Tobey Blaber Date: Wed, 16 Sep 2020 22:08:15 +0100 Subject: [PATCH 4/4] Removed Windows\system32 checks --- QModManager/Patching/Patcher.cs | 11 +---------- QModPluginEmulator/QModPluginGenerator.cs | 5 ----- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/QModManager/Patching/Patcher.cs b/QModManager/Patching/Patcher.cs index 0702a0ab..93b4302d 100644 --- a/QModManager/Patching/Patcher.cs +++ b/QModManager/Patching/Patcher.cs @@ -12,16 +12,7 @@ internal static class Patcher { internal const string IDRegex = "[^0-9a-zA-Z_]"; - internal static string QModBaseDir - { - get - { - if (Environment.CurrentDirectory.ToLowerInvariant().Contains("system32") && Environment.CurrentDirectory.ToLowerInvariant().Contains("windows")) - return null; - else - return Path.Combine(Environment.CurrentDirectory, "QMods"); - } - } + internal static string QModBaseDir => Path.Combine(Environment.CurrentDirectory, "QMods"); private static bool Patched = false; internal static QModGame CurrentlyRunningGame { get; private set; } = QModGame.None; diff --git a/QModPluginEmulator/QModPluginGenerator.cs b/QModPluginEmulator/QModPluginGenerator.cs index 74de795b..2b929366 100644 --- a/QModPluginEmulator/QModPluginGenerator.cs +++ b/QModPluginEmulator/QModPluginGenerator.cs @@ -150,11 +150,6 @@ private static void SaveQMMAssemblyCache() private static void ClearBepInExCache() { - if (BepInExCachePath.ToLowerInvariant().Contains("system32") && BepInExCachePath.ToLowerInvariant().Contains("windows")) - { - throw new InvalidOperationException($"BepInEx Cache Path invalid! ({BepInExCachePath})"); - } - if (!Directory.Exists(BepInExCachePath)) return;