-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathCreateDevKit.py
More file actions
35 lines (27 loc) · 746 Bytes
/
CreateDevKit.py
File metadata and controls
35 lines (27 loc) · 746 Bytes
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
import os
import sys
import subprocess
def PrintInfo (message):
print ('INFO: ' + message)
def PrintError (message):
print ('ERROR: ' + message)
def Main (argv):
currentDir = os.path.dirname (os.path.abspath (__file__))
os.chdir (currentDir)
if len (argv) != 3:
print ('usage: CreateDevKit.py <msBuildPath> <msBuildConfiguration>')
return 1
msBuildPath = argv[1]
msBuildConfiguration = argv[2]
installProjectPath = os.path.join ('Build', 'INSTALL.vcxproj')
buildResult = subprocess.call ([
msBuildPath,
installProjectPath,
'-verbosity:m',
'/property:Configuration=' + msBuildConfiguration
])
if buildResult != 0:
PrintError ('Failed to build install project.')
return 1
return 0
sys.exit (Main (sys.argv))