Merge branch 'dotnet_ver_check' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-dotnet_ver_check

This commit is contained in:
Wojtek Figat
2025-04-12 22:25:28 +02:00
8 changed files with 18 additions and 15 deletions

View File

@@ -7,7 +7,7 @@ pushd
echo Performing the full package... echo Performing the full package...
rem Run the build tool. rem Run the build tool.
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -deployPlatforms -dotnet=8 -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %* call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -deployPlatforms -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
if errorlevel 1 goto BuildToolFailed if errorlevel 1 goto BuildToolFailed
popd popd

View File

@@ -7,7 +7,7 @@ pushd
echo Building and packaging Flax Editor... echo Building and packaging Flax Editor...
rem Run the build tool. rem Run the build tool.
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -dotnet=8 -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %* call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
if errorlevel 1 goto BuildToolFailed if errorlevel 1 goto BuildToolFailed
popd popd

View File

@@ -9,4 +9,4 @@ echo Building and packaging Flax Editor...
cd "`dirname "$0"`" cd "`dirname "$0"`"
# Run Flax.Build (also pass the arguments) # Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Mac/CallBuildTool.sh --deploy --deployEditor --dotnet=8 --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@" bash ./Development/Scripts/Mac/CallBuildTool.sh --deploy --deployEditor --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"

View File

@@ -9,4 +9,4 @@ echo Building and packaging Flax Editor...
cd "`dirname "$0"`" cd "`dirname "$0"`"
# Run Flax.Build (also pass the arguments) # Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployEditor --dotnet=8 --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@" bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployEditor --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"

View File

@@ -7,7 +7,7 @@ pushd
echo Building and packaging platforms data... echo Building and packaging platforms data...
rem Run the build tool. rem Run the build tool.
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployPlatforms -dotnet=8 -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %* call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployPlatforms -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
if errorlevel 1 goto BuildToolFailed if errorlevel 1 goto BuildToolFailed
popd popd

View File

@@ -9,4 +9,4 @@ echo Building and packaging platforms data...
cd "`dirname "$0"`" cd "`dirname "$0"`"
# Run Flax.Build (also pass the arguments) # Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Mac/CallBuildTool.sh --deploy --deployPlatforms --dotnet=8 --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@" bash ./Development/Scripts/Mac/CallBuildTool.sh --deploy --deployPlatforms --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"

View File

@@ -9,4 +9,4 @@ echo Building and packaging platforms data...
cd "`dirname "$0"`" cd "`dirname "$0"`"
# Run Flax.Build (also pass the arguments) # Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployPlatforms --dotnet=8 --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@" bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployPlatforms --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"

View File

@@ -211,13 +211,16 @@ namespace Flax.Build
rid = $"win-{arch}"; rid = $"win-{arch}";
ridFallback = ""; ridFallback = "";
#pragma warning disable CA1416 #pragma warning disable CA1416
using RegistryKey baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64); if (string.IsNullOrEmpty(dotnetPath))
using RegistryKey sdkVersionsKey = baseKey.OpenSubKey($@"SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\{arch}\sdk"); {
using RegistryKey runtimeKey = baseKey.OpenSubKey(@$"SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\{arch}\sharedfx\Microsoft.NETCore.App"); using RegistryKey baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
using RegistryKey hostKey = baseKey.OpenSubKey(@$"SOFTWARE\dotnet\Setup\InstalledVersions\{arch}\sharedhost"); using RegistryKey sdkVersionsKey = baseKey.OpenSubKey($@"SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\{arch}\sdk");
dotnetPath = (string)hostKey.GetValue("Path"); using RegistryKey runtimeKey = baseKey.OpenSubKey(@$"SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\{arch}\sharedfx\Microsoft.NETCore.App");
dotnetSdkVersions = sdkVersionsKey.GetValueNames(); using RegistryKey hostKey = baseKey.OpenSubKey(@$"SOFTWARE\dotnet\Setup\InstalledVersions\{arch}\sharedhost");
dotnetRuntimeVersions = runtimeKey.GetValueNames(); dotnetPath = (string)hostKey.GetValue("Path");
dotnetSdkVersions = sdkVersionsKey.GetValueNames();
dotnetRuntimeVersions = runtimeKey.GetValueNames();
}
#pragma warning restore CA1416 #pragma warning restore CA1416
break; break;
} }
@@ -282,7 +285,7 @@ namespace Flax.Build
var dotnetSdkVersion = GetVersion(dotnetSdkVersions); var dotnetSdkVersion = GetVersion(dotnetSdkVersions);
var dotnetRuntimeVersion = GetVersion(dotnetRuntimeVersions); var dotnetRuntimeVersion = GetVersion(dotnetRuntimeVersions);
if (!string.IsNullOrEmpty(dotnetRuntimeVersion) && ParseVersion(dotnetRuntimeVersion).Major > ParseVersion(dotnetSdkVersion).Major) if (!string.IsNullOrEmpty(dotnetSdkVersion) && !string.IsNullOrEmpty(dotnetRuntimeVersion) && ParseVersion(dotnetRuntimeVersion).Major > ParseVersion(dotnetSdkVersion).Major)
{ {
// Make sure the reference assemblies are not newer than the SDK itself // Make sure the reference assemblies are not newer than the SDK itself
var dotnetRuntimeVersionsRemaining = dotnetRuntimeVersions; var dotnetRuntimeVersionsRemaining = dotnetRuntimeVersions;