Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Oct 21, 2024
1 parent 03d7737 commit ba0e38f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions msbuild/Xamarin.MacDev.Tasks/Tasks/CompileEntitlements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class CompileEntitlements : XamarinTask, ITaskCallback, ICancelableTask {
public string BundleIdentifier { get; set; } = string.Empty;

[Required]
[Output] // this is required to create an output file on Windows.
[Output] // this is required to create an output file on Windows. Note: this is a relative path.
public ITaskItem? CompiledEntitlements { get; set; }

public ITaskItem [] CustomEntitlements { get; set; } = Array.Empty<ITaskItem> ();
Expand Down Expand Up @@ -572,12 +572,10 @@ bool SaveArchivedExpandedEntitlements (PDictionary archived)

public bool ShouldCreateOutputFile (ITaskItem item)
{
var rv = item == EntitlementsInExecutable || item ==EntitlementsInSignature;
Log.LogMessage ($"Checking whether creating output file '{item.ItemSpec}' is '{EntitlementsInExecutable?.ItemSpec}' or '{EntitlementsInSignature?.ItemSpec}': {rv}");
if (rv)
return false;

return true;
// EntitlementsInExecutable and EntitlementsInSignature are full paths on macOS,
// which doesn't work correctly when trying to create such output files on Windows.
var isFullPath = item == EntitlementsInExecutable || item == EntitlementsInSignature;
return !isFullPath;
}

public IEnumerable<ITaskItem> GetAdditionalItemsToBeCopied ()
Expand Down

0 comments on commit ba0e38f

Please sign in to comment.