forked from AtomicGameEngine/AtomicGameEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuildIOS.js
More file actions
52 lines (36 loc) · 2.1 KB
/
BuildIOS.js
File metadata and controls
52 lines (36 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
var os = require('os');
var fs = require('fs-extra');
var path = require("path");
var host = require("./Host");
var config = require("./BuildConfig");
var atomicRoot = config.atomicRoot;
var buildDir = config.artifactsRoot + "Build/IOS/";
namespace('build', function() {
task('ios_native', {
async: true
}, function() {
var NETNativeSrcDir = buildDir + "Source/AtomicNET/NETNative/" + config["config"] + "-iphoneos/";
var NETNativeDestDir = config.artifactsRoot + "AtomicNET/" + config["config"] + "/Native/iOS/";
host.setupDirs(!config["noclean"], [buildDir, NETNativeDestDir]);
process.chdir(buildDir);
var cmds = [];
cmds.push("cmake -DIOS=1 -DATOMIC_DEV_BUILD=0 -G Xcode ../../../");
if (config.jenkins) {
cmds.push("security -v list-keychains -d system -s /Users/jenkins/Library/Keychains/codesign.keychain");
cmds.push("security -v unlock-keychain /Users/jenkins/Library/Keychains/codesign.keychain");
}
cmds.push("xcodebuild -configuration " + config["config"] + " -parallelizeTargets -jobs 4");
// Note that this install_name_tool invocation invalidates the code signing, Xamarin/Visual Studio should resign the binary on deploy to device
cmds.push("cd \"" + NETNativeSrcDir + "\" && install_name_tool -id @rpath/AtomicNETNative.framework/AtomicNETNative AtomicNETNative.framework/AtomicNETNative");
//cmds.push("cd \"" + NETNativeSrcDir + "\" && codesign --deep --force --verify --sign \"iPhone Developer\" ./AtomicNETNative.framework/");
cmds.push("cd \"" + NETNativeSrcDir + "\" && zip -r AtomicNETNative.framework.zip AtomicNETNative.framework");
jake.exec(cmds, function() {
fs.copySync(NETNativeSrcDir + "AtomicNETNative.framework", NETNativeDestDir + "AtomicNETNative.framework");
fs.copySync(NETNativeSrcDir + "AtomicNETNative.framework.zip", NETNativeDestDir + "AtomicNETNative.framework.zip");
complete();
}, {
printStdout: true,
printStderr: true
});
});
}); // end of build namespace