[msbuild] Resolve the full path to the compiled entitlements in the CompileEntitlements task. (#21372)
This saves a round-trip between the Mac and Windows machine for remote builds.
This commit is contained in:
Родитель
8134042f74
Коммит
3a16b7f0ad
|
@ -521,6 +521,11 @@ namespace Xamarin.MacDev.Tasks {
|
|||
|
||||
SaveArchivedExpandedEntitlements (archived);
|
||||
|
||||
/* The path to the entitlements must be resolved to the full path, because we might want to reference it from a containing project that just references this project,
|
||||
* and in that case it becomes a bit complicated to resolve to a full path on disk when building remotely from Windows. Instead just resolve to a full path here,
|
||||
* and use that from now on. This has to be done from a task, so that we get the full path on the mac when executed remotely from Windows. */
|
||||
CompiledEntitlements = new TaskItem (Path.GetFullPath (CompiledEntitlements!.ItemSpec));
|
||||
|
||||
if (Platform == Utils.ApplePlatform.MacCatalyst) {
|
||||
EntitlementsInSignature = CompiledEntitlements;
|
||||
} else if (SdkIsSimulator) {
|
||||
|
|
|
@ -695,15 +695,6 @@ Copyright (C) 2018 Microsoft. All rights reserved.
|
|||
<Output TaskParameter="EntitlementsInSignature" PropertyName="_CompiledCodesignEntitlements" />
|
||||
</CompileEntitlements>
|
||||
|
||||
<!-- The path to the entitlements must be resolved to the full path, because we might want to reference it from a containing project that just references this project,
|
||||
and in that case it becomes a bit complicated to resolve to a full path on disk when building remotely from Windows. Instead just resolve to a full path here,
|
||||
and use that from now on. This has to be done from a task, so that we get the full path on the mac when executed remotely from Windows. -->
|
||||
<GetFullPath SessionId="$(BuildSessionId)" Condition="'$(IsMacEnabled)' == 'true' And '$(_CompiledEntitlements)' != ''" RelativePath="$(_CompiledEntitlements)">
|
||||
<Output TaskParameter="FullPath" PropertyName="_CompiledEntitlements" />
|
||||
</GetFullPath>
|
||||
<GetFullPath SessionId="$(BuildSessionId)" Condition="'$(IsMacEnabled)' == 'true' And '$(_CompiledCodesignEntitlements)' != ''" RelativePath="$(_CompiledCodesignEntitlements)">
|
||||
<Output TaskParameter="FullPath" PropertyName="_CompiledCodesignEntitlements" />
|
||||
</GetFullPath>
|
||||
|
||||
<ItemGroup>
|
||||
<FileWrites Include="$(_CompiledEntitlementsPath)" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче