@@ -545,6 +545,23 @@ private function escapeArg pArg
545
545
return pArg
546
546
end escapeArg
547
547
548
+ -- Needed on MacOS Sierra
549
+ private command clearExtendedAttributes pAppBundle
550
+ -- make sure you have permission to clear extended attributes from bundle files
551
+ get shell ("chmod -R u+w" && pAppBundle )
552
+ if the result is not zero then
553
+ builderLog "error" , "Setting permissions failed with error:" && it
554
+ throw "failure"
555
+ end if
556
+
557
+ -- clear extended attributes from bundle files
558
+ get shell ("xattr -cr" && pAppBundle )
559
+ if the result is not zero then
560
+ builderLog "error" , "Clearing extended attributes failed with error:" && it
561
+ throw "failure"
562
+ end if
563
+ end clearExtendedAttributes
564
+
548
565
private function findSigningIdentity
549
566
get shell ("/usr/bin/security -q find-identity -v" )
550
567
filter it with "*Developer ID Application: Runtime Revolution Ltd*"
@@ -656,6 +673,8 @@ command toolsBuilderMakeAppBundle pVersion, pEdition, pPlatform
656
673
get shell ("file" && escapeArg(tFullPath ))
657
674
if tFile is "Standalone" or "Mach-O" is not among the words of it then next repeat
658
675
676
+ clearExtendedAttributes escapeArg(tFullPath )
677
+
659
678
-- Sign the extension
660
679
-- The "--force" parameter strips the existing signature (which was
661
680
-- made using a not-valid-for-distribution profile)
@@ -668,6 +687,8 @@ command toolsBuilderMakeAppBundle pVersion, pEdition, pPlatform
668
687
end repeat
669
688
end repeat
670
689
690
+ clearExtendedAttributes escapeArg(tAppBundle )
691
+
671
692
builderLog "message" , "Signing macosx app bundle" && "'" & tAppBundle & "'"
672
693
wait 1 second
673
694
get shell ("/usr/bin/codesign --sign" && word 2 of tSigningId && "--deep --verbose=2" && escapeArg(tAppBundle ))
0 commit comments