0024629: Possibility to install binaries in vc*/bin(d), vc*/lib(d) directories
[occt.git] / adm / templates / env.bat.in
1 echo off
2
3 set "SCRIPTROOT=%~dp0"
4 set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
5
6 set "VCVER=@COMPILER@"
7 set "ARCH=@COMPILER_BITNESS@"
8 set "CASDEB=@BUILD_SUFFIX@"
9
10 if not ["%1"]    == [""]      set "VCVER=%1"
11 if not ["%2"]    == [""]      set "ARCH=%2"
12 if /I ["%ARCH%"] == ["win32"] set "ARCH=32"
13 if /I ["%ARCH%"] == ["win64"] set "ARCH=64"
14 if /I ["%3"]     == ["debug"] set "CASDEB=d"
15 if /I ["%3"]     == ["d"]     set "CASDEB=d"
16
17 if exist "%~dp0custom.bat" (
18   call "%~dp0custom.bat" %1 %2 %3
19 )
20
21 if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
22
23 set "ORIGIN_PATH=%PATH%"
24
25 if not ["%TCL_DIR%"] == [""]       set "PATH=%TCL_DIR%;%PATH%"
26 if not ["%FREETYPE_DIR%"] == [""]  set "PATH=%FREETYPE_DIR%;%PATH%"
27 if not ["%FREEIMAGE_DIR%"] == [""] set "PATH=%FREEIMAGE_DIR%;%PATH%"
28 if not ["%GL2PS_DIR%"] == [""]     set "PATH=%GL2PS_DIR%;%PATH%"
29 if not ["%TBB_DIR%"] == [""]       set "PATH=%TBB_DIR%;%PATH%"
30
31 rem ----- Set path to 3rd party and OCCT libraries -----
32 set "BIN_TAIL=win%ARCH%/%VCVER%/bin%CASDEB%"
33 set "PATH=%CASROOT%/%BIN_TAIL%;%PATH%"
34
35 rem ----- Set envoronment variables used by OCCT -----
36 set  CSF_LANGUAGE=us
37 set  MMGT_CLEAR=1
38 set  CSF_EXCEPTION_PROMPT=1
39 set "CSF_SHMessage=%CASROOT%\src\SHMessage"
40 set "CSF_MDTVTexturesDirectory=%CASROOT%\src\Textures"
41 set "CSF_ShadersDirectory=%CASROOT%\src\Shaders"
42 set "CSF_XSMessage=%CASROOT%\src\XSMessage"
43 set "CSF_TObjMessage=%CASROOT%\src\TObj"
44 set "CSF_StandardDefaults=%CASROOT%\src\StdResource"
45 set "CSF_PluginDefaults=%CASROOT%\src\StdResource"
46 set "CSF_XCAFDefaults=%CASROOT%\src\StdResource"
47 set "CSF_TObjDefaults=%CASROOT%\src\StdResource"
48 set "CSF_StandardLiteDefaults=%CASROOT%\src\StdResource"
49 set "CSF_UnitsLexicon=%CASROOT%\src\UnitsAPI\Lexi_Expr.dat"
50 set "CSF_UnitsDefinition=%CASROOT%\src\UnitsAPI\Units.dat"
51 set "CSF_IGESDefaults=%CASROOT%\src\XSTEPResource"
52 set "CSF_STEPDefaults=%CASROOT%\src\XSTEPResource"
53 set "CSF_XmlOcafResource=%CASROOT%\src\XmlOcafResource"
54 set "CSF_MIGRATION_TYPES=%CASROOT%\src\StdResource\MigrationSheet.txt"
55
56 rem Draw Harness special stuff
57 if exist "%CASROOT%\src\DrawResources" (
58   set "DRAWHOME=%CASROOT%\src\DrawResources"
59   set "CSF_DrawPluginDefaults=%CASROOT%\src\DrawResources"
60
61   if exist "%CASROOT%\src\DrawResources\DrawDefault" (
62     set "DRAWDEFAULT=%CASROOT%\src\DrawResources\DrawDefault"
63   )
64 )
65
66 if exist "%CASROOT%\src\DrawResourcesProducts" (
67   set "CSF_DrawPluginProductsDefaults=%CASROOT%\src\DrawResourcesProducts"
68 )
69