mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 18:45:10 +01:00
modified build scripts for vs150
This commit is contained in:
parent
f453dd145c
commit
4f2f7c61d7
2
build_vs150.cmd
Normal file
2
build_vs150.cmd
Normal file
@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
buildwin 150 build shared both Win32 samples tests devenv
|
71
buildwin.cmd
71
buildwin.cmd
@ -10,7 +10,7 @@ rem for MS Visual Studio 2008 to 2013
|
||||
rem
|
||||
rem $Id: //poco/1.4/dist/buildwin.cmd#2 $
|
||||
rem
|
||||
rem Copyright (c) 2006-2014 by Applied Informatics Software Engineering GmbH
|
||||
rem Copyright (c) 2006-2017 by Applied Informatics Software Engineering GmbH
|
||||
rem and Contributors.
|
||||
rem
|
||||
rem Original version by Aleksandar Fabijanic.
|
||||
@ -19,7 +19,7 @@ rem
|
||||
rem Usage:
|
||||
rem ------
|
||||
rem buildwin VS_VERSION [ACTION] [LINKMODE] [CONFIGURATION] [PLATFORM] [SAMPLES] [TESTS] [TOOL] [ENV] [VERBOSITY [LOGGER] ] ]
|
||||
rem VS_VERSION: 90|100|110|120|140
|
||||
rem VS_VERSION: 90|100|110|120|140|150
|
||||
rem ACTION: build|rebuild|clean
|
||||
rem LINKMODE: static_mt|static_md|shared|all
|
||||
rem CONFIGURATION: release|debug|both
|
||||
@ -36,35 +36,14 @@ rem VS_VERSION is required argument. Default is build all.
|
||||
set POCO_BASE=%CD%
|
||||
set PATH=%POCO_BASE%\bin64;%POCO_BASE%\bin;%PATH%
|
||||
|
||||
rem VS_VERSION {90 | 100 | 110 | 120 | 140}
|
||||
rem VS_VERSION {90 | 100 | 110 | 120 | 140 | 150}
|
||||
if "%1"=="" goto usage
|
||||
set VS_VERSION=vs%1
|
||||
set VS_64_BIT_ENV=VC\bin\x86_amd64\vcvarsx86_amd64.bat
|
||||
|
||||
shift /1
|
||||
rem ACTION [build|rebuild|clean]
|
||||
set ACTION=%1
|
||||
if "%ACTION%"=="" (set ACTION=build)
|
||||
if not "%ACTION%"=="build" (
|
||||
if not "%ACTION%"=="rebuild" (
|
||||
if not "%ACTION%"=="clean" goto usage))
|
||||
|
||||
shift /1
|
||||
rem LINKMODE [static_mt|static_md|shared|all]
|
||||
set LINK_MODE=%1
|
||||
if "%LINK_MODE%"=="" (set LINK_MODE=all)
|
||||
if not "%LINK_MODE%"=="static_mt" (
|
||||
if not "%LINK_MODE%"=="static_md" (
|
||||
if not "%LINK_MODE%"=="shared" (
|
||||
if not "%LINK_MODE%"=="all" goto usage)))
|
||||
|
||||
rem CONFIGURATION [release|debug|both]
|
||||
set CONFIGURATION=%2
|
||||
if "%CONFIGURATION%"=="" (set CONFIGURATION=both)
|
||||
if not "%CONFIGURATION%"=="release" (
|
||||
if not "%CONFIGURATION%"=="debug" (
|
||||
if not "%CONFIGURATION%"=="both" goto usage))
|
||||
|
||||
if %VS_VERSION%==vs150 (
|
||||
set VS_VARSALL=..\..\VC\Auxiliary\Build\vcvarsall.bat
|
||||
) else (
|
||||
set VS_VARSALL=..\..\VC\vcvarsall.bat
|
||||
)
|
||||
rem PLATFORM [Win32|x64|WinCE|WEC2013]
|
||||
set PLATFORM=%3
|
||||
if "%PLATFORM%"=="" (set PLATFORM=Win32)
|
||||
@ -89,37 +68,45 @@ if "%TESTS%"=="" (set TESTS=notests)
|
||||
if not defined VCINSTALLDIR (
|
||||
if %VS_VERSION%==vs90 (
|
||||
if %PLATFORM%==x64 (
|
||||
call "%VS90COMNTOOLS%..\..\%VS_64_BIT_ENV%"
|
||||
call "%VS90COMNTOOLS%%VS_VARSALL%" amd64
|
||||
) else (
|
||||
call "%VS90COMNTOOLS%vsvars32.bat"
|
||||
call "%VS90COMNTOOLS%%VS_VARSALL%" x86
|
||||
)
|
||||
) else (
|
||||
if %VS_VERSION%==vs100 (
|
||||
if %PLATFORM%==x64 (
|
||||
call "%VS100COMNTOOLS%..\..\%VS_64_BIT_ENV%"
|
||||
call "%VS100COMNTOOLS%%VS_VARSALL%" amd64
|
||||
) else (
|
||||
call "%VS100COMNTOOLS%vsvars32.bat"
|
||||
call "%VS100COMNTOOLS%%VS_VARSALL%" x86
|
||||
)
|
||||
) else (
|
||||
if %VS_VERSION%==vs110 (
|
||||
if %PLATFORM%==x64 (
|
||||
call "%VS110COMNTOOLS%..\..\%VS_64_BIT_ENV%"
|
||||
call "%VS110COMNTOOLS%%VS_VARSALL%" amd64
|
||||
) else (
|
||||
call "%VS110COMNTOOLS%vsvars32.bat"
|
||||
call "%VS110COMNTOOLS%%VS_VARSALL%" x86
|
||||
)
|
||||
) else (
|
||||
if %VS_VERSION%==vs120 (
|
||||
if %PLATFORM%==x64 (
|
||||
call "%VS120COMNTOOLS%..\..\%VS_64_BIT_ENV%"
|
||||
call "%VS120COMNTOOLS%%VS_VARSALL%" amd64
|
||||
) else (
|
||||
call "%VS120COMNTOOLS%vsvars32.bat
|
||||
call "%VS120COMNTOOLS%%VS_VARSALL%" x86
|
||||
)
|
||||
) else (
|
||||
if %VS_VERSION%==vs140 (
|
||||
if %PLATFORM%==x64 (
|
||||
call "%VS140COMNTOOLS%..\..\%VS_64_BIT_ENV%"
|
||||
call "%VS140COMNTOOLS%%VS_VARSALL%" amd64
|
||||
) else (
|
||||
call "%VS140COMNTOOLS%vsvars32.bat
|
||||
call "%VS140COMNTOOLS%%VS_VARSALL%" x86
|
||||
)
|
||||
) else (
|
||||
if %VS_VERSION%==vs150 (
|
||||
if %PLATFORM%==x64 (
|
||||
call "%VS150COMNTOOLS%%VS_VARSALL%" amd64
|
||||
) else (
|
||||
call "%VS150COMNTOOLS%%VS_VARSALL%" x86
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -140,6 +127,7 @@ 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 %VS_VERSION%==vs150 (set VCPROJ_EXT=vcxproj)
|
||||
|
||||
|
||||
rem ENV env|noenv
|
||||
@ -166,6 +154,7 @@ 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)
|
||||
if "%VS_VERSION%"=="vs150" (set BUILD_TOOL=msbuild)
|
||||
:use_custom
|
||||
if "%BUILD_TOOL%"=="msbuild" (
|
||||
set ACTIONSW=/t:
|
||||
@ -197,6 +186,7 @@ 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 "%VS_VERSION%"=="vs150" (goto msbuildok)
|
||||
if "%BUILD_TOOL%"=="msbuild" (
|
||||
echo "Cannot use msbuild with Visual Studio 2008 or earlier."
|
||||
exit /b 2
|
||||
@ -214,6 +204,7 @@ 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)
|
||||
if %VS_VERSION%==vs150 (set EXTRASW=/m /p:VisualStudioVersion=15.0)
|
||||
)
|
||||
|
||||
|
||||
@ -581,7 +572,7 @@ exit /b 1
|
||||
echo Usage:
|
||||
echo ------
|
||||
echo buildwin VS_VERSION [ACTION] [LINKMODE] [CONFIGURATION] [PLATFORM] [SAMPLES] [TESTS] [TOOL] {ENV] [VERBOSITY]
|
||||
echo VS_VERSION: "90|100|110|120|140"
|
||||
echo VS_VERSION: "90|100|110|120|140|150"
|
||||
echo ACTION: "build|rebuild|clean"
|
||||
echo LINKMODE: "static_mt|static_md|shared|all"
|
||||
echo CONFIGURATION: "release|debug|both"
|
||||
|
25
buildwin.ps1
25
buildwin.ps1
@ -4,7 +4,7 @@
|
||||
# Usage:
|
||||
# ------
|
||||
# buildwin.ps1 [-poco_base dir]
|
||||
# [-vs_version 140 | 120 | 110 | 100 | 90]
|
||||
# [-vs_version 150 | 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, 140)]
|
||||
[ValidateSet(90, 100, 110, 120, 140, 150)]
|
||||
[int] $vs_version,
|
||||
|
||||
[Parameter()]
|
||||
@ -78,7 +78,8 @@ function Set-Environment
|
||||
|
||||
if ($vs_version -eq 0)
|
||||
{
|
||||
if ($Env:VS140COMNTOOLS -ne '') { $script:vs_version = 140 }
|
||||
if ($Env:VS150COMNTOOLS -ne '') { $script:vs_version = 150 }
|
||||
elseif ($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 }
|
||||
@ -117,17 +118,25 @@ function Set-Environment
|
||||
$vsct = "VS$($vs_version)COMNTOOLS"
|
||||
$vsdir = (Get-Item Env:$vsct).Value
|
||||
$Command = ''
|
||||
$CommandArg = ''
|
||||
if ($platform -eq 'x64')
|
||||
{
|
||||
$Command = "$($vsdir)..\..\VC\bin\x86_amd64\vcvarsx86_amd64.bat"
|
||||
$CommandArg = "amd64"
|
||||
}
|
||||
else
|
||||
{
|
||||
$Command = "$($vsdir)vsvars32.bat"
|
||||
$CommandArg = "x86"
|
||||
}
|
||||
if ($vs_version -ge 150)
|
||||
{
|
||||
$Command = "$($vsdir)..\..\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
}
|
||||
else
|
||||
{
|
||||
$Command = "$($vsdir)..\..\VC\vcvarsall.bat"
|
||||
}
|
||||
|
||||
$tempFile = [IO.Path]::GetTempFileName()
|
||||
cmd /c " `"$Command`" && set > `"$tempFile`" "
|
||||
cmd /c " `"$Command`" $CommandArg && set > `"$tempFile`" "
|
||||
Get-Content $tempFile | Foreach-Object {
|
||||
if($_ -match "^(.*?)=(.*)$")
|
||||
{
|
||||
@ -145,7 +154,7 @@ function Process-Input
|
||||
Write-Host 'Usage:'
|
||||
Write-Host '------'
|
||||
Write-Host 'buildwin.ps1 [-poco_base dir]'
|
||||
Write-Host ' [-vs_version 140 | 120 | 110 | 100 | 90]'
|
||||
Write-Host ' [-vs_version 150 | 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]'
|
||||
|
Loading…
Reference in New Issue
Block a user