0023741: Research and remove CSFDB support from OCCT if it is necessary
[occt.git] / samples / CSharp / msvc_D3D.bat
1 @echo off
2
3 rem Setup environment
4 call "%~dp0..\..\env.bat" %1 %2 %3
5
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.
9     exit /B
10   )
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.
13     exit /B
14   )
15 )
16
17 rem Define path to project file
18 set "PRJFILE=%~dp0\CSharp_D3D.sln"
19
20 set "VisualStudioExpressName=VCExpress"
21
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"
36 ) else (
37   echo Error: wrong VS identifier
38   exit /B
39 )
40
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%"
46 ) else (
47   echo Error: Could not find MS Visual Studio ^(%VCVER%^)
48   echo Check relevant environment variable ^(e.g. VS80COMNTOOLS for vc8^)
49 )