Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cff58a7

Browse filesBrowse files
committed
Clear extended attributes before signing iOS extensions and Mac bundle
1 parent ab34fa6 commit cff58a7
Copy full SHA for cff58a7

File tree

Expand file treeCollapse file tree

1 file changed

+21
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+21
-0
lines changed

‎builder/tools_builder.livecodescript

Copy file name to clipboardExpand all lines: builder/tools_builder.livecodescript
+21Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,23 @@ private function escapeArg pArg
545545
return pArg
546546
end escapeArg
547547

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+
548565
private function findSigningIdentity
549566
get shell("/usr/bin/security -q find-identity -v")
550567
filter it with "*Developer ID Application: Runtime Revolution Ltd*"
@@ -656,6 +673,8 @@ command toolsBuilderMakeAppBundle pVersion, pEdition, pPlatform
656673
get shell("file" && escapeArg(tFullPath))
657674
if tFile is "Standalone" or "Mach-O" is not among the words of it then next repeat
658675

676+
clearExtendedAttributes escapeArg(tFullPath)
677+
659678
-- Sign the extension
660679
-- The "--force" parameter strips the existing signature (which was
661680
-- made using a not-valid-for-distribution profile)
@@ -668,6 +687,8 @@ command toolsBuilderMakeAppBundle pVersion, pEdition, pPlatform
668687
end repeat
669688
end repeat
670689

690+
clearExtendedAttributes escapeArg(tAppBundle)
691+
671692
builderLog "message", "Signing macosx app bundle" && "'" & tAppBundle & "'"
672693
wait 1 second
673694
get shell("/usr/bin/codesign --sign" && word 2 of tSigningId && "--deep --verbose=2" && escapeArg(tAppBundle))

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.