[msbuild] Unify some of the codesign dependency properties. (#13725)

This commit is contained in:
Rolf Bjarne Kvinge 2022-01-19 18:54:08 +01:00 коммит произвёл GitHub
Родитель 9368e0871e
Коммит c6ee74377a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 15 добавлений и 21 удалений

Просмотреть файл

@ -65,17 +65,6 @@ Copyright (C) 2014 Xamarin. All rights reserved.
</CreateAppBundleDependsOn>
</PropertyGroup>
<PropertyGroup>
<_CodesignAppBundleDependsOn>
$(_CodesignAppBundleDependsOn);
_CreateAppBundle;
_EmbedProvisionProfile;
_CodesignNativeLibraries;
_CollectFrameworks;
_CodesignFrameworks;
</_CodesignAppBundleDependsOn>
</PropertyGroup>
<Target Name="_CodesignAppBundle" Condition="'$(_RequireCodeSigning)'" DependsOnTargets="$(_CodesignAppBundleDependsOn)">
<Codesign
Condition="'$(IsMacEnabled)' == 'true'"

Просмотреть файл

@ -1727,16 +1727,22 @@ Copyright (C) 2018 Microsoft. All rights reserved.
<_CodesignAppBundleDependsOn>
$(_CodesignAppBundleDependsOn);
_CleanAppBundleRootDirectory;
_EmbedProvisionProfile;
_CodesignNativeLibraries;
_CollectFrameworks;
_CodesignFrameworks;
</_CodesignAppBundleDependsOn>
<CoreCodesignDependsOn>
$(CoreCodesignDependsOn);
$(_CodesignAppBundleDependsOn);
_CodesignAppBundle;
_CodesignVerify;
</CoreCodesignDependsOn>
<CodesignDependsOn>
$(CodesignDependsOn);
_CreateAppBundle;
BeforeCodeSign;
CoreCodeSign;
AfterCodeSign;
@ -1843,9 +1849,13 @@ Copyright (C) 2018 Microsoft. All rights reserved.
>
<Output TaskParameter="Frameworks" ItemName="_Frameworks"/>
</CollectFrameworks>
<PropertyGroup>
<_MustCodesignFrameworks Condition="'$(_PlatformName)' == 'macOS' And '$(_RequireCodeSigning)' == 'true' And '@(_Frameworks)' != ''">true</_MustCodesignFrameworks>
<_MustCodesignFrameworks Condition="'$(_PlatformName)' != 'macOS' And '$(_CanOutputAppBundle)' == 'true' And '@(_Frameworks)' != ''">true</_MustCodesignFrameworks>
</PropertyGroup>
</Target>
<Target Name="_CodesignFrameworks" Condition="'$(_CanOutputAppBundle)' == 'true' And '@(_Frameworks)' != ''" DependsOnTargets="_DetectSigningIdentity;_CollectFrameworks"
<Target Name="_CodesignFrameworks" Condition="'$(_MustCodesignFrameworks)' == 'true'" DependsOnTargets="_DetectSigningIdentity;_CollectFrameworks"
Inputs="%(_Frameworks.Identity)" Outputs="$(DeviceSpecificIntermediateOutputPath)codesign\%(_Frameworks.Filename)%(_Frameworks.Extension)">
<PropertyGroup>

Просмотреть файл

@ -102,10 +102,6 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
<PropertyGroup>
<_CodesignAppBundleDependsOn>
$(_CodesignAppBundleDependsOn);
_EmbedProvisionProfile;
_CodesignNativeLibraries;
_CollectFrameworks;
_CodesignFrameworks;
_ReadAppExtensionCodesignProperties;
_CodesignAppExtensions;
_PrepareCodesignAppExtension;
@ -116,11 +112,6 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
$(_CodesignAppBundleDependsOn);
$(CoreCodesignDependsOn);
</CoreCodesignDependsOn>
<CodesignDependsOn>
_CreateAppBundle;
$(CodesignDependsOn);
</CodesignDependsOn>
</PropertyGroup>
<Target Name="ValidateAppStoreBundle" DependsOnTargets="_DetectSdkLocations;_ComputeTargetFrameworkMoniker">

Просмотреть файл

@ -495,6 +495,10 @@ namespace Xamarin.Tests {
}
}
if (signature == CodeSignature.None && (platform == ApplePlatform.MacCatalyst || platform == ApplePlatform.MacOSX)) {
expectedWarnings.Add ($"Found files in the root directory of the app bundle. This will likely cause codesign to fail. Files:\nbin/Debug/{tfm}{(runtimeIdentifiers.IndexOf (';') >= 0 ? string.Empty : "/" + runtimeIdentifiers)}/BundleStructure.app/UnknownJ.bin");
}
// Sort the messages so that comparison against the expected array is faster
expectedWarnings = expectedWarnings
.OrderBy (v => v)