-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuildVolkano.py
executable file
·66 lines (51 loc) · 1.56 KB
/
buildVolkano.py
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
#! /usr/bin/env python
import os
import sys
import subprocess
def usage():
print "usage:"
print "$0 variant [target] [-c]"
print "variant: scons configuration (ex variant=release)"
print "target: optional target for all subdirs (ex Lib)"
print "-c: optional clean"
if (sys.argv[1] == "--help"):
usage()
sys.exit()
if (sys.argv[1] == "-h"):
usage()
sys.exit()
def build(path, args=''):
externalProgram = 'scons'
#navigate to folder to build at
for folder in path:
os.chdir(folder)
if (args != ''):
externalProgram += ' ' + args
#pass command arguments
for i in range(1, len(sys.argv)):
externalProgram += ' ' + sys.argv[i]
retcode = subprocess.call(externalProgram, shell=True)
#return to path before function call
for folder in path:
os.chdir('..')
if not retcode == 0:
sys.exit(retcode)
build(['Docs'], 'Lib')
build(['External'], 'Lib')
build(['Xml'], 'Lib')
build(['Kodegen'], 'Lib')
build(['LibUpnpCil','Core'], 'Lib')
build(['LibUpnpCil','Toolkit'], 'OssToolkitWinForms')
build(['LibUpnpCil','SysLib'], 'Lib')
build(['LibUpnpCil','Control'], 'Lib')
build(['LibUpnpCil','Services'], 'Lib')
build(['LibUpnpCil','DidlLite'], 'Lib')
build(['LibUpnpCil','Topology'], 'Lib')
build(['Kinsky'], 'Lib')
build(['ProductSupport'], 'Lib')
if (sys.platform == 'win32') or (sys.platform == 'darwin'):
print 'Warning: Web app not built; this is only possible under linux.'
else:
build(['Web'], 'Lib')
build(['Layouts'], 'Lib')
build(['Kinsky'], 'Lib')