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" |
10 | ) |
11 | |
12 | set "TCL_EXEC=tclsh.exe" |
13 | |
14 | for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X) |
15 | |
16 | if not defined TCL_FOUND ( |
17 | echo "Error. %TCL_EXEC% is not found. Please update PATH variable" |
18 | goto :eof |
19 | ) |
20 | |
910970ab |
21 | if not exist "%~dp0custom.bat" ( |
d1a67b9d |
22 | %TCL_EXEC% %~dp0adm/genconf.tcl |
910970ab |
23 | ) |
24 | |
25 | if not exist "%~dp0custom.bat" ( |
d1a67b9d |
26 | echo custom.bat is not created. Run the script again or create custom.bat manually |
910970ab |
27 | goto :eof |
910970ab |
28 | ) |
29 | |
30 | if exist "%~dp0env.bat" ( |
31 | call "%~dp0env.bat" |
32 | ) |
33 | |
34 | cd %~dp0 |
d1a67b9d |
35 | %TCL_EXEC% %~dp0adm/start.tcl genproj -path=. -target=%VCVER% |
910970ab |
36 | SET "PATH=%OLD_PATH%" |