X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=genproj.bat;h=aa4296a97f3028d7bb97e37fcfb777872127a70f;hp=0610af624d7b402f8ace09dddff5582f740c85f6;hb=882e1d11aa7f045752b4eb3849751e79c80e8a9e;hpb=d1a67b9d1bc6867be5da1209050d3932f307a184 diff --git a/genproj.bat b/genproj.bat index 0610af624d..aa4296a97f 100644 --- a/genproj.bat +++ b/genproj.bat @@ -2,35 +2,45 @@ rem Helper script to run generation of VS projects on Windows. rem Running it requires that Tcl should be in the PATH +rem Optional arguments: IDE OS +rem IDE can be vc10, vc11, vc12, vc14, cbp, or xcd +rem OS can be wnt, mac, or lin SET "OLD_PATH=%PATH%" +rem run GUI configurator if custom.bat is missing +if not exist "%~dp0custom.bat" ( + call %~dp0genconf.bat +) + +if not exist "%~dp0custom.bat" ( + echo Error: custom.bat is not present. + echo Run the script again to generate custom.bat, or create it manually + goto :eof +) + if exist "%~dp0env.bat" ( - call "%~dp0env.bat" + call "%~dp0env.bat" %1 ) +rem find Tcl set "TCL_EXEC=tclsh.exe" - for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X) +set "TCL_EXEC2=tclsh86.exe" if not defined TCL_FOUND ( - echo "Error. %TCL_EXEC% is not found. Please update PATH variable" - goto :eof + for %%X in (%TCL_EXEC2%) do ( + set TCL_FOUND=%%~$PATH:X + set TCL_EXEC=%TCL_EXEC2% + ) ) -if not exist "%~dp0custom.bat" ( - %TCL_EXEC% %~dp0adm/genconf.tcl -) - -if not exist "%~dp0custom.bat" ( - echo custom.bat is not created. Run the script again or create custom.bat manually +rem fail if Tcl is not found +if not defined TCL_FOUND ( + echo Error: "%TCL_EXEC%" is not found. Please update PATH variable ^(use custom.bat^) goto :eof -) - -if exist "%~dp0env.bat" ( - call "%~dp0env.bat" -) +) cd %~dp0 -%TCL_EXEC% %~dp0adm/start.tcl genproj -path=. -target=%VCVER% +%TCL_EXEC% %~dp0adm/start.tcl genproj %VCVER% %2 %3 %4 %5 SET "PATH=%OLD_PATH%"