Skip to content

Commit 8175632

Browse files
committed
Add Back Missing Function
1 parent be16c49 commit 8175632

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

platform/resources/iPhonePackageApp.lua

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,35 @@ local function getLiveBuildCopyIconScript(src, dest, options)
319319
end
320320

321321
--------------------------------------------------------------------------------
322+
local function getCodesignScript( entitlements, path, identity, developerBase )
323+
324+
codesign_allocate = xcodetoolhelper['codesign_allocate']
325+
codesign = xcodetoolhelper['codesign']
326+
327+
-- Remove any extended macOS attributes from files in the bundle because
328+
-- codesign doesn't like them
329+
local removeXattrs = "/usr/bin/xattr -cr "..quoteString(path) .." && "
330+
331+
-- quote for spaces
332+
codesign_allocate = quoteString(codesign_allocate)
333+
codesign = quoteString(codesign)
334+
developerBase = quoteString(developerBase)
335+
336+
local devbase_shell = "DEVELOPER_BASE="..developerBase.."\n"
337+
local export_path = [==[
338+
export PATH="$DEVELOPER_BASE/Platforms/iPhoneOS.platform/Developer/usr/bin:$DEVELOPER_BASE/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
339+
]==]
340+
341+
local script = 'export CODESIGN_ALLOCATE=' .. codesign_allocate .. '\n'
342+
343+
local quotedpath = quoteString( path )
344+
local cmd = removeXattrs .. codesign .. " --verbose -f -s "..quoteString(identity).." --entitlements "..entitlements.." "..quotedpath
345+
346+
-- print("getCodesignScript: codesign: ".. codesign)
347+
-- print("getCodesignScript: codesign_allocate: ".. codesign_allocate)
348+
-- print("getCodesignScript: ".. devbase_shell .. export_path .. script .. cmd)
349+
return devbase_shell .. export_path .. script .. cmd
350+
end
322351

323352
local function getCodesignAPPXScriptAndPackage(path, identity, entitlements, developerBase, bundleId, isBuildForDistribution)
324353

0 commit comments

Comments
 (0)