0023115: Polygon offset doesn't applied in Viewer3D sample
[occt.git] / samples / mfc / standard / env.bat
CommitLineData
cf236913 1@ECHO OFF
2
3rem Set environment for building OCCT mfc samples
4rem Use first argument to specify version of Visual Studio (vc8, vc9, or vc10),
5rem second argument specifies architecture) (win32 or win64)
6rem - third argument specifies build mode,
7
8rem Set build environment
9call "%~dp0..\..\ros\env_build.bat" %1 %2
10
11rem Set build mode
12set CASDEB=d
13if not "%3" EQU "" (
14 if /I "%3" == "Release" (
15 set CASDEB=
16 ) else if /I "%3" == "Debug" (
17 set CASDEB=d
18 ) else (
19 echo Error: third argument ^(%3^) should specify build mode,
20 echo one of: Debug or Release
21 exit /B
22 )
23)
24)
25
26rem Workaround for problems of building by VS2010 in 64 bit mode
27if /I "%VCVER%" == "vc10" (
28 if "%ARCH%" == "64" (
29 echo Attention: The error can occured during the compilation in Visual Studio 2010,
30 echo 64 bit mode with embedding manifests ^(TRACKER : error TRK0002: Failed to execute command:^).
31 echo It's an error of Visual Studio 2010 which will be corrected in future versions of Visual Studio.
32 echo More details can be found here:
33 echo https://connect.microsoft.com/VisualStudio/feedback/details/505682/x64-c-c-projects-cannot-compile
34 )
35)
36
37SET OS_TYPE=win%ARCH%
38
39IF NOT DEFINED CASROOT GOTO ERR_CASROOT
40
41IF NOT DEFINED OS_TYPE GOTO ERR_OSTYPE
42
43IF NOT EXIST "%CASROOT%\%OS_TYPE%\%VCVER%\bin\TKernel.dll" GOTO ERR_CASCADE
44
45IF not "%CASDEB%" EQU "" (
46SET CASLIBS=%CASROOT%\%OS_TYPE%\%VCVER%\bind
47SET BIN_DIR=%OS_TYPE%\%VCVER%\bind
48SET LIB_DIR=%OS_TYPE%\%VCVER%\libd
49SET CSF_GraphicShr=%CASROOT%\%OS_TYPE%\%VCVER%\bind\TKOpenGl.dll
50) ELSE (
51SET CASLIBS=%CASROOT%\%OS_TYPE%\%VCVER%\bin
52SET BIN_DIR=%OS_TYPE%\%VCVER%\bin
53SET LIB_DIR=%OS_TYPE%\%VCVER%\lib
54SET CSF_GraphicShr=%CASROOT%\%OS_TYPE%\%VCVER%\bin\TKOpenGl.dll
55)
56
57SET PATH=%~dp0%LIB_DIR%;%~dp0%BIN_DIR%;%CASLIBS%;%PATH%
58
59SET RES_DIR=.\res
60
61set CSF_ResourcesDefaults=%CASROOT%\..\samples\mfc\06_Ocaf\res
62set CSF_PluginDefaults=%CASROOT%\..\samples\mfc\06_Ocaf\res
63
64GOTO END
65
66:ERR_CASROOT
67ECHO Environment variable "CASROOT" has not been defined. Abort.
68EXIT /B
69
70:ERR_CASCADE
71ECHO Environment variable "CASROOT" defined incorrectly. Abort.
72EXIT /B
73
74:ERR_OSTYPE
75ECHO Environment variable "OS_TYPE" has not been defined. Abort.
76EXIT /B
77
78:END
79