From 60b9813fe019bd0796a3ec0e4cf7fc14df4fc543 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 10 Apr 2020 12:48:10 +0200 Subject: [PATCH] invert windows, linux and mac parameters --- GameBundle/Options.cs | 12 ++++++------ GameBundle/Program.cs | 6 +++--- README.md | 4 ++-- Test/Bundle.bat | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/GameBundle/Options.cs b/GameBundle/Options.cs index 33475b4..ca2c041 100644 --- a/GameBundle/Options.cs +++ b/GameBundle/Options.cs @@ -11,12 +11,12 @@ namespace GameBundle { [Option('v', "verbose")] public bool Verbose { get; set; } - [Option('w', "no-win", HelpText = "Skip bundling for windows")] - public bool NoWindows { get; set; } - [Option('l', "no-linux", HelpText = "Skip bundling for linux")] - public bool NoLinux { get; set; } - [Option('m', "no-mac", HelpText = "Skip bundling for mac")] - public bool NoMac { get; set; } + [Option('w', "win", HelpText = "Bundle for windows")] + public bool BuildWindows { get; set; } + [Option('l', "linux", HelpText = "Bundle for linux")] + public bool BuildLinux { get; set; } + [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")] public string[] ExcludedFiles { get; set; } diff --git a/GameBundle/Program.cs b/GameBundle/Program.cs index c3bbd15..9adee5a 100644 --- a/GameBundle/Program.cs +++ b/GameBundle/Program.cs @@ -26,15 +26,15 @@ namespace GameBundle { if (!bundleDir.Exists) bundleDir.Create(); - if (!options.NoWindows) { + if (options.BuildWindows) { Console.WriteLine("Bundling for windows"); Publish(options, proj, $"{bundleDir}/win", options.Publish32Bit ? "win-x86" : "win-x64"); } - if (!options.NoLinux) { + if (options.BuildLinux) { Console.WriteLine("Bundling for linux"); Publish(options, proj, $"{bundleDir}/linux", "linux-x64"); } - if (!options.NoMac) { + if (options.BuildMac) { Console.WriteLine("Bundling for mac"); Publish(options, proj, $"{bundleDir}/mac", "osx-x64"); } diff --git a/README.md b/README.md index 6dcfd2e..d2ad2c1 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ dotnet tool install --global GameBundle # Using By default, GameBundle builds the `.csproj` file that it finds in the directory that it is run from. The bundled outputs go into `bin/Bundled` by default. -To build and bundle your app for Linux, Windows and Mac, all you have to do is run the following command from the directory that contains your project file: +To build and bundle your app for Windows, Linux and Mac, all you have to do is run the following command from the directory that contains your project file: ``` -gamebundle +gamebundle -wlm ``` GameBundle will then build a self-contained release of your application for each system using `dotnet publish` and clean up the output directory using [NetCoreBeauty](https://github.com/nulastudio/NetCoreBeauty) by moving most of the libraries into a `Lib` subdirectory. diff --git a/Test/Bundle.bat b/Test/Bundle.bat index 747e1f5..a89b754 100644 --- a/Test/Bundle.bat +++ b/Test/Bundle.bat @@ -1 +1 @@ -"../GameBundle/bin/Debug/netcoreapp3.1/GameBundle.exe" -s Test.csproj -o bin/Bundled -v \ No newline at end of file +"../GameBundle/bin/Debug/netcoreapp3.1/GameBundle.exe" -wlm -s Test.csproj -o bin/Bundled \ No newline at end of file