@ -0,0 +1,30 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using UnityEngine; | |||||
namespace IPA.Injector | |||||
{ | |||||
class Bootstrapper : MonoBehaviour | |||||
{ | |||||
public event Action Destroyed = delegate {}; | |||||
void Awake() | |||||
{ | |||||
//if (Environment.CommandLine.Contains("--verbose")) | |||||
//{ | |||||
Ipa.Injector.Windows.WinConsole.Initialize(); | |||||
//} | |||||
} | |||||
void Start() | |||||
{ | |||||
Destroy(gameObject); | |||||
} | |||||
void OnDestroy() | |||||
{ | |||||
Destroyed(); | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,104 @@ | |||||
using System; | |||||
using System.Collections; | |||||
using System.Runtime.InteropServices; | |||||
using System.IO; | |||||
using System.Text; | |||||
using Microsoft.Win32.SafeHandles; | |||||
namespace Ipa.Injector.Windows | |||||
{ | |||||
// https://stackoverflow.com/a/48864902/3117125 | |||||
static class WinConsole | |||||
{ | |||||
static public void Initialize(bool alwaysCreateNewConsole = true) | |||||
{ | |||||
bool consoleAttached = true; | |||||
if (alwaysCreateNewConsole | |||||
|| (AttachConsole(ATTACH_PARRENT) == 0 | |||||
&& Marshal.GetLastWin32Error() != ERROR_ACCESS_DENIED)) | |||||
{ | |||||
consoleAttached = AllocConsole() != 0; | |||||
} | |||||
if (consoleAttached) | |||||
{ | |||||
InitializeOutStream(); | |||||
InitializeInStream(); | |||||
} | |||||
} | |||||
private static void InitializeOutStream() | |||||
{ | |||||
var fs = CreateFileStream("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE, FileAccess.Write); | |||||
if (fs != null) | |||||
{ | |||||
var writer = new StreamWriter(fs) { AutoFlush = true }; | |||||
Console.SetOut(writer); | |||||
Console.SetError(writer); | |||||
} | |||||
} | |||||
private static void InitializeInStream() | |||||
{ | |||||
var fs = CreateFileStream("CONIN$", GENERIC_READ, FILE_SHARE_READ, FileAccess.Read); | |||||
if (fs != null) | |||||
{ | |||||
Console.SetIn(new StreamReader(fs)); | |||||
} | |||||
} | |||||
private static FileStream CreateFileStream(string name, uint win32DesiredAccess, uint win32ShareMode, | |||||
FileAccess dotNetFileAccess) | |||||
{ | |||||
var file = new SafeFileHandle(CreateFileW(name, win32DesiredAccess, win32ShareMode, IntPtr.Zero, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, IntPtr.Zero), true); | |||||
if (!file.IsInvalid) | |||||
{ | |||||
var fs = new FileStream(file, dotNetFileAccess); | |||||
return fs; | |||||
} | |||||
return null; | |||||
} | |||||
#region Win API Functions and Constants | |||||
[DllImport("kernel32.dll", | |||||
EntryPoint = "AllocConsole", | |||||
SetLastError = true, | |||||
CharSet = CharSet.Auto, | |||||
CallingConvention = CallingConvention.StdCall)] | |||||
private static extern int AllocConsole(); | |||||
[DllImport("kernel32.dll", | |||||
EntryPoint = "AttachConsole", | |||||
SetLastError = true, | |||||
CharSet = CharSet.Auto, | |||||
CallingConvention = CallingConvention.StdCall)] | |||||
private static extern UInt32 AttachConsole(UInt32 dwProcessId); | |||||
[DllImport("kernel32.dll", | |||||
EntryPoint = "CreateFileW", | |||||
SetLastError = true, | |||||
CharSet = CharSet.Auto, | |||||
CallingConvention = CallingConvention.StdCall)] | |||||
private static extern IntPtr CreateFileW( | |||||
string lpFileName, | |||||
UInt32 dwDesiredAccess, | |||||
UInt32 dwShareMode, | |||||
IntPtr lpSecurityAttributes, | |||||
UInt32 dwCreationDisposition, | |||||
UInt32 dwFlagsAndAttributes, | |||||
IntPtr hTemplateFile | |||||
); | |||||
private const UInt32 GENERIC_WRITE = 0x40000000; | |||||
private const UInt32 GENERIC_READ = 0x80000000; | |||||
private const UInt32 FILE_SHARE_READ = 0x00000001; | |||||
private const UInt32 FILE_SHARE_WRITE = 0x00000002; | |||||
private const UInt32 OPEN_EXISTING = 0x00000003; | |||||
private const UInt32 FILE_ATTRIBUTE_NORMAL = 0x80; | |||||
private const UInt32 ERROR_ACCESS_DENIED = 5; | |||||
private const UInt32 ATTACH_PARRENT = 0xFFFFFFFF; | |||||
#endregion | |||||
} | |||||
} |
@ -0,0 +1,82 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||||
<PropertyGroup> | |||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||||
<ProjectGuid>{2A1AF16B-27F1-46E0-9A95-181516BC1CB7}</ProjectGuid> | |||||
<OutputType>Library</OutputType> | |||||
<AppDesignerFolder>Properties</AppDesignerFolder> | |||||
<RootNamespace>IPA.Injector</RootNamespace> | |||||
<AssemblyName>IPA.Injector</AssemblyName> | |||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> | |||||
<FileAlignment>512</FileAlignment> | |||||
<Deterministic>true</Deterministic> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||||
<DebugSymbols>true</DebugSymbols> | |||||
<DebugType>full</DebugType> | |||||
<Optimize>false</Optimize> | |||||
<OutputPath>bin\Debug\</OutputPath> | |||||
<DefineConstants>DEBUG;TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |||||
<DebugType>pdbonly</DebugType> | |||||
<Optimize>true</Optimize> | |||||
<OutputPath>bin\Release\</OutputPath> | |||||
<DefineConstants>TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<Reference Include="System" /> | |||||
<Reference Include="System.Core" /> | |||||
<Reference Include="System.Xml.Linq" /> | |||||
<Reference Include="System.Data.DataSetExtensions" /> | |||||
<Reference Include="Microsoft.CSharp" /> | |||||
<Reference Include="System.Data" /> | |||||
<Reference Include="System.Net.Http" /> | |||||
<Reference Include="System.Xml" /> | |||||
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | |||||
<SpecificVersion>False</SpecificVersion> | |||||
<HintPath>..\..\..\..\..\..\Game Library\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll</HintPath> | |||||
<Private>False</Private> | |||||
</Reference> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<Compile Include="Bootstrapper.cs" /> | |||||
<Compile Include="ConsoleWindow.cs" /> | |||||
<Compile Include="Injector.cs" /> | |||||
<Compile Include="Properties\AssemblyInfo.cs" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<ProjectReference Include="..\IPA.Loader\IPA.Loader.csproj"> | |||||
<Project>{5ad344f0-01a0-4ca8-92e5-9d095737744d}</Project> | |||||
<Name>IPA.Loader</Name> | |||||
</ProjectReference> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<Content Include="..\Libs\0Harmony.dll"> | |||||
<Link>Libraries\Included\0Harmony.dll</Link> | |||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | |||||
</Content> | |||||
<Content Include="..\Libs\I18N.dll"> | |||||
<Link>Libraries\Mono\I18N.dll</Link> | |||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | |||||
</Content> | |||||
<Content Include="..\Libs\I18N.West.dll"> | |||||
<Link>Libraries\Mono\I18N.West.dll</Link> | |||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | |||||
</Content> | |||||
<Content Include="..\Libs\System.Runtime.Serialization.dll"> | |||||
<Link>Libraries\Mono\System.Runtime.Serialization.dll</Link> | |||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | |||||
</Content> | |||||
</ItemGroup> | |||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||||
<Target Name="AfterBuild"> | |||||
<Exec Command=""$(MSBuildBinPath)\MSBuild.exe" "$(MSBuildProjectDirectory)\PostBuild.msbuild" /property:OPath=$(OutputPath) /property:Configuration=$(Configuration) /property:SolDir=$(SolutionDir)" /> | |||||
</Target> | |||||
</Project> |
@ -1,49 +1,63 @@ | |||||
using System; | |||||
using System.IO; | |||||
using System.Reflection; | |||||
using UnityEngine; | |||||
namespace IllusionInjector | |||||
{ | |||||
public static class Injector | |||||
{ | |||||
private static bool injected = false; | |||||
public static void Inject() | |||||
{ | |||||
if (!injected) | |||||
{ | |||||
injected = true; | |||||
AppDomain.CurrentDomain.AssemblyResolve += AssemblyLibLoader; | |||||
var bootstrapper = new GameObject("Bootstrapper").AddComponent<Bootstrapper>(); | |||||
bootstrapper.Destroyed += Bootstrapper_Destroyed; | |||||
} | |||||
} | |||||
private static string libsDir; | |||||
private static Assembly AssemblyLibLoader(object source, ResolveEventArgs e) | |||||
{ | |||||
if (libsDir == null) | |||||
libsDir = Path.Combine(Environment.CurrentDirectory, "Libs"); | |||||
var asmName = new AssemblyName(e.Name); | |||||
//Logger.log.Debug($"Resolving library {asmName}"); | |||||
var testFilen = Path.Combine(libsDir, $"{asmName.Name}.{asmName.Version}.dll"); | |||||
//Logger.log.Debug($"Looking for file {testFilen}"); | |||||
if (File.Exists(testFilen)) | |||||
{ | |||||
return Assembly.LoadFile(testFilen); | |||||
} | |||||
//Logger.log.Error($"Could not load library {asmName}"); | |||||
return null; | |||||
} | |||||
private static void Bootstrapper_Destroyed() | |||||
{ | |||||
PluginComponent.Create(); | |||||
} | |||||
} | |||||
} | |||||
using IPA.Loader; | |||||
using IPA.Logging; | |||||
using System; | |||||
using System.IO; | |||||
using System.Reflection; | |||||
using UnityEngine; | |||||
using static IPA.Logging.Logger; | |||||
using Logger = IPA.Logging.Logger; | |||||
namespace IPA.Injector | |||||
{ | |||||
public static class Injector | |||||
{ | |||||
private static bool injected = false; | |||||
public static void Inject() | |||||
{ | |||||
if (!injected) | |||||
{ | |||||
injected = true; | |||||
AppDomain.CurrentDomain.AssemblyResolve += AssemblyLibLoader; | |||||
var bootstrapper = new GameObject("Bootstrapper").AddComponent<Bootstrapper>(); | |||||
bootstrapper.Destroyed += Bootstrapper_Destroyed; | |||||
} | |||||
} | |||||
private static string libsDir; | |||||
private static Assembly AssemblyLibLoader(object source, ResolveEventArgs e) | |||||
{ | |||||
if (libsDir == null) | |||||
libsDir = Path.Combine(Environment.CurrentDirectory, "Libs"); | |||||
var asmName = new AssemblyName(e.Name); | |||||
Log(Level.Debug, $"Resolving library {asmName}"); | |||||
var testFilen = Path.Combine(libsDir, $"{asmName.Name}.{asmName.Version}.dll"); | |||||
Log(Level.Debug, $"Looking for file {testFilen}"); | |||||
if (File.Exists(testFilen)) | |||||
return Assembly.LoadFile(testFilen); | |||||
Log(Level.Critical, $"Could not load library {asmName}"); | |||||
return null; | |||||
} | |||||
private static void Log(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}"); | |||||
} | |||||
private static void AssemblyLibLoaderCallLogger(Level lvl, string message) | |||||
{ | |||||
Logger.log.Log(lvl, message); | |||||
} | |||||
private static void Bootstrapper_Destroyed() | |||||
{ | |||||
PluginComponent.Create(); | |||||
} | |||||
} | |||||
} |
@ -1,40 +1,37 @@ | |||||
using System.Resources; | |||||
using System.Reflection; | |||||
using System.Runtime.CompilerServices; | |||||
using System.Runtime.InteropServices; | |||||
// General Information about an assembly is controlled through the following | |||||
// set of attributes. Change these attribute values to modify the information | |||||
// associated with an assembly. | |||||
[assembly: AssemblyTitle("IllusionInjector")] | |||||
[assembly: AssemblyDescription("")] | |||||
[assembly: AssemblyConfiguration("")] | |||||
[assembly: AssemblyCompany("")] | |||||
[assembly: AssemblyProduct("IllusionInjector")] | |||||
[assembly: AssemblyCopyright("Copyright © 2015")] | |||||
[assembly: AssemblyTrademark("")] | |||||
[assembly: AssemblyCulture("")] | |||||
// Setting ComVisible to false makes the types in this assembly not visible | |||||
// to COM components. If you need to access a type in this assembly from | |||||
// COM, set the ComVisible attribute to true on that type. | |||||
[assembly: ComVisible(false)] | |||||
// The following GUID is for the ID of the typelib if this project is exposed to COM | |||||
[assembly: Guid("400a540a-d21f-4609-966b-206059b6e73b")] | |||||
[assembly: InternalsVisibleTo("IllusionPlugin")] | |||||
// Version information for an assembly consists of the following four values: | |||||
// | |||||
// Major Version | |||||
// Minor Version | |||||
// Build Number | |||||
// Revision | |||||
// | |||||
// You can specify all the values or you can default the Build and Revision Numbers | |||||
// by using the '*' as shown below: | |||||
// [assembly: AssemblyVersion("1.0.*")] | |||||
[assembly: AssemblyVersion("1.0.0.0")] | |||||
[assembly: AssemblyFileVersion("1.0.0.0")] | |||||
[assembly: NeutralResourcesLanguage("en")] | |||||
using System.Reflection; | |||||
using System.Runtime.CompilerServices; | |||||
using System.Runtime.InteropServices; | |||||
// General Information about an assembly is controlled through the following | |||||
// set of attributes. Change these attribute values to modify the information | |||||
// associated with an assembly. | |||||
[assembly: AssemblyTitle("IPA.Injector")] | |||||
[assembly: AssemblyDescription("")] | |||||
[assembly: AssemblyConfiguration("")] | |||||
[assembly: AssemblyCompany("")] | |||||
[assembly: AssemblyProduct("IPA.Injector")] | |||||
[assembly: AssemblyCopyright("Copyright © 2018")] | |||||
[assembly: AssemblyTrademark("")] | |||||
[assembly: AssemblyCulture("")] | |||||
// Setting ComVisible to false makes the types in this assembly not visible | |||||
// to COM components. If you need to access a type in this assembly from | |||||
// COM, set the ComVisible attribute to true on that type. | |||||
[assembly: ComVisible(false)] | |||||
// The following GUID is for the ID of the typelib if this project is exposed to COM | |||||
[assembly: Guid("2a1af16b-27f1-46e0-9a95-181516bc1cb7")] | |||||
[assembly: InternalsVisibleTo("IPA.Loader")] | |||||
// Version information for an assembly consists of the following four values: | |||||
// | |||||
// Major Version | |||||
// Minor Version | |||||
// Build Number | |||||
// Revision | |||||
// | |||||
// You can specify all the values or you can default the Build and Revision Numbers | |||||
// by using the '*' as shown below: | |||||
// [assembly: AssemblyVersion("1.0.*")] | |||||
[assembly: AssemblyVersion("3.9.0")] | |||||
[assembly: AssemblyFileVersion("3.9.0")] |
@ -0,0 +1,97 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||||
<PropertyGroup> | |||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||||
<ProjectGuid>{5AD344F0-01A0-4CA8-92E5-9D095737744D}</ProjectGuid> | |||||
<OutputType>Library</OutputType> | |||||
<AppDesignerFolder>Properties</AppDesignerFolder> | |||||
<RootNamespace>IPA</RootNamespace> | |||||
<AssemblyName>IPA.Loader</AssemblyName> | |||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> | |||||
<FileAlignment>512</FileAlignment> | |||||
<Deterministic>true</Deterministic> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||||
<DebugSymbols>true</DebugSymbols> | |||||
<DebugType>full</DebugType> | |||||
<Optimize>false</Optimize> | |||||
<OutputPath>bin\Debug\</OutputPath> | |||||
<DefineConstants>DEBUG;TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |||||
<DebugType>pdbonly</DebugType> | |||||
<Optimize>true</Optimize> | |||||
<OutputPath>bin\Release\</OutputPath> | |||||
<DefineConstants>TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<Reference Include="System" /> | |||||
<Reference Include="System.Core" /> | |||||
<Reference Include="System.Xml.Linq" /> | |||||
<Reference Include="System.Data.DataSetExtensions" /> | |||||
<Reference Include="Microsoft.CSharp" /> | |||||
<Reference Include="System.Data" /> | |||||
<Reference Include="System.Net.Http" /> | |||||
<Reference Include="System.Xml" /> | |||||
<Reference Include="UnityEngine.CoreModule"> | |||||
<HintPath>..\..\..\..\..\..\Game Library\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll</HintPath> | |||||
<Private>False</Private> | |||||
</Reference> | |||||
<Reference Include="UnityEngine.UnityWebRequestModule"> | |||||
<HintPath>..\..\..\..\..\..\Game Library\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.UnityWebRequestModule.dll</HintPath> | |||||
<Private>False</Private> | |||||
</Reference> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<Compile Include="Loader\Composite\CompositeBSPlugin.cs" /> | |||||
<Compile Include="PluginInterfaces\BeatSaber\IBeatSaberPlugin.cs" /> | |||||
<Compile Include="PluginInterfaces\BeatSaber\IEnhancedBeatSaberPlugin.cs" /> | |||||
<Compile Include="PluginInterfaces\BeatSaber\ModsaberModInfo.cs" /> | |||||
<Compile Include="PluginInterfaces\IGenericEnhancedPlugin.cs" /> | |||||
<Compile Include="IniFile.cs" /> | |||||
<Compile Include="PluginInterfaces\IPA\IEnhancedPlugin.cs" /> | |||||
<Compile Include="PluginInterfaces\IPA\IPlugin.cs" /> | |||||
<Compile Include="Logging\Logger.cs" /> | |||||
<Compile Include="Logging\LogPrinter.cs" /> | |||||
<Compile Include="ModPrefs.cs" /> | |||||
<Compile Include="Utilities\ReflectionUtil.cs" /> | |||||
<Compile Include="Loader\Composite\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="Loader\PluginComponent.cs" /> | |||||
<Compile Include="Loader\PluginManager.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" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<PackageReference Include="Ionic.Zip"> | |||||
<Version>1.9.1.8</Version> | |||||
</PackageReference> | |||||
<PackageReference Include="Mono.Cecil"> | |||||
<Version>0.9.6.4</Version> | |||||
</PackageReference> | |||||
<PackageReference Include="Newtonsoft.Json"> | |||||
<Version>11.0.2</Version> | |||||
</PackageReference> | |||||
</ItemGroup> | |||||
<ItemGroup /> | |||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||||
</Project> |
@ -1,14 +1,14 @@ | |||||
using IllusionPlugin; | |||||
using IllusionPlugin.BeatSaber; | |||||
using IPA; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
using System.Text; | using System.Text; | ||||
using UnityEngine; | using UnityEngine; | ||||
using UnityEngine.SceneManagement; | using UnityEngine.SceneManagement; | ||||
using Logger = IllusionInjector.Logging.Logger; | |||||
using Logger = IPA.Logging.Logger; | |||||
namespace IllusionInjector { | |||||
namespace IPA.Loader.Composite | |||||
{ | |||||
public class CompositeBSPlugin : IBeatSaberPlugin | public class CompositeBSPlugin : IBeatSaberPlugin | ||||
{ | { | ||||
IEnumerable<IBeatSaberPlugin> plugins; | IEnumerable<IBeatSaberPlugin> plugins; |
@ -1,13 +1,15 @@ | |||||
using IllusionPlugin; | |||||
using System; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using IPA; | |||||
using IPA.Old; | |||||
using System.Linq; | using System.Linq; | ||||
using System.Text; | using System.Text; | ||||
using UnityEngine; | using UnityEngine; | ||||
using UnityEngine.SceneManagement; | using UnityEngine.SceneManagement; | ||||
using Logger = IllusionInjector.Logging.Logger; | |||||
using Logger = IPA.Logging.Logger; | |||||
namespace IllusionInjector { | |||||
namespace IPA.Loader.Composite | |||||
{ | |||||
#pragma warning disable CS0618 // Type or member is obsolete | #pragma warning disable CS0618 // Type or member is obsolete | ||||
public class CompositeIPAPlugin : IPlugin | public class CompositeIPAPlugin : IPlugin | ||||
{ | { |
@ -0,0 +1,33 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
using UnityEngine; | |||||
namespace IPA.Logging | |||||
{ | |||||
internal class UnityLogInterceptor | |||||
{ | |||||
public static Logger UnityLogger = new StandardLogger("UnityEngine"); | |||||
public static Logger.Level LogTypeToLevel(LogType type) | |||||
{ | |||||
switch (type) | |||||
{ | |||||
case LogType.Assert: | |||||
return Logger.Level.Debug; | |||||
case LogType.Error: | |||||
return Logger.Level.Error; | |||||
case LogType.Exception: | |||||
return Logger.Level.Critical; | |||||
case LogType.Log: | |||||
return Logger.Level.Info; | |||||
case LogType.Warning: | |||||
return Logger.Level.Warning; | |||||
default: | |||||
return Logger.Level.Info; | |||||
} | |||||
} | |||||
} | |||||
} |
@ -1,10 +1,9 @@ | |||||
using IllusionPlugin.BeatSaber; | |||||
using System; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
using UnityEngine.SceneManagement; | using UnityEngine.SceneManagement; | ||||
namespace IllusionPlugin | |||||
namespace IPA | |||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// Interface for Beat Saber plugins. Every class that implements this will be loaded if the DLL is placed at | /// Interface for Beat Saber plugins. Every class that implements this will be loaded if the DLL is placed at |
@ -1,37 +1,37 @@ | |||||
using System.Reflection; | |||||
using System.Runtime.CompilerServices; | |||||
using System.Runtime.InteropServices; | |||||
// General Information about an assembly is controlled through the following | |||||
// set of attributes. Change these attribute values to modify the information | |||||
// associated with an assembly. | |||||
[assembly: AssemblyTitle("IllusionPlugin")] | |||||
[assembly: AssemblyDescription("")] | |||||
[assembly: AssemblyConfiguration("")] | |||||
[assembly: AssemblyCompany("")] | |||||
[assembly: AssemblyProduct("IllusionPlugin")] | |||||
[assembly: AssemblyCopyright("Copyright © 2015")] | |||||
[assembly: AssemblyTrademark("")] | |||||
[assembly: AssemblyCulture("")] | |||||
// Setting ComVisible to false makes the types in this assembly not visible | |||||
// to COM components. If you need to access a type in this assembly from | |||||
// COM, set the ComVisible attribute to true on that type. | |||||
[assembly: ComVisible(false)] | |||||
// The following GUID is for the ID of the typelib if this project is exposed to COM | |||||
[assembly: Guid("e8cea89d-6c2f-4729-94b3-f355f7db19e5")] | |||||
[assembly: InternalsVisibleTo("IllusionInjector")] | |||||
// Version information for an assembly consists of the following four values: | |||||
// | |||||
// Major Version | |||||
// Minor Version | |||||
// Build Number | |||||
// Revision | |||||
// | |||||
// You can specify all the values or you can default the Build and Revision Numbers | |||||
// by using the '*' as shown below: | |||||
// [assembly: AssemblyVersion("1.0.*")] | |||||
[assembly: AssemblyVersion("1.0.0.0")] | |||||
[assembly: AssemblyFileVersion("1.0.0.0")] | |||||
using System.Reflection; | |||||
using System.Runtime.CompilerServices; | |||||
using System.Runtime.InteropServices; | |||||
// General Information about an assembly is controlled through the following | |||||
// set of attributes. Change these attribute values to modify the information | |||||
// associated with an assembly. | |||||
[assembly: AssemblyTitle("IPA.Loader")] | |||||
[assembly: AssemblyDescription("")] | |||||
[assembly: AssemblyConfiguration("")] | |||||
[assembly: AssemblyCompany("")] | |||||
[assembly: AssemblyProduct("IPA.Loader")] | |||||
[assembly: AssemblyCopyright("Copyright © 2018")] | |||||
[assembly: AssemblyTrademark("")] | |||||
[assembly: AssemblyCulture("")] | |||||
// Setting ComVisible to false makes the types in this assembly not visible | |||||
// to COM components. If you need to access a type in this assembly from | |||||
// COM, set the ComVisible attribute to true on that type. | |||||
[assembly: ComVisible(false)] | |||||
// The following GUID is for the ID of the typelib if this project is exposed to COM | |||||
[assembly: Guid("5ad344f0-01a0-4ca8-92e5-9d095737744d")] | |||||
[assembly: InternalsVisibleTo("IPA.Injector")] | |||||
// Version information for an assembly consists of the following four values: | |||||
// | |||||
// Major Version | |||||
// Minor Version | |||||
// Build Number | |||||
// Revision | |||||
// | |||||
// You can specify all the values or you can default the Build and Revision Numbers | |||||
// by using the '*' as shown below: | |||||
// [assembly: AssemblyVersion("1.0.*")] | |||||
[assembly: AssemblyVersion("1.0.0.0")] | |||||
[assembly: AssemblyFileVersion("1.0.0.0")] |
@ -1,11 +1,10 @@ | |||||
using IllusionInjector.Logging; | |||||
using System; | |||||
using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
using System.Text; | using System.Text; | ||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
namespace IllusionInjector.Utilities | |||||
namespace IPA.Utilities | |||||
{ | { | ||||
public static class SteamCheck | public static class SteamCheck | ||||
{ | { |
@ -1,27 +0,0 @@ | |||||
{ | |||||
"name": "bsipa-test-plugin", | |||||
"version": "0.0.1", | |||||
"approved": true, | |||||
"title": "BSIPA Test Plugin", | |||||
"description": "", | |||||
"type": "mod", | |||||
"published": "2018-08-02T03:12:18.805Z", | |||||
"gameVersion": "0.11.2", | |||||
"gameVersionID": "5b626bb15d243a0008b8886e", | |||||
"oldVersions": [], | |||||
"dependsOn": [], | |||||
"conflictsWith": [], | |||||
"files": { | |||||
"steam": { | |||||
"hash": "a94e7eea2f656b2830a86000ee222b6cb06f8da5", | |||||
"files": { | |||||
"Plugins/": "da39a3ee5e6b4b0d3255bfef95601890afd80709", | |||||
"Plugins/RandomSong.dll": "64ee1ecfeda73c550004bdb5123c7ac47a45e428" | |||||
}, | |||||
"url": "https://www.modsaber.ml/cdn/randomsong/1.0.0-default.zip" | |||||
} | |||||
}, | |||||
"weight": 7, | |||||
"author": "danike", | |||||
"authorID": "5b62723f288b110008291cb9" | |||||
} |
@ -1 +1 @@ | |||||
854dcf24535098612cfeca06e87fe2b163332578 | |||||
1d38dd5b9139545c6bc300c735ca121563a74d20 |
@ -1,4 +0,0 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<packages> | |||||
<package id="Mono.Cecil" version="0.9.6.4" targetFramework="net462" /> | |||||
</packages> |
@ -1,38 +0,0 @@ | |||||
using IllusionInjector.Logging; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using UnityEngine; | |||||
namespace IllusionInjector | |||||
{ | |||||
class Bootstrapper : MonoBehaviour | |||||
{ | |||||
public event Action Destroyed = delegate {}; | |||||
void Awake() | |||||
{ | |||||
//if (Environment.CommandLine.Contains("--verbose")) | |||||
//{ | |||||
Windows.GuiConsole.CreateConsole(); | |||||
//} | |||||
Application.logMessageReceived += delegate (string condition, string stackTrace, LogType type) | |||||
{ | |||||
var level = UnityLogInterceptor.LogTypeToLevel(type); | |||||
UnityLogInterceptor.Unitylogger.Log(level, $"{condition.Trim()}"); | |||||
UnityLogInterceptor.Unitylogger.Log(level, $"{stackTrace.Trim()}"); | |||||
}; | |||||
} | |||||
void Start() | |||||
{ | |||||
Destroy(gameObject); | |||||
} | |||||
void OnDestroy() | |||||
{ | |||||
Destroyed(); | |||||
} | |||||
} | |||||
} |
@ -1,72 +0,0 @@ | |||||
using System; | |||||
using System.Collections; | |||||
using System.Runtime.InteropServices; | |||||
using System.IO; | |||||
using System.Text; | |||||
using Microsoft.Win32.SafeHandles; | |||||
namespace Windows | |||||
{ | |||||
class GuiConsole | |||||
{ | |||||
public static void CreateConsole() | |||||
{ | |||||
if (hasConsole) | |||||
return; | |||||
if (oldOut == IntPtr.Zero) | |||||
oldOut = GetStdHandle( -11 ); | |||||
if (! AllocConsole()) | |||||
throw new Exception("AllocConsole() failed"); | |||||
conOut = CreateFile( "CONOUT$", 0x40000000, 2, IntPtr.Zero, 3, 0, IntPtr.Zero ); | |||||
if (! SetStdHandle(-11, conOut)) | |||||
throw new Exception("SetStdHandle() failed"); | |||||
StreamToConsole(); | |||||
hasConsole = true; | |||||
} | |||||
public static void ReleaseConsole() | |||||
{ | |||||
if (! hasConsole) | |||||
return; | |||||
if (! CloseHandle(conOut)) | |||||
throw new Exception("CloseHandle() failed"); | |||||
conOut = IntPtr.Zero; | |||||
if (! FreeConsole()) | |||||
throw new Exception("FreeConsole() failed"); | |||||
if (! SetStdHandle(-11, oldOut)) | |||||
throw new Exception("SetStdHandle() failed"); | |||||
StreamToConsole(); | |||||
hasConsole = false; | |||||
} | |||||
private static void StreamToConsole() | |||||
{ | |||||
Stream cstm = Console.OpenStandardOutput(); | |||||
StreamWriter cstw = new StreamWriter( cstm, Encoding.Default ); | |||||
cstw.AutoFlush = true; | |||||
Console.SetOut( cstw ); | |||||
Console.SetError( cstw ); | |||||
} | |||||
private static bool hasConsole = false; | |||||
private static IntPtr conOut; | |||||
private static IntPtr oldOut; | |||||
[DllImport("kernel32.dll", SetLastError=true)] | |||||
private static extern bool AllocConsole(); | |||||
[DllImport("kernel32.dll", SetLastError=false)] | |||||
private static extern bool FreeConsole(); | |||||
[DllImport("kernel32.dll", SetLastError=true)] | |||||
private static extern IntPtr GetStdHandle( int nStdHandle ); | |||||
[DllImport("kernel32.dll", SetLastError=true)] | |||||
private static extern bool SetStdHandle(int nStdHandle, IntPtr hConsoleOutput); | |||||
[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)] | |||||
private static extern IntPtr CreateFile( | |||||
string fileName, | |||||
int desiredAccess, | |||||
int shareMode, | |||||
IntPtr securityAttributes, | |||||
int creationDisposition, | |||||
int flagsAndAttributes, | |||||
IntPtr templateFile ); | |||||
[DllImport("kernel32.dll", ExactSpelling=true, SetLastError=true)] | |||||
private static extern bool CloseHandle(IntPtr handle); | |||||
} | |||||
} |
@ -1,132 +0,0 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||||
<PropertyGroup> | |||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||||
<ProjectGuid>{D1C61AF5-0D2D-4752-8203-1C6929025F7C}</ProjectGuid> | |||||
<OutputType>Library</OutputType> | |||||
<AppDesignerFolder>Properties</AppDesignerFolder> | |||||
<RootNamespace>IllusionInjector</RootNamespace> | |||||
<AssemblyName>IllusionInjector</AssemblyName> | |||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> | |||||
<FileAlignment>512</FileAlignment> | |||||
<TargetFrameworkProfile> | |||||
</TargetFrameworkProfile> | |||||
<NuGetPackageImportStamp> | |||||
</NuGetPackageImportStamp> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||||
<DebugSymbols>true</DebugSymbols> | |||||
<DebugType>full</DebugType> | |||||
<Optimize>false</Optimize> | |||||
<OutputPath>bin\Debug\</OutputPath> | |||||
<DefineConstants>TRACE;DEBUG</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
<Prefer32Bit>false</Prefer32Bit> | |||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |||||
<DebugType>none</DebugType> | |||||
<Optimize>true</Optimize> | |||||
<OutputPath>bin\Release\</OutputPath> | |||||
<DefineConstants>TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
<Prefer32Bit>false</Prefer32Bit> | |||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |||||
<UseVSHostingProcess>true</UseVSHostingProcess> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<Reference Include="I18N"> | |||||
<HintPath>..\Libs\I18N.dll</HintPath> | |||||
</Reference> | |||||
<Reference Include="I18N.West"> | |||||
<HintPath>..\Libs\I18N.West.dll</HintPath> | |||||
</Reference> | |||||
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL"> | |||||
<HintPath>..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath> | |||||
</Reference> | |||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | |||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath> | |||||
</Reference> | |||||
<Reference Include="System" /> | |||||
<Reference Include="System.Data" /> | |||||
<Reference Include="System.Xml" /> | |||||
<Reference Include="UnityEngine"> | |||||
<HintPath>..\Libs\UnityEngine.dll</HintPath> | |||||
<Private>False</Private> | |||||
</Reference> | |||||
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> | |||||
<HintPath>..\Libs\UnityEngine.CoreModule.dll</HintPath> | |||||
<Private>False</Private> | |||||
</Reference> | |||||
<Reference Include="UnityEngine.UnityWebRequestModule"> | |||||
<HintPath>..\..\..\..\..\..\Game Library\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.UnityWebRequestModule.dll</HintPath> | |||||
<Private>False</Private> | |||||
</Reference> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<Compile Include="Bootstrapper.cs" /> | |||||
<Compile Include="BeatSaber\CompositeBSPlugin.cs" /> | |||||
<Compile Include="ConsoleWindow.cs" /> | |||||
<Compile Include="Injector.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="PluginManager.cs" /> | |||||
<Compile Include="Properties\AssemblyInfo.cs" /> | |||||
<Compile Include="PluginComponent.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" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<ProjectReference Include="..\IllusionPlugin\IllusionPlugin.csproj"> | |||||
<Project>{e2848bfb-5432-42f4-8ae0-d2ec0cdf2f71}</Project> | |||||
<Name>IllusionPlugin</Name> | |||||
</ProjectReference> | |||||
<ProjectReference Include="..\MSBuildTasks\MSBuildTasks.csproj"> | |||||
<Project>{f08c3c7a-3221-432e-bab8-32bce58408c8}</Project> | |||||
<Name>MSBuildTasks</Name> | |||||
<Private>False</Private> | |||||
</ProjectReference> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<None Include="packages.config" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<Content Include="..\Libs\0Harmony.dll"> | |||||
<Link>IncludedLibs\0Harmony.dll</Link> | |||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | |||||
</Content> | |||||
<Content Include="..\Libs\System.Runtime.Serialization.dll"> | |||||
<Link>RequiredMonoLibs\System.Runtime.Serialization.dll</Link> | |||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | |||||
</Content> | |||||
</ItemGroup> | |||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||||
<PropertyGroup> | |||||
<PreBuildEvent> | |||||
</PreBuildEvent> | |||||
</PropertyGroup> | |||||
<Target Name="AfterBuild"> | |||||
<Exec Command=""$(MSBuildBinPath)\MSBuild.exe" "$(MSBuildProjectDirectory)\PostBuild.msbuild" /property:OPath=$(OutputPath) /property:Configuration=$(Configuration) /property:SolDir=$(SolutionDir)" /> | |||||
</Target> | |||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |||||
Other similar extension points exist, see Microsoft.Common.targets. | |||||
<Target Name="BeforeBuild"> | |||||
</Target> | |||||
<Target Name="AfterBuild"> | |||||
</Target> | |||||
--> | |||||
</Project> |
@ -1,34 +0,0 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
using UnityEngine; | |||||
using LoggerBase = IllusionPlugin.Logging.Logger; | |||||
namespace IllusionInjector.Logging | |||||
{ | |||||
public class UnityLogInterceptor | |||||
{ | |||||
public static LoggerBase Unitylogger = new StandardLogger("UnityEngine"); | |||||
public static LoggerBase.Level LogTypeToLevel(LogType type) | |||||
{ | |||||
switch (type) | |||||
{ | |||||
case LogType.Assert: | |||||
return LoggerBase.Level.Debug; | |||||
case LogType.Error: | |||||
return LoggerBase.Level.Error; | |||||
case LogType.Exception: | |||||
return LoggerBase.Level.Critical; | |||||
case LogType.Log: | |||||
return LoggerBase.Level.Info; | |||||
case LogType.Warning: | |||||
return LoggerBase.Level.Warning; | |||||
default: | |||||
return LoggerBase.Level.Info; | |||||
} | |||||
} | |||||
} | |||||
} |
@ -1 +0,0 @@ | |||||
dae758b90b096a39aa928b136ec952d8ed591e5d |
@ -1,5 +0,0 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<packages> | |||||
<package id="Ionic.Zip" version="1.9.1.8" targetFramework="net46" /> | |||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net46" /> | |||||
</packages> |
@ -1,178 +0,0 @@ | |||||
<?xml version="1.0"?> | |||||
<doc> | |||||
<assembly> | |||||
<name>IllusionPlugin</name> | |||||
</assembly> | |||||
<members> | |||||
<member name="P:IllusionPlugin.IEnhancedPlugin.Filter"> | |||||
<summary> | |||||
Gets a list of executables this plugin should be excuted on (without the file ending) | |||||
</summary> | |||||
<example>{ "PlayClub", "PlayClubStudio" }</example> | |||||
</member> | |||||
<member name="T:IllusionPlugin.IniFile"> | |||||
<summary> | |||||
Create a New INI file to store or load data | |||||
</summary> | |||||
</member> | |||||
<member name="M:IllusionPlugin.IniFile.#ctor(System.String)"> | |||||
<summary> | |||||
INIFile Constructor. | |||||
</summary> | |||||
<PARAM name="INIPath"></PARAM> | |||||
</member> | |||||
<member name="M:IllusionPlugin.IniFile.IniWriteValue(System.String,System.String,System.String)"> | |||||
<summary> | |||||
Write Data to the INI File | |||||
</summary> | |||||
<PARAM name="Section"></PARAM> | |||||
Section name | |||||
<PARAM name="Key"></PARAM> | |||||
Key Name | |||||
<PARAM name="Value"></PARAM> | |||||
Value Name | |||||
</member> | |||||
<member name="M:IllusionPlugin.IniFile.IniReadValue(System.String,System.String)"> | |||||
<summary> | |||||
Read Data Value From the Ini File | |||||
</summary> | |||||
<PARAM name="Section"></PARAM> | |||||
<PARAM name="Key"></PARAM> | |||||
<PARAM name="Path"></PARAM> | |||||
<returns></returns> | |||||
</member> | |||||
<member name="T:IllusionPlugin.IPlugin"> | |||||
<summary> | |||||
Interface for generic Illusion unity plugins. Every class that implements this will be loaded if the DLL is placed at | |||||
data/Managed/Plugins. | |||||
</summary> | |||||
</member> | |||||
<member name="P:IllusionPlugin.IPlugin.Name"> | |||||
<summary> | |||||
Gets the name of the plugin. | |||||
</summary> | |||||
</member> | |||||
<member name="P:IllusionPlugin.IPlugin.Version"> | |||||
<summary> | |||||
Gets the version of the plugin. | |||||
</summary> | |||||
</member> | |||||
<member name="M:IllusionPlugin.IPlugin.OnApplicationStart"> | |||||
<summary> | |||||
Gets invoked when the application is started. | |||||
</summary> | |||||
</member> | |||||
<member name="M:IllusionPlugin.IPlugin.OnApplicationQuit"> | |||||
<summary> | |||||
Gets invoked when the application is closed. | |||||
</summary> | |||||
</member> | |||||
<member name="M:IllusionPlugin.IPlugin.OnLevelWasLoaded(System.Int32)"> | |||||
<summary> | |||||
Gets invoked whenever a level is loaded. | |||||
</summary> | |||||
<param name="level"></param> | |||||
</member> | |||||
<member name="M:IllusionPlugin.IPlugin.OnLevelWasInitialized(System.Int32)"> | |||||
<summary> | |||||
Gets invoked after the first update cycle after a level was loaded. | |||||
</summary> | |||||
<param name="level"></param> | |||||
</member> | |||||
<member name="M:IllusionPlugin.IPlugin.OnUpdate"> | |||||
<summary> | |||||
Gets invoked on every graphic update. | |||||
</summary> | |||||
</member> | |||||
<member name="M:IllusionPlugin.IPlugin.OnFixedUpdate"> | |||||
<summary> | |||||
Gets invoked on ever physics update. | |||||
</summary> | |||||
</member> | |||||
<member name="T:IllusionPlugin.ModPrefs"> | |||||
<summary> | |||||
Allows to get and set preferences for your mod. | |||||
</summary> | |||||
</member> | |||||
<member name="M:IllusionPlugin.ModPrefs.GetString(System.String,System.String,System.String,System.Boolean)"> | |||||
<summary> | |||||
Gets a string from the ini. | |||||
</summary> | |||||
<param name="section">Section of the key.</param> | |||||
<param name="name">Name of the key.</param> | |||||
<param name="defaultValue">Value that should be used when no value is found.</param> | |||||
<param name="autoSave">Whether or not the default value should be written if no value is found.</param> | |||||
<returns></returns> | |||||
</member> | |||||
<member name="M:IllusionPlugin.ModPrefs.GetInt(System.String,System.String,System.Int32,System.Boolean)"> | |||||
<summary> | |||||
Gets an int from the ini. | |||||
</summary> | |||||
<param name="section">Section of the key.</param> | |||||
<param name="name">Name of the key.</param> | |||||
<param name="defaultValue">Value that should be used when no value is found.</param> | |||||
<param name="autoSave">Whether or not the default value should be written if no value is found.</param> | |||||
<returns></returns> | |||||
</member> | |||||
<member name="M:IllusionPlugin.ModPrefs.GetFloat(System.String,System.String,System.Single,System.Boolean)"> | |||||
<summary> | |||||
Gets a float from the ini. | |||||
</summary> | |||||
<param name="section">Section of the key.</param> | |||||
<param name="name">Name of the key.</param> | |||||
<param name="defaultValue">Value that should be used when no value is found.</param> | |||||
<param name="autoSave">Whether or not the default value should be written if no value is found.</param> | |||||
<returns></returns> | |||||
</member> | |||||
<member name="M:IllusionPlugin.ModPrefs.GetBool(System.String,System.String,System.Boolean,System.Boolean)"> | |||||
<summary> | |||||
Gets a bool from the ini. | |||||
</summary> | |||||
<param name="section">Section of the key.</param> | |||||
<param name="name">Name of the key.</param> | |||||
<param name="defaultValue">Value that should be used when no value is found.</param> | |||||
<param name="autoSave">Whether or not the default value should be written if no value is found.</param> | |||||
<returns></returns> | |||||
</member> | |||||
<member name="M:IllusionPlugin.ModPrefs.HasKey(System.String,System.String)"> | |||||
<summary> | |||||
Checks whether or not a key exists in the ini. | |||||
</summary> | |||||
<param name="section">Section of the key.</param> | |||||
<param name="name">Name of the key.</param> | |||||
<returns></returns> | |||||
</member> | |||||
<member name="M:IllusionPlugin.ModPrefs.SetFloat(System.String,System.String,System.Single)"> | |||||
<summary> | |||||
Sets a float in the ini. | |||||
</summary> | |||||
<param name="section">Section of the key.</param> | |||||
<param name="name">Name of the key.</param> | |||||
<param name="value">Value that should be written.</param> | |||||
</member> | |||||
<member name="M:IllusionPlugin.ModPrefs.SetInt(System.String,System.String,System.Int32)"> | |||||
<summary> | |||||
Sets an int in the ini. | |||||
</summary> | |||||
<param name="section">Section of the key.</param> | |||||
<param name="name">Name of the key.</param> | |||||
<param name="value">Value that should be written.</param> | |||||
</member> | |||||
<member name="M:IllusionPlugin.ModPrefs.SetString(System.String,System.String,System.String)"> | |||||
<summary> | |||||
Sets a string in the ini. | |||||
</summary> | |||||
<param name="section">Section of the key.</param> | |||||
<param name="name">Name of the key.</param> | |||||
<param name="value">Value that should be written.</param> | |||||
</member> | |||||
<member name="M:IllusionPlugin.ModPrefs.SetBool(System.String,System.String,System.Boolean)"> | |||||
<summary> | |||||
Sets a bool in the ini. | |||||
</summary> | |||||
<param name="section">Section of the key.</param> | |||||
<param name="name">Name of the key.</param> | |||||
<param name="value">Value that should be written.</param> | |||||
</member> | |||||
</members> | |||||
</doc> |
@ -1,69 +0,0 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||||
<PropertyGroup> | |||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||||
<ProjectGuid>{E2848BFB-5432-42F4-8AE0-D2EC0CDF2F71}</ProjectGuid> | |||||
<OutputType>Library</OutputType> | |||||
<AppDesignerFolder>Properties</AppDesignerFolder> | |||||
<RootNamespace>IllusionPlugin</RootNamespace> | |||||
<AssemblyName>IllusionPlugin</AssemblyName> | |||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> | |||||
<FileAlignment>512</FileAlignment> | |||||
<TargetFrameworkProfile> | |||||
</TargetFrameworkProfile> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||||
<DebugSymbols>true</DebugSymbols> | |||||
<DebugType>full</DebugType> | |||||
<Optimize>false</Optimize> | |||||
<OutputPath>bin\Debug\</OutputPath> | |||||
<DefineConstants>DEBUG;TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
<Prefer32Bit>false</Prefer32Bit> | |||||
</PropertyGroup> | |||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |||||
<DebugType>none</DebugType> | |||||
<Optimize>true</Optimize> | |||||
<OutputPath>bin\Release\</OutputPath> | |||||
<DefineConstants>TRACE</DefineConstants> | |||||
<ErrorReport>prompt</ErrorReport> | |||||
<WarningLevel>4</WarningLevel> | |||||
<DocumentationFile>bin\Release\IllusionPlugin.XML</DocumentationFile> | |||||
<Prefer32Bit>false</Prefer32Bit> | |||||
<UseVSHostingProcess>true</UseVSHostingProcess> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<Reference Include="System" /> | |||||
<Reference Include="System.Data" /> | |||||
<Reference Include="System.Xml" /> | |||||
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> | |||||
<HintPath>..\Libs\UnityEngine.CoreModule.dll</HintPath> | |||||
<Private>False</Private> | |||||
</Reference> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<Compile Include="BeatSaber\IEnhancedBeatSaberPlugin.cs" /> | |||||
<Compile Include="BeatSaber\ModsaberModInfo.cs" /> | |||||
<Compile Include="IniFile.cs" /> | |||||
<Compile Include="BeatSaber\IBeatSaberPlugin.cs" /> | |||||
<Compile Include="IPA\IEnhancedPlugin.cs" /> | |||||
<Compile Include="IGenericEnhancedPlugin.cs" /> | |||||
<Compile Include="IPA\IPlugin.cs" /> | |||||
<Compile Include="Logging\LogPrinter.cs" /> | |||||
<Compile Include="Logging\Logger.cs" /> | |||||
<Compile Include="ModPrefs.cs" /> | |||||
<Compile Include="Properties\AssemblyInfo.cs" /> | |||||
<Compile Include="Utils\ReflectionUtil.cs" /> | |||||
</ItemGroup> | |||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |||||
Other similar extension points exist, see Microsoft.Common.targets. | |||||
<Target Name="BeforeBuild"> | |||||
</Target> | |||||
<Target Name="AfterBuild"> | |||||
</Target> | |||||
--> | |||||
</Project> |
@ -1 +0,0 @@ | |||||
77d5fd2376e4df56c59ee712f4f804807c24fc6f |