CLI/Output: Add option to create Visual Studio solution (.sln) (no project files yet)

This commit is contained in:
Katy Coe
2020-01-19 04:03:14 +01:00
parent f71e065968
commit b4ab0036f0
5 changed files with 322 additions and 1 deletions

View File

@@ -56,6 +56,9 @@ namespace Il2CppInspector
[Option("separate-attributes", Required = false, HelpText = "Place assembly-level attributes in their own AssemblyInfo.cs files. Only used when layout is per-assembly or tree")]
public bool SeparateAssemblyAttributesFiles { get; set; }
[Option('j', "project", Required = false, HelpText = "Create a Visual Studio solution and projects. Implies --layout tree, --must-compile and --separate-attributes")]
public bool CreateSolution { get; set; }
}
// Adapted from: https://stackoverflow.com/questions/16376191/measuring-code-execution-time
@@ -130,6 +133,11 @@ namespace Il2CppInspector
else
csOut += imageSuffix;
if (options.CreateSolution) {
writer.WriteSolution(csOut);
continue;
}
switch (options.LayoutSchema.ToLower(), options.SortOrder.ToLower()) {
case ("single", "index"):
writer.WriteSingleFile(csOut, t => t.Index);