|
@ -53,8 +53,6 @@ namespace IPA.Loader |
|
|
|
|
|
|
|
|
internal static void Configure() |
|
|
internal static void Configure() |
|
|
{ |
|
|
{ |
|
|
Console.WriteLine("Configuring up library loading"); |
|
|
|
|
|
|
|
|
|
|
|
SetupAssemblyFilenames(true); |
|
|
SetupAssemblyFilenames(true); |
|
|
AppDomain.CurrentDomain.AssemblyResolve -= AssemblyLibLoader; |
|
|
AppDomain.CurrentDomain.AssemblyResolve -= AssemblyLibLoader; |
|
|
AppDomain.CurrentDomain.AssemblyResolve += AssemblyLibLoader; |
|
|
AppDomain.CurrentDomain.AssemblyResolve += AssemblyLibLoader; |
|
@ -64,8 +62,6 @@ namespace IPA.Loader |
|
|
{ |
|
|
{ |
|
|
if (FilenameLocations == null || force) |
|
|
if (FilenameLocations == null || force) |
|
|
{ |
|
|
{ |
|
|
Console.WriteLine("Calculating assembly filenames"); |
|
|
|
|
|
|
|
|
|
|
|
FilenameLocations = new Dictionary<string, string>(); |
|
|
FilenameLocations = new Dictionary<string, string>(); |
|
|
|
|
|
|
|
|
foreach (var fn in TraverseTree(LibraryPath, s => s != NativeLibraryPath)) |
|
|
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}"); |
|
|
Log(Logger.Level.Critical, $"Multiple instances of {fn.Name} exist in Libs! Ignoring {fn.FullName}"); |
|
|
else FilenameLocations.Add(fn.Name, 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 |
|
|
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)) |
|
|
| LoadLibraryFlags.LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LoadLibraryFlags.LOAD_LIBRARY_SEARCH_APPLICATION_DIR)) |
|
@ -90,7 +85,7 @@ namespace IPA.Loader |
|
|
if (retPtr == IntPtr.Zero) |
|
|
if (retPtr == IntPtr.Zero) |
|
|
{ |
|
|
{ |
|
|
var err = new Win32Exception(); |
|
|
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); |
|
|
Log(Logger.Level.Warning, err); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -124,8 +119,6 @@ namespace IPA.Loader |
|
|
|
|
|
|
|
|
SetupAssemblyFilenames(); |
|
|
SetupAssemblyFilenames(); |
|
|
|
|
|
|
|
|
Console.WriteLine($"Looking for {asmName.Name} {asmName.Version} ({asmName.Name}.{asmName.Version}.dll)"); |
|
|
|
|
|
|
|
|
|
|
|
var testFile = $"{asmName.Name}.{asmName.Version}.dll"; |
|
|
var testFile = $"{asmName.Name}.{asmName.Version}.dll"; |
|
|
Log(Logger.Level.Debug, $"Looking for file {testFile}"); |
|
|
Log(Logger.Level.Debug, $"Looking for file {testFile}"); |
|
|
|
|
|
|
|
|