Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
Expand Down Expand Up @@ -94,10 +94,10 @@
<ItemGroup>
<PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="SSH.NET" Version="2024.2.0" />
<PackageReference Include="System.Formats.Asn1" Version="8.0.2" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.2" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Processes\Constants.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,60 @@ static AllData()
Engines.Add(engine);

}
// FNA Desktop
// Desktop GL Net 9
{
var engine = new EngineData();
engine.Name = "MonoGame DesktopGL .NET 9.0+";

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

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

// This is the built folder when building FlatRedBall.Forms sln
// All files below (DebugFiles and ReleaseFiles) should be contained
// in that output folder because the project should reference those files
var debugBinFolder = @"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.DesktopGlNet6\bin\Debug\net8.0\";
var releaseBinFolder = @"FlatRedBall\Engines\Forms\FlatRedBall.Forms\FlatRedBall.Forms.DesktopGlNet6\bin\Release\net8.0\";


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

engine.DebugFiles.Add($"{debugBinFolder}StateInterpolation.DesktopNet6.dll");
engine.DebugFiles.Add($"{debugBinFolder}StateInterpolation.DesktopNet6.pdb");

engine.DebugFiles.Add($"{debugBinFolder}FlatRedBall.Forms.DesktopGlNet6.dll");
engine.DebugFiles.Add($"{debugBinFolder}FlatRedBall.Forms.DesktopGlNet6.pdb");

engine.DebugFiles.Add($"{debugBinFolder}GumCore.DesktopGlNet6.dll");
engine.DebugFiles.Add($"{debugBinFolder}GumCore.DesktopGlNet6.pdb");

engine.DebugFiles.Add($@"Gum\SvgPlugin\SkiaInGumShared\bin\Debug\net8.0\SkiaInGum.dll");
engine.DebugFiles.Add($@"Gum\SvgPlugin\SkiaInGumShared\bin\Debug\net8.0\SkiaInGum.pdb");


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

engine.ReleaseFiles.Add($"{releaseBinFolder}StateInterpolation.DesktopNet6.dll");
engine.ReleaseFiles.Add($"{releaseBinFolder}StateInterpolation.DesktopNet6.pdb");

engine.ReleaseFiles.Add($"{releaseBinFolder}FlatRedBall.Forms.DesktopGlNet6.dll");
engine.ReleaseFiles.Add($"{releaseBinFolder}FlatRedBall.Forms.DesktopGlNet6.pdb");

engine.ReleaseFiles.Add($"{releaseBinFolder}GumCore.DesktopGlNet6.dll");
engine.ReleaseFiles.Add($"{releaseBinFolder}GumCore.DesktopGlNet6.pdb");

engine.ReleaseFiles.Add($@"Gum\SvgPlugin\SkiaInGumShared\bin\Release\net8.0\SkiaInGum.dll");
engine.ReleaseFiles.Add($@"Gum\SvgPlugin\SkiaInGumShared\bin\Release\net8.0\SkiaInGum.pdb");


Engines.Add(engine);

}
// FNA Desktop (.net 7)
{
var engine = new EngineData();
engine.Name = "FNA DesktopGL .NET 7.0";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,17 @@ private void UpdateTemplateNugets()

var strippedEngineName = FileManager.RemoveExtension( FileManager.RemovePath(engine.EngineCSProjLocation));

UpdateTemplateNuget(strippedEngineName, templateName);
UpdateTemplateNuget(strippedEngineName, templateName, engine);
}
}

private void UpdateTemplateNuget(string engineName, string templateName)
private void UpdateTemplateNuget(string engineName, string templateName, EngineData engine)
{
var matchingEngine = AllData.Engines.First(item => item.EngineCSProjLocation?.Contains($"{engineName}.csproj") == true);
var templateLocation = matchingEngine.TemplateCsProjFolder + templateName + ".csproj";
ModifyNugetVersionInAssembly(DirectoryHelper.TemplateDirectory + templateLocation, engineName, GetVersionString(IsBeta));
var templateLocation = engine.TemplateCsProjFolder + templateName + ".csproj";

var fullTemplateCsprojLocation = DirectoryHelper.TemplateDirectory + templateLocation;

ModifyNugetVersionInAssembly(fullTemplateCsprojLocation, engineName, GetVersionString(IsBeta));
}

private static void ModifyAssemblyInfoVersion(string assemblyInfoLocation, string versionString)
Expand Down Expand Up @@ -165,23 +167,23 @@ private static void ModifyCsprojAssemblyInfoVersion(string csprojLocation, strin

}

private void ModifyNugetVersionInAssembly(string csprojLocation, string packageName, string versionString)
private void ModifyNugetVersionInAssembly(string templateCsprojLocation, string packageName, string versionString)
{
if (System.IO.File.Exists(csprojLocation) == false)
if (System.IO.File.Exists(templateCsprojLocation) == false)
{
throw new ArgumentException($"Could not find file {csprojLocation}");
throw new ArgumentException($"Could not find file {templateCsprojLocation}");
}

string csprojText = FileManager.FromFileText(csprojLocation);
string csprojText = FileManager.FromFileText(templateCsprojLocation);

csprojText = System.Text.RegularExpressions.Regex.Replace(csprojText,
$"<PackageReference Include=\"{packageName}\" Version=\"[0-9]*.[0-9]*.[0-9]*.[0-9]*\" />",
$"<PackageReference Include=\"{packageName}\" Version=\"{versionString}\" />");

Results.WriteMessage("Modified " + csprojLocation + $" to have FlatRedBall Nuget package {versionString}");
Results.WriteMessage("Modified " + templateCsprojLocation + $" to have FlatRedBall Nuget package {versionString}");


FileManager.SaveText(csprojText, csprojLocation);
FileManager.SaveText(csprojText, templateCsprojLocation);
}

}
Expand Down
6 changes: 5 additions & 1 deletion FRBDK/Glue/GlueCommon/SaveClasses/GlueProjectSave.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,15 @@ public enum GluxVersions

// March 9, 2025
AudioManagerStopSongTakesBool = 63,
// Also December 27, 2024
GraphicalUiElementRemoveFromManagersIsVirtual = 63,

// Feburary 2, but added as a version on May 19, 2025
GumVisualHasRenderTarget = 64,
// Added around April 4, 2025, so adding this as the same version:
GumNineSliceHasAnimate = 64
GumNineSliceHasAnimate = 64,
// and also March 15, 2025
ObsoleteGumDimensionUnitTypes = 64,

// Stop! If adding an entry here, modify SyntaxVersionAttribute on FlatRedBallServices
// and LatestVersion down below
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -930,10 +930,13 @@ internal string GetAddToManagersFunc(IElement glueElement, NamedObjectSave named

private void GenerateRemoveFromManagers(ElementSave elementSave, ICodeBlock classBlock)
{
var method = classBlock.Function("public override void", "RemoveFromManagers");
if(GlueState.Self.CurrentGlueProject.FileVersion >= (int)GluxVersions.GraphicalUiElementRemoveFromManagersIsVirtual)
{
var method = classBlock.Function("public override void", "RemoveFromManagers");

method.Line("StopAnimations();");
method.Line("base.RemoveFromManagers();");
method.Line("StopAnimations();");
method.Line("base.RemoveFromManagers();");
}
}


Expand Down Expand Up @@ -1199,13 +1202,16 @@ private void AdjustEnumerationVariableValue(Gum.DataTypes.Variables.VariableSave
}
else if(variableSave.Type == "Gum.DataTypes.DimensionUnitType" || variableSave.Type == "DimensionUnitType")
{
if(variableValue == "Percentage")
{
variableValue = "PercentageOfParent";
}
else if(variableValue == "RelativeToContainer")
if(GlueState.Self.CurrentGlueProject.FileVersion >= (int)GluxVersions.ObsoleteGumDimensionUnitTypes)
{
variableValue = "RelativeToParent";
if(variableValue == "Percentage")
{
variableValue = "PercentageOfParent";
}
else if(variableValue == "RelativeToContainer")
{
variableValue = "RelativeToParent";
}
}
}

Expand Down
19 changes: 14 additions & 5 deletions FRBDK/Glue/NpcWpfLib/Data/EmptyTemplates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@ static class EmptyTemplates

static EmptyTemplates()
{
Add("Desktop GL .NET 8 (Windows, Mac, Linux) - MonoGame", "FlatRedBallDesktopGlNet6Template", "http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallDesktopGlNet6Template.zip");
Add("Android .NET (Phone, Tablet, Fire TV) - MonoGame", "FlatRedBallAndroidMonoGameTemplate", "http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallAndroidMonoGameTemplate.zip");
Add("iOS .NET (iPhone, iPad, iPod Touch) - MonoGame", "FlatRedBalliOSMonoGameTemplate", "http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBalliOSMonoGameTemplate.zip");
Add("Web (Browsers) - Kni", "FlatRedBallWebTemplate", "https://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallWebTemplate.zip");
Add("FNA .NET 7 (Windows, Mac, Linux)", "FlatRedBallDesktopFnaTemplate", "http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallDesktopFnaTemplate.zip");
Add("Desktop GL .NET 9 (Windows, Mac, Linux) - MonoGame", "FlatRedBallDesktopGlMonoGameTemplate",
"http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallDesktopGlMonoGameTemplate.zip");

Add("Android .NET (Phone, Tablet, Fire TV) - MonoGame", "FlatRedBallAndroidMonoGameTemplate",
"http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallAndroidMonoGameTemplate.zip");

Add("iOS .NET (iPhone, iPad, iPod Touch) - MonoGame", "FlatRedBalliOSMonoGameTemplate",
"http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBalliOSMonoGameTemplate.zip");

Add("Web (Browsers) - Kni", "FlatRedBallWebTemplate",
"https://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallWebTemplate.zip");

Add("FNA .NET 7 (Windows, Mac, Linux)", "FlatRedBallDesktopFnaTemplate",
"http://files.flatredball.com/content/FrbXnaTemplates/DailyBuild/ZippedTemplates/FlatRedBallDesktopFnaTemplate.zip");

Projects.Add(new AddNewLocalProjectOption());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ public partial class Game1 : Microsoft.Xna.Framework.Game
public Game1() : base()
{
graphics = new GraphicsDeviceManager(this);

// HiDef is required for web, but proably for all other platforms too, so let's set it
// outside of any #if's
graphics.GraphicsProfile = GraphicsProfile.HiDef;
#if ANDROID || IOS
graphics.IsFullScreen = true;
#elif WINDOWS || DESKTOP_GL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ public partial class Game1 : Microsoft.Xna.Framework.Game
public Game1() : base()
{
graphics = new GraphicsDeviceManager(this);

// HiDef is required for web, but proably for all other platforms too, so let's set it
// outside of any #if's
graphics.GraphicsProfile = GraphicsProfile.HiDef;
#if ANDROID || IOS
graphics.IsFullScreen = true;
#elif WINDOWS || DESKTOP_GL
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32519.379
MinimumVisualStudioVersion = 17.2.32519.379
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlatRedBallDesktopGlMonoGameTemplate", "FlatRedBallDesktopGlMonoGameTemplate\FlatRedBallDesktopGlMonoGameTemplate.csproj", "{D7079294-70C6-4204-B29E-C505EC181815}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D7079294-70C6-4204-B29E-C505EC181815}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D7079294-70C6-4204-B29E-C505EC181815}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7079294-70C6-4204-B29E-C505EC181815}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7079294-70C6-4204-B29E-C505EC181815}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {19F0E96B-A930-4730-AD7A-3E93D29343B5}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.1.303",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.1.303",
"commands": [
"mgcb-editor-mac"
]
}
}
}
Loading
Loading