Fix macOS scripting SDK build.
This also enables universal spcomp binaries with arm64 support.
This commit is contained in:
@@ -14,32 +14,14 @@ class PackageHelpers:
|
||||
self.folder_map[folder] = self.builder.AddFolder(norm_folder)
|
||||
return self.folder_map
|
||||
|
||||
def lipo(self, binaries, outFolder):
|
||||
bins = []
|
||||
binPaths = []
|
||||
for b in binaries:
|
||||
bins.append(b.binary)
|
||||
binPaths.append(os.path.join(self.builder.buildPath, b.binary.path))
|
||||
argv = ['lipo', '-create']
|
||||
binary = os.path.basename(binPaths[0])
|
||||
outputPath = os.path.join(self.builder.buildPath, self.builder.buildFolder, outFolder, binary)
|
||||
self.builder.AddCommand(
|
||||
argv = argv + binPaths + ['-output', outputPath],
|
||||
inputs = bins,
|
||||
outputs = [os.path.join(outFolder, binary)],
|
||||
)
|
||||
|
||||
def CopySpcomp(self, target_folder):
|
||||
if self.builder.host.platform == 'mac' and len(SM.target_archs) > 1:
|
||||
self.lipo(SM.spcomp_bins, target_folder)
|
||||
else:
|
||||
for bin_task in SM.spcomp_bins:
|
||||
if bin_task.target.arch == 'x86_64':
|
||||
root, ext = os.path.splitext(os.path.basename(bin_task.binary.path))
|
||||
file = root + '64' + ext
|
||||
self.builder.AddCopy(bin_task.binary, os.path.join(target_folder, file))
|
||||
else:
|
||||
self.builder.AddCopy(bin_task.binary, self.folder_map[target_folder])
|
||||
for bin_task in SM.spcomp_bins:
|
||||
if bin_task.target.arch == 'x86_64':
|
||||
root, ext = os.path.splitext(os.path.basename(bin_task.binary.path))
|
||||
file = root + '64' + ext
|
||||
self.builder.AddCopy(bin_task.binary, os.path.join(target_folder, file))
|
||||
else:
|
||||
self.builder.AddCopy(bin_task.binary, self.folder_map[target_folder])
|
||||
|
||||
if self.builder.host.platform == 'windows':
|
||||
self.CopyFiles('tools/batchtool', target_folder, '.exe')
|
||||
@@ -70,4 +52,4 @@ class PackageHelpers:
|
||||
|
||||
self.CopyFiles('plugins/include', target_folder, '.inc')
|
||||
|
||||
SM.package_helpers = PackageHelpers(builder)
|
||||
SM.package_helpers = PackageHelpers(builder)
|
||||
|
||||
Reference in New Issue
Block a user