diff --git a/CodeCoverage/Program.cs b/CodeCoverage/Program.cs index 6a53798..b5ee8b9 100644 --- a/CodeCoverage/Program.cs +++ b/CodeCoverage/Program.cs @@ -19,9 +19,10 @@ public partial class Program const string blue = "\x1b[34m"; const string reset = "\x1b[39m"; - static string basePath = @"E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project"; + //static string basePath = @"E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project"; static List assemblys = new List(); - //static string testAssemblyPath = basePath + @"\Packages\com.vrchat.base\Runtime\VRCSDK\Plugins\VRCSDKBase.dll"; + //static string testAssemblyPath = workingDirectory + @"\Packages\com.vrchat.base\Runtime\VRCSDK\Plugins\VRCSDKBase.dll"; + static string workingDirectory = Environment.CurrentDirectory; static string XMLPath = @"\Packages\com.happyrobot33.vrcsdkdocumentation\Editor\Documentation"; @@ -43,17 +44,15 @@ public static void Main(string[] args) //clear the terminal Console.Clear(); - //try to make a basepath - string workingDirectory = Environment.CurrentDirectory; //check if we can see the Packages folder - if(!Directory.Exists(basePath + @"\Packages")) + Console.WriteLine("Initial Working Directory: " + workingDirectory); + if(!Directory.Exists(workingDirectory + @"\Packages")) { //if we cant, then we are in the wrong directory, so go up a few directories - basePath = Directory.GetParent(workingDirectory).Parent.Parent.Parent.Parent.FullName; + workingDirectory = Directory.GetParent(workingDirectory).Parent.Parent.Parent.FullName; } - Console.WriteLine("Working Directory: " + projectDirectory); - basePath = projectDirectory; - XMLPath = basePath + XMLPath; + Console.WriteLine("Working Directory: " + workingDirectory); + XMLPath = workingDirectory + XMLPath; //populate the namespace blacklist namespaceBlacklist.Add("VRC.SDKBase.Validation.*"); @@ -139,11 +138,11 @@ public static void Main(string[] args) #endregion //load assemblys - assemblys.Add(basePath + @"\Packages\com.vrchat.base\Runtime\VRCSDK\Plugins\VRCSDKBase.dll"); - assemblys.Add(basePath + @"\Packages\com.vrchat.base\Runtime\VRCSDK\Plugins\VRCSDKBase-Editor.dll"); - assemblys.Add(basePath + @"\Packages\com.vrchat.worlds\Runtime\VRCSDK\Plugins\VRCSDK3.dll"); - assemblys.Add(basePath + @"\Packages\com.vrchat.worlds\Runtime\VRCSDK\Plugins\VRCSDK3-Editor.dll"); - //assemblys.Add(basePath + @"\Packages\com.vrchat.worlds\Runtime\Udon\External\VRC.Udon.Common.dll"); + assemblys.Add(workingDirectory + @"\Packages\com.vrchat.base\Runtime\VRCSDK\Plugins\VRCSDKBase.dll"); + assemblys.Add(workingDirectory + @"\Packages\com.vrchat.base\Runtime\VRCSDK\Plugins\VRCSDKBase-Editor.dll"); + assemblys.Add(workingDirectory + @"\Packages\com.vrchat.worlds\Runtime\VRCSDK\Plugins\VRCSDK3.dll"); + assemblys.Add(workingDirectory + @"\Packages\com.vrchat.worlds\Runtime\VRCSDK\Plugins\VRCSDK3-Editor.dll"); + //assemblys.Add(workingDirectory + @"\Packages\com.vrchat.worlds\Runtime\Udon\External\VRC.Udon.Common.dll"); //generate the source code for documentation purposes GenerateSourceCode(); @@ -309,9 +308,9 @@ private static void BlankDocGen(List assemblyData, string Console.WriteLine(string.Format("{0}Found {1} fields, {2} propertys, {3} methods, {4} events, {5} types to generate for {6}{7}", orange, fieldsGen.Count, propertysGen.Count, methodsGen.Count, eventsGen.Count, typesGen.Count, pathToGenerate, reset)); //generate a XML file next to where this is - //string xmlPath = basePath + @"\GeneratedXML\" + pathToGenerate + ".xml"; + //string xmlPath = workingDirectory + @"\GeneratedXML\" + pathToGenerate + ".xml"; //generate the name as just the class name - string xmlPath = basePath + @"\GeneratedXML\" + pathToGenerate.Split('.').Last() + ".xml"; + string xmlPath = workingDirectory + @"\GeneratedXML\" + pathToGenerate.Split('.').Last() + ".xml"; //make sure the folder exists Directory.CreateDirectory(Path.GetDirectoryName(xmlPath)); @@ -408,7 +407,7 @@ private static void GenerateSourceCode() Console.WriteLine("Generating source code..."); //clear the folder of previous C# files - string decompiledSourcePath = basePath + @"\DecompiledSource"; + string decompiledSourcePath = workingDirectory + @"\DecompiledSource"; if (Directory.Exists(decompiledSourcePath)) { Directory.Delete(decompiledSourcePath, true); @@ -426,7 +425,7 @@ private static void GenerateSourceCode() string code = decompiler.DecompileWholeModuleAsString(); //save the code to a folder - string path = basePath + @"\DecompiledSource\" + Path.GetFileNameWithoutExtension(assembly) + ".cs"; + string path = workingDirectory + @"\DecompiledSource\" + Path.GetFileNameWithoutExtension(assembly) + ".cs"; //make sure folder exists Directory.CreateDirectory(Path.GetDirectoryName(path)); @@ -435,7 +434,7 @@ private static void GenerateSourceCode() } //make a gitignore file - string gitignore = basePath + @"\DecompiledSource\.gitignore"; + string gitignore = workingDirectory + @"\DecompiledSource\.gitignore"; File.WriteAllText(gitignore, "*"); Console.WriteLine("Generated source code"); diff --git a/CodeCoverage/bin/Debug/net8.0/CodeCoverage.dll b/CodeCoverage/bin/Debug/net8.0/CodeCoverage.dll index 6661cc7..a4ac664 100644 Binary files a/CodeCoverage/bin/Debug/net8.0/CodeCoverage.dll and b/CodeCoverage/bin/Debug/net8.0/CodeCoverage.dll differ diff --git a/CodeCoverage/bin/Debug/net8.0/CodeCoverage.exe b/CodeCoverage/bin/Debug/net8.0/CodeCoverage.exe index 56fac08..b68af59 100644 Binary files a/CodeCoverage/bin/Debug/net8.0/CodeCoverage.exe and b/CodeCoverage/bin/Debug/net8.0/CodeCoverage.exe differ diff --git a/CodeCoverage/obj/Debug/net8.0/CodeCoverage.AssemblyInfo.cs b/CodeCoverage/obj/Debug/net8.0/CodeCoverage.AssemblyInfo.cs index 8554659..4c8b999 100644 --- a/CodeCoverage/obj/Debug/net8.0/CodeCoverage.AssemblyInfo.cs +++ b/CodeCoverage/obj/Debug/net8.0/CodeCoverage.AssemblyInfo.cs @@ -13,7 +13,7 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("CodeCoverage")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ccf1c3f825825cc43eaf05900ae8c4e963ef30b7")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a83cd29e4c6d5e46dbb32bf4cd6594cae534dc9f")] [assembly: System.Reflection.AssemblyProductAttribute("CodeCoverage")] [assembly: System.Reflection.AssemblyTitleAttribute("CodeCoverage")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/CodeCoverage/obj/Debug/net8.0/CodeCoverage.AssemblyInfoInputs.cache b/CodeCoverage/obj/Debug/net8.0/CodeCoverage.AssemblyInfoInputs.cache index 71d6ddf..119996b 100644 --- a/CodeCoverage/obj/Debug/net8.0/CodeCoverage.AssemblyInfoInputs.cache +++ b/CodeCoverage/obj/Debug/net8.0/CodeCoverage.AssemblyInfoInputs.cache @@ -1 +1 @@ -fd1bb6b085b11ef633969313b6203ebe27f918f1eca6a18bebc4864244a99ac6 +813f3527f016ecbac803d3d04e03564a386c600cbefe2369d933796180be245a diff --git a/CodeCoverage/obj/Debug/net8.0/CodeCoverage.dll b/CodeCoverage/obj/Debug/net8.0/CodeCoverage.dll index 6661cc7..a4ac664 100644 Binary files a/CodeCoverage/obj/Debug/net8.0/CodeCoverage.dll and b/CodeCoverage/obj/Debug/net8.0/CodeCoverage.dll differ diff --git a/CodeCoverage/obj/Debug/net8.0/CodeCoverage.sourcelink.json b/CodeCoverage/obj/Debug/net8.0/CodeCoverage.sourcelink.json index ec467b7..0c85865 100644 --- a/CodeCoverage/obj/Debug/net8.0/CodeCoverage.sourcelink.json +++ b/CodeCoverage/obj/Debug/net8.0/CodeCoverage.sourcelink.json @@ -1 +1 @@ -{"documents":{"C:\\Users\\mherber\\Documents\\VRCSDK-Documentation-Project\\*":"https://raw.githubusercontent.com/Happyrobot33/VRCSDK-Documentation-Project/ccf1c3f825825cc43eaf05900ae8c4e963ef30b7/*"}} \ No newline at end of file +{"documents":{"C:\\Users\\mherber\\Documents\\VRCSDK-Documentation-Project\\*":"https://raw.githubusercontent.com/Happyrobot33/VRCSDK-Documentation-Project/a83cd29e4c6d5e46dbb32bf4cd6594cae534dc9f/*"}} \ No newline at end of file diff --git a/CodeCoverage/obj/Debug/net8.0/apphost.exe b/CodeCoverage/obj/Debug/net8.0/apphost.exe index 56fac08..b68af59 100644 Binary files a/CodeCoverage/obj/Debug/net8.0/apphost.exe and b/CodeCoverage/obj/Debug/net8.0/apphost.exe differ diff --git a/CodeCoverage/obj/Debug/net8.0/ref/CodeCoverage.dll b/CodeCoverage/obj/Debug/net8.0/ref/CodeCoverage.dll index 03508eb..0cd3871 100644 Binary files a/CodeCoverage/obj/Debug/net8.0/ref/CodeCoverage.dll and b/CodeCoverage/obj/Debug/net8.0/ref/CodeCoverage.dll differ diff --git a/CodeCoverage/obj/Debug/net8.0/refint/CodeCoverage.dll b/CodeCoverage/obj/Debug/net8.0/refint/CodeCoverage.dll index 03508eb..0cd3871 100644 Binary files a/CodeCoverage/obj/Debug/net8.0/refint/CodeCoverage.dll and b/CodeCoverage/obj/Debug/net8.0/refint/CodeCoverage.dll differ