update build scripts for VS2015

This commit is contained in:
Guenter Obiltschnig 2015-07-31 12:49:14 +02:00
parent 4de38fcb76
commit 2065799db9
3 changed files with 23 additions and 8 deletions

2
build_vs140.cmd Normal file
View File

@ -0,0 +1,2 @@
@echo off
buildwin 140 build shared both Win32 samples tests devenv

View File

@ -18,7 +18,7 @@ rem
rem Usage:
rem ------
rem buildwin VS_VERSION [ACTION] [LINKMODE] [CONFIGURATION] [PLATFORM] [SAMPLES] [TESTS] [TOOL]
rem VS_VERSION: 90|100|110|120
rem VS_VERSION: 90|100|110|120|140
rem ACTION: build|rebuild|clean
rem LINKMODE: static_mt|static_md|shared|all
rem CONFIGURATION: release|debug|both
@ -46,7 +46,7 @@ set LIB=%LIB%;%MYSQL_LIB%
set POCO_BASE=%CD%
set PATH=%POCO_BASE%\bin64;%POCO_BASE%\bin;%PATH%
rem VS_VERSION {90 | 100 | 110 | 120}
rem VS_VERSION {90 | 100 | 110 | 120 | 140}
if "%1"=="" goto usage
set VS_VERSION=vs%1
set VS_64_BIT_ENV=VC\bin\x86_amd64\vcvarsx86_amd64.bat
@ -87,7 +87,15 @@ if not defined VCINSTALLDIR (
) else (
call "%VS120COMNTOOLS%vsvars32.bat
)
)
) else (
if %VS_VERSION%==vs140 (
if %PLATFORM%==x64 (
call "%VS140COMNTOOLS%..\..\%VS_64_BIT_ENV%"
) else (
call "%VS140COMNTOOLS%vsvars32.bat
)
)
)
)
)
)
@ -104,6 +112,7 @@ set VCPROJ_EXT=vcproj
if %VS_VERSION%==vs100 (set VCPROJ_EXT=vcxproj)
if %VS_VERSION%==vs110 (set VCPROJ_EXT=vcxproj)
if %VS_VERSION%==vs120 (set VCPROJ_EXT=vcxproj)
if %VS_VERSION%==vs140 (set VCPROJ_EXT=vcxproj)
if "%8"=="" goto use_devenv
set BUILD_TOOL=%8
@ -113,6 +122,7 @@ set BUILD_TOOL=devenv
if "%VS_VERSION%"=="vs100" (set BUILD_TOOL=msbuild)
if "%VS_VERSION%"=="vs110" (set BUILD_TOOL=msbuild)
if "%VS_VERSION%"=="vs120" (set BUILD_TOOL=msbuild)
if "%VS_VERSION%"=="vs140" (set BUILD_TOOL=msbuild)
:use_custom
if not "%BUILD_TOOL%"=="msbuild" (set USEENV=/useenv)
if "%BUILD_TOOL%"=="msbuild" (
@ -127,6 +137,7 @@ if not "%BUILD_TOOL%"=="msbuild" (
if "%VS_VERSION%"=="vs100" (goto msbuildok)
if "%VS_VERSION%"=="vs110" (goto msbuildok)
if "%VS_VERSION%"=="vs120" (goto msbuildok)
if "%VS_VERSION%"=="vs140" (goto msbuildok)
if "%BUILD_TOOL%"=="msbuild" (
echo "Cannot use msbuild with Visual Studio 2008 or earlier."
exit /b 2
@ -169,6 +180,7 @@ set PLATFORMSW=/p:Platform=%WEC2013_PLATFORM%
set USEENV=
if %VS_VERSION%==vs110 (set EXTRASW=/m /p:VisualStudioVersion=11.0)
if %VS_VERSION%==vs120 (set EXTRASW=/m /p:VisualStudioVersion=12.0)
if %VS_VERSION%==vs140 (set EXTRASW=/m /p:VisualStudioVersion=14.0)
)
rem SAMPLES [samples|nosamples]
@ -506,7 +518,7 @@ exit /b 1
echo Usage:
echo ------
echo buildwin VS_VERSION [ACTION] [LINKMODE] [CONFIGURATION] [PLATFORM] [SAMPLES] [TESTS] [TOOL]
echo VS_VERSION: "90|100|110|120"
echo VS_VERSION: "90|100|110|120|140"
echo ACTION: "build|rebuild|clean"
echo LINKMODE: "static_mt|static_md|shared|all"
echo CONFIGURATION: "release|debug|both"

View File

@ -4,7 +4,7 @@
# Usage:
# ------
# buildwin.ps1 [-poco_base dir]
# [-vs_version 120 | 110 | 100 | 90]
# [-vs_version 140 | 120 | 110 | 100 | 90]
# [-action build | rebuild | clean]
# [-linkmode shared | static_mt | static_md | all]
# [-config release | debug | both]
@ -23,7 +23,7 @@ Param
[string] $poco_base,
[Parameter()]
[ValidateSet(90, 100, 110, 120)]
[ValidateSet(90, 100, 110, 120, 140)]
[int] $vs_version,
[Parameter()]
@ -78,7 +78,8 @@ function Set-Environment
if ($vs_version -eq 0)
{
if ($Env:VS120COMNTOOLS -ne '') { $script:vs_version = 120 }
if ($Env:VS140COMNTOOLS -ne '') { $script:vs_version = 140 }
elseif ($Env:VS120COMNTOOLS -ne '') { $script:vs_version = 120 }
elseif ($Env:VS110COMNTOOLS -ne '') { $script:vs_version = 110 }
elseif ($Env:VS100COMNTOOLS -ne '') { $script:vs_version = 100 }
elseif ($Env:VS90COMNTOOLS -ne '') { $script:vs_version = 90 }
@ -144,7 +145,7 @@ function Process-Input
Write-Host 'Usage:'
Write-Host '------'
Write-Host 'buildwin.ps1 [-poco_base dir]'
Write-Host ' [-vs_version 120 | 110 | 100 | 90]'
Write-Host ' [-vs_version 140 | 120 | 110 | 100 | 90]'
Write-Host ' [-action build | rebuild | clean]'
Write-Host ' [-linkmode shared | static_mt | static_md | all]'
Write-Host ' [-config release | debug | both]'