From 4c42a6e5b03b72309e64e482c0652ae66a131ebb Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 11 Apr 2020 17:26:07 +0200 Subject: [PATCH] allow changing the library folder name --- GameBundle/Options.cs | 4 +++- GameBundle/Program.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/GameBundle/Options.cs b/GameBundle/Options.cs index ca2c041..0b11e6e 100644 --- a/GameBundle/Options.cs +++ b/GameBundle/Options.cs @@ -18,7 +18,7 @@ namespace GameBundle { [Option('m', "mac", HelpText = "Bundle for mac")] public bool BuildMac { get; set; } - [Option('e', "exclude", Default = new[] {"openal", "oal", "sdl2", "SDL2"}, HelpText = "Files like unmanaged libraries that should not be moved to the /Lib folder")] + [Option('e', "exclude", Default = new[] {"openal", "oal", "sdl2", "SDL2"}, HelpText = "Files like unmanaged libraries that should not be moved to the library folder")] public string[] ExcludedFiles { get; set; } [Option("32-bit", HelpText = "Publish for 32 bit instead of 64 bit. Note that this is only possible on Windows")] public bool Publish32Bit { get; set; } @@ -26,6 +26,8 @@ namespace GameBundle { public bool NoTrim { get; set; } [Option('c', "config", Default = "Release", HelpText = "The build configuration to use")] public string BuildConfig { get; set; } + [Option("lib-name", Default = "Lib", HelpText = "The name of the library folder that is created")] + public string LibFolder { get; set; } } } \ No newline at end of file diff --git a/GameBundle/Program.cs b/GameBundle/Program.cs index 76dcf9b..ac7f128 100644 --- a/GameBundle/Program.cs +++ b/GameBundle/Program.cs @@ -51,7 +51,7 @@ namespace GameBundle { if (options.ExcludedFiles.Length > 0) excludes = '"' + string.Join(";", options.ExcludedFiles) + '"'; var log = options.Verbose ? "Detail" : "Error"; - RunProcess(options, "ncbeauty", $"--loglevel={log} --force=True {path} Lib {excludes}"); + RunProcess(options, "ncbeauty", $"--loglevel={log} --force=True {path} {options.LibFolder} {excludes}"); // Remove the beauty file since it's just a marker var beautyFile = new FileInfo(Path.Combine(path, "NetCoreBeauty"));