forked from AtomicGameEngine/AtomicGameEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuildAtomicNET.js
More file actions
93 lines (59 loc) · 2.45 KB
/
BuildAtomicNET.js
File metadata and controls
93 lines (59 loc) · 2.45 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
var fs = require('fs-extra');
var path = require("path");
var host = require("./Host");
var os = require('os');
var config = require('./BuildConfig');
var atomicRoot = config.atomicRoot;
namespace('build', function() {
task('atomicnetdocs', {
async: true
}, function() {
var assemblyFolder = atomicRoot + "Artifacts/AtomicNET/" + config["config"] + "/Desktop/";
var templateFile = atomicRoot + "Build/Docs/AtomicNET/atomictemplate.xsl";
var sourceAssembly = assemblyFolder + "AtomicNET.dll";
var sourceAssemblyXML = assemblyFolder + "AtomicNET.xml";
var outputFolder = atomicRoot + "Artifacts/AtomicNET/Docs/";
// Make sure the assemblies exist, this is only an issue when running the task
// directly with --task=build:atomicnetdocs
if (!fs.existsSync(sourceAssembly) || !fs.existsSync(sourceAssemblyXML)) {
throw new Error("\n\nSource assembly doesn't exist in: " + assemblyFolder + "\nPlease try specifying --debug?\n\n");
}
host.cleanCreateDir(outputFolder)
var cmds = [];
cmds.push("mdoc update -i \"" + sourceAssemblyXML + "\" \"" + sourceAssembly +
"\" -o \"" + outputFolder + "xml\"" );
// mdoc export-html --template=atomictemplate.xsl -o html xml
cmds.push("mdoc export-html --template=\"" + templateFile +
"\" -o \"" + outputFolder +"html\" \"" + outputFolder + "xml\"");
jake.exec(cmds, function() {
complete();
}, {
printStdout: true,
printStderr: true
});
});
task('atomicnet', {
async: true
}, function() {
platforms = "-platform desktop";
if (config["with-android"])
platforms += " -platform android";
if (config["with-ios"])
platforms += " -platform ios";
var cmds = [];
var netCmd = host.atomicTool + " net compile " + atomicRoot + "Script/AtomicNET/AtomicNETProject.json " + platforms + " -config " + config["config"];
if (os.platform() == 'win32') {
var vsver = (config["vs2017"] ? "VS2017" : "VS2015");
netCmd += " -toolversion " + vsver;
}
netCmd += " -toolbootstrap"
console.log(netCmd);
cmds.push(netCmd);
jake.exec(cmds, function() {
complete();
}, {
printStdout: true,
printStderr: true
});
});
}); // end of build namespace