0026763: CMake configuration process does not allow setup paths for TK library if...
[occt.git] / adm / templates / env.install.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_LETTER@"
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 if /I ["%3"]     == ["i"]     set "CASDEB=i"
17 if /I ["%3"]     == ["relwithdeb"] set "CASDEB=i"
18
19 if exist "%~dp0custom.bat" (
20   call "%~dp0custom.bat" %VCVER% %ARCH% %CASDEB%
21 )
22
23 if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
24 set "PRODROOT="
25
26 set "ORIGIN_PATH=%PATH%"
27
28 if not ["%TCL_DIR%"] == [""]           set "PATH=%TCL_DIR%;%PATH%"
29 if not ["%TK_DIR%"] == [""]            set "PATH=%TK_DIR%;%PATH%"
30 if not ["%FREETYPE_DIR%"] == [""]      set "PATH=%FREETYPE_DIR%;%PATH%"
31 if not ["%FREEIMAGE_DIR%"] == [""]     set "PATH=%FREEIMAGE_DIR%;%PATH%"
32 if not ["%FREEIMAGEPLUS_DIR%"] == [""] set "PATH=%FREEIMAGEPLUS_DIR%;%PATH%"
33 if not ["%GL2PS_DIR%"] == [""]         set "PATH=%GL2PS_DIR%;%PATH%"
34 if not ["%TBB_DIR%"] == [""]           set "PATH=%TBB_DIR%;%PATH%"
35 if not ["%VTK_DIR%"] == [""]           set "PATH=%VTK_DIR%;%PATH%"
36
37 rem ----- Set path to 3rd party and OCCT libraries -----
38 set "BIN_TAIL=win%ARCH%/%VCVER%/bin%CASDEB%"
39 set "PATH=%CASROOT%/%BIN_TAIL%;%PATH%"
40 if not ["%TK_DIR%"] == ["%TCL_DIR%"] (
41   if not ["%TK_DIR%"] == [""]  set "TK_LIBRARY=%TK_DIR%/../lib/tk@3RDPARTY_TK_LIBRARY_VERSION_WITH_DOT@"
42   if not ["%TCL_DIR%"] == [""] set "TCL_LIBRARY=%TCL_DIR%/../lib/tcl@3RDPARTY_TCL_LIBRARY_VERSION_WITH_DOT@"
43 )
44
45 rem ----- Set envoronment variables used by OCCT -----
46 set  CSF_LANGUAGE=us
47 set  MMGT_CLEAR=1
48 set  CSF_EXCEPTION_PROMPT=1
49 set "CSF_SHMessage=%CASROOT%\src\SHMessage"
50 set "CSF_MDTVTexturesDirectory=%CASROOT%\src\Textures"
51 set "CSF_ShadersDirectory=%CASROOT%\src\Shaders"
52 set "CSF_XSMessage=%CASROOT%\src\XSMessage"
53 set "CSF_TObjMessage=%CASROOT%\src\TObj"
54 set "CSF_StandardDefaults=%CASROOT%\src\StdResource"
55 set "CSF_PluginDefaults=%CASROOT%\src\StdResource"
56 set "CSF_XCAFDefaults=%CASROOT%\src\StdResource"
57 set "CSF_TObjDefaults=%CASROOT%\src\StdResource"
58 set "CSF_StandardLiteDefaults=%CASROOT%\src\StdResource"
59 set "CSF_UnitsLexicon=%CASROOT%\src\UnitsAPI\Lexi_Expr.dat"
60 set "CSF_UnitsDefinition=%CASROOT%\src\UnitsAPI\Units.dat"
61 set "CSF_IGESDefaults=%CASROOT%\src\XSTEPResource"
62 set "CSF_STEPDefaults=%CASROOT%\src\XSTEPResource"
63 set "CSF_XmlOcafResource=%CASROOT%\src\XmlOcafResource"
64 set "CSF_MIGRATION_TYPES=%CASROOT%\src\StdResource\MigrationSheet.txt"
65
66 rem Draw Harness special stuff
67 if exist "%CASROOT%\src\DrawResources" (
68   set "DRAWHOME=%CASROOT%\src\DrawResources"
69   set "CSF_DrawPluginDefaults=%CASROOT%\src\DrawResources"
70
71   if exist "%CASROOT%\src\DrawResources\DrawDefault" (
72     set "DRAWDEFAULT=%CASROOT%\src\DrawResources\DrawDefault"
73   )
74 )
75
76 if exist "%CASROOT%\src\DrawResourcesProducts" (
77   set "CSF_DrawPluginProductsDefaults=%CASROOT%\src\DrawResourcesProducts"
78 )
79