Skip to content

Commit

Permalink
Add doxyfile and source generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Happyrobot33 committed Mar 18, 2024
1 parent a7f4e82 commit aa61468
Show file tree
Hide file tree
Showing 30 changed files with 3,439 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CodeCoverage/obj/Debug/net8.0/CodeCoverage.AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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+49d1b02eab5fbd5b859a585494fd8a18be82f7d7")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a7f4e82205602f95ced2520aabcfb0fa15c26db5")]
[assembly: System.Reflection.AssemblyProductAttribute("CodeCoverage")]
[assembly: System.Reflection.AssemblyTitleAttribute("CodeCoverage")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3b864596f80e27a1bd7e67d8ce2aad7c4c3b11008d3c60cbf56a9a8ec5f2ca18
a002e885b69a9b504296267292902ec659bb13b5c66bc638a9df8cf868606b2f
51 changes: 51 additions & 0 deletions SourceGenerator/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// import ICSharpCode.Decompiler
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml;

using ICSharpCode.Decompiler;
using ICSharpCode.Decompiler.CSharp;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;

public partial class Program
{
const string basePath = @"E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project";
static List<string> assemblys = new List<string>();

public static void Main(string[] args)
{
//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");

foreach(string assembly in assemblys)
{
var resolver = new UniversalAssemblyResolver(assembly, false, assembly);
resolver.AddSearchDirectory(Path.GetDirectoryName(assembly));

//load the solution
var decompiler = new CSharpDecompiler(assembly, resolver, new DecompilerSettings());

//we want to save the decompiled code to a file
string code = decompiler.DecompileWholeModuleAsString();

//save the code to a folder
string path = basePath + @"\DecompiledSource\" + Path.GetFileNameWithoutExtension(assembly) + ".cs";

//make sure folder exists
Directory.CreateDirectory(Path.GetDirectoryName(path));

File.WriteAllText(path, code);
}

//make a gitignore file
string gitignore = basePath + @"\DecompiledSource\.gitignore";
File.WriteAllText(gitignore, "*");
}
}
Binary file not shown.
77 changes: 77 additions & 0 deletions SourceGenerator/bin/Debug/net8.0/SourceGenerator.deps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"SourceGenerator/1.0.0": {
"dependencies": {
"ICSharpCode.Decompiler": "8.2.0.7535"
},
"runtime": {
"SourceGenerator.dll": {}
}
},
"ICSharpCode.Decompiler/8.2.0.7535": {
"dependencies": {
"System.Collections.Immutable": "6.0.0",
"System.Reflection.Metadata": "6.0.0"
},
"runtime": {
"lib/netstandard2.0/ICSharpCode.Decompiler.dll": {
"assemblyVersion": "8.2.0.7535",
"fileVersion": "8.2.0.7535"
}
}
},
"System.Collections.Immutable/6.0.0": {
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"System.Reflection.Metadata/6.0.0": {
"dependencies": {
"System.Collections.Immutable": "6.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {}
}
},
"libraries": {
"SourceGenerator/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"ICSharpCode.Decompiler/8.2.0.7535": {
"type": "package",
"serviceable": true,
"sha512": "sha512-y4vSHtXCoTNISvvlxcskz+Hiw1vqY0kQsu0loO6nOsWwwZ60IxaTygEFapN2SuSB3SiswGPv535y/bV70Fm8hw==",
"path": "icsharpcode.decompiler/8.2.0.7535",
"hashPath": "icsharpcode.decompiler.8.2.0.7535.nupkg.sha512"
},
"System.Collections.Immutable/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==",
"path": "system.collections.immutable/6.0.0",
"hashPath": "system.collections.immutable.6.0.0.nupkg.sha512"
},
"System.Reflection.Metadata/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-sffDOcex1C3HO5kDolOYcWXTwRpZY/LvJujM6SMjn63fWMJWchYAAmkoAJXlbpZ5yf4d+KMgxd+LeETa4gD9sQ==",
"path": "system.reflection.metadata/6.0.0",
"hashPath": "system.reflection.metadata.6.0.0.nupkg.sha512"
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
"path": "system.runtime.compilerservices.unsafe/6.0.0",
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
}
}
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"runtimeOptions": {
"tfm": "net8.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
22 changes: 22 additions & 0 deletions SourceGenerator/obj/Debug/net8.0/SourceGenerator.AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("SourceGenerator")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a7f4e82205602f95ced2520aabcfb0fa15c26db5")]
[assembly: System.Reflection.AssemblyProductAttribute("SourceGenerator")]
[assembly: System.Reflection.AssemblyTitleAttribute("SourceGenerator")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
54b0b0cfd353e6d4a89006a327d563ae4492a77fa8dcb6fd055f24d873c31b01
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net8.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = SourceGenerator
build_property.ProjectDir = E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;
Binary file not shown.
Binary file not shown.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9f16eb0d3daf6081a487fa61578715ebbe85b6e695f822c2e345173c41eb5d54
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\bin\Debug\net8.0\SourceGenerator.exe
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\bin\Debug\net8.0\SourceGenerator.deps.json
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\bin\Debug\net8.0\SourceGenerator.runtimeconfig.json
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\bin\Debug\net8.0\SourceGenerator.dll
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\bin\Debug\net8.0\SourceGenerator.pdb
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\bin\Debug\net8.0\ICSharpCode.Decompiler.dll
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\obj\Debug\net8.0\SourceGenerator.csproj.AssemblyReference.cache
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\obj\Debug\net8.0\SourceGenerator.GeneratedMSBuildEditorConfig.editorconfig
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\obj\Debug\net8.0\SourceGenerator.AssemblyInfoInputs.cache
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\obj\Debug\net8.0\SourceGenerator.AssemblyInfo.cs
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\obj\Debug\net8.0\SourceGenerator.csproj.CoreCompileInputs.cache
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\obj\Debug\net8.0\SourceGenerator.sourcelink.json
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\obj\Debug\net8.0\SourceGenerator.csproj.CopyComplete
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\obj\Debug\net8.0\SourceGenerator.dll
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\obj\Debug\net8.0\refint\SourceGenerator.dll
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\obj\Debug\net8.0\SourceGenerator.pdb
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\obj\Debug\net8.0\SourceGenerator.genruntimeconfig.cache
E:\Storage\Personal\Coding\VRChat\VRCSDK-Documentation-Project\SourceGenerator\obj\Debug\net8.0\ref\SourceGenerator.dll
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1b5e2df7e4d075c45f7364d963857ab785166e8833843e8a9412210ecc924904
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documents":{"E:\\Storage\\Personal\\Coding\\VRChat\\VRCSDK-Documentation-Project\\*":"https://raw.githubusercontent.com/Happyrobot33/VRCSDK-Documentation-Project/a7f4e82205602f95ced2520aabcfb0fa15c26db5/*"}}
Binary file added SourceGenerator/obj/Debug/net8.0/apphost.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
69 changes: 69 additions & 0 deletions SourceGenerator/obj/SourceGenerator.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"format": 1,
"restore": {
"E:\\Storage\\Personal\\Coding\\VRChat\\VRCSDK-Documentation-Project\\SourceGenerator\\SourceGenerator.csproj": {}
},
"projects": {
"E:\\Storage\\Personal\\Coding\\VRChat\\VRCSDK-Documentation-Project\\SourceGenerator\\SourceGenerator.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "E:\\Storage\\Personal\\Coding\\VRChat\\VRCSDK-Documentation-Project\\SourceGenerator\\SourceGenerator.csproj",
"projectName": "SourceGenerator",
"projectPath": "E:\\Storage\\Personal\\Coding\\VRChat\\VRCSDK-Documentation-Project\\SourceGenerator\\SourceGenerator.csproj",
"packagesPath": "C:\\Users\\Matthew\\.nuget\\packages\\",
"outputPath": "E:\\Storage\\Personal\\Coding\\VRChat\\VRCSDK-Documentation-Project\\SourceGenerator\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\Matthew\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net8.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net8.0": {
"targetAlias": "net8.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net8.0": {
"targetAlias": "net8.0",
"dependencies": {
"ICSharpCode.Decompiler": {
"target": "Package",
"version": "[8.2.0.7535, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.101/PortableRuntimeIdentifierGraph.json"
}
}
}
}
}
15 changes: 15 additions & 0 deletions SourceGenerator/obj/SourceGenerator.csproj.nuget.g.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Matthew\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.8.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\Matthew\.nuget\packages\" />
</ItemGroup>
</Project>
2 changes: 2 additions & 0 deletions SourceGenerator/obj/SourceGenerator.csproj.nuget.g.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
Loading

0 comments on commit aa61468

Please sign in to comment.