Skip to content

Commit

Permalink
Print banner only on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
commonuserlol committed Jul 10, 2024
1 parent 87766f6 commit 9855aa3
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions Il2CppInspector.CLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,18 @@ private static int DisplayHelp(ParserResult<Options> result, IEnumerable<Error>
}

private static int Run(Options options) {

// Banner
var location = Assembly.GetEntryAssembly().Location;
if (location == "") // Single file executables don't have an assembly location
location = Path.Join(AppContext.BaseDirectory, "Il2CppInspector.exe");

var asmInfo = FileVersionInfo.GetVersionInfo(location);
Console.WriteLine(asmInfo.ProductName);
Console.WriteLine("Version " + asmInfo.ProductVersion);
Console.WriteLine(asmInfo.LegalCopyright);
Console.WriteLine("");
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
// Banner
var location = Assembly.GetEntryAssembly().Location;
if (location == "") // Single file executables don't have an assembly location
location = Path.Join(AppContext.BaseDirectory, "Il2CppInspector.exe");

var asmInfo = FileVersionInfo.GetVersionInfo(location);
Console.WriteLine(asmInfo.ProductName);
Console.WriteLine("Version " + asmInfo.ProductVersion);
Console.WriteLine(asmInfo.LegalCopyright);
Console.WriteLine("");
}

// Safe plugin manager load
try {
Expand Down

0 comments on commit 9855aa3

Please sign in to comment.