| 1 |
|
| 2 |
This file describes how to build BLT under Windows 95/98/NT/2000/XP. |
| 3 |
|
| 4 |
It's not necessary to compile BLT for Windows 95/98/NT/2000/XP. |
| 5 |
Binary versions are available on ftp.tcltk.com/pub/blt. |
| 6 |
|
| 7 |
http://www.sourceforge.net/projects/blt/files/blt2.4z-for-8.0.exe |
| 8 |
-or- |
| 9 |
http://www.sourceforge.net/projects/blt/files/blt2.4z-for-8.1.exe |
| 10 |
-or- |
| 11 |
http://www.sourceforge.net/projects/blt/files/blt2.4z-for-8.2.exe |
| 12 |
-or- |
| 13 |
http://www.sourceforge.net/projects/blt/files/blt2.4z-for-8.3.exe |
| 14 |
|
| 15 |
They will dynamically load into wish80.exe, wish81.exe, wish82.exe, or |
| 16 |
wish83.exe by invoking |
| 17 |
|
| 18 |
package require BLT |
| 19 |
|
| 20 |
from within your script. |
| 21 |
|
| 22 |
If you really need to build BLT yourself, then hold onto your hat. |
| 23 |
It's a lot more difficult to build BLT under Windows than under Unix. |
| 24 |
Most Windows software is designed to be delivered as a self-installing |
| 25 |
binary executable, therefore it's rare to find the installation tools |
| 26 |
necessary to build and install BLT from the source code. |
| 27 |
|
| 28 |
1. What versions of Tcl/Tk can I use? |
| 29 |
|
| 30 |
Any stable release. I've built and tested BLT with Tcl/Tk |
| 31 |
versions 8.0.5, 8.1.1, and 8.2.3, and 8.3.4. Avoid the alpha and |
| 32 |
beta versions. |
| 33 |
|
| 34 |
2. What compiler can I use? |
| 35 |
|
| 36 |
You can use one of the following compilers: |
| 37 |
|
| 38 |
1. Microsoft Visual C++ 5.0/6.0 |
| 39 |
2. Cygwin's GNU CC 2.95.2 (with or without -mno-cygwin) |
| 40 |
3. Borland Free compiler 5.5.1 |
| 41 |
|
| 42 |
I normally build with VC++ 6.0. This is also what the binary Tcl/Tk |
| 43 |
distribution use. |
| 44 |
|
| 45 |
Note: Unless it's your only option, I don't recommend using the |
| 46 |
Borland free compiler right now. |
| 47 |
|
| 48 |
3. What "make" program do I need? |
| 49 |
|
| 50 |
I highly recommend installing the Cygwin tool suite. You can pick |
| 51 |
this up from |
| 52 |
|
| 53 |
http://sourceware.cygnus.com/cygwin/setup.exe |
| 54 |
|
| 55 |
I normally use GNU make instead of Microsoft's nmake. But you can |
| 56 |
also nmake. If you have a choice, use the Cygnus tools. For |
| 57 |
compiling with Borland's C compiler, you can use Borland's make.exe. |
| 58 |
|
| 59 |
4. Do I need to compile the Tcl/Tk libraries? |
| 60 |
|
| 61 |
More than likely. Unless you're compiling with Cygwin GCC and the |
| 62 |
cygwin-version of the Tcl/Tk libraries, you'll need to obtain the |
| 63 |
Tcl/Tk sources and compile them. |
| 64 |
|
| 65 |
5. Is there anything else I need? |
| 66 |
|
| 67 |
By default, JPEG support is enabled. It uses the jpeg-6b |
| 68 |
libraries from ftp.uu.net. You can pick up the sources from |
| 69 |
|
| 70 |
ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz |
| 71 |
|
| 72 |
You can also use the Intel JPEG Libraries. JPEG support is |
| 73 |
optional. You can disable it. |
| 74 |
|
| 75 |
6. Can I mix-and-match DLLs? |
| 76 |
|
| 77 |
You can't really mix the Borland and VC++ compiled DLLs. BLT isn't |
| 78 |
stubbed and the symbol names are incompatible between versions. |
| 79 |
The various workarounds are difficult. |
| 80 |
|
| 81 |
I haven't tested this, but I believe you can load a GNU CC |
| 82 |
(-mno-cygwin) BLT24.dll into a VC++ compiled wish. |
| 83 |
|
| 84 |
In general the best advice is to use the same compiler that |
| 85 |
that you compiled Tcl/Tk to compile BLT. |
| 86 |
|
| 87 |
7. What compiler should I use? |
| 88 |
|
| 89 |
Right now, probably Microsoft VC++. This is what all Tcl/Tk |
| 90 |
releases 8.0 to present have been built with. So you shouldn't |
| 91 |
have to work too hard to compile the Tcl and Tk libraries. |
| 92 |
|
| 93 |
Having said that, Cygwin's GNU CC works just fine. You can |
| 94 |
obtain versions from Mumit Khan to build Tcl and Tk. I recommend |
| 95 |
compiling the Tcl/Tk libraries yourself with the -mno-cygwin |
| 96 |
option. |
| 97 |
|
| 98 |
And if compiling Tcl and Tk is too much of a hassle, you can |
| 99 |
always built BLT with the cygwin Tcl/Tk libraries (cygtcl80.dll |
| 100 |
and cygtk80.dll). The downside is that the cygwin libraries are |
| 101 |
1) pretty old (version 8.0) and 2) there may be some |
| 102 |
incompatibilities between the native Win32 calls in BLT |
| 103 |
and the cygwin emulation layer. |
| 104 |
|
| 105 |
I have built BLT with the Borland free compiler. It's not |
| 106 |
100% yet. The problems are |
| 107 |
1) If you automatically load BLT from a script file, you |
| 108 |
will generate exception in the DLL. Oddly enough, |
| 109 |
you can source the script manually. |
| 110 |
2) Resampled images are blank (see the graph3.tcl and eps.tcl |
| 111 |
demos). The same code works with both GCC and VC++. |
| 112 |
3) I can't even get wish83.exe to open a console window. |
| 113 |
Weirdly, bltwish.exe does this properly. |
| 114 |
4) The turbo debugger is a pain. |
| 115 |
|
| 116 |
|
| 117 |
Building BLT with Microsoft VC++, Cygwin Make, and VC++ compiled |
| 118 |
Tcl/Tk libraries. |
| 119 |
=================================================================== |
| 120 |
|
| 121 |
1. Install the Tcl/Tk sources. They should reside in the |
| 122 |
same directory tree as the BLT sources. |
| 123 |
|
| 124 |
______________|______________ |
| 125 |
| | | | |
| 126 |
blt2.4 tcl8.3.4 tk8.3.4 jpeg-6b |
| 127 |
|
| 128 |
|
| 129 |
2. Build and install the Tcl and Tk libraries. |
| 130 |
|
| 131 |
cd tcl8.3.4/win |
| 132 |
nmake -f Makefile.vc |
| 133 |
nmake -f Makefile.vc install |
| 134 |
cd ../../tk8.3.4/win |
| 135 |
nmake -f Makefile.vc |
| 136 |
nmake -f Makefile.vc install |
| 137 |
|
| 138 |
3. In the BLT directory, edit ./win/makedefs. Set the following |
| 139 |
macros. |
| 140 |
|
| 141 |
|
| 142 |
v1 = 8.3 Tcl/Tk version. |
| 143 |
v2 = 83 Version number without dots. |
| 144 |
v3 = 8.3.4 Suffix of Tcl/Tk directories |
| 145 |
|
| 146 |
prefix = C:/Program\ Files/Tcl |
| 147 |
Location of installed Tcl/Tk files. |
| 148 |
TOOLS32 = C:/Program\ Files/Microsoft\ Visual\ Studio/VC90 |
| 149 |
Location of MS C compiler and tools. |
| 150 |
HAVE_JPEG = 0 |
| 151 |
|
| 152 |
4. Compile and install. |
| 153 |
|
| 154 |
make -f Makefile.vc |
| 155 |
make -f Makefile.vc install |
| 156 |
|
| 157 |
5. Add the location of BLT24.dll to your PATH variable and test |
| 158 |
BLT |
| 159 |
|
| 160 |
cd demos |
| 161 |
export PATH=/cygdrive/c/Program\ Files/Tcl/bin:$PATH |
| 162 |
|
| 163 |
bltwish.exe graph1.tcl |
| 164 |
|
| 165 |
Building BLT with Microsoft VC++, nmake, and VC++ compiled Tcl/Tk |
| 166 |
libraries. |
| 167 |
==================================================================== |
| 168 |
|
| 169 |
1. Install the Tcl/Tk sources. They should reside in the |
| 170 |
same directory tree as the BLT sources. |
| 171 |
|
| 172 |
______________|______________ |
| 173 |
| | | | |
| 174 |
blt2.4 tcl8.3.4 tk8.3.4 jpeg-6b |
| 175 |
|
| 176 |
|
| 177 |
2. Build and install the Tcl and Tk libraries. |
| 178 |
|
| 179 |
cd tcl8.3.4\win |
| 180 |
nmake -f Makefile.vc |
| 181 |
nmake -f Makefile.vc install |
| 182 |
cd ..\..\tk8.3.4\win |
| 183 |
nmake -f Makefile.vc |
| 184 |
nmake -f Makefile.vc install |
| 185 |
|
| 186 |
3. In the BLT directory, edit .\win\makedefs. Set the following |
| 187 |
macros. |
| 188 |
|
| 189 |
|
| 190 |
v1 = 8.3 Tcl/Tk version. |
| 191 |
v2 = 83 Version number without dots. |
| 192 |
v3 = 8.3.4 Suffix of Tcl/Tk directories |
| 193 |
|
| 194 |
prefix = C:/Program\ Files/Tcl |
| 195 |
Location of installed Tcl/Tk files. |
| 196 |
TOOLS32 = C:/Program\ Files/Microsoft\ Visual\ Studio/VC90 |
| 197 |
Location of MS C compiler and tools. |
| 198 |
HAVE_JPEG = 0 |
| 199 |
|
| 200 |
4. Compile BLT. |
| 201 |
|
| 202 |
make -f blt.mak |
| 203 |
|
| 204 |
5. Install BLT |
| 205 |
|
| 206 |
Since Windows doesn't provide tools to install software, we'll |
| 207 |
use Tcl/Tk to do it. There's an install script in ./win/install.tcl. |
| 208 |
Add the location of wish83.exe to your PATH and run wish83.exe. |
| 209 |
|
| 210 |
wish83.exe ./win/install.tcl |
| 211 |
|
| 212 |
6. Test BLT |
| 213 |
|
| 214 |
cd demos |
| 215 |
bltwish.exe graph1.tcl |
| 216 |
|
| 217 |
Building BLT with Cygwin GCC and mingw (-mno-cygwin) Tcl/Tk libraries. |
| 218 |
====================================================================== |
| 219 |
|
| 220 |
1. Install the Tcl/Tk sources. They should reside in the |
| 221 |
same directory tree as the BLT sources. |
| 222 |
|
| 223 |
______________|______________ |
| 224 |
| | | | |
| 225 |
blt2.4 tcl8.3.4 tk8.3.4 jpeg-6b |
| 226 |
|
| 227 |
|
| 228 |
2. Install the cygwin tool suite. |
| 229 |
|
| 230 |
3. Build and install the Tcl and Tk libraries. |
| 231 |
|
| 232 |
cd tcl8.3.4/win |
| 233 |
./configure --prefix=/usr/local/tcl8.3.4 |
| 234 |
make |
| 235 |
make install |
| 236 |
cd ../../tk8.3.4/win |
| 237 |
./configure --prefix=/usr/local/tcl8.3.4 |
| 238 |
make |
| 239 |
make install |
| 240 |
|
| 241 |
3. Compile and install BLT. |
| 242 |
|
| 243 |
./configure --disable-cygwin --prefix=/usr/local/tcl8.3.4 |
| 244 |
make |
| 245 |
make install |
| 246 |
|
| 247 |
4. Test BLT |
| 248 |
|
| 249 |
Add the location of wish83.exe to your PATH and run bltwish.exe. |
| 250 |
|
| 251 |
cd demos |
| 252 |
bltwish.exe graph1.tcl |
| 253 |
|
| 254 |
Building BLT with Cygwin GCC and the cygwin distribution Tcl/Tk |
| 255 |
libraries. |
| 256 |
============================================================= |
| 257 |
|
| 258 |
1. Install the cygwin tool suite. |
| 259 |
|
| 260 |
2. Compile and install BLT. |
| 261 |
|
| 262 |
./configure --disable-cygwin --with-scriptdir=/usr/share --prefix=/usr |
| 263 |
make |
| 264 |
make install |
| 265 |
|
| 266 |
3. Test BLT |
| 267 |
|
| 268 |
Add the location of wish83.exe to your PATH and run bltwish.exe. |
| 269 |
|
| 270 |
cd demos |
| 271 |
bltwish.exe graph1.tcl |
| 272 |
|
| 273 |
Building BLT with Borland bcc55 and Borland compiled Tcl/Tk libraries. |
| 274 |
====================================================================== |
| 275 |
|
| 276 |
1. Install the Tcl/Tk sources. They should reside in the |
| 277 |
same directory tree as the BLT sources. |
| 278 |
|
| 279 |
______________|______________ |
| 280 |
| | | | |
| 281 |
blt2.4 tcl8.3.4 tk8.3.4 jpeg-6b |
| 282 |
|
| 283 |
|
| 284 |
2. Build and install the Tcl and Tk libraries. |
| 285 |
|
| 286 |
cd tcl8.3.4\win |
| 287 |
make -f Makefile.bc |
| 288 |
make -f Makefile.bc install |
| 289 |
cd ..\..\tk8.3.4\win |
| 290 |
make -f Makefile.bc |
| 291 |
make -f Makefile.bc install |
| 292 |
|
| 293 |
3. In the BLT directory, edit .\win\makedefs. Set the following |
| 294 |
macros. |
| 295 |
|
| 296 |
v1 = 8.3 Tcl/Tk version. |
| 297 |
v2 = 83 Version number without dots. |
| 298 |
v3 = 8.3.4 Suffix of Tcl/Tk directories |
| 299 |
|
| 300 |
4. Edit .\src\Makefile.bc |
| 301 |
|
| 302 |
prefix = C:\Program Files\Tcl |
| 303 |
Location of installed Tcl/Tk files. |
| 304 |
TOOLS32 = C:\Borland\BCC55\ |
| 305 |
Location of Borland C compiler and tools. |
| 306 |
HAVE_JPEG = 0 |
| 307 |
|
| 308 |
4. Compile BLT. |
| 309 |
|
| 310 |
cd src |
| 311 |
make -f Makefile.bc |
| 312 |
|
| 313 |
5. Install BLT |
| 314 |
|
| 315 |
Since Windows doesn't provide tools to install software, we'll |
| 316 |
use Tcl/Tk to do it. There's an install script in ./win/install.tcl. |
| 317 |
Add the location of wish83.exe to your PATH and run wish83.exe. |
| 318 |
|
| 319 |
wish83.exe ./win/install.tcl |
| 320 |
|
| 321 |
6. Test BLT |
| 322 |
|
| 323 |
cd demos |
| 324 |
bltwish.exe graph1.tcl |
| 325 |
|