mirror of
https://github.com/php-win-ext/php-sdk-binary-tools.git
synced 2026-04-26 18:28:14 +02:00
improve crt version check
This commit is contained in:
@@ -20,10 +20,13 @@ if /i not "%PHP_SDK_VC:~0,2%"=="vc" (
|
||||
set PHP_SDK_VC=
|
||||
goto out_error
|
||||
)
|
||||
set /a TMP_CHK=%PHP_SDK_VC:~2,7%
|
||||
if ""=="%PHP_SDK_VC:~2,2%" (
|
||||
goto malformed_vc_string
|
||||
)
|
||||
set /a TMP_CHK=%PHP_SDK_VC:~2,2%
|
||||
if 14 gtr %TMP_CHK% (
|
||||
if "0"=="%TMP_CHK%" (
|
||||
if not "0"=="%PHP_SDK_VC:~2,7%" (
|
||||
if not "0"=="%PHP_SDK_VC:~2,2%" (
|
||||
set TMP_CHK=
|
||||
goto malformed_vc_string
|
||||
)
|
||||
@@ -74,7 +77,7 @@ 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 %PHP_SDK_VC:~2,7% -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:~2,2% -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
|
||||
)
|
||||
set TMPKEY=
|
||||
|
||||
Reference in New Issue
Block a user