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