Redirection of generation reference documentation from source files
[occt.git] / genproj.bat
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
8 if exist "%~dp0env.bat" (
9   call "%~dp0env.bat"
10 ) else (
11    type "%~dp0adm\templates\env.bat" | findstr /i /v "__CASROOT__" > "%~dp0env.bat"
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
23 if not exist "%~dp0custom.bat" (
24   %TCL_EXEC% %~dp0adm/genconf.tcl
25 )
26
27 if not exist "%~dp0custom.bat" (
28   echo custom.bat is not created. Run the script again or create custom.bat manually
29   goto :eof
30 )
31
32 if exist "%~dp0env.bat" (
33   call "%~dp0env.bat"
34 )
35
36 cd %~dp0
37 %TCL_EXEC% %~dp0adm/start.tcl genproj -path=. -target=%VCVER%
38 SET "PATH=%OLD_PATH%"