4 call "%~dp0..\..\env.bat" %1 %2 %3
6 if NOT DEFINED DXSDK_DIR (
7 if "%VCVER%" == "vc9" (
8 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.
11 if "%VCVER%" == "vc10" (
12 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.
17 rem Define path to project file
18 set "PRJFILE=%~dp0\CSharp_D3D.sln"
20 set "VisualStudioExpressName=VCExpress"
22 if "%VCVER%" == "vc8" (
23 set "DevEnvDir=%VS80COMNTOOLS%..\IDE"
24 ) else if "%VCVER%" == "vc9" (
25 set "DevEnvDir=%VS90COMNTOOLS%..\IDE"
26 ) else if "%VCVER%" == "vc10" (
27 set "DevEnvDir=%VS100COMNTOOLS%..\IDE"
28 ) else if "%VCVER%" == "vc11" (
29 set "DevEnvDir=%VS110COMNTOOLS%..\IDE"
30 rem Visual Studio Express starting from VS 2012 is called "for Windows Desktop"
31 rem and has a new name for executable - WDExpress
32 set "VisualStudioExpressName=WDExpress"
33 ) else if "%VCVER%" == "vc12" (
34 set "DevEnvDir=%VS120COMNTOOLS%..\IDE"
35 set "VisualStudioExpressName=WDExpress"
37 echo Error: wrong VS identifier
41 rem Launch Visual Studio - either professional (devenv) or Express, as available
42 if exist "%DevEnvDir%\devenv.exe" (
43 start "%DevEnvDir%\devenv.exe" "%PRJFILE%"
44 ) else if exist "%DevEnvDir%\%VisualStudioExpressName%.exe" (
45 start "%DevEnvDir%\%VisualStudioExpressName%.exe" "%PRJFILE%"
47 echo Error: Could not find MS Visual Studio ^(%VCVER%^)
48 echo Check relevant environment variable ^(e.g. VS80COMNTOOLS for vc8^)