SET "OLD_PATH=%PATH%"
+if exist "%~dp0env.bat" (
+ call "%~dp0env.bat"
+)
+
+set "TCL_EXEC=tclsh.exe"
+
+for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X)
+
+if not defined TCL_FOUND (
+ echo "Error. %TCL_EXEC% is not found. Please update PATH variable"
+ goto :eof
+)
+
if not exist "%~dp0custom.bat" (
- tclsh.exe ./adm/genconf.tcl
+ %TCL_EXEC% %~dp0adm/genconf.tcl
)
if not exist "%~dp0custom.bat" (
- echo custom.bat is not created. Run the script again and generate custom.bat
+ echo custom.bat is not created. Run the script again or create custom.bat manually
goto :eof
-) else (
- call "%~dp0custom.bat"
)
if exist "%~dp0env.bat" (
)
cd %~dp0
-tclsh.exe ./adm/genproj.tcl -path=. -target=%VCVER%
+%TCL_EXEC% %~dp0adm/start.tcl genproj -path=. -target=%VCVER%
SET "PATH=%OLD_PATH%"