mirror of
https://github.com/Ellpeck/GameBundle.git
synced 2024-11-05 01:39:10 +01:00
some updates, including readme and logo
This commit is contained in:
parent
3f92e7790e
commit
cc84aea7a7
5 changed files with 41 additions and 16 deletions
|
@ -10,6 +10,7 @@
|
|||
<PackageProjectUrl>https://github.com/Ellpeck/GameBundle</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/Ellpeck/GameBundle</RepositoryUrl>
|
||||
<PackageLicenseUrl>https://github.com/Ellpeck/GameBundle/blob/master/LICENSE</PackageLicenseUrl>
|
||||
<PackageIconUrl>https://raw.githubusercontent.com/Ellpeck/GameBundle/master/Logo.png</PackageIconUrl>
|
||||
<PackAsTool>true</PackAsTool>
|
||||
<ToolCommandName>gamebundle</ToolCommandName>
|
||||
<VersionPrefix>0.0.1</VersionPrefix>
|
||||
|
|
|
@ -8,22 +8,24 @@ namespace GameBundle {
|
|||
public string SourceFile { get; set; }
|
||||
[Option('o', "output", Default = "bin/Bundled", HelpText = "The location of the directory that the bundles should be stored in")]
|
||||
public string OutputDirectory { get; set; }
|
||||
[Option('v', "verbose", Default = false)]
|
||||
[Option('v', "verbose")]
|
||||
public bool Verbose { get; set; }
|
||||
|
||||
[Option('w', "win", Default = true, HelpText = "Bundle for windows")]
|
||||
public bool BundleWindows { get; set; }
|
||||
[Option('l', "linux", Default = true, HelpText = "Bundle for linux")]
|
||||
public bool BundleLinux { get; set; }
|
||||
[Option('m', "mac", Default = true, HelpText = "Bundle for mac")]
|
||||
public bool BundleMac { 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('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; }
|
||||
[Option("32bit", Default = false, HelpText = "Publish for 32 bit instead of 64 bit. Note that this is only possible on Windows")]
|
||||
[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; }
|
||||
[Option("trim", Default = true, HelpText = "Trim the application when publishing")]
|
||||
public bool Trim { get; set; }
|
||||
[Option('t', "no-trim", HelpText = "Skip trimming the application when publishing")]
|
||||
public bool NoTrim { get; set; }
|
||||
[Option('c', "config", Default = "Release", HelpText = "The build configuration to use")]
|
||||
public string BuildConfig { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -26,15 +26,15 @@ namespace GameBundle {
|
|||
if (!bundleDir.Exists)
|
||||
bundleDir.Create();
|
||||
|
||||
if (options.BundleWindows) {
|
||||
if (!options.NoWindows) {
|
||||
Console.WriteLine("Bundling for windows");
|
||||
Publish(options, proj, $"{bundleDir}/win", options.Publish32Bit ? "win-x86" : "win-x64");
|
||||
}
|
||||
if (options.BundleLinux) {
|
||||
if (!options.NoLinux) {
|
||||
Console.WriteLine("Bundling for linux");
|
||||
Publish(options, proj, $"{bundleDir}/linux", "linux-x64");
|
||||
}
|
||||
if (options.BundleMac) {
|
||||
if (!options.NoMac) {
|
||||
Console.WriteLine("Bundling for mac");
|
||||
Publish(options, proj, $"{bundleDir}/mac", "osx-x64");
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ namespace GameBundle {
|
|||
}
|
||||
|
||||
private static void Publish(Options options, FileInfo proj, string path, string rid) {
|
||||
RunProcess(options, "dotnet", $"publish {proj.FullName} -o {path} -r {rid} /p:PublishTrimmed={options.Trim}");
|
||||
RunProcess(options, "dotnet", $"publish {proj.FullName} -o {path} -r {rid} -c {options.BuildConfig} /p:PublishTrimmed={!options.NoTrim}");
|
||||
|
||||
// Run beauty
|
||||
var excludes = string.Empty;
|
||||
|
|
BIN
Logo.png
Normal file
BIN
Logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.4 KiB |
26
README.md
26
README.md
|
@ -1,2 +1,24 @@
|
|||
# GameBundle
|
||||
A tool to package MonoGame and other .NET Core applications into several distributable formats
|
||||
<img src="Logo.png" width="25%" >
|
||||
|
||||
**GameBundle** is a tool to package MonoGame and other .NET Core applications into several distributable formats.
|
||||
|
||||
# Installing
|
||||
GameBundle is a `dotnet` tool, meaning you can install it very easily like so:
|
||||
```
|
||||
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:
|
||||
```
|
||||
gamebundle
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
# Configuring
|
||||
GameBundle takes several optional arguments to modify the way it works. To see a list of all possible arguments, simply run
|
||||
```
|
||||
gamebundle --help
|
||||
```
|
Loading…
Reference in a new issue