Compare commits

..

12 Commits

Author SHA1 Message Date
Anatol Belski
4074dc7e18 release 2.0.3 2017-05-08 19:29:44 +02:00
Anatol Belski
bef5693b20 Allow down to vc11
It still can be coupled with sdk 8.1, so while no particularly practical
for PHP, still might be useful. We still keep on vc14 as lowest for PHP.
2017-05-08 19:09:26 +02:00
Anatol Belski
09a5e2bedc cut off trailing slash, so unify with setvars part 2017-05-08 18:35:16 +02:00
Anatol Belski
49f6a761e2 improve path check for vc15+ 2017-05-08 18:32:23 +02:00
Anatol Belski
c385a12d58 further improvements to crt version checks 2017-05-08 18:21:54 +02:00
Anatol Belski
07546d9304 simplify 2017-05-08 18:09:18 +02:00
Anatol Belski
79da1ed7af improve crt version check 2017-05-08 18:07:33 +02:00
Anatol Belski
5ccdabeb39 fix crt version check, be future compatible 2017-05-08 17:36:24 +02:00
Anatol Belski
31291b5aba fix previous breach, get path before shifts 2017-05-08 16:43:22 +02:00
Anatol Belski
dc0a5cce5b rework starter, so no intermediate vars are left on the env 2017-05-08 16:39:32 +02:00
Anatol Belski
af67c49c46 extend local template 2017-05-08 16:06:38 +02:00
Anatol Belski
513dd29f8a back to dev 2017-04-26 16:34:24 +02:00
5 changed files with 57 additions and 23 deletions

View File

@@ -1 +1 @@
2.0.2
2.0.3

View File

@@ -22,7 +22,7 @@ if "%PHP_SDK_ARCH%"=="x64" (
echo Build architecture: 32-bit
)
echo Visual C++: %PHP_SDK_VC:~2%
echo Visual C++: %PHP_SDK_VC_NUM%
echo PHP-SDK path: %PHP_SDK_ROOT_PATH%

View File

@@ -13,12 +13,32 @@ if "%1"=="-h" goto :help
if "%1"=="--help" goto :help
if "%2"=="" goto :help
if /i not "%1"=="vc14" (
if /i not "%1"=="vc15" (
echo Unsupported runtime "%1"
goto out_error
)
set PHP_SDK_VC=%1
if /i not "%PHP_SDK_VC:~0,2%"=="vc" (
:malformed_vc_string
echo Malformed CRT string "%1"
set PHP_SDK_VC=
goto out_error
)
if ""=="%PHP_SDK_VC:~2%" (
goto malformed_vc_string
)
set /a TMP_CHK=%PHP_SDK_VC:~2%
if 11 gtr %TMP_CHK% (
if "0"=="%TMP_CHK%" (
if not "0"=="%PHP_SDK_VC:~2%" (
set TMP_CHK=
goto malformed_vc_string
)
)
echo At least vc14 is required
set PHP_SDK_VC=
set TMP_CHK=
goto out_error
)
set PHP_SDK_VC_NUM=%TMP_CHK%
set TMP_CHK=
if /i not "%2"=="x64" (
if /i not "%2"=="x86" (
@@ -27,7 +47,6 @@ if /i not "%2"=="x64" (
)
)
set PHP_SDK_VC=%1
set PHP_SDK_ARCH=%2
rem check OS arch
@@ -45,7 +64,7 @@ if not errorlevel 1 (
set TMPKEY=
rem get vc base dir
if /i "%1"=="vc14" (
if 15 gtr %PHP_SDK_VC_NUM% (
if /i "%PHP_SDK_OS_ARCH%"=="x64" (
set TMPKEY=HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%PHP_SDK_VC:~2%.0\Setup\VC
) else (
@@ -59,12 +78,16 @@ if /i "%1"=="vc14" (
for /f "tokens=2*" %%a in ('reg query !TMPKEY! /v ProductDir') do set PHP_SDK_VC_DIR=%%b
) else (
rem vc15 support only for now, could parse out and pass on later
for /f "tokens=1* delims=: " %%a in ('%~dp0\vswhere -nologo -version 15 -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath -format text') do set PHP_SDK_VC_DIR=%%b\VC
for /f "tokens=1* delims=: " %%a in ('%~dp0\vswhere -nologo -version %PHP_SDK_VC_NUM% -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath -format text') do set PHP_SDK_VC_DIR=%%b\VC
set VSCMD_ARG_no_logo=nologo
if not exist "!PHP_SDK_VC_DIR!" (
echo Could not determine '%PHP_SDK_VC%' directory
goto out_error;
)
)
set TMPKEY=
if /i "%PHP_SDK_VC%"=="vc14" (
if 15 gtr %PHP_SDK_VC_NUM% (
rem get sdk dir
if /i "%PHP_SDK_OS_ARCH%"=="x64" (
set TMPKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1
@@ -84,13 +107,13 @@ if /i "%PHP_SDK_VC%"=="vc14" (
)
if /i "%PHP_SDK_ARCH%"=="x64" (
if /i "%1"=="vc14" (
if 15 gtr %PHP_SDK_VC_NUM% (
set PHP_SDK_VC_SHELL_CMD="!PHP_SDK_VC_DIR!\vcvarsall.bat" amd64
) else (
set PHP_SDK_VC_SHELL_CMD="!PHP_SDK_VC_DIR!\Auxiliary\Build\vcvarsall.bat" amd64
)
) else (
if /i "%1"=="vc14" (
if 15 gtr %PHP_SDK_VC_NUM% (
set PHP_SDK_VC_SHELL_CMD="!PHP_SDK_VC_DIR!\vcvarsall.bat" x86
) else (
set PHP_SDK_VC_SHELL_CMD="!PHP_SDK_VC_DIR!\Auxiliary\Build\vcvarsall.bat" x86

View File

@@ -1,5 +1,9 @@
@echo off
rem edit if PGO scripts are present and are to be used
rem set PHP_SDK_PGO_TOOLS_ROOT_PATH=%PHP_SDK_ROOT_PATH%\pgo
rem set PATH=%PHP_SDK_PGO_TOOLS_ROOT_PATH%\bin;%PATH%
set PGSQL_TEST_CONNSTR=host=127.0.0.1 dbname=test port=5432 user=test password=test
set PDO_PGSQL_TEST_DSN=pgsql:host=127.0.0.1 port=5432 dbname=test user=test password=test

View File

@@ -2,7 +2,9 @@
setlocal enableextensions enabledelayedexpansion
set IMHERE=%~dp0
rem this will be eventually overridden by phpsdk_setvars, but nothing wrong to use the same name here
set PHP_SDK_ROOT_PATH=%~dp0
set PHP_SDK_ROOT_PATH=%PHP_SDK_ROOT_PATH:~0,-1%
:getopt
if /i "%1" equ "-h" goto help
@@ -28,9 +30,14 @@ set ARCH=%ARCH: =%
set PHP_SDK_RUN_FROM_ROOT=1
title PHP SDK
call %IMHERE%bin\phpsdk_setshell.bat %CRT% %ARCH%
call %PHP_SDK_ROOT_PATH%\bin\phpsdk_setshell.bat %CRT% %ARCH%
set PHP_SDK_RUN_FROM_ROOT=
set CRT=
set ARCH=
if errorlevel 3 (
exit /b %errorlevel%
@@ -40,25 +47,25 @@ if "%TASK%" neq "" (
if exist "%TASK%" (
set TASK_ARGS=%TASK_ARGS:"=%
if exist "%IMHERE%phpsdk-local.bat" (
cmd /c "!PHP_SDK_VC_SHELL_CMD! && %IMHERE%\bin\phpsdk_setvars.bat && %IMHERE%\phpsdk-local.bat && %TASK% !TASK_ARGS!"
if exist "%PHP_SDK_ROOT_PATH%\phpsdk-local.bat" (
cmd /c "!PHP_SDK_VC_SHELL_CMD! && %PHP_SDK_ROOT_PATH%\bin\phpsdk_setvars.bat && %PHP_SDK_ROOT_PATH%\phpsdk-local.bat && %TASK% !TASK_ARGS!"
) else (
cmd /c "!PHP_SDK_VC_SHELL_CMD! && %IMHERE%\bin\phpsdk_setvars.bat && %TASK% !TASK_ARGS!"
cmd /c "!PHP_SDK_VC_SHELL_CMD! && %PHP_SDK_ROOT_PATH%\bin\phpsdk_setvars.bat && %TASK% !TASK_ARGS!"
)
set TASK=
exit /b
) else (
echo could not find the task file
set TASK=
exit /b 3
)
)
if exist "%IMHERE%phpsdk-local.bat" (
cmd /k "!PHP_SDK_VC_SHELL_CMD! && %IMHERE%\bin\phpsdk_setvars.bat && %IMHERE%\bin\phpsdk_dumpenv.bat && %IMHERE%\phpsdk-local.bat && echo. && set prompt=$P$_$+$$$S"
if exist "%PHP_SDK_ROOT_PATH%\phpsdk-local.bat" (
cmd /k "!PHP_SDK_VC_SHELL_CMD! && %PHP_SDK_ROOT_PATH%\bin\phpsdk_setvars.bat && %PHP_SDK_ROOT_PATH%\bin\phpsdk_dumpenv.bat && %PHP_SDK_ROOT_PATH%\phpsdk-local.bat && echo. && set prompt=$P$_$+$$$S"
) else (
cmd /k "!PHP_SDK_VC_SHELL_CMD! && %IMHERE%\bin\phpsdk_setvars.bat && %IMHERE%\bin\phpsdk_dumpenv.bat && set prompt=$P$_$+$$$S"
cmd /k "!PHP_SDK_VC_SHELL_CMD! && %PHP_SDK_ROOT_PATH%\bin\phpsdk_setvars.bat && %PHP_SDK_ROOT_PATH%\bin\phpsdk_dumpenv.bat && set prompt=$P$_$+$$$S"
)
set PHP_SDK_RUN_FROM_ROOT=
exit /b