public const uint KARK = 1263681867; // 0x4b, 0x41, 0x52, 0x4b public static bool Load() { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { // try get oodle dll from game if (TryCopyOodleLib()) { var result = OodleLib.Load(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "oo2ext_7_win64.dll")); if (result) { CompressionSettings.Get().CompressionLevel = CompressionLevel.Optimal2; CompressionSettings.Get().UseOodle = true; return(true); } } return(true); } if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { return(true); } if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { return(true); } throw new NotImplementedException(); }
public const uint KARK = 1263681867; // 0x4b, 0x41, 0x52, 0x4b public static bool Load() { // try get oodle dll from game if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { var result = false; if (TryCopyOodleLib()) { result = OodleLib.Load(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "oo2ext_7_win64.dll")); if (result) { CompressionSettings.Get().CompressionLevel = CompressionLevel.Optimal2; CompressionSettings.Get().UseOodle = true; return(true); } } // try load Kraken result = KrakenLib.Load(); if (result) { return(true); } Log.Error("Could not automatically find oo2ext_7_win64.dll. " + "Please manually copy and paste the DLL found in <gamedir>\\Cyberpunk 2077\\bin\\x64\\oo2ext_7_win64.dll into this folder: " + $"{AppDomain.CurrentDomain.BaseDirectory}."); return(false); } if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { return(KrakenLib.Load()); } if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { } throw new NotImplementedException(); }