Browse Source

Reworked some refactor organization

Added somewhaat backwards compatavbility through Mono.Cecil
pull/46/head
Anairkoen Schno 6 years ago
parent
commit
b1ea2e387b
17 changed files with 30 additions and 17 deletions
  1. +17
    -17
      IPA.Loader/IPA.Loader.csproj
  2. +0
    -0
      IPA.Loader/IllusionInjector/BeatSaber/CompositeBSPlugin.cs
  3. +0
    -0
      IPA.Loader/IllusionInjector/IPA/CompositeIPAPlugin.cs
  4. +0
    -0
      IPA.Loader/IllusionInjector/Logging/Printers/ColoredConsolePrinter.cs
  5. +0
    -0
      IPA.Loader/IllusionInjector/Logging/Printers/GZFilePrinter.cs
  6. +0
    -0
      IPA.Loader/IllusionInjector/Logging/Printers/GlobalLogFilePrinter.cs
  7. +0
    -0
      IPA.Loader/IllusionInjector/Logging/Printers/PluginLogFilePrinter.cs
  8. +0
    -0
      IPA.Loader/IllusionInjector/Logging/StandardLogger.cs
  9. +0
    -0
      IPA.Loader/IllusionInjector/Logging/UnityLogInterceptor.cs
  10. +0
    -0
      IPA.Loader/IllusionInjector/PluginComponent.cs
  11. +13
    -0
      IPA.Loader/IllusionInjector/PluginManager.cs
  12. +0
    -0
      IPA.Loader/IllusionInjector/Updating/ModsaberML/ApiEndpoint.cs
  13. +0
    -0
      IPA.Loader/IllusionInjector/Updating/ModsaberML/Updater.cs
  14. +0
    -0
      IPA.Loader/IllusionInjector/Updating/SelfPlugin.cs
  15. +0
    -0
      IPA.Loader/IllusionInjector/Utilities/Extensions.cs
  16. +0
    -0
      IPA.Loader/IllusionInjector/Utilities/LoneFunctions.cs
  17. +0
    -0
      IPA.Loader/IllusionInjector/Utilities/SteamCheck.cs

+ 17
- 17
IPA.Loader/IPA.Loader.csproj View File

@ -51,7 +51,7 @@
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="BeatSaber\CompositeBSPlugin.cs" />
<Compile Include="IllusionInjector\BeatSaber\CompositeBSPlugin.cs" />
<Compile Include="IllusionPlugin\BeatSaber\IBeatSaberPlugin.cs" /> <Compile Include="IllusionPlugin\BeatSaber\IBeatSaberPlugin.cs" />
<Compile Include="IllusionPlugin\BeatSaber\IEnhancedBeatSaberPlugin.cs" /> <Compile Include="IllusionPlugin\BeatSaber\IEnhancedBeatSaberPlugin.cs" />
<Compile Include="IllusionPlugin\BeatSaber\ModsaberModInfo.cs" /> <Compile Include="IllusionPlugin\BeatSaber\ModsaberModInfo.cs" />
@ -63,23 +63,23 @@
<Compile Include="IllusionPlugin\Logging\LogPrinter.cs" /> <Compile Include="IllusionPlugin\Logging\LogPrinter.cs" />
<Compile Include="IllusionPlugin\ModPrefs.cs" /> <Compile Include="IllusionPlugin\ModPrefs.cs" />
<Compile Include="IllusionPlugin\Utils\ReflectionUtil.cs" /> <Compile Include="IllusionPlugin\Utils\ReflectionUtil.cs" />
<Compile Include="IPA\CompositeIPAPlugin.cs" />
<Compile Include="Logging\Printers\ColoredConsolePrinter.cs" />
<Compile Include="Logging\Printers\GlobalLogFilePrinter.cs" />
<Compile Include="Logging\Printers\GZFilePrinter.cs" />
<Compile Include="Logging\Printers\PluginLogFilePrinter.cs" />
<Compile Include="Logging\StandardLogger.cs" />
<Compile Include="Logging\UnityLogInterceptor.cs" />
<Compile Include="PluginComponent.cs" />
<Compile Include="PluginManager.cs" />
<Compile Include="IllusionInjector\IPA\CompositeIPAPlugin.cs" />
<Compile Include="IllusionInjector\Logging\Printers\ColoredConsolePrinter.cs" />
<Compile Include="IllusionInjector\Logging\Printers\GlobalLogFilePrinter.cs" />
<Compile Include="IllusionInjector\Logging\Printers\GZFilePrinter.cs" />
<Compile Include="IllusionInjector\Logging\Printers\PluginLogFilePrinter.cs" />
<Compile Include="IllusionInjector\Logging\StandardLogger.cs" />
<Compile Include="IllusionInjector\Logging\UnityLogInterceptor.cs" />
<Compile Include="IllusionInjector\PluginComponent.cs" />
<Compile Include="IllusionInjector\PluginManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Updating\Backup\BackupUnit.cs" />
<Compile Include="Updating\ModsaberML\ApiEndpoint.cs" />
<Compile Include="Updating\ModsaberML\Updater.cs" />
<Compile Include="Updating\SelfPlugin.cs" />
<Compile Include="Utilities\Extensions.cs" />
<Compile Include="Utilities\LoneFunctions.cs" />
<Compile Include="Utilities\SteamCheck.cs" />
<Compile Include="IllusionInjector\Updating\Backup\BackupUnit.cs" />
<Compile Include="IllusionInjector\Updating\ModsaberML\ApiEndpoint.cs" />
<Compile Include="IllusionInjector\Updating\ModsaberML\Updater.cs" />
<Compile Include="IllusionInjector\Updating\SelfPlugin.cs" />
<Compile Include="IllusionInjector\Utilities\Extensions.cs" />
<Compile Include="IllusionInjector\Utilities\LoneFunctions.cs" />
<Compile Include="IllusionInjector\Utilities\SteamCheck.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Ionic.Zip"> <PackageReference Include="Ionic.Zip">


IPA.Loader/BeatSaber/CompositeBSPlugin.cs → IPA.Loader/IllusionInjector/BeatSaber/CompositeBSPlugin.cs View File


IPA.Loader/IPA/CompositeIPAPlugin.cs → IPA.Loader/IllusionInjector/IPA/CompositeIPAPlugin.cs View File


IPA.Loader/Logging/Printers/ColoredConsolePrinter.cs → IPA.Loader/IllusionInjector/Logging/Printers/ColoredConsolePrinter.cs View File


IPA.Loader/Logging/Printers/GZFilePrinter.cs → IPA.Loader/IllusionInjector/Logging/Printers/GZFilePrinter.cs View File


IPA.Loader/Logging/Printers/GlobalLogFilePrinter.cs → IPA.Loader/IllusionInjector/Logging/Printers/GlobalLogFilePrinter.cs View File


IPA.Loader/Logging/Printers/PluginLogFilePrinter.cs → IPA.Loader/IllusionInjector/Logging/Printers/PluginLogFilePrinter.cs View File


IPA.Loader/Logging/StandardLogger.cs → IPA.Loader/IllusionInjector/Logging/StandardLogger.cs View File


IPA.Loader/Logging/UnityLogInterceptor.cs → IPA.Loader/IllusionInjector/Logging/UnityLogInterceptor.cs View File


IPA.Loader/PluginComponent.cs → IPA.Loader/IllusionInjector/PluginComponent.cs View File


IPA.Loader/PluginManager.cs → IPA.Loader/IllusionInjector/PluginManager.cs View File

@ -3,6 +3,7 @@ using IllusionInjector.Updating;
using IllusionInjector.Utilities; using IllusionInjector.Utilities;
using IllusionPlugin; using IllusionPlugin;
using IllusionPlugin.BeatSaber; using IllusionPlugin.BeatSaber;
using Mono.Cecil;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
@ -176,6 +177,18 @@ namespace IllusionInjector
try try
{ {
var module = ModuleDefinition.ReadModule(file);
bool modifiedModule = false;
foreach (var @ref in module.AssemblyReferences)
{
if (@ref.Name == "IllusionPlugin" || @ref.Name == "IllusionInjector")
{
@ref.Name = "IPA.Loader";
modifiedModule = true;
}
}
if (modifiedModule) module.Write(file);
Assembly assembly = Assembly.LoadFrom(file); Assembly assembly = Assembly.LoadFrom(file);
foreach (Type t in assembly.GetTypes()) foreach (Type t in assembly.GetTypes())

IPA.Loader/Updating/ModsaberML/ApiEndpoint.cs → IPA.Loader/IllusionInjector/Updating/ModsaberML/ApiEndpoint.cs View File


IPA.Loader/Updating/ModsaberML/Updater.cs → IPA.Loader/IllusionInjector/Updating/ModsaberML/Updater.cs View File


IPA.Loader/Updating/SelfPlugin.cs → IPA.Loader/IllusionInjector/Updating/SelfPlugin.cs View File


IPA.Loader/Utilities/Extensions.cs → IPA.Loader/IllusionInjector/Utilities/Extensions.cs View File


IPA.Loader/Utilities/LoneFunctions.cs → IPA.Loader/IllusionInjector/Utilities/LoneFunctions.cs View File


IPA.Loader/Utilities/SteamCheck.cs → IPA.Loader/IllusionInjector/Utilities/SteamCheck.cs View File


Loading…
Cancel
Save