Improve Dotnet version setup for Game Cooker

Especially after #3371 change to not passing dotnet 8 when packaging engine so editor can use the one use at compile time.
This commit is contained in:
Wojtek Figat
2025-04-13 20:22:23 +02:00
parent 85ecbaab6d
commit f70ec896b8
2 changed files with 21 additions and 5 deletions

View File

@@ -12,17 +12,21 @@
class GameCooker;
class PlatformTools;
// Range of dotnet runtime versions
#ifndef GAME_BUILD_DOTNET_RUNTIME_MIN_VER
#define GAME_BUILD_DOTNET_RUNTIME_MIN_VER 8
#endif
#ifndef GAME_BUILD_DOTNET_RUNTIME_MAX_VER
#define GAME_BUILD_DOTNET_RUNTIME_MAX_VER 9
#endif
#if OFFICIAL_BUILD
// Use the fixed .NET SDK version in packaged builds for compatibility (FlaxGame is precompiled with it)
#define GAME_BUILD_DOTNET_VER TEXT("-dotnet=8")
#define GAME_BUILD_DOTNET_VER TEXT("-dotnet=" MACRO_TO_STR(GAME_BUILD_DOTNET_RUNTIME_MIN_VER))
#else
#define GAME_BUILD_DOTNET_VER TEXT("")
#endif
// Range of dotnet runtime versions
#define GAME_BUILD_DOTNET_RUNTIME_MIN_VER 8
#define GAME_BUILD_DOTNET_RUNTIME_MAX_VER 9
/// <summary>
/// Game building options. Used as flags.
/// </summary>