Skip to content

Commit

Permalink
Merge branch 'main' into xcode13.2-chip-b1
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelkang authored Jan 31, 2022
2 parents 1fb2d43 + 39ec61d commit 893a031
Show file tree
Hide file tree
Showing 86 changed files with 579 additions and 509 deletions.
2 changes: 1 addition & 1 deletion Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ MANIFEST_VERSION_BAND=$(shell echo $(DOTNET6_VERSION_BAND) | sed 's/..$$/00/')
DOTNET_CSC_PATH_PREVIEW=$(DOTNET6_DIR)/sdk/$(DOTNET6_VERSION)/Roslyn/bincore/csc.dll
DOTNET_CSC_PATH_STABLE=$(DOTNET6_DIR)/sdk/$(DOTNET6_VERSION_BAND)/Roslyn/bincore/csc.dll

DOTNET6_CSC=$(DOTNET6) exec $(DOTNET_CSC_PATH_PREVIEW)
DOTNET6_CSC=$(DOTNET6) exec $(DOTNET_CSC_PATH_STABLE)

# How are our assemblies named?
DOTNET_IOS_ASSEMBLY_NAME=Xamarin.iOS
Expand Down
6 changes: 4 additions & 2 deletions dotnet/package/common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
<PackageReference Include="Microsoft.DotNet.Arcade.Sdk" Version="$(MicrosoftDotNetBuildTasksFeedPackageVersion)" PrivateAssets="all" GeneratePathProperty="true" />
</ItemGroup>

<Import Project="Sdk.props" Sdk="Microsoft.DotNet.SharedFramework.Sdk" Version="$(MicrosoftDotNetBuildTasksFeedPackageVersion)" />
<UsingTask TaskName="CreateFrameworkListFile" AssemblyFile="$(DotNetSharedFrameworkTaskFile)"/>
<!-- do not load this Sdk for template packages -->
<!-- it overwrites packageType -->
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.SharedFramework.Sdk" Version="$(MicrosoftDotNetBuildTasksFeedPackageVersion)" Condition="'$(PackageType)' != 'Template'" />
<UsingTask TaskName="CreateFrameworkListFile" AssemblyFile="$(DotNetSharedFrameworkTaskFile)" Condition="'$(PackageType)' != 'Template'" />
<UsingTask TaskName="GenerateBuildManifest" AssemblyFile="$(_MicrosoftDotNetBuildTasksFeedTaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll" />

<Target Name="_GenerateFrameworkListFile" Condition=" '$(_CreateFrameworkList)' == 'true' Or '$(_CreateRuntimeList)' == 'true' ">
Expand Down
8 changes: 8 additions & 0 deletions dotnet/targets/Xamarin.Shared.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,14 @@
<OutputPath Condition="'%(ResolvedFileToPublish.DestinationSubPath)' != ''">$(_StrippedAssemblyDirectory)\%(ResolvedFileToPublish.DestinationSubPath)</OutputPath>
<OutputPath Condition="'%(ResolvedFileToPublish.DestinationSubPath)' == ''">$(_StrippedAssemblyDirectory)\%(Filename)%(Extension)</OutputPath>
</_AssembliesToBeStripped>

<!-- Use forward slashes in OutputPath, otherwise ILStrip will create filenames that resemble the part of
the relative path of the item that uses backslashes, instead of writing the file to the location of the
relative path. -->
<_AssembliesToBeStripped>
<OutputPath>$([System.String]::Copy('%(OutputPath)').Replace('\', '/'))</OutputPath>
</_AssembliesToBeStripped>

<_AssemblyDirsToCreate Include="@(_AssembliesToBeStripped->'%(OutputPath)%(Directory)'->Distinct())"/>
</ItemGroup>
<MakeDir SessionId="$(BuildSessionId)" Condition="'$(IsMacEnabled)' == 'true'" Directories="@(_AssemblyDirsToCreate)" />
Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.200-preview.22071.6">
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="6.0.200-rtm.22076.4">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>9d335dacf2a133830c14b3b4c46d59ae8a35af2c</Sha>
<Sha>d0b45b2ddba60cbd451a9bd55cae2446f7fbd0c5</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-1.21519.4" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.200-1.22069.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/linker</Uri>
<Sha>d0662ed8db919642177ddfd06a1c33895a69015f</Sha>
<Sha>70dc7f6daaf50e8eb67afb91876b8efc8330103f</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.2-mauipre.1.22069.5">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="6.0.2-mauipre.1.22074.5">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>4f567e5ffa4bad5d2cbb5e82470f18534ee02c9f</Sha>
<Sha>63715256cc94963d608ef3d683d2529332c5140c</Sha>
</Dependency>
<!-- This is required for our test apps to build; in some cases Microsoft.AspNetCore.App is pulled in, and when building test apps the build needs to be able to resolve that -->
<Dependency Name="Microsoft.AspNetCore.App.Ref" Version="6.0.0" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project>
<!--Package versions-->
<PropertyGroup>
<MicrosoftDotnetSdkInternalPackageVersion>6.0.200-preview.22071.6</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>6.0.100-1.21519.4</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>6.0.200-rtm.22076.4</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>6.0.200-1.22069.1</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftDotNetBuildTasksFeedPackageVersion>6.0.0-beta.21212.6</MicrosoftDotNetBuildTasksFeedPackageVersion>
<MicrosoftNETILStripTasksPackageVersion>6.0.0-rc.2.21468.3</MicrosoftNETILStripTasksPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>6.0.2-mauipre.1.22069.5</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>6.0.2-mauipre.1.22074.5</MicrosoftNETCoreAppRefPackageVersion>
</PropertyGroup>
</Project>
19 changes: 0 additions & 19 deletions msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,6 @@ Copyright (C) 2014 Xamarin. All rights reserved.
</CreateAppBundleDependsOn>
</PropertyGroup>

<Target Name="_CodesignAppBundle" Condition="'$(_RequireCodeSigning)'" DependsOnTargets="$(_CodesignAppBundleDependsOn)">
<Codesign
Condition="'$(IsMacEnabled)' == 'true'"
SessionId="$(BuildSessionId)"
ToolExe="$(CodesignExe)"
ToolPath="$(CodesignPath)"
CodesignAllocate="$(_CodesignAllocate)"
Keychain="$(CodesignKeychain)"
Entitlements="$(IntermediateOutputPath)Entitlements.xcent"
Resources="$(AppBundleDir)"
SigningKey="$(_CodeSigningKey)"
ExtraArgs="$(CodesignExtraArgs)"
IsAppExtension="$(IsAppExtension)"
UseHardenedRuntime="$(UseHardenedRuntime)"
UseSecureTimestamp="$(UseHardenedRuntime)"
>
</Codesign>
</Target>

<PropertyGroup>
<CompileToNativeDependsOn>
_ComputeLinkMode;
Expand Down
53 changes: 52 additions & 1 deletion msbuild/Xamarin.Shared/Xamarin.Shared.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2024,10 +2024,61 @@ Copyright (C) 2018 Microsoft. All rights reserved.
/>
</Target>

<Target Name="_CalculateCodesignAppBundleInputs" Condition="('$(_CanOutputAppBundle)' == 'true' And '$(_CodeSigningKey)' != '') And ('$(IsAppExtension)' == 'false' Or '@(_ResolvedAppExtensionReferences)' != '')">
<Target Name="_CalculateCodesignAppBundleInputs">
<ItemGroup>
<_CodesignAppBundleInputs Include="$(_AppBundlePath)**\*.*" Exclude="$(_AppCodeSignaturePath)_CodeSignature\CodeResources" />
</ItemGroup>

<PropertyGroup>
<_CodesignAppBundleCondition Condition="'$(_PlatformName)' == 'macOS' And '$(_RequireCodeSigning)'">true</_CodesignAppBundleCondition>
<_CodesignAppBundleCondition Condition="'$(_PlatformName)' != 'macOS' And ('$(_CanOutputAppBundle)' == 'true' And '$(_CodeSigningKey)' != '') And ('$(IsAppExtension)' == 'false' Or '@(_ResolvedAppExtensionReferences)' != '')">true</_CodesignAppBundleCondition>
</PropertyGroup>
</Target>

<Target Name="_CodesignAppBundle"
Condition="'$(_CodesignAppBundleCondition)' == 'true'"
DependsOnTargets="$(_CodesignAppBundleDependsOn)"
Inputs="@(_CodesignAppBundleInputs)"
Outputs="$(_AppCodeSignaturePath)_CodeSignature\CodeResources"
>

<PropertyGroup>
<_CodesignDisableTimestamp>False</_CodesignDisableTimestamp>
<_CodesignDisableTimestamp Condition="'$(_SdkIsSimulator)' == 'true' Or '$(_BundlerDebug)' == 'true'">True</_CodesignDisableTimestamp>

<_AppBundleCodesignEntitlements Condition="'$(_PlatformName)' == 'macOS'">$(IntermediateOutputPath)Entitlements.xcent</_AppBundleCodesignEntitlements>
<_AppBundleCodesignEntitlements Condition="'$(_PlatformName)' != 'macOS'">$(_CompiledCodesignEntitlements)</_AppBundleCodesignEntitlements>
</PropertyGroup>

<Codesign
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true'"
CodesignAllocate="$(_CodesignAllocate)"
DisableTimestamp="$(_CodesignDisableTimestamp)"
Entitlements="$(_AppBundleCodesignEntitlements)"
ExtraArgs="$(CodesignExtraArgs)"
IsAppExtension="$(IsAppExtension)"
Keychain="$(CodesignKeychain)"
ResourceRules="$(_PreparedResourceRules)"
Resources="$(AppBundleDir)"
SigningKey="$(_CodeSigningKey)"
ToolExe="$(CodesignExe)"
ToolPath="$(CodesignPath)"
UseHardenedRuntime="$(UseHardenedRuntime)"
UseSecureTimestamp="$(UseHardenedRuntime)"
>
</Codesign>

<Touch
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true' And Exists ('$(AppBundleDir).dSYM\Contents\Info.plist')"
Files="$(AppBundleDir).dSYM\Contents\Info.plist"
/>
<Touch
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true' And Exists ('$(_AppBundlePath)_CodeSignature\CodeResources')"
Files="$(_AppBundlePath)_CodeSignature\CodeResources"
/>
</Target>

<!-- LinkMode -->
Expand Down
36 changes: 0 additions & 36 deletions msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -434,42 +434,6 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
/>
</Target>

<Target Name="_CodesignAppBundle" Condition="('$(_CanOutputAppBundle)' == 'true' And '$(_CodeSigningKey)' != '') And ('$(IsAppExtension)' == 'false' Or '@(_ResolvedAppExtensionReferences)' != '')" DependsOnTargets="$(_CodesignAppBundleDependsOn)"
Inputs="@(_CodesignAppBundleInputs)" Outputs="$(_AppBundlePath)_CodeSignature\CodeResources">

<PropertyGroup>
<_CodesignDisableTimestamp>False</_CodesignDisableTimestamp>
<_CodesignDisableTimestamp Condition="'$(_SdkIsSimulator)' == 'true' Or '$(_BundlerDebug)' == 'true'">True</_CodesignDisableTimestamp>
</PropertyGroup>

<Codesign
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true'"
ToolExe="$(CodesignExe)"
ToolPath="$(CodesignPath)"
CodesignAllocate="$(_CodesignAllocate)"
DisableTimestamp="$(_CodesignDisableTimestamp)"
Keychain="$(CodesignKeychain)"
Entitlements="$(_CompiledCodesignEntitlements)"
ResourceRules="$(_PreparedResourceRules)"
Resources="$(AppBundleDir)"
SigningKey="$(_CodeSigningKey)"
ExtraArgs="$(CodesignExtraArgs)"
>
</Codesign>

<Touch
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true' And Exists ('$(AppBundleDir).dSYM\Contents\Info.plist')"
Files="$(AppBundleDir).dSYM\Contents\Info.plist"
/>
<Touch
SessionId="$(BuildSessionId)"
Condition="'$(IsMacEnabled)' == 'true' And Exists ('$(_AppBundlePath)_CodeSignature\CodeResources')"
Files="$(_AppBundlePath)_CodeSignature\CodeResources"
/>
</Target>

<Target Name="_CoreCreateIpa" Condition="'$(BuildIpa)' == 'true'" DependsOnTargets="Codesign">
<RemoveDir SessionId="$(BuildSessionId)" Condition="'$(IsMacEnabled)' == 'true'" Directories="$(DeviceSpecificIntermediateOutputPath)ipa" />

Expand Down
42 changes: 36 additions & 6 deletions runtime/bindings-generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ static IEnumerable<FunctionData> GetFunctionData (bool isDotNet = false)
var data = new List<FunctionData> ();

Types.NativeHandleType = isDotNet ? Types.NativeHandle : Types.IntPtr;
Types.MDLVoxelIndexExtent = isDotNet ? Types.MDLVoxelIndexExtent_DotNet : Types.MDLVoxelIndexExtent2;

data.Add (
new FunctionData {
Expand Down Expand Up @@ -952,6 +953,21 @@ static IEnumerable<FunctionData> GetFunctionData (bool isDotNet = false)
}
);

if (isDotNet) {
data.Add (
new FunctionData {
Comment = " // NMatrix4 func (IntPtr, Double)",
Prefix = "simd__",
Variants = Variants.All,
ReturnType = Types.NMatrix4,
Parameters = new ParameterData[] {
new ParameterData { TypeData = Types.NativeHandleType },
new ParameterData { TypeData = Types.Double },
},
}
);
}

data.Add (
new FunctionData {
Comment = " // IntPtr func (Matrix4)",
Expand Down Expand Up @@ -2000,10 +2016,10 @@ static IEnumerable<FunctionData> GetFunctionData (bool isDotNet = false)

data.Add (
new FunctionData {
Comment = " // MDLVoxelIndexExtent2 func ()",
Comment = " // MDLVoxelIndexExtent func ()",
Prefix = "simd__",
Variants = Variants.All,
ReturnType = Types.MDLVoxelIndexExtent2,
ReturnType = Types.MDLVoxelIndexExtent,
}
);

Expand All @@ -2018,11 +2034,11 @@ static IEnumerable<FunctionData> GetFunctionData (bool isDotNet = false)

data.Add (
new FunctionData {
Comment = " // void func (MDLVoxelIndexExtent2)",
Comment = " // void func (MDLVoxelIndexExtent)",
Prefix = "simd__",
Variants = Variants.NonStret,
Parameters = new ParameterData [] {
new ParameterData { TypeData = Types.MDLVoxelIndexExtent2 },
new ParameterData { TypeData = Types.MDLVoxelIndexExtent },
}
}
);
Expand Down Expand Up @@ -2131,12 +2147,12 @@ static IEnumerable<FunctionData> GetFunctionData (bool isDotNet = false)

data.Add (
new FunctionData {
Comment = " // IntPtr func (MDLVoxelIndexExtent2)",
Comment = " // IntPtr func (MDLVoxelIndexExtent)",
Prefix = "simd__",
Variants = Variants.NonStret,
ReturnType = Types.NativeHandleType,
Parameters = new ParameterData [] {
new ParameterData { TypeData = Types.MDLVoxelIndexExtent2 },
new ParameterData { TypeData = Types.MDLVoxelIndexExtent },
},
}
);
Expand Down Expand Up @@ -2756,6 +2772,7 @@ static void MarshalToManaged (StringWriter writer, TypeData type, string nativeV
// this is not exposed (under normal circumstance) to managed code - but if something gets wrong it won't be random data
writer.WriteLine ("\tmemset ({0}{1}dummy, 0, sizeof ({0}{1}dummy));", managedVariable, accessor);
break;
case "MDLVoxelIndexExtent":
case "MDLVoxelIndexExtent2":
writer.WriteLine ("\t{0}{2}minimumExtent.a = {1}.minimumExtent [0];", managedVariable, nativeVariable, accessor);
writer.WriteLine ("\t{0}{2}minimumExtent.b = {1}.minimumExtent [1];", managedVariable, nativeVariable, accessor);
Expand Down Expand Up @@ -2894,6 +2911,7 @@ static void MarshalToNative (StringWriter writer, TypeData type, string nativeVa
writer.WriteLine ("\t{0}.maxPixelValue [2] = {1}{2}maxPixelValue.c;", nativeVariable, managedVariable, accessor);
writer.WriteLine ("\t{0}.maxPixelValue [3] = {1}{2}maxPixelValue.d;", nativeVariable, managedVariable, accessor);
break;
case "MDLVoxelIndexExtent":
case "MDLVoxelIndexExtent2":
writer.WriteLine ("\t{0}.minimumExtent [0] = {1}{2}minimumExtent.a;", nativeVariable, managedVariable, accessor);
writer.WriteLine ("\t{0}.minimumExtent [1] = {1}{2}minimumExtent.b;", nativeVariable, managedVariable, accessor);
Expand Down Expand Up @@ -3619,6 +3637,18 @@ public static class Types {
IsX64Stret = true,
};

public static TypeData MDLVoxelIndexExtent;

public static TypeData MDLVoxelIndexExtent_DotNet = new TypeData {
ManagedType = "MDLVoxelIndexExtent",
NativeType = "MDLVoxelIndexExtent",
NativeWrapperType = "struct MDLVoxelIndexExtentWrapper",
RequireMarshal = true,
IsARMStret = true,
IsX86Stret = true,
IsX64Stret = true,
};

public static TypeData MDLVoxelIndexExtent2 = new TypeData {
ManagedType = "MDLVoxelIndexExtent2",
NativeType = "MDLVoxelIndexExtent",
Expand Down
2 changes: 1 addition & 1 deletion src/ARKit/ARCompat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace ARKit {

#if !XAMCORE_4_0 && IOS
#if !NET && IOS
public partial class ARFaceGeometry {

[Obsolete ("Use the 'GetVertices' method instead.")]
Expand Down
2 changes: 1 addition & 1 deletion src/AVFoundation/AVAssetImageGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

#if !XAMCORE_4_0 && WATCH // This empty partial class was accidentally included in our watchOS bindings.
#if !NET && WATCH // This empty partial class was accidentally included in our watchOS bindings.
namespace AVFoundation {
public partial class AVAssetImageGenerator {
}
Expand Down
2 changes: 1 addition & 1 deletion src/AVFoundation/AVAssetReaderVideoCompositionOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

#if !XAMCORE_4_0 && WATCH // This empty partial class was accidentally included in our watchOS bindings.
#if !NET && WATCH // This empty partial class was accidentally included in our watchOS bindings.
namespace AVFoundation {
public partial class AVAssetReaderVideoCompositionOutput {
}
Expand Down
2 changes: 1 addition & 1 deletion src/AVFoundation/AVCaptureDeviceDiscoverySession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using ObjCRuntime;

namespace AVFoundation {
#if IOS
#if IOS && !NET
public partial class AVCaptureDeviceDiscoverySession {

public static AVCaptureDeviceDiscoverySession Create (AVCaptureDeviceType [] deviceTypes, string mediaType, AVCaptureDevicePosition position)
Expand Down
2 changes: 1 addition & 1 deletion src/AVFoundation/AVCaptureSynchronizedDepthData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Foundation;

namespace AVFoundation {
#if !XAMCORE_4_0 && __IOS__
#if !NET && __IOS__
public partial class AVCaptureSynchronizedDepthData {
[Obsolete ("Default constructor should not be used")]
public AVCaptureSynchronizedDepthData () : base (NSObjectFlag.Empty)
Expand Down
11 changes: 5 additions & 6 deletions src/AVKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ public enum AVPlayerViewControlsStyle : long {
}
#endif

#if !MONOMAC || !XAMCORE_4_0
#if NET
[SupportedOSPlatform ("ios9.0")]
[SupportedOSPlatform ("tvos13.0")]
#else
// The version of the AVError.h header file in the tvOS SDK is much newer than in the iOS SDKs,
// (copyright 2016 vs 2019), so this is reflecting the tvOS SDK.
[iOS (9,0)]
[TV (13,0)]
#if NET
[NoMac]
[NoWatch]
#endif
[Native]
[ErrorDomain ("AVKitErrorDomain")]
Expand All @@ -36,7 +36,6 @@ public enum AVKitError : long {
ContentDisallowedByPasscode = -1101,
ContentDisallowedByProfile = -1102,
}
#endif

#if NET
[SupportedOSPlatform ("ios13.0")]
Expand Down
Loading

0 comments on commit 893a031

Please sign in to comment.