15534713 |
1 | @echo off |
2 | |
4b3541c6 |
3 | Setlocal EnableDelayedExpansion |
4 | |
06562706 |
5 | rem Setup environment |
4b3541c6 |
6 | call "%~dp0env.bat" %1 %2 %3 |
62e1beed |
7 | |
15534713 |
8 | if NOT DEFINED DXSDK_DIR ( |
4b3541c6 |
9 | if /I "%VCVER%" == "vc9" ( |
62e1beed |
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. |
11 | exit /B |
12 | ) |
4b3541c6 |
13 | if /I "%VCVER%" == "vc10" ( |
62e1beed |
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. |
15 | exit /B |
16 | ) |
15534713 |
17 | ) |
18 | |
06562706 |
19 | rem Define path to project file |
20 | set "PRJFILE=%~dp0\CSharp_D3D.sln" |
21 | |
06562706 |
22 | rem Launch Visual Studio - either professional (devenv) or Express, as available |
23 | if exist "%DevEnvDir%\devenv.exe" ( |
48691eaa |
24 | start "" "%DevEnvDir%\devenv.exe" "%PRJFILE%" |
06562706 |
25 | ) else if exist "%DevEnvDir%\%VisualStudioExpressName%.exe" ( |
48691eaa |
26 | start "" "%DevEnvDir%\%VisualStudioExpressName%.exe" "%PRJFILE%" |
15534713 |
27 | ) else ( |
06562706 |
28 | echo Error: Could not find MS Visual Studio ^(%VCVER%^) |
693c4bbe |
29 | echo Check relevant environment variable ^(e.g. VS100COMNTOOLS for vc10^) |
06562706 |
30 | ) |