Skip to content

Commit

Permalink
First attempt at adding FRB web to automated builds
Browse files Browse the repository at this point in the history
Retired FRB Desktop GL .NET 4.X from automated builds.
Modified updating template nugets to assume all engines have nugets.
  • Loading branch information
vchelaru committed Jul 23, 2024
1 parent 290d6fb commit 8b54ec4
Show file tree
Hide file tree
Showing 8 changed files with 138 additions and 102 deletions.
35 changes: 30 additions & 5 deletions .github/workflows/Engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,31 @@ jobs:
if: ${{ github.event.inputs.IsBeta == 'false' }}
run: .\FlatRedBall\FRBDK\BuildServerUploader\BuildServerUploaderConsole\bin\x86\Debug\BuildServerUploaderConsole.exe changeengineversion

## -----------------------------------------------------------------------------------------------------
- name: Build FlatRedBall Web Debug
run: dotnet build -c Debug 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.Kni.Web.sln'
- name: Package FlatRedBall Web
uses: actions/upload-artifact@v3
with:
name: WebKniNet8Debug
path: FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.Kni.Web\bin\Debug\net8.0\
- name: Publish NuGet package Web .NET 8
run: |
$files = Get-ChildItem -Path 'FlatRedBall\Engines\FlatRedBallXNA\KniWeb\bin\Debug\*.nupkg'
foreach ($file in $files) {
dotnet nuget push $file.FullName --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json
}
- name: Build FlatRedBall Web Release
run: dotnet build -c Release 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.Kni.Web.sln'
## We don't (yet?) publish any release nuget packages, but we do this in preparation for this in the future
- name: Package FlatRedBall Web
uses: actions/upload-artifact@v3
with:
name: WebKniNet8Release
path: FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.Kni.Web\bin\Release\net8.0-ios\

## -----------------------------------------------------------------------------------------------------
- name: Build FlatRedBall iOS .NET 8 Debug
run: dotnet build -c Debug 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.iOS.Net8.sln'
- name: Package FlatRedBall iOS .NET 8
Expand All @@ -68,8 +92,7 @@ jobs:
$files = Get-ChildItem -Path 'FlatRedBall\Engines\FlatRedBallXNA\FlatRedBalliOS\bin\Debug\*.nupkg'
foreach ($file in $files) {
dotnet nuget push $file.FullName --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json
}
}
- name: Build FlatRedBall iOS .NET 8 Release
run: dotnet build -c Release 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.iOS.Net8.sln'
Expand All @@ -80,7 +103,7 @@ jobs:
name: iOSMonoGameNet8Release
path: FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.iOSMonoGame\bin\Release\net8.0-ios\


## -----------------------------------------------------------------------------------------------------
- name: Build FlatRedBall Android .NET 8 Debug
run: dotnet build -c Debug 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.Android.Net8.sln'
- name: Package FlatRedBall Android .NET 8
Expand All @@ -106,7 +129,7 @@ jobs:




## -----------------------------------------------------------------------------------------------------
- name: Build FlatRedBall FNA .NET 7 Debug
run: dotnet build -c Debug 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.FNA.sln'
- name: Package FlatRedBall FNA .NET 7
Expand All @@ -130,7 +153,7 @@ jobs:
name: DesktopGlFnaNet7Release
path: FlatRedBall/Engines/Forms/FlatRedBall.Forms/FlatRedBall.Forms.FNA/bin/Release/net7.0/


## -----------------------------------------------------------------------------------------------------
- name: Build FlatRedBall DesktopGL .NET 6 Debug
run: dotnet build -c Debug 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.DesktopGLNet6.sln'
- name: Package FlatRedBall .NET 6
Expand All @@ -154,6 +177,8 @@ jobs:
name: DesktopGlNet6Release
path: FlatRedBall/Engines/Forms/FlatRedBall.Forms/FlatRedBall.Forms.DesktopGlNet6/bin/Release/net6.0/


## ## -----------------------------------------------------------------------------------------------------
- name: Build FlatRedBall .NET 4 Debug
if: ${{ github.event.inputs.IsBeta == 'false' }}
run: dotnet build -c Debug 'FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.DesktopGL.sln'
Expand Down
6 changes: 3 additions & 3 deletions Engines/FlatRedBallXNA/FlatRedBall/Content/ContentManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ public T LoadFromFile<T>(string assetName)

else if (typeof(T) == typeof(SoundEffect))
{
SoundEffect soundEffect;
SoundEffect soundEffect = null;

var modifiedAssetName = (assetName.StartsWith(@".\") || assetName.StartsWith(@"./")
? assetName.Substring(2)
Expand All @@ -745,10 +745,10 @@ public T LoadFromFile<T>(string assetName)
#if WEB
using var stream = FileManager.GetStreamForFile(assetName);
soundEffect = SoundEffect.FromStream(stream);
#else
#elif NET6_0_OR_GREATER
soundEffect = SoundEffect.FromFile(assetName);

Check failure on line 749 in Engines/FlatRedBallXNA/FlatRedBall/Content/ContentManager.cs

View workflow job for this annotation

GitHub Actions / build

'SoundEffect' does not contain a definition for 'FromFile'

Check failure on line 749 in Engines/FlatRedBallXNA/FlatRedBall/Content/ContentManager.cs

View workflow job for this annotation

GitHub Actions / build

'SoundEffect' does not contain a definition for 'FromFile'
#endif
loadedAsset = soundEffect;
loadedAsset = soundEffect;
}

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<DefineConstants>TRACE;MONOGAME; DESKTOP_GL; XNA4; FRB_XNA;MONOGAME_381;</DefineConstants>
<Title>FlatRedBall (.NET 6 Desktop GL)</Title>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Description>FlatRedBall Game Engine</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Version>1.0.0</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

</PropertyGroup>
<Import Project="..\FlatRedBall\FlatRedBallShared.projitems" Label="Shared" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<DefineConstants>TRACE;MONOGAME; DESKTOP_GL; XNA4; FRB_XNA;MONOGAME_381;</DefineConstants>
<Title>FlatRedBall (.NET 6 Desktop GL)</Title>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Description>FlatRedBall Game Engine</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Version>1.0.0</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<ItemGroup>
<PackageReference Include="AsepriteDotNet" Version="1.8.1" />
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
</ItemGroup>
</PropertyGroup>
<Import Project="..\FlatRedBall\FlatRedBallShared.projitems" Label="Shared" />

<ItemGroup>
<PackageReference Include="AsepriteDotNet" Version="1.8.1" />
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "GumCoreShared", "..\..\..\.
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "GumCoreShared.FlatRedBall", "..\..\..\FRBDK\Glue\GumPlugin\GumPlugin\GumCoreShared.FlatRedBall.shproj", "{0EE8A96C-A754-453D-9E65-19A24E9A5E76}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{BC14B675-58ED-4DA5-AF45-BB68A3F9643A}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "StateInterpolationShared", "..\..\..\FRBDK\Glue\StateInterpolationPlugin\StateInterpolationPlugin\StateInterpolationShared.shproj", "{D00D287D-385B-42FB-BF5F-04401E7D37D0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FlatRedBallDesktopGLNet6", "..\..\FlatRedBallXNA\FlatRedBallDesktopGLNet6\FlatRedBallDesktopGLNet6.csproj", "{15F82BA6-F685-4408-B25E-3EBE3388B82E}"
Expand Down Expand Up @@ -119,9 +117,6 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{15F82BA6-F685-4408-B25E-3EBE3388B82E} = {BC14B675-58ED-4DA5-AF45-BB68A3F9643A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {81B3E152-73E4-4A3A-88E7-78634E4F25C4}
EndGlobalSection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@
<Compile Include="Data\EngineFileData.cs" />
<Compile Include="Processes\AddRunFlatRedBallBatch.cs" />
<Compile Include="Processes\BuildGlue.cs" />
<Compile Include="Processes\InjectFnaNugetAndVersion.cs" />
<Compile Include="Processes\PublishGlue.cs" />
<Compile Include="Processes\TraceResults.cs" />
<Compile Include="Processes\ZipGum.cs" />
Expand Down
104 changes: 79 additions & 25 deletions FRBDK/BuildServerUploader/BuildServerUploaderConsole/Data/AllData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,44 +206,44 @@ static AllData()
Engines.Add(engine);
}

// Desktop GL
{
var engine = new EngineData();
engine.Name = "MonoGame DesktopGL .NET 4.X";
// Desktop GL Retired July 2024 (for August 2024 release)
//{
// var engine = new EngineData();
// engine.Name = "MonoGame DesktopGL .NET 4.X";

engine.RelativeToLibrariesDebugFolder = @"DesktopGl\Debug";
engine.RelativeToLibrariesReleaseFolder = @"DesktopGl\Release";
engine.TemplateCsProjFolder = @"FlatRedBallDesktopGlTemplate\FlatRedBallDesktopGlTemplate\";
// engine.RelativeToLibrariesDebugFolder = @"DesktopGl\Debug";
// engine.RelativeToLibrariesReleaseFolder = @"DesktopGl\Release";
// engine.TemplateCsProjFolder = @"FlatRedBallDesktopGlTemplate\FlatRedBallDesktopGlTemplate\";

engine.DebugFiles.Add(@"FlatRedBall\Engines\FlatRedBallXNA\FlatRedBall\bin\DesktopGL\Debug\FlatRedBallDesktopGL.dll");
engine.DebugFiles.Add(@"FlatRedBall\Engines\FlatRedBallXNA\FlatRedBall\bin\DesktopGL\Debug\FlatRedBallDesktopGL.pdb");
// engine.DebugFiles.Add(@"FlatRedBall\Engines\FlatRedBallXNA\FlatRedBall\bin\DesktopGL\Debug\FlatRedBallDesktopGL.dll");
// engine.DebugFiles.Add(@"FlatRedBall\Engines\FlatRedBallXNA\FlatRedBall\bin\DesktopGL\Debug\FlatRedBallDesktopGL.pdb");

engine.DebugFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\StateInterpolation\bin\DesktopGL\Debug\StateInterpolation.dll");
engine.DebugFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\StateInterpolation\bin\DesktopGL\Debug\StateInterpolation.pdb");
// engine.DebugFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\StateInterpolation\bin\DesktopGL\Debug\StateInterpolation.dll");
// engine.DebugFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\StateInterpolation\bin\DesktopGL\Debug\StateInterpolation.pdb");

engine.DebugFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Debug\FlatRedBall.Forms.dll");
engine.DebugFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Debug\FlatRedBall.Forms.pdb");
// engine.DebugFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Debug\FlatRedBall.Forms.dll");
// engine.DebugFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Debug\FlatRedBall.Forms.pdb");

engine.DebugFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Debug\GumCoreXnaPc.dll");
engine.DebugFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Debug\GumCoreXnaPc.pdb");
// engine.DebugFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Debug\GumCoreXnaPc.dll");
// engine.DebugFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Debug\GumCoreXnaPc.pdb");


engine.ReleaseFiles.Add(@"FlatRedBall\Engines\FlatRedBallXNA\FlatRedBall\bin\DesktopGL\Release\FlatRedBallDesktopGL.dll");
engine.ReleaseFiles.Add(@"FlatRedBall\Engines\FlatRedBallXNA\FlatRedBall\bin\DesktopGL\Release\FlatRedBallDesktopGL.pdb");
// engine.ReleaseFiles.Add(@"FlatRedBall\Engines\FlatRedBallXNA\FlatRedBall\bin\DesktopGL\Release\FlatRedBallDesktopGL.dll");
// engine.ReleaseFiles.Add(@"FlatRedBall\Engines\FlatRedBallXNA\FlatRedBall\bin\DesktopGL\Release\FlatRedBallDesktopGL.pdb");

engine.ReleaseFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\StateInterpolation\bin\DesktopGL\Release\StateInterpolation.dll");
engine.ReleaseFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\StateInterpolation\bin\DesktopGL\Release\StateInterpolation.pdb");
// engine.ReleaseFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\StateInterpolation\bin\DesktopGL\Release\StateInterpolation.dll");
// engine.ReleaseFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\StateInterpolation\bin\DesktopGL\Release\StateInterpolation.pdb");

engine.ReleaseFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Release\FlatRedBall.Forms.dll");
engine.ReleaseFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Release\FlatRedBall.Forms.pdb");
// engine.ReleaseFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Release\FlatRedBall.Forms.dll");
// engine.ReleaseFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Release\FlatRedBall.Forms.pdb");

engine.ReleaseFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Release\GumCoreXnaPc.dll");
engine.ReleaseFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Release\GumCoreXnaPc.pdb");
// engine.ReleaseFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Release\GumCoreXnaPc.dll");
// engine.ReleaseFiles.Add(@"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms\bin\DesktopGL\Release\GumCoreXnaPc.pdb");


Engines.Add(engine);
// Engines.Add(engine);

}
//}

// Desktop GL Net 6
{
Expand Down Expand Up @@ -351,6 +351,60 @@ static AllData()
Engines.Add(engine);
}

// Web
{
var engine = new EngineData();
engine.Name = "Web";

engine.EngineCSProjLocation = @"FlatRedBall\Engines\FlatRedBallXNA\KniWeb\FlatRedBallKniWeb.csproj";

engine.RelativeToLibrariesDebugFolder = @"Web\Debug";
engine.RelativeToLibrariesReleaseFolder = @"Web\Release";

engine.TemplateCsProjFolder = @"FlatRedBallWebTemplate\FlatRedBallWebTemplate\";

var debugBinFolder = @"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.Kni.Web\bin\Debug\net8.0\";
var releaseBinFolder = @"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.Kni.Web\bin\Debug\net8.0\";

engine.DebugFiles.Add($"{debugBinFolder}FlatRedBall.Forms.Kni.Web.deps.json");
engine.DebugFiles.Add($"{debugBinFolder}FlatRedBall.Forms.Kni.Web.dll");
engine.DebugFiles.Add($"{debugBinFolder}FlatRedBall.Forms.Kni.Web.pdb");
engine.DebugFiles.Add($"{debugBinFolder}FlatRedBall.Forms.Kni.Web.xml");

engine.DebugFiles.Add($"{debugBinFolder}FlatRedBallKniWeb.dll");
engine.DebugFiles.Add($"{debugBinFolder}FlatRedBallKniWeb.pdb");
engine.DebugFiles.Add($"{debugBinFolder}FlatRedBallKniWeb.xml");

engine.DebugFiles.Add($"{debugBinFolder}GumCore.Kni.Web.dll");
engine.DebugFiles.Add($"{debugBinFolder}GumCore.Kni.Web.pdb");
engine.DebugFiles.Add($"{debugBinFolder}GumCore.Kni.Web.xml");

engine.DebugFiles.Add($"{debugBinFolder}StateInterpolation.Kni.Web.dll");
engine.DebugFiles.Add($"{debugBinFolder}StateInterpolation.Kni.Web.pdb");
engine.DebugFiles.Add($"{debugBinFolder}StateInterpolation.Kni.Web.xml");

///

engine.ReleaseFiles.Add($"{releaseBinFolder}FlatRedBall.Forms.Kni.Web.deps.json");
engine.ReleaseFiles.Add($"{releaseBinFolder}FlatRedBall.Forms.Kni.Web.dll");
engine.ReleaseFiles.Add($"{releaseBinFolder}FlatRedBall.Forms.Kni.Web.pdb");
engine.ReleaseFiles.Add($"{releaseBinFolder}FlatRedBall.Forms.Kni.Web.xml");

engine.ReleaseFiles.Add($"{releaseBinFolder}FlatRedBallKniWeb.dll");
engine.ReleaseFiles.Add($"{releaseBinFolder}FlatRedBallKniWeb.pdb");
engine.ReleaseFiles.Add($"{releaseBinFolder}FlatRedBallKniWeb.xml");

engine.ReleaseFiles.Add($"{releaseBinFolder}GumCore.Kni.Web.dll");
engine.ReleaseFiles.Add($"{releaseBinFolder}GumCore.Kni.Web.pdb");
engine.ReleaseFiles.Add($"{releaseBinFolder}GumCore.Kni.Web.xml");

engine.ReleaseFiles.Add($"{releaseBinFolder}StateInterpolation.Kni.Web.dll");
engine.ReleaseFiles.Add($"{releaseBinFolder}StateInterpolation.Kni.Web.pdb");
engine.ReleaseFiles.Add($"{releaseBinFolder}StateInterpolation.Kni.Web.xml");

Engines.Add(engine);
}

}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,18 @@ public override void ExecuteStep()

private void UpdateTemplateNugets()
{
UpdateTemplateNuget("FlatRedBallDesktopGLNet6", "FlatRedBallDesktopGLNet6Template");

UpdateTemplateNuget("FlatRedBall.FNA", "FlatRedBallDesktopFnaTemplate");
foreach(var engine in AllData.Engines)
{
var templateName = FileManager.RemovePath(engine.TemplateCsProjFolder);
if(templateName.EndsWith("\\"))
{
templateName = templateName.Substring(0, templateName.Length - 1);
}

UpdateTemplateNuget("FlatRedBallAndroid", "FlatRedBallAndroidMonoGameTemplate");
var strippedEngineName = FileManager.RemoveExtension( FileManager.RemovePath(engine.EngineCSProjLocation));

UpdateTemplateNuget("FlatRedBalliOS", "FlatRedBalliOSMonoGameTemplate");
UpdateTemplateNuget(strippedEngineName, templateName);
}
}

private void UpdateTemplateNuget(string engineName, string templateName)
Expand Down

0 comments on commit 8b54ec4

Please sign in to comment.