From bdc7611c8101ccc1686dfa5bf9793ff3141ebf5c Mon Sep 17 00:00:00 2001 From: DaNike Date: Tue, 9 Oct 2018 23:24:30 -0500 Subject: [PATCH] Fixed up some build order stuff Started work on repository included dependencies --- .gitignore | 1 + IPA.Injector/IPA.Injector.csproj | 8 +++- IPA.Loader/IPA.Loader.csproj | 4 +- IPA/IPA.csproj | 27 ++++++++++--- Refs/grabo.py | 66 ++++++++++++++++++++++++++++++++ Refs/refs.txt | 6 +++ 6 files changed, 104 insertions(+), 8 deletions(-) create mode 100644 Refs/grabo.py create mode 100644 Refs/refs.txt diff --git a/.gitignore b/.gitignore index 988a2bcd..6e747cd3 100644 --- a/.gitignore +++ b/.gitignore @@ -251,3 +251,4 @@ paket-files/ .idea/ *.sln.iml /MigrationBackup/d2a2abe6/IPA.Injector +/bsinstalldir.txt diff --git a/IPA.Injector/IPA.Injector.csproj b/IPA.Injector/IPA.Injector.csproj index 8b93e097..108c1a41 100644 --- a/IPA.Injector/IPA.Injector.csproj +++ b/IPA.Injector/IPA.Injector.csproj @@ -47,7 +47,7 @@ False - ..\..\..\..\..\..\Game Library\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll + ..\..\..\..\..\..\GameLibrary\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll False @@ -67,6 +67,12 @@ {5ad344f0-01a0-4ca8-92e5-9d095737744d} IPA.Loader + + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + false + False + MSBuildTasks + diff --git a/IPA.Loader/IPA.Loader.csproj b/IPA.Loader/IPA.Loader.csproj index c3f99e1c..758cb3ce 100644 --- a/IPA.Loader/IPA.Loader.csproj +++ b/IPA.Loader/IPA.Loader.csproj @@ -47,11 +47,11 @@ - ..\..\..\..\..\..\Game Library\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll + ..\..\..\..\..\..\GameLibrary\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.CoreModule.dll False - ..\..\..\..\..\..\Game Library\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.UnityWebRequestModule.dll + ..\..\..\..\..\..\GameLibrary\Steam\steamapps\common\Beat Saber\Beat Saber_Data\Managed\UnityEngine.UnityWebRequestModule.dll False diff --git a/IPA/IPA.csproj b/IPA/IPA.csproj index 53957900..6a49b5a7 100644 --- a/IPA/IPA.csproj +++ b/IPA/IPA.csproj @@ -30,6 +30,7 @@ true true $(SolutionDir)=C:\ + $(Configuration) @@ -44,6 +45,7 @@ 4 false Debug + Release AnyCPU @@ -75,6 +77,7 @@ prompt MinimumRecommendedRules.ruleset Debug + Verbose_Release bin\Verbose_Release\ @@ -89,6 +92,20 @@ + + + {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942} + false + False + Doorstop + + + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + false + False + IPA.Injector + + @@ -138,15 +155,15 @@ - - + + - - - + + + diff --git a/Refs/grabo.py b/Refs/grabo.py new file mode 100644 index 00000000..6e3d0536 --- /dev/null +++ b/Refs/grabo.py @@ -0,0 +1,66 @@ +import os +import shutil + +def toFileList(text): + lines = text.splitlines() + files = [] + stack = [] + def push(val): + pre = '' + if len(stack) > 0: + pre = stack[-1] + stack.append(pre + val) + def pop(): + return stack.pop() + def replace(val): + val2 = pop() + push(val) + return val2 + + for line in lines: + spl = line.split('"'); + spath = spl[-1] + semis = len(spl[:-1]) + + if spath.startswith('::'): + spl = spath.split(' ') + cmd = spl[0][2:] + if cmd == 'from': # basically just import + content = '' + with open(' '.join(spl[1:]),'r') as f: + content = f.read() + spath = content + elif cmd == 'prompt': + spath = input(' '.join(spl[1:])) + else: + spath = '' + print("No such command", cmd) + + if semis > (len(stack)-1): + push(spath) + elif semis == (len(stack)-1): + files.append(replace(spath)) + elif semis < (len(stack)-1): + files.append(pop()) + while semis < (len(stack)): + pop() + push(spath) + files.append(pop()) + return files + +if __name__ == '__main__': + file = '' + with open("refs.txt","r") as f: + file = f.read() + + refs = toFileList(file) + + tgtDir = "target/" + shutil.rmtree(tgtDir, ignore_errors=True) + if not os.path.exists(tgtDir): + os.makedirs(tgtDir) + + for filename in refs: + if (os.path.isfile(filename)): + print("Copying",filename) + shutil.copy(filename, tgtDir) \ No newline at end of file diff --git a/Refs/refs.txt b/Refs/refs.txt new file mode 100644 index 00000000..4984b40e --- /dev/null +++ b/Refs/refs.txt @@ -0,0 +1,6 @@ +::from ../bsinstalldir.txt +"Beat Saber_Data/ +""Managed/ +"""UnityEngine. +""""UnityWebRequestModule.dll +""""CoreModule.dll \ No newline at end of file