invert windows, linux and mac parameters

This commit is contained in:
Ellpeck 2020-04-10 12:48:10 +02:00
parent 754e662b54
commit 60b9813fe0
4 changed files with 12 additions and 12 deletions

View file

@ -11,12 +11,12 @@ namespace GameBundle {
[Option('v', "verbose")] [Option('v', "verbose")]
public bool Verbose { get; set; } public bool Verbose { get; set; }
[Option('w', "no-win", HelpText = "Skip bundling for windows")] [Option('w', "win", HelpText = "Bundle for windows")]
public bool NoWindows { get; set; } public bool BuildWindows { get; set; }
[Option('l', "no-linux", HelpText = "Skip bundling for linux")] [Option('l', "linux", HelpText = "Bundle for linux")]
public bool NoLinux { get; set; } public bool BuildLinux { get; set; }
[Option('m', "no-mac", HelpText = "Skip bundling for mac")] [Option('m', "mac", HelpText = "Bundle for mac")]
public bool NoMac { get; set; } 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 /Lib folder")]
public string[] ExcludedFiles { get; set; } public string[] ExcludedFiles { get; set; }

View file

@ -26,15 +26,15 @@ namespace GameBundle {
if (!bundleDir.Exists) if (!bundleDir.Exists)
bundleDir.Create(); bundleDir.Create();
if (!options.NoWindows) { if (options.BuildWindows) {
Console.WriteLine("Bundling for windows"); Console.WriteLine("Bundling for windows");
Publish(options, proj, $"{bundleDir}/win", options.Publish32Bit ? "win-x86" : "win-x64"); Publish(options, proj, $"{bundleDir}/win", options.Publish32Bit ? "win-x86" : "win-x64");
} }
if (!options.NoLinux) { if (options.BuildLinux) {
Console.WriteLine("Bundling for linux"); Console.WriteLine("Bundling for linux");
Publish(options, proj, $"{bundleDir}/linux", "linux-x64"); Publish(options, proj, $"{bundleDir}/linux", "linux-x64");
} }
if (!options.NoMac) { if (options.BuildMac) {
Console.WriteLine("Bundling for mac"); Console.WriteLine("Bundling for mac");
Publish(options, proj, $"{bundleDir}/mac", "osx-x64"); Publish(options, proj, $"{bundleDir}/mac", "osx-x64");
} }

View file

@ -10,9 +10,9 @@ dotnet tool install --global GameBundle
# Using # 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. 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. 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.

View file

@ -1 +1 @@
"../GameBundle/bin/Debug/netcoreapp3.1/GameBundle.exe" -s Test.csproj -o bin/Bundled -v "../GameBundle/bin/Debug/netcoreapp3.1/GameBundle.exe" -wlm -s Test.csproj -o bin/Bundled