3 rem Helper script to configure environment for building with genproj tool.
4 rem Running it requires that Tcl should be in the PATH
8 rem create env.bat if it does not exist yet
9 if not exist "%~dp0env.bat" (
10 type "%~dp0adm\templates\env.bat" | findstr /i /v "__CASROOT__" > "%~dp0env.bat"
15 set "TCL_EXEC=tclsh.exe"
16 for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X)
18 set "TCL_EXEC2=tclsh86.exe"
19 if not defined TCL_FOUND (
20 for %%X in (%TCL_EXEC2%) do (
21 set TCL_FOUND=%%~$PATH:X
22 set TCL_EXEC=%TCL_EXEC2%
26 rem Prompt the user to specify location of Tcl if not found in PATH
27 if not defined TCL_FOUND (
28 set /P TCL_PATH=This script requires Tcl, but tclsh.exe cannot be found in PATH.^
30 Please enter path to folder containing tclsh.exe^
33 rem NOTE: KEEP LINE AFTER "set" ABOVE EMPTY !
36 if 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"
41 set "TCL_EXEC=%TCL_PATH%\tclsh.exe"
44 rem Initialize custom.bat if it does not exist yet
45 rem if not exist %%dp0custom.bat (
46 rem echo set "PATH=%%PATH%%;%TCL_PATH%" >%~dp0custom.bat
49 rem fail if Tcl is not found
50 if not defined TCL_FOUND (
51 echo Error: "%TCL_EXEC%" is not found. Please update PATH variable ^(use custom.bat^)
56 "%TCL_FOUND%" %~dp0adm/genconf.tcl