Skip to content

Commit

Permalink
change default of MSVC edition to build with
Browse files Browse the repository at this point in the history
Build script will iterate on Ent, Pro or Community, to find an
installation to prepare the environment with. If Community is used,
it'll warn about its license.
  • Loading branch information
bpintea committed Apr 20, 2018
1 parent 744145a commit 61358eb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,17 @@ REM CLEAN function: clean up the build dir before building

REM SETUP function: set-up the build environment
:SETUP
REM TODO: add some logic to detect available versions (Enterprise, Professional, Community)
REM TODO: add support for vcvarsall.bat (2015)
set RELEASE=2017
set EDITION=Community
call "C:\Program Files (x86)\Microsoft Visual Studio\%RELEASE%\%EDITION%\Common7\Tools\VsDevCmd.bat" -arch=!TARCH!
set EDITION=Professional
for %%e in (Enterprise, Professional, Community) do (
if exist "C:\Program Files (x86)\Microsoft Visual Studio\%RELEASE%\%%e\Common7\Tools\VsDevCmd.bat" (
if /i "%%e" == "Community" (
echo WARNING: Community edition is not licensed to build commerical projects.
)
call "C:\Program Files (x86)\Microsoft Visual Studio\%RELEASE%\%%e\Common7\Tools\VsDevCmd.bat" -arch=!TARCH!
break
)
)

goto:eof

Expand Down

0 comments on commit 61358eb

Please sign in to comment.