1 | @echo off |
---|
2 | :: This is an example batchfile for building everything. Please |
---|
3 | :: edit this (or make your own) for your needs and wants using |
---|
4 | :: the instructions for calling makefile.vc found in makefile.vc |
---|
5 | :: |
---|
6 | :: RCS: @(#) $Id: buildall.vc.bat,v 1.9 2005/10/14 12:31:39 patthoyts Exp $ |
---|
7 | |
---|
8 | set SYMBOLS= |
---|
9 | |
---|
10 | :OPTIONS |
---|
11 | if "%1" == "/?" goto help |
---|
12 | if /i "%1" == "/help" goto help |
---|
13 | if %1.==symbols. goto SYMBOLS |
---|
14 | if %1.==debug. goto SYMBOLS |
---|
15 | goto OPTIONS_DONE |
---|
16 | |
---|
17 | :SYMBOLS |
---|
18 | set SYMBOLS=symbols |
---|
19 | shift |
---|
20 | goto OPTIONS |
---|
21 | |
---|
22 | :OPTIONS_DONE |
---|
23 | |
---|
24 | :: reset errorlevel |
---|
25 | cd > nul |
---|
26 | |
---|
27 | :: We need to run the development environment batch script that comes |
---|
28 | :: with developer studio (v4,5,6,7,etc...) All have it. These paths |
---|
29 | :: might not be correct. You may need to edit these. |
---|
30 | :: |
---|
31 | if not defined MSDevDir ( |
---|
32 | call "C:\Program Files\Microsoft Developer Studio\vc98\bin\vcvars32.bat" |
---|
33 | ::call "C:\Program Files\Microsoft Developer Studio\vc\bin\vcvars32.bat" |
---|
34 | ::call c:\dev\devstudio60\vc98\bin\vcvars32.bat |
---|
35 | if errorlevel 1 goto no_vcvars |
---|
36 | ) |
---|
37 | |
---|
38 | |
---|
39 | echo. |
---|
40 | echo Sit back and have a cup of coffee while this grinds through ;) |
---|
41 | echo You asked for *everything*, remember? |
---|
42 | echo. |
---|
43 | title Building Tcl, please wait... |
---|
44 | |
---|
45 | |
---|
46 | :: makefile.vc uses this for its default anyways, but show its use here |
---|
47 | :: just to be explicit and convey understanding to the user. Setting |
---|
48 | :: the INSTALLDIR envar prior to running this batchfile affects all builds. |
---|
49 | :: |
---|
50 | if "%INSTALLDIR%" == "" set INSTALLDIR=C:\Program Files\Tcl |
---|
51 | |
---|
52 | |
---|
53 | :: Build the normal stuff along with the help file. |
---|
54 | :: |
---|
55 | set OPTS=none |
---|
56 | if not %SYMBOLS%.==. set OPTS=symbols |
---|
57 | nmake -nologo -f makefile.vc release winhelp OPTS=%OPTS% %1 |
---|
58 | if errorlevel 1 goto error |
---|
59 | |
---|
60 | :: Build the static core, dlls and shell. |
---|
61 | :: |
---|
62 | set OPTS=static |
---|
63 | if not %SYMBOLS%.==. set OPTS=symbols,static |
---|
64 | nmake -nologo -f makefile.vc release OPTS=%OPTS% %1 |
---|
65 | if errorlevel 1 goto error |
---|
66 | |
---|
67 | :: Build the special static libraries that use the dynamic runtime. |
---|
68 | :: |
---|
69 | set OPTS=static,msvcrt |
---|
70 | if not %SYMBOLS%.==. set OPTS=symbols,static,msvcrt |
---|
71 | nmake -nologo -f makefile.vc core dlls OPTS=%OPTS% %1 |
---|
72 | if errorlevel 1 goto error |
---|
73 | |
---|
74 | :: Build the core and shell for thread support. |
---|
75 | :: |
---|
76 | set OPTS=threads |
---|
77 | if not %SYMBOLS%.==. set OPTS=symbols,threads |
---|
78 | nmake -nologo -f makefile.vc shell OPTS=%OPTS% %1 |
---|
79 | if errorlevel 1 goto error |
---|
80 | |
---|
81 | :: Build a static, thread support core library with a shell. |
---|
82 | :: |
---|
83 | set OPTS=static,threads |
---|
84 | if not %SYMBOLS%.==. set OPTS=symbols,static,threads |
---|
85 | nmake -nologo -f makefile.vc shell OPTS=%OPTS% %1 |
---|
86 | if errorlevel 1 goto error |
---|
87 | |
---|
88 | :: Build the special static libraries that use the dynamic runtime, |
---|
89 | :: but now with thread support. |
---|
90 | :: |
---|
91 | set OPTS=static,msvcrt,threads |
---|
92 | if not %SYMBOLS%.==. set OPTS=symbols,static,msvcrt,threads |
---|
93 | nmake -nologo -f makefile.vc core dlls OPTS=%OPTS% %1 |
---|
94 | if errorlevel 1 goto error |
---|
95 | |
---|
96 | set OPTS= |
---|
97 | set SYMBOLS= |
---|
98 | goto end |
---|
99 | |
---|
100 | :error |
---|
101 | echo *** BOOM! *** |
---|
102 | goto end |
---|
103 | |
---|
104 | :no_vcvars |
---|
105 | echo vcvars32.bat not found. You'll need to edit this batch script. |
---|
106 | goto out |
---|
107 | |
---|
108 | :help |
---|
109 | title buildall.vc.bat help message |
---|
110 | echo usage: |
---|
111 | echo %0 : builds Tcl for all build types (do this first) |
---|
112 | echo %0 install : installs all the release builds (do this second) |
---|
113 | echo %0 symbols : builds Tcl for all debugging build types |
---|
114 | echo %0 symbols install : install all the debug builds. |
---|
115 | echo. |
---|
116 | goto out |
---|
117 | |
---|
118 | :end |
---|
119 | title Building Tcl, please wait... DONE! |
---|
120 | echo DONE! |
---|
121 | goto out |
---|
122 | |
---|
123 | :out |
---|
124 | pause |
---|
125 | title Command Prompt |
---|
126 | |
---|