Browse Source

Bundle netstandard.dll with BSIPA and force-load our Newtonsoft early

pull/84/head
Anairkoen Schno 2 years ago
parent
commit
eee567bb83
Signed by: DaNike GPG Key ID: BEFB74D5F3FC4387
7 changed files with 17 additions and 5 deletions
  1. +4
    -3
      IPA.Injector/IPA.Injector.csproj
  2. +13
    -2
      IPA.Loader/Loader/LibLoader.cs
  3. BIN
      Libs/netstandard.dll
  4. BIN
      Refs/UnityEngine.CoreModule.Net4.dll
  5. BIN
      Refs/UnityEngine.CoreModule.net3.dll
  6. BIN
      Refs/UnityEngine.UnityWebRequestModule.net3.dll
  7. BIN
      Refs/UnityEngine.net3.dll

+ 4
- 3
IPA.Injector/IPA.Injector.csproj View File

@ -55,6 +55,10 @@
<Link>Libraries\Mono\System.Runtime.Serialization.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\Libs\netstandard.dll">
<Link>Libraries\Mono\netstandard.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
@ -84,9 +88,6 @@
<PackageReference Include="AsyncBridge" Version="0.3.1" />
<ProjectReference Include="..\SemVer\SemVer.csproj" />
<Reference Include="Hive.Versioning" Version="0.1.0">
<HintPath>$(MSBuildThisFileDirectory)..\Libs\thirdparty\Hive.Versioning.dll</HintPath>
</Reference>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">


+ 13
- 2
IPA.Loader/Loader/LibLoader.cs View File

@ -90,6 +90,9 @@ namespace IPA.Loader
//var unityData = Directory.EnumerateDirectories(Environment.CurrentDirectory, "*_Data").First();
//AddDir(Path.Combine(unityData, "Plugins"));
// TODO: find a way to either safely remove Newtonsoft, or switch to a different JSON lib
_ = LoadLibrary(new AssemblyName("Newtonsoft.Json, Version=12.0.0.0, Culture=neutral"));
}
}
@ -151,21 +154,29 @@ namespace IPA.Loader
return Assembly.LoadFrom(path);
}
internal static void Log(Logger.Level lvl, string message)
internal static void Log(Logger.Level lvl, string message)
{ // multiple proxy methods to delay loading of assemblies until it's done
if (Logger.LogCreated)
{
AssemblyLibLoaderCallLogger(lvl, message);
}
else
{
if (((byte)lvl & (byte)StandardLogger.PrintFilter) != 0)
Console.WriteLine($"[{lvl}] {message}");
}
}
internal static void Log(Logger.Level lvl, Exception message)
{ // multiple proxy methods to delay loading of assemblies until it's done
if (Logger.LogCreated)
{
AssemblyLibLoaderCallLogger(lvl, message);
}
else
{
if (((byte)lvl & (byte)StandardLogger.PrintFilter) != 0)
Console.WriteLine($"[{lvl}] {message}");
Console.WriteLine($"[{lvl}] {message}");
}
}
private static void AssemblyLibLoaderCallLogger(Logger.Level lvl, string message) => Logger.LibLoader.Log(lvl, message);


BIN
Libs/netstandard.dll View File


BIN
Refs/UnityEngine.CoreModule.Net4.dll View File


BIN
Refs/UnityEngine.CoreModule.net3.dll View File


BIN
Refs/UnityEngine.UnityWebRequestModule.net3.dll View File


BIN
Refs/UnityEngine.net3.dll View File


Loading…
Cancel
Save