| 1 |
@echo off |
| 2 |
|
| 3 |
:: This is an example batchfile for building everything. Please |
| 4 |
:: edit this (or make your own) for your needs and wants using |
| 5 |
:: the instructions for calling makefile.vc found in makefile.vc |
| 6 |
|
| 7 |
set SYMBOLS= |
| 8 |
|
| 9 |
:OPTIONS |
| 10 |
if "%1" == "/?" goto help |
| 11 |
if /i "%1" == "/help" goto help |
| 12 |
if %1.==symbols. goto SYMBOLS |
| 13 |
if %1.==debug. goto SYMBOLS |
| 14 |
goto OPTIONS_DONE |
| 15 |
|
| 16 |
:SYMBOLS |
| 17 |
set SYMBOLS=symbols |
| 18 |
shift |
| 19 |
goto OPTIONS |
| 20 |
|
| 21 |
:OPTIONS_DONE |
| 22 |
|
| 23 |
:: reset errorlevel |
| 24 |
cd > nul |
| 25 |
|
| 26 |
:: You might have installed your developer studio to add itself to the |
| 27 |
:: path or have already run vcvars32.bat. Testing these envars proves |
| 28 |
:: cl.exe and friends are in your path. |
| 29 |
:: |
| 30 |
if defined VCINSTALLDIR (goto :startBuilding) |
| 31 |
if defined MSDEVDIR (goto :startBuilding) |
| 32 |
if defined MSVCDIR (goto :startBuilding) |
| 33 |
if defined MSSDK (goto :startBuilding) |
| 34 |
if defined WINDOWSSDKDIR (goto :startBuilding) |
| 35 |
|
| 36 |
:: We need to run the development environment batch script that comes |
| 37 |
:: with developer studio (v4,5,6,7,etc...) All have it. This path |
| 38 |
:: might not be correct. You should call it yourself prior to running |
| 39 |
:: this batchfile. |
| 40 |
:: |
| 41 |
call "C:\Program Files\Microsoft Developer Studio\vc98\bin\vcvars32.bat" |
| 42 |
if errorlevel 1 (goto no_vcvars) |
| 43 |
|
| 44 |
:startBuilding |
| 45 |
|
| 46 |
echo. |
| 47 |
echo Sit back and have a cup of coffee while this grinds through ;) |
| 48 |
echo You asked for *everything*, remember? |
| 49 |
echo. |
| 50 |
title Building Tcl, please wait... |
| 51 |
|
| 52 |
|
| 53 |
:: makefile.vc uses this for its default anyways, but show its use here |
| 54 |
:: just to be explicit and convey understanding to the user. Setting |
| 55 |
:: the INSTALLDIR envar prior to running this batchfile affects all builds. |
| 56 |
:: |
| 57 |
if "%INSTALLDIR%" == "" set INSTALLDIR=C:\Program Files\Tcl |
| 58 |
|
| 59 |
|
| 60 |
:: Build the normal stuff along with the help file. |
| 61 |
:: |
| 62 |
set OPTS=none |
| 63 |
if not %SYMBOLS%.==. set OPTS=symbols |
| 64 |
nmake -nologo -f makefile.vc release htmlhelp OPTS=%OPTS% %1 |
| 65 |
if errorlevel 1 goto error |
| 66 |
|
| 67 |
:: Build the static core and shell. |
| 68 |
:: |
| 69 |
set OPTS=static,msvcrt |
| 70 |
if not %SYMBOLS%.==. set OPTS=symbols,static,msvcrt |
| 71 |
nmake -nologo -f makefile.vc shell OPTS=%OPTS% %1 |
| 72 |
if errorlevel 1 goto error |
| 73 |
|
| 74 |
set OPTS= |
| 75 |
set SYMBOLS= |
| 76 |
goto end |
| 77 |
|
| 78 |
:error |
| 79 |
echo *** BOOM! *** |
| 80 |
goto end |
| 81 |
|
| 82 |
:no_vcvars |
| 83 |
echo vcvars32.bat was not run prior to this batchfile, nor are the MS tools in your path. |
| 84 |
goto out |
| 85 |
|
| 86 |
:help |
| 87 |
title buildall.vc.bat help message |
| 88 |
echo usage: |
| 89 |
echo %0 : builds Tcl for all build types (do this first) |
| 90 |
echo %0 install : installs all the release builds (do this second) |
| 91 |
echo %0 symbols : builds Tcl for all debugging build types |
| 92 |
echo %0 symbols install : install all the debug builds. |
| 93 |
echo. |
| 94 |
goto out |
| 95 |
|
| 96 |
:end |
| 97 |
title Building Tcl, please wait... DONE! |
| 98 |
echo DONE! |
| 99 |
goto out |
| 100 |
|
| 101 |
:out |
| 102 |
pause |
| 103 |
title Command Prompt |