diff --git a/IPA.Injector/Injector.cs b/IPA.Injector/Injector.cs index 6731d944..fc53db10 100644 --- a/IPA.Injector/Injector.cs +++ b/IPA.Injector/Injector.cs @@ -45,8 +45,6 @@ namespace IPA.Injector if (Environment.GetCommandLineArgs().Contains("--verbose")) WinConsole.Initialize(); - Console.WriteLine("Setting up library loading"); - SetupLibraryLoading(); /*var otherNewtonsoft = Path.Combine( @@ -98,8 +96,6 @@ namespace IPA.Injector GameVersionEarly.Load(); - InstallHarmonyProtections(); - pluginAsyncLoadTask = PluginLoader.LoadTask(); permissionFixTask = PermissionFix.FixPermissions(new DirectoryInfo(Environment.CurrentDirectory)); } @@ -311,6 +307,8 @@ namespace IPA.Injector // need to reinit streams singe Unity seems to redirect stdout StdoutInterceptor.RedirectConsole(); + InstallHarmonyProtections(); + var bootstrapper = new GameObject("NonDestructiveBootstrapper").AddComponent(); bootstrapper.Destroyed += Bootstrapper_Destroyed; } diff --git a/IPA.Loader/Loader/LibLoader.cs b/IPA.Loader/Loader/LibLoader.cs index c75fc887..3634b558 100644 --- a/IPA.Loader/Loader/LibLoader.cs +++ b/IPA.Loader/Loader/LibLoader.cs @@ -53,8 +53,6 @@ namespace IPA.Loader internal static void Configure() { - Console.WriteLine("Configuring up library loading"); - SetupAssemblyFilenames(true); AppDomain.CurrentDomain.AssemblyResolve -= AssemblyLibLoader; AppDomain.CurrentDomain.AssemblyResolve += AssemblyLibLoader; @@ -64,8 +62,6 @@ namespace IPA.Loader { if (FilenameLocations == null || force) { - Console.WriteLine("Calculating assembly filenames"); - FilenameLocations = new Dictionary(); foreach (var fn in TraverseTree(LibraryPath, s => s != NativeLibraryPath)) @@ -73,7 +69,6 @@ namespace IPA.Loader Log(Logger.Level.Critical, $"Multiple instances of {fn.Name} exist in Libs! Ignoring {fn.FullName}"); else FilenameLocations.Add(fn.Name, fn.FullName); - foreach (var kvp in FilenameLocations) Console.WriteLine(kvp); if (!SetDefaultDllDirectories(LoadLibraryFlags.LOAD_LIBRARY_SEARCH_USER_DIRS | LoadLibraryFlags.LOAD_LIBRARY_SEARCH_SYSTEM32 | LoadLibraryFlags.LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LoadLibraryFlags.LOAD_LIBRARY_SEARCH_APPLICATION_DIR)) @@ -90,7 +85,7 @@ namespace IPA.Loader if (retPtr == IntPtr.Zero) { var err = new Win32Exception(); - Log(Logger.Level.Warning, $"Could not add DLL directory"); + Log(Logger.Level.Warning, $"Could not add DLL directory {path}"); Log(Logger.Level.Warning, err); } } @@ -124,8 +119,6 @@ namespace IPA.Loader SetupAssemblyFilenames(); - Console.WriteLine($"Looking for {asmName.Name} {asmName.Version} ({asmName.Name}.{asmName.Version}.dll)"); - var testFile = $"{asmName.Name}.{asmName.Version}.dll"; Log(Logger.Level.Debug, $"Looking for file {testFile}");