Windows Installation ==================== This section describes how to install MIT Scheme on Windows 3.1, Windows 95 and Windows NT. Note that we have tested MIT Scheme only on Windows NT 3.10, Windows 3.1 and Windows 95. It should run under Windows NT 3.51. It was compiled using the Microsoft's MSTOOLS compiler that comes with Windows NT 3.10. It is helpful to read these instructions through before trying the installation. There are several places where the instructions differ depending on what flavor of Windows you are running. We suggest that you omit the optional instructions unless you have a pressing need. What to download ---------------- The distribution has five files: `w32bin.zip' This contains most of MIT Scheme, including the scheme executables, scheme libraries, and documentation as `.HLP' files. `unzip.exe' Unzip program for installing `.zip' files. You must use this program to unpack the `.zip' files. Not all `unzip' programs are compatible and we have seen many problems due to using another program to unpack the zip files. Use this one. `w32rtbci.zip' Debugging support for runtime system (which includes all the standard procedures). `w32edbci.zip' Debugging support for Edwin. This is not very useful unless you want to do lots of programming to change Edwin's behaviour. `pw1118.exe' Microsoft's Win32S system. This is required only for Windows 3.1. Throughout these instructions we assume that you downloaded these files into a directory called `C:\download'. Prerequisites ------------- The Scheme files use about 20 megabytes of disk space when installed. An additional 5 megabytes of disk space is required during installation. After installation, you can reduce the amount of disk space required by deleting some files (see "Image Files" below). MIT Scheme requires a fair amount of RAM to run well. Our experience is that you should have at least 12 megabytes of RAM, and preferably 16 megabytes or more. MIT Scheme is a 32-bit program. To run it on Windows 3.1 you need to install the Win32s compatibility package from Microsoft. You might already have Win32s on your machine if another 32-bit software package installed it. Win32s is provided in the self-extracting ZIP file `pw1118.exe'. To install Win32s do the following: Create a directory (it does not matter what it is called). Copy or download `pw1118.exe' into the directory. Then change into the directory and run `pw1118'. This will create three files. Follow the instructions in `readme.txt'. Using an MSDOS window, you can do the above by entering each of the following commands in turn: mkdir \temp cd \temp copy c:\download\pw1118.exe \temp pw1118 Windows Installation Procedure ------------------------------ Unless otherwise stated, these instructions should be followed by typing commands into a command shell window and pressing the Enter key. Do not try to run the commands from File/Run menu or the Start button as most of the commands do not work properly this way. You can start an MSDOS window by (Windows 3.1, NT 3.51) double-clicking the MSDOS icon called `Command prompt' in the `Main' program manager group, or (Windows 95, NT 4.0) from the `Start' button, => Programs => Shell. Create a directory where you would like Scheme to be installed. We suggest `c:\scheme'. From now on we will call this directory the "Scheme root directory". Change to this directory and unpack `bin.zip': cd \ mkdir scheme cd scheme c:\download\unzip c:\download\bin.zip You should now have the following files and directories in the scheme root directory. `readme' These installation instructions. `bin\' The executable programs `scheme.exe' and `bchschem.exe', the libraries `scheme16.dll', `scheme31.dll' and `scheme32.dll', and the libraries `dibutils.dll' and `pmgrpapi.dll'. `doc\' Documentation files. Three files, the `MIT Scheme Users' Manual', the `MIT Scheme Reference Manual', and the `Revised^4 Report on the Algorithmic Language Scheme', are provided in Windows Help (`.hlp') format. `etc\' Installation command files (mostly `.bat' and `.scm' files). `lib\' Contains the data files needed by Scheme when it is running. Mostly large `.com' files. `cref\' This is useful only for people who want to recompile Edwin or the compiler. Note that the `.com' files in the `lib' directory and elsewhere in the MIT Scheme system are data files and *not* programs, so you should not try to run them. If you do not get this directory structure you are probably using the wrong version of `unzip'. In this case use the version of `unzip' that comes with MIT Scheme, in the same directory as the `.zip' files. Perform the following steps to install Scheme: 1. *Build the bands.* Make sure that you are in a command shell window and in the Scheme root directory (you should be there already). Run the following commands by typing in each line and pressing `Enter'. Each command (except `cd') will open a window, do some processing, close the window, and return to the prompt. cd c:\scheme etc\mk_comp.bat etc\mk_edwin.bat etc\mk_all.bat This will create the files `lib\compiler.com', `lib\edwin.com', and `lib\all.com'. These files are MIT Scheme `image' files (also called `bands'). An image file is a collection of Scheme programs and data that has been combined into a single file. `.com' files are not MSDOS or Windows programs so do not try to run them. `lib\compiler.com' contains the runtime system (i.e. standard Scheme definitions) plus the native code compiler. `lib\edwin.com' contains the runtime system plus the Edwin editor. `lib\all.com' contains the runtime system, the compiler and Edwin. You may now delete the files `lib\compdel.com' and `lib\eddel.com'. If you are running Windows 3.1 you cannot run Scheme from the command line. You need to make a folder containing icons to run Scheme (how to do this is described below) and then run (double-click) the following icons in turn, waiting for each one to finish before starting the next: `Build COMPILER.COM band', `Build EDWIN.COM band' and `Build ALL.COM band'. 2. *Optional system configuration.* You may move the executable files `scheme.exe' and `bchschem.exe' and the `.dll' files from `bin\' to any directory that appears in your `PATH'. We suggest that you leave them put. Depending on your needs, you may want to keep only one of the `scheme.exe' or `bchschem.exe' files; each of these files is about 550 kilobytes and chances are you'll only be using one of them. If you keep only `bchschem.exe' we recommend you rename it to `scheme.exe'. Of course, you can also keep both programs around if you think you might use them both. The only difference between these two programs is in how they handle garbage collection. `scheme.exe' allocates two memory heaps, and copies objects between the heaps to preserve them. This means that most of the time the other heap is occupying valuable memory but doesn't hold any interesting data. `bchschem.exe' allocates only one memory heap, creates a disk file during garbage collection, copies objects into the file, then copies them back into memory. These programs provide you with some important performance trade-offs. If you have plenty of memory and want the best performance, use `scheme.exe'. If you don't have enough memory, or if you want to use less memory and will accept slower performance, use `bchschem.exe'. One way to tell that you don't have enough memory is to run `scheme.exe' for a while and see if your machine is paging during garbage collection. You might consider trying to use `scheme.exe' and letting the operating system's paging handle the lack of RAM. But usually you will find that using `bchschem.exe' without paging is much faster than using `scheme.exe' with paging. Of course, if you are using `bchschem.exe' and you're still paging, there's nothing you can do to win. 3. *Optional system configuration.* You may move the `lib\' directory anywhere you like. You may rename it to anything you like. (Here at MIT, we use `c:\scheme\lib'.) After you have chosen where it will be located, set the `MITSCHEME_LIBRARY_PATH' environment variable to be that location. For example, if you decide to store the directory as `d:\schdata', On Windows 95 or Windows 3.1 you would add the following line to `autoexec.bat': SET MITSCHEME_LIBRARY_PATH=D:\SCHDATA `autoexec.bat' is usually in `c:\windows\autoexec.bat' or `c:\autoexec.bat'. You can use the Notepad accessory to edit the file. On Windows NT, environment variables can be set by editing `autoexec.bat' or by using the `System' item in the Control Panel. You can override the setting of `MITSCHEME_LIBRARY_PATH' with the `-library' command-line option to Scheme, for example: scheme -library d:\schdata If you always supply a `-library' option, it is not necessary to have the environment variable defined. For example, instead of editing `autoexec.bat', you might create a `.bat' file or a shortcut (icon) to invoke Scheme and pass it the `-library' option automatically. 4. *Optional:* Move the `doc' directory anywhere you like, or delete it if you do not want to keep the documentation. 5. *Creating a Scheme folder (Program group).* This step creates a folder (or Program Manager group) called `MIT Scheme 7.4.2' which contains shortcuts (icons) to invoke Scheme. This step creates a folder (or Program Manager group) called `MIT Scheme 7.4.2' containing shortcuts (icons) for running Scheme and for reading the help files. The shortcuts called `Runtime', `Edwin', `Compiler', and `MIT Scheme (Edwin + Compiler)' correspond to running Scheme with the image files `runtime.com', `edwin.com', `compiler.com', and `all.com'. If you decide to delete any of the image files, you can delete the corresponding icons as well. *Windows 95, Windows NT:* Still at the `c:\scheme' prompt, enter the following command line. bin\scheme -library lib -load etc\pmgrp *Windows 3.1:* On Windows 3.1 you have to use the `File | Run..' menu option of the Program Manager or File Manager and enter the full paths: c:\scheme\bin\scheme -library c:\scheme\lib -load c:\scheme\etc\pmgrp.scm There is a bug in Windows 95 that prevents the Edwin shortcut from being created correctly. Each shortcut contains a `target' which is like a command line. We were unable to create a shortcut with a target containing parentheses. To get around this problem, we have created the shortcut with an incorrect target. You have to manually edit the shortcut to change the curly braces in the target to parentheses. Also, if there are any double quote symbols, remove them. The end of the target reads -eval {edit} but should read -eval (edit) How to edit the shortcut: 1. Right click on the Start button, and select Open from the menu that appears. A window will appear with all the first-level Start menu shortcuts. 2. Double-click (with the left mouse button) on the "Programs" item. 3. In the resulting window there will be a folder called `MIT Scheme 7.4.2' Double-click on it. 4. Right-click on the `Edwin' shortcut. A menu will appear. Choose `Properties' from this menu. 5. You now get a dialog box with two tabs. Select the `Shortcut' tab. 6. You will see a line labeled `Target'. This is the text that you should edit. 7. Click OK and test the shortcut. (Double left click). When the shortcut is correct, Scheme will create a window with the title ``Edwin:*scheme*'' 8. You can now close all those windows. On Windows 3.1 you can edit the same line like this: 1. Double-click the `MIT Scheme 7.4.2' program group. 2. Left-click ONCE on the Edwin item. 3. Select File | Properties from the Program Manager menu. 4. The same command line appear as above. 6. *Installing debugging information* The two files `w32rtbci.zip' and `w32edbci.zip' contain debugging information for the Scheme runtime and Edwin respectively. The total space required for all of the debugging information is about 8 megabytes. The runtime debugging information is the more useful as it allows the debugger to give you source code level information on all of the standard procedures like `map' and `number->string'. Debugging information can be installed by unzipping the `w32rtbci.zip' and `w32edbci.zip' files in the `SRC' subdirectory of the library directory. Start a command shell window (as described earlier), and use it to enter the following commands: cd c:\scheme\lib mkdir SRC cd SRC c:\download\unzip c:\download\w32rtbci c:\download\unzip c:\download\w32edbci The `SRC' directory should now contain three subdirectories called `edwin', `runtime' and `win32'. These directories in turn contain lots of `.bci' files. To test that you have installed the debugging information correctly, try to pretty-print a compiled procedure, for example, (pp pp) When the debugging information is installed correctly, Scheme will be able to find the source code for the `pp' procedure, and display it (about fifteen lines of Scheme code_). Otherwise it will use the short opaque form, something like this: #[compiled-procedure 13 ("pp" #x2) #xF #x646BF7] Debugging information files can be installed in another place. In this case the `MITSCHEME_INF_DIRECTORY' environment variable should be set to the directory path where you unzipped the `.zip' files.