mirror of
https://github.com/Ellpeck/GameBundle.git
synced 2024-11-23 08:58:34 +01:00
Compare commits
No commits in common. "cfae3353e8c5e62aca2b7e618df5af7691b5d8b7" and "d7282c256b5acd78ff3e778f50f0f1977e0c2aa9" have entirely different histories.
cfae3353e8
...
d7282c256b
7 changed files with 42 additions and 20 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<RollForward>Major</RollForward>
|
<RollForward>Major</RollForward>
|
||||||
|
|
||||||
<Authors>Ellpeck</Authors>
|
<Authors>Ellpeck</Authors>
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<PackageIcon>Logo.png</PackageIcon>
|
<PackageIcon>Logo.png</PackageIcon>
|
||||||
<PackAsTool>true</PackAsTool>
|
<PackAsTool>true</PackAsTool>
|
||||||
<ToolCommandName>gamebundle</ToolCommandName>
|
<ToolCommandName>gamebundle</ToolCommandName>
|
||||||
<VersionPrefix>1.6.0</VersionPrefix>
|
<VersionPrefix>1.5.4</VersionPrefix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -52,8 +52,6 @@ public class Options {
|
||||||
public bool SkipLib { get; set; }
|
public bool SkipLib { get; set; }
|
||||||
[Option('e', "exclude", HelpText = "Files that should not be moved to the library folder")]
|
[Option('e', "exclude", HelpText = "Files that should not be moved to the library folder")]
|
||||||
public IEnumerable<string> ExcludedFiles { get; set; }
|
public IEnumerable<string> ExcludedFiles { get; set; }
|
||||||
[Option("mg", HelpText = "Exclude MonoGame's native libraries from being moved to the library folder, which is a requirement for DesktopGL version 3.8.2.1105 or later. This has the same behavior as supplying the --exclude arguments soft_oal.dll, SDL2.dll, libopenal.so.1, libSDL2-2.0.so.0, libopenal.1.dylib and libSDL2.dylib")]
|
|
||||||
public bool MonoGameExclusions { get; set; }
|
|
||||||
[Option("lib-name", Default = "Lib", HelpText = "The name of the library folder that is created")]
|
[Option("lib-name", Default = "Lib", HelpText = "The name of the library folder that is created")]
|
||||||
public string LibFolder { get; set; }
|
public string LibFolder { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ using System.IO;
|
||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.IO.Enumeration;
|
using System.IO.Enumeration;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using CommandLine;
|
using CommandLine;
|
||||||
|
|
||||||
namespace GameBundle;
|
namespace GameBundle;
|
||||||
|
@ -67,12 +68,9 @@ internal static class Program {
|
||||||
|
|
||||||
// Run beauty
|
// Run beauty
|
||||||
if (!options.SkipLib && !config.SkipLib) {
|
if (!options.SkipLib && !config.SkipLib) {
|
||||||
var exclude = options.ExcludedFiles.ToList();
|
var excludes = $"\"{string.Join(";", options.ExcludedFiles)}\"";
|
||||||
if (options.MonoGameExclusions)
|
|
||||||
exclude.AddRange(["soft_oal.dll", "SDL2.dll", "libopenal.so.1", "libSDL2-2.0.so.0", "libopenal.1.dylib", "libSDL2.dylib"]);
|
|
||||||
var excludeString = exclude.Count > 0 ? $"\"{string.Join(";", exclude)}\"" : "";
|
|
||||||
var log = options.Verbose ? "Detail" : "Error";
|
var log = options.Verbose ? "Detail" : "Error";
|
||||||
var beautyResult = Program.RunProcess(options, "dotnet", $"ncbeauty --loglevel={log} --force=True --noflag=True \"{buildDir.FullName}\" \"{options.LibFolder}\" {excludeString}", AppDomain.CurrentDomain.BaseDirectory);
|
var beautyResult = Program.RunProcess(options, "dotnet", $"ncbeauty --loglevel={log} --force=True --noflag=True \"{buildDir.FullName}\" \"{options.LibFolder}\" {excludes}", AppDomain.CurrentDomain.BaseDirectory);
|
||||||
if (beautyResult != 0)
|
if (beautyResult != 0)
|
||||||
return beautyResult;
|
return beautyResult;
|
||||||
}
|
}
|
||||||
|
|
30
Jenkinsfile
vendored
Normal file
30
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
stages {
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh 'dotnet build **/GameBundle.csproj'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Pack') {
|
||||||
|
steps {
|
||||||
|
sh 'find . -type f -name "*.nupkg" -delete'
|
||||||
|
sh 'dotnet pack **/GameBundle.csproj --version-suffix ${BUILD_NUMBER}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Publish') {
|
||||||
|
when {
|
||||||
|
branch 'main'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'dotnet nuget push -s http://localhost:5000/v3/index.json **/*.nupkg -k $BAGET -n'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
BAGET = credentials('3db850d0-e6b5-43d5-b607-d180f4eab676')
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,9 +17,6 @@ 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.
|
||||||
|
|
||||||
## Building a MonoGame Project
|
|
||||||
If you're building a MonoGame project using MonoGame's DesktopGL version 3.8.2.1105 or later, you can additionally supply the `--mg` argument to automatically exclude MonoGame's native libraries from being moved into the `Lib` subdirectory, which is a requirement for your game to run.
|
|
||||||
|
|
||||||
# Configuring
|
# Configuring
|
||||||
GameBundle takes several optional arguments to modify the way it works. To see a list of all possible arguments, simply run
|
GameBundle takes several optional arguments to modify the way it works. To see a list of all possible arguments, simply run
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
dotnet build ../GameBundle/GameBundle.csproj
|
|
||||||
rmdir /S /Q "bin/Bundled"
|
rmdir /S /Q "bin/Bundled"
|
||||||
"../GameBundle/bin/Debug/net8.0/GameBundle.exe" -wlmWL -bnV --mg -s Test.csproj -o bin/Bundled -v --mac-bundle-ignore macmain.txt -N beta
|
"../GameBundle/bin/Debug/net6.0/GameBundle.exe" -wlmWL -bznV -s Test.csproj -o bin/Bundled -v --mac-bundle-ignore macmain.txt -N beta
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<PublishReadyToRun>false</PublishReadyToRun>
|
<PublishReadyToRun>false</PublishReadyToRun>
|
||||||
<TieredCompilation>false</TieredCompilation>
|
<TieredCompilation>false</TieredCompilation>
|
||||||
<AssemblyName>Test Project</AssemblyName>
|
<AssemblyName>Test Project</AssemblyName>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<PackageReference Include="Contentless" Version="2.0.*" />
|
<PackageReference Include="Contentless" Version="2.0.*" />
|
||||||
<PackageReference Include="MLEM.Startup" Version="3.2.*" />
|
<PackageReference Include="MLEM.Startup" Version="3.2.*" />
|
||||||
<PackageReference Include="MonoGame.Content.Builder" Version="3.7.*" />
|
<PackageReference Include="MonoGame.Content.Builder" Version="3.7.*" />
|
||||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.2.1105" />
|
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
Loading…
Reference in a new issue