You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
Some platforms don't support hostfxr but we can use the coreclr/monosgen library directly to initialize the runtime. Android exports now use the `android` runtime identifier instead of `linux-bionic`, this removes the restrictions we previously had: - Adds support for all Android architectures (arm32, arm64, x32, and x64), previously only the 64-bit architectures were supported. - Loads `System.Security.Cryptography.Native.Android` (the .NET library that binds to the Android OS crypto functions).
118 lines
7.6 KiB
XML
118 lines
7.6 KiB
XML
<Project>
|
|
<Import Project="$(MSBuildThisFileDirectory)\SdkPackageVersions.props" />
|
|
|
|
<PropertyGroup>
|
|
<UsingGodotNETSdk>true</UsingGodotNETSdk>
|
|
|
|
<!-- Determines if we should import Microsoft.NET.Sdk, if it wasn't already imported. -->
|
|
<GodotSdkImportsMicrosoftNetSdk Condition=" '$(UsingMicrosoftNETSdk)' != 'true' ">true</GodotSdkImportsMicrosoftNetSdk>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<Configurations>Debug;ExportDebug;ExportRelease</Configurations>
|
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
|
|
<GodotProjectDir Condition=" '$(GodotProjectDir)' == '' ">$(MSBuildProjectDirectory)</GodotProjectDir>
|
|
<GodotProjectDir>$([MSBuild]::EnsureTrailingSlash('$(GodotProjectDir)'))</GodotProjectDir>
|
|
<GodotProjectDirBase64 Condition=" $([MSBuild]::VersionGreaterThanOrEquals($(MSBuildAssemblyVersion), '17.3')) ">$([MSBuild]::ConvertToBase64('$(GodotProjectDir)'))</GodotProjectDirBase64>
|
|
|
|
<!-- Custom output paths for Godot projects. In brief, 'bin\' and 'obj\' are moved to '$(GodotProjectDir)\.godot\mono\temp\'. -->
|
|
<BaseOutputPath>$(GodotProjectDir).godot\mono\temp\bin\</BaseOutputPath>
|
|
<OutputPath>$(GodotProjectDir).godot\mono\temp\bin\$(Configuration)\</OutputPath>
|
|
<!--
|
|
Use custom IntermediateOutputPath and BaseIntermediateOutputPath only if it wasn't already set.
|
|
Otherwise the old values may have already been changed by MSBuild which can cause problems with NuGet.
|
|
-->
|
|
<IntermediateOutputPath Condition=" '$(IntermediateOutputPath)' == '' ">$(GodotProjectDir).godot\mono\temp\obj\$(Configuration)\</IntermediateOutputPath>
|
|
<BaseIntermediateOutputPath Condition=" '$(BaseIntermediateOutputPath)' == '' ">$(GodotProjectDir).godot\mono\temp\obj\</BaseIntermediateOutputPath>
|
|
|
|
<!-- Do not append the target framework name to the output path. -->
|
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
|
</PropertyGroup>
|
|
|
|
<Target Condition=" $([MSBuild]::VersionLessThan($(MSBuildAssemblyVersion), '17.3')) " Name="GodotProjectDir" BeforeTargets="Build">
|
|
<Error Text="Cannot build from path containing '%23', move your project or update dotnet to the latest version." Condition="$(GodotProjectDir.Contains('%23'))" /> <!-- # -->
|
|
<Error Text="Cannot build from path containing '%3B', move your project or update dotnet to the latest version." Condition="$(GodotProjectDir.Contains('%3B'))" /> <!-- ; -->
|
|
<Error Text="Cannot build from path containing newlines, move your project or update dotnet to the latest version." Condition="$(GodotProjectDir.Contains('%0A'))" /> <!-- \n -->
|
|
<Error Text="Cannot build from path containing newlines, move your project or update dotnet to the latest version." Condition="$(GodotProjectDir.Contains('%0D'))" /> <!-- \r -->
|
|
</Target>
|
|
|
|
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" Condition=" '$(GodotSdkImportsMicrosoftNetSdk)' == 'true' " />
|
|
|
|
<PropertyGroup>
|
|
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
|
|
</PropertyGroup>
|
|
|
|
<!--
|
|
The Microsoft.NET.Sdk only understands of the Debug and Release configurations.
|
|
We need to set the following properties manually for ExportDebug and ExportRelease.
|
|
-->
|
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' or '$(Configuration)' == 'ExportDebug' ">
|
|
<DebugSymbols Condition=" '$(DebugSymbols)' == '' ">true</DebugSymbols>
|
|
<Optimize Condition=" '$(Optimize)' == '' ">false</Optimize>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition=" '$(Configuration)' == 'ExportRelease' ">
|
|
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<GodotApiConfiguration Condition=" '$(Configuration)' != 'ExportRelease' ">Debug</GodotApiConfiguration>
|
|
<GodotApiConfiguration Condition=" '$(Configuration)' == 'ExportRelease' ">Release</GodotApiConfiguration>
|
|
</PropertyGroup>
|
|
|
|
<!-- Auto-detect the target Godot platform if it was not specified. -->
|
|
<PropertyGroup Condition=" '$(GodotTargetPlatform)' == '' ">
|
|
<GodotTargetPlatform Condition=" $(RuntimeIdentifier.StartsWith('ios')) ">ios</GodotTargetPlatform>
|
|
<GodotTargetPlatform Condition=" '$(GodotTargetPlatform)' == '' and $(RuntimeIdentifier.StartsWith('android')) ">android</GodotTargetPlatform>
|
|
<GodotTargetPlatform Condition=" '$(GodotTargetPlatform)' == '' and $(RuntimeIdentifier.StartsWith('browser')) ">web</GodotTargetPlatform>
|
|
|
|
<GodotTargetPlatform Condition=" '$(GodotTargetPlatform)' == '' and $(RuntimeIdentifier.StartsWith('linux')) ">linuxbsd</GodotTargetPlatform>
|
|
<GodotTargetPlatform Condition=" '$(GodotTargetPlatform)' == '' and $(RuntimeIdentifier.StartsWith('freebsd')) ">linuxbsd</GodotTargetPlatform>
|
|
<GodotTargetPlatform Condition=" '$(GodotTargetPlatform)' == '' and $(RuntimeIdentifier.StartsWith('osx')) ">macos</GodotTargetPlatform>
|
|
<GodotTargetPlatform Condition=" '$(GodotTargetPlatform)' == '' and $(RuntimeIdentifier.StartsWith('win')) ">windows</GodotTargetPlatform>
|
|
</PropertyGroup>
|
|
|
|
<!-- Auto-detect the target Godot platform if it was not specified and there's no runtime identifier information. -->
|
|
<PropertyGroup Condition=" '$(GodotTargetPlatform)' == '' ">
|
|
<GodotTargetPlatform Condition=" '$([MSBuild]::IsOsPlatform(Linux))' ">linuxbsd</GodotTargetPlatform>
|
|
<GodotTargetPlatform Condition=" '$([MSBuild]::IsOsPlatform(FreeBSD))' ">linuxbsd</GodotTargetPlatform>
|
|
<GodotTargetPlatform Condition=" '$([MSBuild]::IsOsPlatform(OSX))' ">macos</GodotTargetPlatform>
|
|
<GodotTargetPlatform Condition=" '$([MSBuild]::IsOsPlatform(Windows))' ">windows</GodotTargetPlatform>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<GodotFloat64 Condition=" '$(GodotFloat64)' == '' ">false</GodotFloat64>
|
|
</PropertyGroup>
|
|
|
|
<!-- Godot DefineConstants. -->
|
|
<PropertyGroup>
|
|
<!-- Define constants to identify Godot builds. -->
|
|
<GodotDefineConstants>GODOT</GodotDefineConstants>
|
|
|
|
<!--
|
|
Define constant to determine the target Godot platform. This includes the
|
|
recognized platform names and the platform category (PC, MOBILE or WEB).
|
|
-->
|
|
<GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'windows' ">GODOT_WINDOWS;GODOT_PC</GodotPlatformConstants>
|
|
<GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'linuxbsd' ">GODOT_LINUXBSD;GODOT_PC</GodotPlatformConstants>
|
|
<GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'macos' ">GODOT_OSX;GODOT_MACOS;GODOT_PC</GodotPlatformConstants>
|
|
<GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'android' ">GODOT_ANDROID;GODOT_MOBILE</GodotPlatformConstants>
|
|
<GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'ios' ">GODOT_IPHONE;GODOT_IOS;GODOT_MOBILE</GodotPlatformConstants>
|
|
<GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'web' ">GODOT_JAVASCRIPT;GODOT_HTML5;GODOT_WASM;GODOT_WEB</GodotPlatformConstants>
|
|
|
|
<GodotDefineConstants>$(GodotDefineConstants);$(GodotPlatformConstants);$(GodotVersionConstants)</GodotDefineConstants>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<!-- ExportDebug also defines DEBUG like Debug does. -->
|
|
<DefineConstants Condition=" '$(Configuration)' == 'ExportDebug' ">$(DefineConstants);DEBUG</DefineConstants>
|
|
<!-- Debug defines TOOLS to differentiate between Debug and ExportDebug configurations. -->
|
|
<DefineConstants Condition=" '$(Configuration)' == 'Debug' ">$(DefineConstants);TOOLS</DefineConstants>
|
|
|
|
<DefineConstants>$(GodotDefineConstants);$(DefineConstants)</DefineConstants>
|
|
</PropertyGroup>
|
|
|
|
<Import Project="$(MSBuildThisFileDirectory)\Android.props" Condition=" '$(GodotTargetPlatform)' == 'android' " />
|
|
<Import Project="$(MSBuildThisFileDirectory)\iOSNativeAOT.props" Condition=" '$(GodotTargetPlatform)' == 'ios' " />
|
|
</Project>
|