910970ab |
1 | @echo off |
2 | |
3 | rem Helper script to run generation of VS projects on Windows. |
4 | rem Running it requires that Tcl should be in the PATH |
5 | |
6 | SET "OLD_PATH=%PATH%" |
7 | |
d1a67b9d |
8 | if exist "%~dp0env.bat" ( |
9 | call "%~dp0env.bat" |
31dfc19f |
10 | ) else ( |
11 | type "%~dp0adm\templates\env.bat" | findstr /i /v "__CASROOT__" > "%~dp0env.bat" |
d1a67b9d |
12 | ) |
13 | |
14 | set "TCL_EXEC=tclsh.exe" |
15 | |
16 | for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X) |
17 | |
18 | if not defined TCL_FOUND ( |
19 | echo "Error. %TCL_EXEC% is not found. Please update PATH variable" |
20 | goto :eof |
21 | ) |
22 | |
910970ab |
23 | if not exist "%~dp0custom.bat" ( |
d1a67b9d |
24 | %TCL_EXEC% %~dp0adm/genconf.tcl |
910970ab |
25 | ) |
26 | |
27 | if not exist "%~dp0custom.bat" ( |
d1a67b9d |
28 | echo custom.bat is not created. Run the script again or create custom.bat manually |
910970ab |
29 | goto :eof |
910970ab |
30 | ) |
31 | |
32 | if exist "%~dp0env.bat" ( |
33 | call "%~dp0env.bat" |
34 | ) |
35 | |
36 | cd %~dp0 |
d1a67b9d |
37 | %TCL_EXEC% %~dp0adm/start.tcl genproj -path=. -target=%VCVER% |
910970ab |
38 | SET "PATH=%OLD_PATH%" |