Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update iOS native packaging #3044

Merged
merged 9 commits into from
Nov 14, 2021
Merged
11 changes: 1 addition & 10 deletions osu.Framework.iOS.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<Project>
<PropertyGroup>
<LangVersion>8.0</LangVersion>
<DefaultMtouchExtraArgs>--nolinkaway</DefaultMtouchExtraArgs>
<DefaultMtouchGccFlags>-lstdc++ -lbz2 -framework AudioToolbox -framework AVFoundation -framework CoreMedia -framework VideoToolbox -framework SystemConfiguration -framework CFNetwork -framework Accelerate</DefaultMtouchGccFlags>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<OutputPath>bin\$(Platform)\$(Configuration)</OutputPath>
<MtouchI18n>cjk,mideast,other,rare,west</MtouchI18n>
<OptimizePNGs>false</OptimizePNGs>
<MtouchExtraArgs>$(DefaultMtouchExtraArgs) -gcc_flags "$(DefaultMtouchGccFlags)"</MtouchExtraArgs>
<MtouchExtraArgs>--nolinkaway</MtouchExtraArgs>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchVerbosity></MtouchVerbosity>
</PropertyGroup>
Expand Down Expand Up @@ -52,13 +50,6 @@
<Reference Include="Xamarin.iOS" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<NativeReference Include="..\osu.Framework.iOS\*.a">
<Kind>Static</Kind>
<SmartLink>False</SmartLink>
<ForceLoad>True</ForceLoad>
</NativeReference>
</ItemGroup>
<ItemGroup Label="Package References">
<PackageReference Include="Markdig" Version="0.26.0" />
<PackageReference Include="FFmpeg.AutoGen" Version="4.3.0.1" />
Expand Down
14 changes: 14 additions & 0 deletions osu.Framework.iOS/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,24 @@
// See the LICENCE file in the repository root for full licence text.

using System.Runtime.CompilerServices;
using ObjCRuntime;

// We publish our internal attributes to other sub-projects of the framework.
// Note, that we omit visual tests as they are meant to test the framework
// behavior "in the wild".

[assembly: InternalsVisibleTo("osu.Framework.Tests")]
[assembly: InternalsVisibleTo("osu.Framework.Tests.Dynamic")]

[assembly: LinkWith(LinkerFlags = "-lstdc++ -lbz2")]
[assembly: LinkWith(Frameworks = "AudioToolbox AVFoundation CoreMedia VideoToolbox SystemConfiguration CFNetwork Accelerate")]
[assembly: LinkWith("libavcodec.a", SmartLink = false, ForceLoad = true)]
[assembly: LinkWith("libavdevice.a", SmartLink = false, ForceLoad = true)]
[assembly: LinkWith("libavfilter.a", SmartLink = false, ForceLoad = true)]
[assembly: LinkWith("libavformat.a", SmartLink = false, ForceLoad = true)]
[assembly: LinkWith("libavutil.a", SmartLink = false, ForceLoad = true)]
[assembly: LinkWith("libbass.a", SmartLink = false, ForceLoad = true)]
[assembly: LinkWith("libbass_fx.a", SmartLink = false, ForceLoad = true)]
[assembly: LinkWith("libbassmix.a", SmartLink = false, ForceLoad = true)]
[assembly: LinkWith("libswresample.a", SmartLink = false, ForceLoad = true)]
[assembly: LinkWith("libswscale.a", SmartLink = false, ForceLoad = true)]
12 changes: 6 additions & 6 deletions osu.Framework.iOS/osu.Framework.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.4" />
</ItemGroup>
<ItemGroup>
<NativeLibs Include="$(MSBuildThisFileDirectory)\*.a" />
<None Include="@(NativeLibs)">
<Pack>true</Pack>
<PackageCopyToOutput>true</PackageCopyToOutput>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<!-- Don't forget to update the linker attributes in AssemblyInfo.cs if you are modifying native libraries. -->
<EmbeddedResource Include="$(MSBuildThisFileDirectory)*.a">
<LogicalName>%(Filename)%(Extension)</LogicalName>
<WithCulture>False</WithCulture>
<Type>Non-Resx</Type>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<!-- Without separate dll configs and using BundleResource, dllmaps won't work properly
Expand Down