@@ -20,7 +20,7 @@ def BuildSolution (msBuildPath, solutionPath, configuration):
2020 print ('Building ' + solutionPath )
2121 subprocess .call ([msBuildPath , solutionPath , '/property:Configuration=' + configuration , '/property:Platform=x64' ])
2222
23- def InstallwxWidgets (targetFolder , msBuildPath ):
23+ def InstallwxWidgets (targetFolder , msBuildPath , msBuildConfiguration ):
2424 wxWidgetsName = 'wxWidgets-3.1.2'
2525 wxWidgetsZipUrl = 'https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.2/wxWidgets-3.1.2.7z'
2626 wxWidgetsZipPath = os .path .join (targetFolder , wxWidgetsName + '.7z' )
@@ -31,24 +31,24 @@ def InstallwxWidgets (targetFolder, msBuildPath):
3131 DownloadFile (wxWidgetsZipUrl , wxWidgetsZipPath )
3232 UnzipFile (wxWidgetsZipPath , wxWidgetsFolderPath )
3333 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 )
3635
3736def 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> '
4039 return 1
4140
4241 currentDir = os .path .dirname (os .path .abspath (__file__ ))
4342 os .chdir (currentDir )
4443
4544 targetFolder = sys .argv [1 ]
4645 msBuildPath = sys .argv [2 ] # "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
46+ msBuildConfiguration = sys .argv [3 ]
4747
4848 if not os .path .exists (targetFolder ):
4949 os .makedirs (targetFolder )
5050
51- InstallwxWidgets (targetFolder , msBuildPath )
51+ InstallwxWidgets (targetFolder , msBuildPath , msBuildConfiguration )
5252 return 0
5353
5454sys .exit (Main (sys .argv ))
0 commit comments