@@ -20,7 +20,7 @@ def BuildSolution (msBuildPath, solutionPath, configuration):
20
20
print ('Building ' + solutionPath )
21
21
subprocess .call ([msBuildPath , solutionPath , '/property:Configuration=' + configuration , '/property:Platform=x64' ])
22
22
23
- def InstallwxWidgets (targetFolder , msBuildPath ):
23
+ def InstallwxWidgets (targetFolder , msBuildPath , msBuildConfiguration ):
24
24
wxWidgetsName = 'wxWidgets-3.1.2'
25
25
wxWidgetsZipUrl = 'https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.2/wxWidgets-3.1.2.7z'
26
26
wxWidgetsZipPath = os .path .join (targetFolder , wxWidgetsName + '.7z' )
@@ -31,24 +31,24 @@ def InstallwxWidgets (targetFolder, msBuildPath):
31
31
DownloadFile (wxWidgetsZipUrl , wxWidgetsZipPath )
32
32
UnzipFile (wxWidgetsZipPath , wxWidgetsFolderPath )
33
33
solutionPath = os .path .join (wxWidgetsFolderPath , 'build' , 'msw' , 'wx_vc15.sln' )
34
- BuildSolution (msBuildPath , solutionPath , 'Debug' )
35
- BuildSolution (msBuildPath , solutionPath , 'Release' )
34
+ BuildSolution (msBuildPath , solutionPath , msBuildConfiguration )
36
35
37
36
def Main (argv ):
38
- if len (argv ) != 3 :
39
- print 'usage: installdepswin.py <targetFolder> <msBuildPath>'
37
+ if len (argv ) != 4 :
38
+ print 'usage: installdepswin.py <targetFolder> <msBuildPath> <msBuildConfiguration> '
40
39
return 1
41
40
42
41
currentDir = os .path .dirname (os .path .abspath (__file__ ))
43
42
os .chdir (currentDir )
44
43
45
44
targetFolder = sys .argv [1 ]
46
45
msBuildPath = sys .argv [2 ] # "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
46
+ msBuildConfiguration = sys .argv [3 ]
47
47
48
48
if not os .path .exists (targetFolder ):
49
49
os .makedirs (targetFolder )
50
50
51
- InstallwxWidgets (targetFolder , msBuildPath )
51
+ InstallwxWidgets (targetFolder , msBuildPath , msBuildConfiguration )
52
52
return 0
53
53
54
54
sys .exit (Main (sys .argv ))
0 commit comments