#!/bin/sh # # Script to port a clean TCL 7.3 or 7.4 distribution to DOS and Windows, # 16 and 32-bit, ready to compile. # # If you have Microsoft C 8.0 or greater (for 16-bit) or MSVC++ 2.2 or # greater (for 32-bit), TCL will build completely from the ported src code # generated by this script. # # 16-bit should build successfully under MSC 7.0 as well, but this hasn't been # tested. 32-bit should build under VC++ 2.0 and 2.1, but this also has not # been tested. Your mileage may vary with earlier versions, or with another # vendor's compilor. I don't have access to anything but MS compilors, so # if you want to compile it with Borland, you're on your own. # # This script is provided "as is" - no copyrights, liabilities, # or implied warranties are assumed for this script, or the resulting # compiled src code. Feel free to modify this script to suit your # needs, but please respect and preserve the copyrights of UCB, # Sun Microsystems, and all other parties that have contributed to # the core TCL distribution, in any and all src code generated by this # script, whether or not you modify it further. # # # Usage: tcl2dos # # where: is the absolute path to an existing, clean # TCL distribution. # # is the absolute path to a directory # where you want the ported distribution to be installed. # If this doesn't already exist, it is created. # # You need a way to achieve PC-to-Unix connectivity in order to access # the destination directory from your PC. # # Before running TCL, set the HOME environment variable to the path # where your home directory is mounted, say "H:\", or if your PC is # not networked, just use "C:\". # # This DOS & Windows port supports DOS style path syntax - backslashes instead # of slashes. Unfortunately, this means that you have to use double # backslashes, so that the TCL interpreter can escape the 1st to get # the 2nd (for example, C:\\TCL\\LIBRARY). # # If the script completes without errors, you can go to the drive and # directory on your PC in which you installed the ported src and type # `nmake'. The makefile will compile the code twice, once for DOS and # once for Windows. The DOS binaries will be in the `dos' subdirectory, # the Windows binaries will be in the `win' subdirectory. The contents # of each subdirectory is essentially identical, except for a couple # of files built specifically for Windows. The `install' makefile target # will copy tclsh.exe and libtcl.lib from the `dos' subdirectory to the # target install directory. It will also copy tclsh.exe and libtcl.lib # from the `win' subdirectory to the target install directory as tclshw.exe # and libtclw.lib, respectively. # # Before running `nmake', set the ARCH macro at the top of the makefile # to the desired target platform for which you want to build TCL. This # would be WIN16 for Windows 3.x, and WIN32 (or comment out the line) for # Windows 95 or Windows NT. # # Send bugs/comments/suggestions to Bob Yennaco (byennaco@East.Sun.COM). # # # History: # # 12/10/95 - add support for 32-bit DOS/Windows # 10/25/95 - add support for porting TCL 7.4. # # Added static function tmpnam(), written in terms of # tempnam(), so tmp files used for implementing pipes # can be configured on host machine, rather than based # on build machine. # # 1/9/95 - change occurrences of "1<<30" to INT_MAX. Fixes # a problem with the 'read' command where failing to # supply the number of bytes to read would cause read to # fail, and a problem with lreplace where the 'end' # keyword was handled incorrectly. # # Convert instances of "/" to "\\", and "//" to "\\\\", # so 'glob' and 'file dirname' work correctly. # # Add support for "chdrive" command. # # 11/8/94 - Windows build uses LARGE model instead of MEDIUM, # fixes memory errors and GPFs with large scripts. #