0029463: Regression relation to 691 version: Method BndBox::IsOut() returns true...
[occt.git] / genconf.bat
CommitLineData
72c37458 1@echo off
2
3rem Helper script to configure environment for building with genproj tool.
4rem Running it requires that Tcl should be in the PATH
5
6SET "OLD_PATH=%PATH%"
7
8rem create env.bat if it does not exist yet
d6cda17a 9if not exist "%~dp0env.bat" (
72c37458 10 type "%~dp0adm\templates\env.bat" | findstr /i /v "__CASROOT__" > "%~dp0env.bat"
11)
d6cda17a 12call "%~dp0env.bat"
72c37458 13
14rem find Tcl
15set "TCL_EXEC=tclsh.exe"
16for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X)
17
18set "TCL_EXEC2=tclsh86.exe"
19if not defined TCL_FOUND (
20 for %%X in (%TCL_EXEC2%) do (
21 set TCL_FOUND=%%~$PATH:X
22 set TCL_EXEC=%TCL_EXEC2%
23 )
24)
25
26rem Prompt the user to specify location of Tcl if not found in PATH
27if not defined TCL_FOUND (
28 set /P TCL_PATH=This script requires Tcl, but tclsh.exe cannot be found in PATH.^
29
30Please enter path to folder containing tclsh.exe^
31
32^:
33 rem NOTE: KEEP LINE AFTER "set" ABOVE EMPTY !
34)
35
36if exist %TCL_PATH%\tclsh.exe (
37 set "TCL_FOUND=%TCL_PATH%\tclsh.exe"
38) else if exist %TCL_PATH%\tclsh86.exe (
39 set "TCL_FOUND=%TCL_PATH%\tclsh86.exe"
40) else (
41 set "TCL_EXEC=%TCL_PATH%\tclsh.exe"
42)
43
44rem Initialize custom.bat if it does not exist yet
45rem if not exist %%dp0custom.bat (
46rem echo set "PATH=%%PATH%%;%TCL_PATH%" >%~dp0custom.bat
47rem )
48
49rem fail if Tcl is not found
50if not defined TCL_FOUND (
51 echo Error: "%TCL_EXEC%" is not found. Please update PATH variable ^(use custom.bat^)
52 goto :eof
53)
54
d6cda17a 55rem run GUI tool
4b3541c6 56"%TCL_FOUND%" %~dp0adm/genconf.tcl
72c37458 57
58SET "PATH=%OLD_PATH%"