@echo off
+Setlocal EnableDelayedExpansion
+
rem Setup environment
-call "%~dp0..\..\env.bat" %1 %2 %3
+call "%~dp0env.bat" %1 %2 %3
if NOT DEFINED DXSDK_DIR (
- if "%VCVER%" == "vc9" (
+ if /I "%VCVER%" == "vc9" (
echo ERROR: DirectX SDK is required in order to build the sample but it is not found in your system. Please install DirectX SDK and retry.
exit /B
)
- if "%VCVER%" == "vc10" (
+ if /I "%VCVER%" == "vc10" (
echo ERROR: DirectX SDK is required in order to build the sample but it is not found in your system. Please install DirectX SDK and retry.
exit /B
)
set "VisualStudioExpressName=VCExpress"
-if "%VCVER%" == "vc8" (
+if /I "%VCVER%" == "vc8" (
set "DevEnvDir=%VS80COMNTOOLS%..\IDE"
-) else if "%VCVER%" == "vc9" (
+) else if /I "%VCVER%" == "vc9" (
set "DevEnvDir=%VS90COMNTOOLS%..\IDE"
-) else if "%VCVER%" == "vc10" (
+) else if /I "%VCVER%" == "vc10" (
set "DevEnvDir=%VS100COMNTOOLS%..\IDE"
-) else if "%VCVER%" == "vc11" (
+) else if /I "%VCVER%" == "vc11" (
set "DevEnvDir=%VS110COMNTOOLS%..\IDE"
rem Visual Studio Express starting from VS 2012 is called "for Windows Desktop"
rem and has a new name for executable - WDExpress
set "VisualStudioExpressName=WDExpress"
-) else if "%VCVER%" == "vc12" (
+) else if /I "%VCVER%" == "vc12" (
set "DevEnvDir=%VS120COMNTOOLS%..\IDE"
set "VisualStudioExpressName=WDExpress"
) else (