-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82729 from shana/shana/ios-csharp
Add C# iOS support
- Loading branch information
Showing
16 changed files
with
463 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/iOSNativeAOT.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<PublishAot>true</PublishAot> | ||
<PublishAotUsingRuntimePack>true</PublishAotUsingRuntimePack> | ||
<UseNativeAOTRuntime>true</UseNativeAOTRuntime> | ||
<TrimmerSingleWarn>false</TrimmerSingleWarn> | ||
</PropertyGroup> | ||
</Project> |
58 changes: 58 additions & 0 deletions
58
modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/iOSNativeAOT.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<Project> | ||
<ItemGroup> | ||
<TrimmerRootAssembly Include="GodotSharp" /> | ||
<TrimmerRootAssembly Include="$(TargetName)" /> | ||
<LinkerArg Include="-install_name '@rpath/$(TargetName)$(NativeBinaryExt)'" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<LinkStandardCPlusPlusLibrary>true</LinkStandardCPlusPlusLibrary> | ||
<FindXCode Condition=" '$(XCodePath)' == '' and '$([MSBuild]::IsOsPlatform(OSX))' ">true</FindXCode> | ||
<XCodePath Condition=" '$(XCodePath)' == '' ">/Applications/Xcode.app/Contents/Developer</XCodePath> | ||
<XCodePath>$([MSBuild]::EnsureTrailingSlash('$(XCodePath)'))</XCodePath> | ||
</PropertyGroup> | ||
|
||
<Target Name="PrepareBeforeIlcCompile" | ||
BeforeTargets="IlcCompile"> | ||
|
||
<Copy SourceFiles="%(ResolvedRuntimePack.PackageDirectory)/runtimes/$(RuntimeIdentifier)/native/icudt.dat" DestinationFolder="$(PublishDir)"/> | ||
|
||
<!-- We need to find the path to Xcode so we can set manual linker args to the correct SDKs | ||
Once https://github.com/dotnet/runtime/issues/88737 is released, we can take this out | ||
--> | ||
|
||
<Exec Command="xcrun xcode-select -p" ConsoleToMSBuild="true" Condition=" '$(FindXCode)' == 'true' "> | ||
<Output TaskParameter="ConsoleOutput" PropertyName="XcodeSelect" /> | ||
</Exec> | ||
|
||
<PropertyGroup Condition=" '$(FindXCode)' == 'true' "> | ||
<XCodePath>$(XcodeSelect)</XCodePath> | ||
<XCodePath>$([MSBuild]::EnsureTrailingSlash('$(XCodePath)'))</XCodePath> | ||
</PropertyGroup> | ||
|
||
<Message Importance="normal" Text="Found XCode at $(XcodeSelect)" Condition=" '$(FindXCode)' == 'true' "/> | ||
|
||
<ItemGroup> | ||
<LinkerArg Include="-isysroot %22$(XCodePath)Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk%22" | ||
Condition=" $(RuntimeIdentifier.Contains('simulator')) "/> | ||
<LinkerArg Include="-isysroot %22$(XCodePath)Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk%22" | ||
Condition=" !$(RuntimeIdentifier.Contains('simulator')) "/> | ||
</ItemGroup> | ||
|
||
</Target> | ||
|
||
<Target Name="FixSymbols" | ||
AfterTargets="Publish"> | ||
|
||
<RemoveDir Directories="$(PublishDir)$(TargetName).framework.dSYM"/> | ||
|
||
<!-- create-xcframework (called from the export plugin wants the symbol files in a directory | ||
with a slightly different name from the one created by dotnet publish, so we copy them over | ||
to the correctly-named directory --> | ||
<ItemGroup> | ||
<SymbolFiles Include="$(NativeBinary).dsym\**\*.*"/> | ||
</ItemGroup> | ||
<Copy SourceFiles="@(SymbolFiles)" DestinationFolder="$(PublishDir)$(TargetName).framework.dSYM"/> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.