-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathtb.js
More file actions
93 lines (76 loc) · 3.58 KB
/
Copy pathtb.js
File metadata and controls
93 lines (76 loc) · 3.58 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
// @ts-check
/// <reference path="../super/tb/install/builtins.js"/>
function configure() {
project.setVariable("NAME", "npackd-cpp");
project.setVariable("TITLE", "Npackd C++");
project.setVariable("DESCRIPTION", "All the C++ Npackd programs.");
project.setVariable("TYPE", "generic");
}
function build() {
console.log("Building Npackd C++................");
var version = system.readTextFile(project.getDirectory() + "\\appveyor.yml");
version = version.split('\n')[0];
version = version.split(':')[1];
version = version.split('{')[0];
version = version + "0";
version = version.trim();
console.log(version);
var config = project.getConfig();
var d = project.getDirectory() + "\\build\\" + config + "\\dist";
fs.mkdirSync(d, { recursive: true });
var name = "clu";
console.log("We are building " + name + "................");
var p = new Project(project.getDirectory() + "\\" + name);
p.setConfig(project.getConfig());
p.build("all");
fs.mkdirSync(p.getDirectory() + "\\build\\" + config + "\\installer", { recursive: true });
system.zip(p.getDirectory() + "\\build\\" + config + "\\dist",
d + "\\CLU-" + version + ".zip");
var name = "npackd";
console.log("We are building " + name + "................");
var p = new Project(project.getDirectory() + "\\" + name);
p.setConfig(project.getConfig());
p.build("all");
var name = "npackdcl";
console.log("We are building " + name + "................");
var p = new Project(project.getDirectory() + "\\" + name);
p.setConfig(project.getConfig());
p.build("msi");
fs.mkdirSync(p.getDirectory() + "\\build\\" + config + "\\installer", { recursive: true });
system.zip(p.getDirectory() + "\\build\\" + config + "\\dist",
d + "\\NpackdCL-" + version + ".zip");
var name = "npackdcl_ftests";
console.log("We are building " + name + "................");
var p = new Project(project.getDirectory() + "\\" + name);
p.setConfig(project.getConfig());
p.build("all");
var name = "npackdcl_tests";
console.log("We are building " + name + "................");
var p = new Project(project.getDirectory() + "\\" + name);
p.setConfig(project.getConfig());
p.build("all");
var name = "npackdg";
console.log("We are building " + name + "................");
var p = new Project(project.getDirectory() + "\\" + name);
p.setConfig(project.getConfig());
p.build("msi");
fs.mkdirSync(p.getDirectory() + "\\build\\" + config + "\\installer", { recursive: true });
system.zip(p.getDirectory() + "\\build\\" + config + "\\dist",
d + "\\Npackd-" + version + ".zip");
// TODO: exchndl.dll, mgwhelp.dll, dbghelp.dll, symsrv.dll, symsrv.yes, xxx.map
// TODO: release on Github
// TODO: Coverity
/*
rem Coverity build is too slow
set path=%mingw%\bin;%ai%\bin\x86;%sevenzip%;C:\msys64\mingw64\bin
set CMAKE_PREFIX_PATH=%mingw%\%mingw_libs%
mingw32-make.exe clean
"..\..\cov-analysis\bin\cov-configure.exe" --comptype gcc --compiler C:\PROGRA~2\MINGW-~1\bin\G__~1.EXE -- -std=gnu++11
"..\..\cov-analysis\bin\cov-build.exe" --dir ..\..\cov-int mingw32-make.exe install
rem type C:\projects\Npackd\cov-int\build-log.txt
7z a cov-int.zip cov-int
if %errorlevel% neq 0 exit /b %errorlevel%
"C:\Program Files (x86)\Gow\bin\curl" --form token=%covtoken% --form email=tim.lebedkov@gmail.com -k --form file=@cov-int.zip --form version="Version" --form description="Description" https://scan.coverity.com/builds?project=Npackd
if %errorlevel% neq 0 exit /b %errorlevel%
*/
}