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 | |
72c37458 |
8 | rem run GUI configurator if custom.bat is missing |
9 | if not exist "%~dp0custom.bat" ( |
10 | call %~dp0genconf.bat |
11 | ) |
12 | |
13 | if not exist "%~dp0custom.bat" ( |
14 | echo Error: custom.bat is not present. |
15 | echo Run the script again to generate custom.bat, or create it manually |
16 | goto :eof |
17 | ) |
18 | |
d1a67b9d |
19 | if exist "%~dp0env.bat" ( |
20 | call "%~dp0env.bat" |
21 | ) |
22 | |
72c37458 |
23 | rem find Tcl |
d1a67b9d |
24 | set "TCL_EXEC=tclsh.exe" |
d1a67b9d |
25 | for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X) |
26 | |
72c37458 |
27 | set "TCL_EXEC2=tclsh86.exe" |
d1a67b9d |
28 | if not defined TCL_FOUND ( |
72c37458 |
29 | for %%X in (%TCL_EXEC2%) do ( |
30 | set TCL_FOUND=%%~$PATH:X |
31 | set TCL_EXEC=%TCL_EXEC2% |
32 | ) |
d1a67b9d |
33 | ) |
34 | |
72c37458 |
35 | rem fail if Tcl is not found |
36 | if not defined TCL_FOUND ( |
37 | echo Error: "%TCL_EXEC%" is not found. Please update PATH variable ^(use custom.bat^) |
910970ab |
38 | goto :eof |
72c37458 |
39 | ) |
910970ab |
40 | |
41 | cd %~dp0 |
d1a67b9d |
42 | %TCL_EXEC% %~dp0adm/start.tcl genproj -path=. -target=%VCVER% |
910970ab |
43 | SET "PATH=%OLD_PATH%" |