X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=projects%2Fbuild-openssl.bat;h=19b7357cfb48bd29c6c3a5d006b892152981545f;hb=31368b6eac8092a307849518e912b4c475c0238a;hp=3703a3f2d3050280382e78984d43ea593aa1ce89;hpb=ff9f0eb35d80c251e9a54162eae18f44349ae59d;p=platform%2Fupstream%2Fcurl.git diff --git a/projects/build-openssl.bat b/projects/build-openssl.bat index 3703a3f..19b7357 100644 --- a/projects/build-openssl.bat +++ b/projects/build-openssl.bat @@ -6,7 +6,7 @@ rem * / __| | | | |_) | | rem * | (__| |_| | _ <| |___ rem * \___|\___/|_| \_\_____| rem * -rem * Copyright (C) 2012 - 2014, Steve Holme, . +rem * Copyright (C) 2012 - 2015, Steve Holme, . rem * rem * This software is licensed as described in the file COPYING, which rem * you should have received as part of this distribution. The terms @@ -24,13 +24,14 @@ rem *************************************************************************** :begin rem Check we are running on a Windows NT derived OS if not "%OS%" == "Windows_NT" goto nodos + + rem Set our variables setlocal - - rem Display the help + set VC_VER= + set BUILD_PLATFORM= + + rem Ensure we have the required arguments if /i "%~1" == "" goto syntax - if /i "%~1" == "-?" goto syntax - if /i "%~1" == "-h" goto syntax - if /i "%~1" == "-help" goto syntax :parseArgs if "%~1" == "" goto prerequisites @@ -67,6 +68,10 @@ rem *************************************************************************** set VC_VER=12.0 set VC_DESC=VC12 set "VC_PATH=Microsoft Visual Studio 12.0\VC" + ) else if /i "%~1" == "vc14" ( + set VC_VER=14.0 + set VC_DESC=VC14 + set "VC_PATH=Microsoft Visual Studio 14.0\VC" ) else if /i "%~1%" == "x86" ( set BUILD_PLATFORM=x86 ) else if /i "%~1%" == "x64" ( @@ -75,6 +80,12 @@ rem *************************************************************************** set BUILD_CONFIG=debug ) else if /i "%~1%" == "release" ( set BUILD_CONFIG=release + ) else if /i "%~1" == "-?" ( + goto syntax + ) else if /i "%~1" == "-h" ( + goto syntax + ) else if /i "%~1" == "-help" ( + goto syntax ) else ( if not defined START_DIR ( set START_DIR=%~1% @@ -86,6 +97,10 @@ rem *************************************************************************** shift & goto parseArgs :prerequisites + rem Compiler and platform are required parameters. + if not defined VC_VER goto syntax + if not defined BUILD_PLATFORM goto syntax + rem Default the start directory if one isn't specified if not defined START_DIR set START_DIR=..\..\openssl @@ -105,6 +120,14 @@ rem *************************************************************************** rem Check we have Visual Studio installed if not exist "%PF%\%VC_PATH%" goto novc + rem Check we have Perl installed + echo %PATH% | findstr /I /C:"\Perl" 1>nul + if errorlevel 1 ( + if not exist "%SystemDrive%\Perl" ( + if not exist "%SystemDrive%\Perl64" goto noperl + ) + ) + rem Check the start directory exists if not exist "%START_DIR%" goto noopenssl @@ -132,6 +155,7 @@ rem *************************************************************************** if "%VC_VER%" == "10.0" set VCVARS_PLATFORM=%BUILD_PLATFORM% if "%VC_VER%" == "11.0" set VCVARS_PLATFORM=amd64 if "%VC_VER%" == "12.0" set VCVARS_PLATFORM=amd64 + if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64 ) :start @@ -156,7 +180,7 @@ rem *************************************************************************** set OUTDIR=build\Win64\%VC_DESC% if not exist %OUTDIR% md %OUTDIR% - if "%BUILD_CONFIG%" == "release" goto x64release + if "%BUILD_CONFIG%" == "release" goto x64release :x64debug rem Configuring 64-bit Debug Build @@ -272,6 +296,7 @@ rem *************************************************************************** echo vc10 - Use Visual Studio 2010 echo vc11 - Use Visual Studio 2012 echo vc12 - Use Visual Studio 2013 + echo vc14 - Use Visual Studio 2015 echo. echo Platform: echo. @@ -308,6 +333,11 @@ rem *************************************************************************** echo Error: %VC_DESC% is not installed goto error +:noperl + echo. + echo Error: Perl is not installed + goto error + :nox64 echo. echo Error: %VC_DESC% does not support 64-bit builds