From f5f5620c5545c8707e2cb00a5aee030eaebd6531 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 13 Mar 2017 18:22:19 +0100 Subject: [PATCH] don't check for sdk 8.1 for vc15 and up, only vc14 is relevant --- bin/phpsdk_setshell.bat | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/bin/phpsdk_setshell.bat b/bin/phpsdk_setshell.bat index 06ff7ba..663f5d5 100644 --- a/bin/phpsdk_setshell.bat +++ b/bin/phpsdk_setshell.bat @@ -64,23 +64,24 @@ if /i "%1"=="vc14" ( ) set TMPKEY= -rem get sdk dir -if /i "%PHP_SDK_OS_ARCH%"=="x64" ( - set TMPKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1 -) else ( - set TMPKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1 -) -for /f "tokens=2*" %%a in ('reg query "!TMPKEY!" /v InstallationFolder') do ( - if exist "%%b\Include\um\Windows.h" ( - set PHP_SDK_WIN_SDK_DIR=%%b +if /i not "%PHP_SDK_VC%"=="vc14" ( + rem get sdk dir + if /i "%PHP_SDK_OS_ARCH%"=="x64" ( + set TMPKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1 + ) else ( + set TMPKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1 ) + for /f "tokens=2*" %%a in ('reg query "!TMPKEY!" /v InstallationFolder') do ( + if exist "%%b\Include\um\Windows.h" ( + set PHP_SDK_WIN_SDK_DIR=%%b + ) + ) + if not defined PHP_SDK_WIN_SDK_DIR ( + echo Windows SDK not found. + goto out_error; + ) + set TMPKEY= ) -if not defined PHP_SDK_WIN_SDK_DIR ( - echo Windows SDK not found. - goto out_error; -) -set TMPKEY= - if /i "%PHP_SDK_ARCH%"=="x64" ( if /i "%1"=="vc14" (