Skip to content

Commit

Permalink
[unreal]Read engine version from Build.version instead of folder name (
Browse files Browse the repository at this point in the history
…#1937) fix #1935

Read engine version from Build\Build.version instead of folder name
  • Loading branch information
zhaojunmeng authored Dec 4, 2024
1 parent 2bd39b7 commit 0ed1019
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
<PropertyGroup>


<EngineVersion >$([System.Text.RegularExpressions.Regex]::Match($(EngineDir), "\d+.\d+"))</EngineVersion >
<TargetFramework Condition="$([MSBuild]::VersionGreaterThanOrEquals($(EngineVersion), '5.5'))">net8.0</TargetFramework>
<TargetFramework Condition="$([MSBuild]::VersionLessThan($(EngineVersion), '5.5'))">net6.0</TargetFramework>
<EngineVersionText >$([System.IO.File]::ReadAllText("$(EngineDir)\Build\Build.version"))</EngineVersionText >
<EngineVersionMajorText >$([System.Text.RegularExpressions.Regex]::Match($(EngineVersionText), "MajorVersion.*\d+"))</EngineVersionMajorText >
<EngineVersionMajor >$([System.Text.RegularExpressions.Regex]::Match($(EngineVersionMajorText), "\d+"))</EngineVersionMajor >
<EngineVersionMinorText >$([System.Text.RegularExpressions.Regex]::Match($(EngineVersionText), "MinorVersion.*\d+"))</EngineVersionMinorText >
<EngineVersionMinor >$([System.Text.RegularExpressions.Regex]::Match($(EngineVersionMinorText), "\d+"))</EngineVersionMinor >
<TargetFramework Condition="$([MSBuild]::VersionGreaterThanOrEquals($(EngineVersionMajor).$(EngineVersionMinor), '5.5'))">net8.0</TargetFramework>
<TargetFramework Condition="$([MSBuild]::VersionLessThan($(EngineVersionMajor).$(EngineVersionMinor), '5.5'))">net6.0</TargetFramework>

<Configuration Condition=" '$(Configuration)' == '' ">Development</Configuration>
<OutputType>Library</OutputType>
Expand Down

0 comments on commit 0ed1019

Please sign in to comment.