diff --git a/.gitmodules b/.gitmodules
index 8d6898d0..ad87e188 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
[submodule "Doorstop"]
path = Doorstop
url = https://github.com/nike4613/UnityDoorstop-BSIPA
+[submodule "BuildTools"]
+ path = BuildTools
+ url = https://github.com/nike4613/BS-Plugin-BuildTools.git
diff --git a/BSIPA.sln b/BSIPA.sln
index 11836794..8fb520bf 100644
--- a/BSIPA.sln
+++ b/BSIPA.sln
@@ -5,11 +5,11 @@ VisualStudioVersion = 15.0.27428.2043
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IPA", "IPA\IPA.csproj", "{14092533-98BB-40A4-9AFC-27BB75672A70}"
ProjectSection(ProjectDependencies) = postProject
+ {5F33B310-DC8D-4C0D-877E-BAC3908DE10F} = {5F33B310-DC8D-4C0D-877E-BAC3908DE10F}
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A} = {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}
{2A1AF16B-27F1-46E0-9A95-181516BC1CB7} = {2A1AF16B-27F1-46E0-9A95-181516BC1CB7}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSBuildTasks", "MSBuildTasks\MSBuildTasks.csproj", "{F08C3C7A-3221-432E-BAB8-32BCE58408C8}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IPA.Loader", "IPA.Loader\IPA.Loader.csproj", "{5AD344F0-01A0-4CA8-92E5-9D095737744D}"
ProjectSection(ProjectDependencies) = postProject
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F} = {5F33B310-DC8D-4C0D-877E-BAC3908DE10F}
@@ -19,7 +19,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IPA.Injector", "IPA.Injecto
ProjectSection(ProjectDependencies) = postProject
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F} = {5F33B310-DC8D-4C0D-877E-BAC3908DE10F}
{88609E16-731F-46C9-8139-6B1A7A83240D} = {88609E16-731F-46C9-8139-6B1A7A83240D}
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8} = {F08C3C7A-3221-432E-BAB8-32BCE58408C8}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "proxy", "Doorstop\Proxy\Proxy.vcxproj", "{88609E16-731F-46C9-8139-6B1A7A83240D}"
@@ -29,14 +28,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{C79C2C3A
Refs\refs.txt = Refs\refs.txt
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CollectDependencies", "CollectDependencies\CollectDependencies.csproj", "{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4D6639A2-BD39-4F9B-AF7F-8E5F3B88243D}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
README.md = README.md
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CollectDependencies", "BuildTools\CollectDependencies\CollectDependencies.csproj", "{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyRenameStep", "BuildTools\AssemblyRenameStep\AssemblyRenameStep.csproj", "{E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -77,30 +78,6 @@ Global
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x64.Build.0 = Verbose|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x86.ActiveCfg = Release|Any CPU
{14092533-98BB-40A4-9AFC-27BB75672A70}.Verbose|x86.Build.0 = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Debug|x64.ActiveCfg = Debug|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Debug|x64.Build.0 = Debug|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Debug|x86.ActiveCfg = Debug|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Debug|x86.Build.0 = Debug|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Release|Any CPU.Build.0 = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Release|x64.ActiveCfg = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Release|x64.Build.0 = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Release|x86.ActiveCfg = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Release|x86.Build.0 = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Verbose_Release|Any CPU.ActiveCfg = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Verbose_Release|Any CPU.Build.0 = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Verbose_Release|x64.ActiveCfg = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Verbose_Release|x64.Build.0 = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Verbose_Release|x86.ActiveCfg = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Verbose_Release|x86.Build.0 = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Verbose|Any CPU.ActiveCfg = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Verbose|Any CPU.Build.0 = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Verbose|x64.ActiveCfg = Debug|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Verbose|x64.Build.0 = Debug|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Verbose|x86.ActiveCfg = Release|Any CPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}.Verbose|x86.Build.0 = Release|Any CPU
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5AD344F0-01A0-4CA8-92E5-9D095737744D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -178,11 +155,13 @@ Global
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Release|Any CPU.Build.0 = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Release|x64.ActiveCfg = Release|Any CPU
+ {5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Release|x64.Build.0 = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Release|x86.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Release|x86.Build.0 = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose_Release|Any CPU.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose_Release|Any CPU.Build.0 = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose_Release|x64.ActiveCfg = Release|Any CPU
+ {5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose_Release|x64.Build.0 = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose_Release|x86.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose_Release|x86.Build.0 = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose|Any CPU.ActiveCfg = Release|Any CPU
@@ -191,13 +170,37 @@ Global
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose|x64.Build.0 = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose|x86.ActiveCfg = Release|Any CPU
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F}.Verbose|x86.Build.0 = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|x64.Build.0 = Debug|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Debug|x86.Build.0 = Debug|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|x64.ActiveCfg = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|x64.Build.0 = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|x86.ActiveCfg = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Release|x86.Build.0 = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|Any CPU.Build.0 = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|x64.ActiveCfg = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|x64.Build.0 = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|x86.ActiveCfg = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose_Release|x86.Build.0 = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|Any CPU.ActiveCfg = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|Any CPU.Build.0 = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x64.ActiveCfg = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x64.Build.0 = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x86.ActiveCfg = Release|Any CPU
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A}.Verbose|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8} = {C79C2C3A-A7FC-40D6-A5CC-9752A661AFA9}
{5F33B310-DC8D-4C0D-877E-BAC3908DE10F} = {C79C2C3A-A7FC-40D6-A5CC-9752A661AFA9}
+ {E2CCDD2F-1D4F-4B06-9CD4-E0D2B9AE543A} = {C79C2C3A-A7FC-40D6-A5CC-9752A661AFA9}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C7380FAB-02D6-4A2A-B428-B4BFCFE3A054}
diff --git a/BuildTools b/BuildTools
new file mode 160000
index 00000000..de919c49
--- /dev/null
+++ b/BuildTools
@@ -0,0 +1 @@
+Subproject commit de919c49496a7e7e11382bd876473018ddceaa1a
diff --git a/CollectDependencies/App.config b/CollectDependencies/App.config
deleted file mode 100644
index 56efbc7b..00000000
--- a/CollectDependencies/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CollectDependencies/CollectDependencies.csproj b/CollectDependencies/CollectDependencies.csproj
deleted file mode 100644
index b8352cc7..00000000
--- a/CollectDependencies/CollectDependencies.csproj
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {5F33B310-DC8D-4C0D-877E-BAC3908DE10F}
- Exe
- CollectDependencies
- CollectDependencies
- v4.7.2
- 512
- true
- true
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
- ..\packages\Mono.Cecil.0.10.3\lib\net40\Mono.Cecil.dll
-
-
- ..\packages\Mono.Cecil.0.10.3\lib\net40\Mono.Cecil.Mdb.dll
-
-
- ..\packages\Mono.Cecil.0.10.3\lib\net40\Mono.Cecil.Pdb.dll
-
-
- ..\packages\Mono.Cecil.0.10.3\lib\net40\Mono.Cecil.Rocks.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CollectDependencies/Program.cs b/CollectDependencies/Program.cs
deleted file mode 100644
index 926b30ad..00000000
--- a/CollectDependencies/Program.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-using Mono.Cecil;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-
-namespace CollectDependencies
-{
- static class Program
- {
- static void Main(string[] args)
- {
- var depsFile = File.ReadAllText(args[0]);
- var directoryName = Path.GetDirectoryName(args[0]);
-
- var files = new List>();
- { // Create files from stuff in depsfile
- var stack = new Stack();
-
- void Push(string val)
- {
- string pre = "";
- if (stack.Count > 0)
- pre = stack.First();
- stack.Push(pre + val);
- }
- string Pop() => stack.Pop();
- string Replace(string val)
- {
- var v2 = Pop();
- Push(val);
- return v2;
- }
-
- var lineNo = 0;
- foreach (var line in depsFile.Split(new[] { Environment.NewLine, "\n" }, StringSplitOptions.None))
- {
- var parts = line.Split('"');
- var path = parts.Last();
- var level = parts.Length - 1;
-
- if (path.StartsWith("::"))
- { // pseudo-command
- parts = path.Split(' ');
- var command = parts[0].Substring(2);
- parts = parts.Skip(1).ToArray();
- var arglist = string.Join(" ", parts);
- if (command == "from")
- { // an "import" type command
- path = File.ReadAllText(Path.Combine(directoryName ?? throw new InvalidOperationException(), arglist));
- }
- else if (command == "prompt")
- {
- Console.Write(arglist);
- path = Console.ReadLine();
- }
- else
- {
- path = "";
- Console.Error.WriteLine($"Invalid command {command}");
- }
- }
-
- if (level > stack.Count - 1)
- Push(path);
- else if (level == stack.Count - 1)
- files.Add(new Tuple(Replace(path), lineNo));
- else if (level < stack.Count - 1)
- {
- files.Add(new Tuple(Pop(), lineNo));
- while (level < stack.Count)
- Pop();
- Push(path);
- }
-
- lineNo++;
- }
-
- files.Add(new Tuple(Pop(), lineNo));
- }
-
- foreach (var file in files)
- {
- try
- {
- var fparts = file.Item1.Split('?');
- var fname = fparts[0];
-
- if (fname == "") continue;
-
- var outp = Path.Combine(directoryName ?? throw new InvalidOperationException(),
- Path.GetFileName(fname) ?? throw new InvalidOperationException());
- Console.WriteLine($"Copying \"{fname}\" to \"{outp}\"");
- if (File.Exists(outp)) File.Delete(outp);
-
- if (Path.GetExtension(fname)?.ToLower() == ".dll")
- {
- // ReSharper disable once StringLiteralTypo
- if (fparts.Length > 1 && fparts[1] == "virt")
- {
- var module = VirtualizedModule.Load(fname);
- module.Virtualize(Path.Combine(Path.GetTempPath(), Path.GetRandomFileName(),
- Path.GetFileName(fname) ?? throw new InvalidOperationException()));
- }
-
- var modl = ModuleDefinition.ReadModule(fparts[0]);
- foreach (var t in modl.Types)
- {
- foreach (var m in t.Methods)
- {
- if (m.Body != null)
- {
- m.Body.Instructions.Clear();
- m.Body.InitLocals = false;
- m.Body.Variables.Clear();
- }
- }
- }
-
- modl.Write(outp);
- }
- else
- {
- File.Copy(fname, outp);
- }
- }
- catch (Exception e)
- {
- Console.WriteLine($"{Path.Combine(Environment.CurrentDirectory, args[0])}({file.Item2}): error: {e}");
- }
- }
-
- }
- }
-}
diff --git a/CollectDependencies/Properties/AssemblyInfo.cs b/CollectDependencies/Properties/AssemblyInfo.cs
deleted file mode 100644
index 83c77d77..00000000
--- a/CollectDependencies/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-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("CollectDependencies")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("CollectDependencies")]
-[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("5f33b310-dc8d-4c0d-877e-bac3908de10f")]
-
-// 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")]
diff --git a/CollectDependencies/Virtualizer.cs b/CollectDependencies/Virtualizer.cs
deleted file mode 100644
index ac9db5c2..00000000
--- a/CollectDependencies/Virtualizer.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-using Mono.Cecil;
-using System.IO;
-using System.Linq;
-
-namespace CollectDependencies
-{
- class VirtualizedModule
- {
- private readonly FileInfo _file;
- private ModuleDefinition _module;
-
- public static VirtualizedModule Load(string engineFile)
- {
- return new VirtualizedModule(engineFile);
- }
-
- private VirtualizedModule(string assemblyFile)
- {
- _file = new FileInfo(assemblyFile);
-
- LoadModules();
- }
-
- private void LoadModules()
- {
- var resolver = new DefaultAssemblyResolver();
- resolver.AddSearchDirectory(_file.DirectoryName);
-
- var parameters = new ReaderParameters
- {
- AssemblyResolver = resolver,
- };
-
- _module = ModuleDefinition.ReadModule(_file.FullName, parameters);
- }
-
- ///
- ///
- ///
- ///
- public void Virtualize(string targetFile)
- {
-
- foreach (var type in _module.Types)
- {
- VirtualizeType(type);
- }
-
- _module.Write(targetFile);
- }
-
- private void VirtualizeType(TypeDefinition type)
- {
- if(type.IsSealed)
- {
- // Unseal
- type.IsSealed = false;
- }
-
- if (type.IsInterface) return;
- if (type.IsAbstract) return;
-
- // These two don't seem to work.
- if (type.Name == "SceneControl" || type.Name == "ConfigUI") return;
-
- // Take care of sub types
- foreach (var subType in type.NestedTypes)
- {
- VirtualizeType(subType);
- }
-
- foreach (var method in type.Methods)
- {
- if (method.IsManaged
- && method.IsIL
- && !method.IsStatic
- && !method.IsVirtual
- && !method.IsAbstract
- && !method.IsAddOn
- && !method.IsConstructor
- && !method.IsSpecialName
- && !method.IsGenericInstance
- && !method.HasOverrides)
- {
- method.IsVirtual = true;
- method.IsPublic = true;
- method.IsPrivate = false;
- method.IsNewSlot = true;
- method.IsHideBySig = true;
- }
- }
-
- foreach (var field in type.Fields)
- {
- if (field.IsPrivate) field.IsFamily = true;
- }
- }
-
- public bool IsVirtualized
- {
- get
- {
- var awakeMethods = _module.GetTypes().SelectMany(t => t.Methods.Where(m => m.Name == "Awake"));
- var methodDefinitions = awakeMethods as MethodDefinition[] ?? awakeMethods.ToArray();
- if (!methodDefinitions.Any()) return false;
-
- return ((float)methodDefinitions.Count(m => m.IsVirtual) / methodDefinitions.Count()) > 0.5f;
- }
- }
- }
-}
diff --git a/CollectDependencies/packages.config b/CollectDependencies/packages.config
deleted file mode 100644
index 0918e7d8..00000000
--- a/CollectDependencies/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/IPA.Injector/PostBuild.msbuild b/IPA.Injector/PostBuild.msbuild
index 930720a6..c2c0aa8d 100644
--- a/IPA.Injector/PostBuild.msbuild
+++ b/IPA.Injector/PostBuild.msbuild
@@ -5,8 +5,7 @@
-
-
+
@@ -30,9 +29,7 @@
-
-
\ No newline at end of file
diff --git a/MSBuildTasks/AssemblyRenameTask.cs b/MSBuildTasks/AssemblyRenameTask.cs
deleted file mode 100644
index ad002073..00000000
--- a/MSBuildTasks/AssemblyRenameTask.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-using Mono.Cecil;
-using System;
-using System.IO;
-
-namespace MSBuildTasks
-{
- public class AssemblyRename : Task
- {
-
- [Required]
- // ReSharper disable once UnusedAutoPropertyAccessor.Global
- public ITaskItem[] Assemblies { get; set; }
-
- public override bool Execute()
- {
- foreach (ITaskItem assembly in Assemblies)
- {
- // ItemSpec holds the filename or path of an Item
- if (assembly.ItemSpec.Length > 0)
- {
- if (!File.Exists(assembly.ItemSpec))
- {
- Log.LogMessage(MessageImportance.Normal, "No file at " + assembly.ItemSpec);
- continue;
- }
-
- if (Path.GetExtension(assembly.ItemSpec) != ".dll")
- {
- Log.LogMessage(MessageImportance.Normal, assembly.ItemSpec + " not a DLL");
- continue;
- }
-
- try
- {
- Log.LogMessage(MessageImportance.Normal, "Reading " + assembly.ItemSpec);
- var module = ModuleDefinition.ReadModule(assembly.ItemSpec);
- var asmName = module.Assembly.Name;
- var name = asmName.Name;
- var version = asmName.Version;
- var newFilen = $"{name}.{version}.dll";
- var newFilePath = Path.Combine(Path.GetDirectoryName(assembly.ItemSpec) ?? throw new InvalidOperationException(), newFilen);
-
- module.Dispose();
-
- Log.LogMessage(MessageImportance.Normal, $"Old file: {assembly.ItemSpec}, new file: {newFilePath}");
-
- if (File.Exists(newFilePath))
- File.Delete(newFilePath);
-
- Log.LogMessage(MessageImportance.Normal, "Moving");
- try
- {
- File.Move(assembly.ItemSpec, newFilePath);
- }
- catch (Exception)
- {
- File.Copy(assembly.ItemSpec, newFilePath);
- File.Delete(assembly.ItemSpec);
- }
- }
- catch (Exception e)
- {
- Log.LogErrorFromException(e);
- }
- }
- }
-
- return !Log.HasLoggedErrors;
- }
- }
-}
diff --git a/MSBuildTasks/MSBuildTasks.csproj b/MSBuildTasks/MSBuildTasks.csproj
deleted file mode 100644
index 18f0caca..00000000
--- a/MSBuildTasks/MSBuildTasks.csproj
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {F08C3C7A-3221-432E-BAB8-32BCE58408C8}
- Library
- Properties
- MSBuildTasks
- MSBuildTasks
- v4.6
- 512
-
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- true
-
-
-
- ..\packages\Microsoft.Build.Framework.15.9.20\lib\net46\Microsoft.Build.Framework.dll
-
-
- ..\packages\Microsoft.Build.Utilities.Core.15.9.20\lib\net46\Microsoft.Build.Utilities.Core.dll
-
-
- ..\packages\Microsoft.VisualStudio.Setup.Configuration.Interop.1.16.30\lib\net35\Microsoft.VisualStudio.Setup.Configuration.Interop.dll
- True
-
-
- ..\packages\Mono.Cecil.0.10.3\lib\net40\Mono.Cecil.dll
-
-
- ..\packages\Mono.Cecil.0.10.3\lib\net40\Mono.Cecil.Mdb.dll
-
-
- ..\packages\Mono.Cecil.0.10.3\lib\net40\Mono.Cecil.Pdb.dll
-
-
- ..\packages\Mono.Cecil.0.10.3\lib\net40\Mono.Cecil.Rocks.dll
-
-
-
- ..\packages\System.Collections.Immutable.1.5.0\lib\netstandard1.3\System.Collections.Immutable.dll
-
-
-
-
- ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
- True
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/MSBuildTasks/Pdb2Mdb.cs b/MSBuildTasks/Pdb2Mdb.cs
deleted file mode 100644
index ca99642e..00000000
--- a/MSBuildTasks/Pdb2Mdb.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using System;
-using System.IO;
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-
-namespace MSBuildTasks
-{
- public class PdbToMdb : Task
- {
-
- [Required]
- // ReSharper disable once UnusedAutoPropertyAccessor.Global
- public ITaskItem[] Binaries { get; set; }
-
- public override bool Execute()
- {
- //var readerProvider = new PdbReaderProvider();
- //var writerProvider = new MdbWriterProvider();
-
- foreach (ITaskItem dll in Binaries)
- {
- // ItemSpec holds the filename or path of an Item
- if (dll.ItemSpec.Length > 0)
- {
- if (!File.Exists(dll.ItemSpec))
- {
- Log.LogMessage(MessageImportance.Normal, "No file at " + dll.ItemSpec);
- continue;
- }
-
- if (Path.GetExtension(dll.ItemSpec) != ".dll" && Path.GetExtension(dll.ItemSpec) != ".pdb")
- {
- Log.LogMessage(MessageImportance.Normal, dll.ItemSpec + " not a DLL or PDB");
- continue;
- }
-
- try
- {
- /*Log.LogMessage(MessageImportance.Normal, "Processing PDB for " + dll.ItemSpec);
- var path = Path.ChangeExtension(dll.ItemSpec, ".dll");
- var module = ModuleDefinition.ReadModule(path);
- var reader = readerProvider.GetSymbolReader(module, path);
- var writer = writerProvider.GetSymbolWriter(module, path);
-
- foreach (var type in module.Types)
- foreach (var method in type.Methods)
- {
- var read = reader.Read(method);
- if (read == null) Log.LogWarning($"Method {module.FileName} -> {method.FullName} read from PDB as null");
- else writer.Write(read);
- }
-
- writer.Dispose();
- reader.Dispose();
- module.Dispose();*/
- var path = Path.ChangeExtension(dll.ItemSpec, ".dll");
- Log.LogMessage(MessageImportance.Normal, "Processing PDB for " + path);
-
- /*Process.Start(new ProcessStartInfo
- {
- WorkingDirectory = Path.GetDirectoryName(path) ?? throw new InvalidOperationException(),
- FileName = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase) ?? throw new InvalidOperationException(), "pdb2mdb.exe"),
- Arguments = Path.GetFileName(path)
- });*/
-
- //Pdb2Mdb.Converter.Convert(path);
- }
- catch (Exception e)
- {
- Log.LogErrorFromException(e);
- Log.LogError(e.ToString());
- }
- }
- }
-
- return !Log.HasLoggedErrors;
- }
- }
-}
\ No newline at end of file
diff --git a/MSBuildTasks/Properties/AssemblyInfo.cs b/MSBuildTasks/Properties/AssemblyInfo.cs
deleted file mode 100644
index 74f94c1c..00000000
--- a/MSBuildTasks/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-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("MSBuildTasks")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("MSBuildTasks")]
-[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("f08c3c7a-3221-432e-bab8-32bce58408c8")]
-
-// 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")]
diff --git a/MSBuildTasks/packages.config b/MSBuildTasks/packages.config
deleted file mode 100644
index 774987b9..00000000
--- a/MSBuildTasks/packages.config
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Refs/UnityEngine.CoreModule.dll b/Refs/UnityEngine.CoreModule.dll
index 2d47355a..860de28d 100644
Binary files a/Refs/UnityEngine.CoreModule.dll and b/Refs/UnityEngine.CoreModule.dll differ
diff --git a/Refs/refs.txt b/Refs/refs.txt
index f79922cf..f34bab9f 100644
--- a/Refs/refs.txt
+++ b/Refs/refs.txt
@@ -1,4 +1,4 @@
-::from ../bsinstalldir.txt
+::from ./bsinstalldir.txt
"Beat Saber_Data/
""Managed/
"""UnityEngine.