Skip to content

Commit 4a20c5f

Browse files
committed
Build dependencies only for the current configuration.
1 parent 5644b16 commit 4a20c5f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Diff for: appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ platform:
1717
- x64
1818

1919
before_build:
20-
- python installdepswin.py C:\Dependencies msbuild
2120
- set WXWIDGETS_DIR=C:\Dependencies\wxWidgets-3.1.2
21+
- python installdepswin.py C:\Dependencies msbuild %configuration%
2222
- mkdir Build
2323
- cd Build
2424
- cmake -G "Visual Studio 15 2017 Win64" ..

Diff for: installdepswin.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -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

3736
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>'
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

5454
sys.exit (Main (sys.argv))

0 commit comments

Comments
 (0)