diff --git a/ALOTInstallerCore/ModManager/ME3Tweaks/LogCollector.cs b/ALOTInstallerCore/ModManager/ME3Tweaks/LogCollector.cs index 3b3c7e1..3194056 100644 --- a/ALOTInstallerCore/ModManager/ME3Tweaks/LogCollector.cs +++ b/ALOTInstallerCore/ModManager/ME3Tweaks/LogCollector.cs @@ -263,7 +263,11 @@ void addDiagLine(string message = "", Severity sev = Severity.INFO) #else addDiagLine($@"Version information cannot be read on non-windows platforms"); #endif - + if (selectedDiagnosticTarget.Game == MEGame.ME1 && selectedDiagnosticTarget.IsPolishME1) + { + Log.Warning(@"Detected this is Polish build of ME1. This version is a different build of ME1 than the rest of the localizations"); + addDiagLine(@"POLISH BUILD OF ME1", Severity.WARN); + } // Disk type #if WINDOWS string pathroot = Path.GetPathRoot(gamePath); @@ -719,12 +723,12 @@ void memExceptionOccured(string operation, string line) }, applicationExited: x => exitcode = x); - if (exitcode != 0) - { - addDiagLine( - $@"MassEffectModderNoGui exited exited incompatible mod detection check with code {exitcode}", - Severity.ERROR); - } + if (exitcode != 0) + { + addDiagLine( + $@"MassEffectModderNoGui exited exited incompatible mod detection check with code {exitcode}", + Severity.ERROR); + } if (blacklistedMods.Any()) { @@ -882,45 +886,45 @@ void memExceptionOccured(string operation, string line) addDiagLine(@"Files added or removed after texture mods were installed", Severity.DIAGSECTION); - if (textureMapFileExists) - { - // check for replaced files (file size changes) - updateStatusCallback?.Invoke( - "Checking texture map consistency"); - List removedFiles = new List(); - List addedFiles = new List(); - List replacedFiles = new List(); - MEMIPCHandler.RunMEMIPCUntilExit(args, ipcCallback: (string command, string param) => - { - switch (command) + if (textureMapFileExists) + { + // check for replaced files (file size changes) + updateStatusCallback?.Invoke( + "Checking texture map consistency"); + List removedFiles = new List(); + List addedFiles = new List(); + List replacedFiles = new List(); + MEMIPCHandler.RunMEMIPCUntilExit(args, ipcCallback: (string command, string param) => { - case @"ERROR_REMOVED_FILE": - //.Add($" - File removed after textures were installed: {param}"); - removedFiles.Add(param); - break; - case @"ERROR_ADDED_FILE": - //addedFiles.Add($"File was added after textures were installed" + param + " " + File.GetCreationTimeUtc(Path.Combine(gamePath, param)); - addedFiles.Add(param); - break; - case @"ERROR_VANILLA_MOD_FILE": - if (!addedFiles.Contains(param)) - { - replacedFiles.Add(param); - } + switch (command) + { + case @"ERROR_REMOVED_FILE": + //.Add($" - File removed after textures were installed: {param}"); + removedFiles.Add(param); + break; + case @"ERROR_ADDED_FILE": + //addedFiles.Add($"File was added after textures were installed" + param + " " + File.GetCreationTimeUtc(Path.Combine(gamePath, param)); + addedFiles.Add(param); + break; + case @"ERROR_VANILLA_MOD_FILE": + if (!addedFiles.Contains(param)) + { + replacedFiles.Add(param); + } - break; - default: - Debug.WriteLine(@"oof?"); - break; - } - }, - applicationExited: i => exitcode = i); - if (exitcode != 0) - { - addDiagLine( - $@"MassEffectModderNoGuiexited exited texture map consistency check with code {exitcode}", - Severity.ERROR); - } + break; + default: + Debug.WriteLine(@"oof?"); + break; + } + }, + applicationExited: i => exitcode = i); + if (exitcode != 0) + { + addDiagLine( + $@"MassEffectModderNoGuiexited exited texture map consistency check with code {exitcode}", + Severity.ERROR); + } if (removedFiles.Any()) { @@ -1058,10 +1062,10 @@ void handleIPC(string command, string param) setMEMCrashLog: x => memCrashText = x ); - if (exitcode != 0) - { - addDiagLine($@"MassEffectModderNoGui exited full textures check with code {exitcode}", Severity.ERROR); - }; + if (exitcode != 0) + { + addDiagLine($@"MassEffectModderNoGui exited full textures check with code {exitcode}", Severity.ERROR); + }; if (emptyMipsNotRemoved.Any() || badTFCReferences.Any() || scanErrors.Any()) { @@ -1086,26 +1090,26 @@ void handleIPC(string command, string param) } } - if (scanErrors.Any()) - { - addDiagLine(); - addDiagLine(@"The following textures failed to scan:", Severity.ERROR); - foreach (var fts in scanErrors) + if (scanErrors.Any()) { - addDiagLine(@" - " + fts, Severity.ERROR); + addDiagLine(); + addDiagLine(@"The following textures failed to scan:", Severity.ERROR); + foreach (var fts in scanErrors) + { + addDiagLine(@" - " + fts, Severity.ERROR); + } } } - } - else if (exitcode != 0) - { - addDiagLine(@"Texture check failed"); - if (memCrashText != null) + else if (exitcode != 0) { - addDiagLine(@"MassEffectModder crashed with info:"); - addDiagLines(memCrashText.Split("\n"), Severity.ERROR); //do not localize - } + addDiagLine(@"Texture check failed"); + if (memCrashText != null) + { + addDiagLine(@"MassEffectModder crashed with info:"); + addDiagLines(memCrashText.Split("\n"), Severity.ERROR); //do not localize + } } - else + else { // Is this right?? We skipped check. We can't just print this diff --git a/ALOTInstallerCore/ModManager/Objects/GameTarget.cs b/ALOTInstallerCore/ModManager/Objects/GameTarget.cs index a9e70f3..c44789e 100644 --- a/ALOTInstallerCore/ModManager/Objects/GameTarget.cs +++ b/ALOTInstallerCore/ModManager/Objects/GameTarget.cs @@ -40,7 +40,7 @@ public string TargetBootIcon } } - public bool Supported => GameSource != null; + public bool Supported => !string.IsNullOrEmpty(GameSource); public bool IsPolishME1 { get; private set; } /// diff --git a/ALOTInstallerCore/ModManager/Services/VanillaDatabaseService.cs b/ALOTInstallerCore/ModManager/Services/VanillaDatabaseService.cs index e5c3b13..de79131 100644 --- a/ALOTInstallerCore/ModManager/Services/VanillaDatabaseService.cs +++ b/ALOTInstallerCore/ModManager/Services/VanillaDatabaseService.cs @@ -451,7 +451,7 @@ internal static (string hash, string result) GetGameSource(GameTarget target) case MEGame.ME1: var me1Info = ME1ExecutableInfo.GetExecutableInfo(exePath, true); SUPPORTED_HASHES_ME1.TryGetValue(me1Info.OriginalExecutableHash, out var me1result); - return (md5, me1result); + return (me1Info.OriginalExecutableHash, me1result); case MEGame.ME2: SUPPORTED_HASHES_ME2.TryGetValue(md5, out var me2result); return (md5, me2result); diff --git a/ALOTInstallerCore/Steps/Precheck.cs b/ALOTInstallerCore/Steps/Precheck.cs index 911cf94..cb41ad2 100644 --- a/ALOTInstallerCore/Steps/Precheck.cs +++ b/ALOTInstallerCore/Steps/Precheck.cs @@ -51,45 +51,7 @@ public static string PerformPreStagingCheck(InstallOptionsPackage package, package = package }; -#if WINDOWS - // Check for PhysX legacy. Require it to be installed at this point in time - - // Obsolete due to PhysXLoader.dll patch - //if (package.InstallTarget.Game == MEGame.ME1) - //{ - // if (!LegacyPhysXInstaller.IsPhysxKeyWritable() && !LegacyPhysXInstaller.IsLegacyPhysXInstalled()) - // { - // Log.Information("[AICORE] Precheck: Legacy PhysX is not detected. Prompting for install"); - // if (ShowConfirmationDialog("Legacy PhysX is not installed", - // "Legacy PhysX must be installed to correct issues with poor programming practices in Mass Effect that can cause other older games (such as Mirror's Edge) to not work, due to how PhyX was designed back in 2007.\n\nALOT Installer will install Legacy PhysX and implement changes that prevent Mass Effect from interfering with other games. The next page has important information about this fix.", - // "Continue", "Abort install")) - // { - // void setProgressCallback(long done, long total) - // { - // SetPreinstallCheckText($"Downloading Legacy PhysX {Math.Round(done * 100.0 / total)}%"); - // } - - // var physxInstallResult = LegacyPhysXInstaller.InstallLegacyPhysX(setProgressCallback, - // SetPreinstallCheckText, - // ShowConfirmationDialog, - // ShowNormalDialog, null).Result; - // if (physxInstallResult != null) - // { - // return physxInstallResult; - // } - // } - // else - // { - // return - // "Legacy PhysX is not installed. Legacy PhysX must be installed to fix issues with Mass Effect when the game is texture modded."; //Technically it's exe modded but still - // } - // } - // else - // { - // Log.Information("[AICORE] Precheck: Legacy PhysX is installed"); - // } - //} -#endif + SetPreinstallCheckText("Performing precheck"); if (!pc.checkOneOptionSelected(out var noOptionsSelectedReason)) { diff --git a/SharedAssemblyInfo.proj b/SharedAssemblyInfo.proj index 7dc3e02..e1e763e 100644 --- a/SharedAssemblyInfo.proj +++ b/SharedAssemblyInfo.proj @@ -5,8 +5,8 @@ 2017-2021 ME3Tweaks true - 4.0.722.2337 - 4.0.722.2337 - 4.0.722.2337 + 4.0.723.2344 + 4.0.723.2344 + 4.0.723.2344 \ No newline at end of file