AppModel: Silent build option
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Aron.Weiler;
|
using Aron.Weiler;
|
||||||
using Il2CppInspector.Cpp;
|
using Il2CppInspector.Cpp;
|
||||||
@@ -117,7 +118,12 @@ namespace Il2CppInspector.Model
|
|||||||
// The C++ compiler used to actually build the original IL2CPP binary will always be guessed based on the binary file format
|
// The C++ compiler used to actually build the original IL2CPP binary will always be guessed based on the binary file format
|
||||||
// (via the constructor of CppDeclarationGenerator, in InheritanceStyle)
|
// (via the constructor of CppDeclarationGenerator, in InheritanceStyle)
|
||||||
// If no target C++ compiler is specified, it will be set to match the one assumed to have been used to compile the binary
|
// If no target C++ compiler is specified, it will be set to match the one assumed to have been used to compile the binary
|
||||||
public AppModel Build(UnityVersion unityVersion = null, CppCompilerType compiler = CppCompilerType.BinaryFormat) {
|
public AppModel Build(UnityVersion unityVersion = null, CppCompilerType compiler = CppCompilerType.BinaryFormat, bool silent = false) {
|
||||||
|
// Silent operation if requested
|
||||||
|
var stdout = Console.Out;
|
||||||
|
if (silent)
|
||||||
|
Console.SetOut(new StreamWriter(Stream.Null));
|
||||||
|
|
||||||
// Reset in case this is not the first build
|
// Reset in case this is not the first build
|
||||||
Methods.Clear();
|
Methods.Clear();
|
||||||
Types.Clear();
|
Types.Clear();
|
||||||
@@ -243,6 +249,9 @@ namespace Il2CppInspector.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Restore stdout
|
||||||
|
Console.SetOut(stdout);
|
||||||
|
|
||||||
// This is to allow this method to be chained after a new expression
|
// This is to allow this method to be chained after a new expression
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user