Instructions for Installing Emacs, Ciao Prolog and Communications Software for CSCI-C 201 on Windows 98 and Similar Operating Systems Version 1.2 (9/25/2004): Clarified step I.3; described alternative step II.4; other minor changes. Version 1.1 (9/24/2004): Corrected step II.2. Version 1.0 (9/15/2004): Initial version. NOTATION CONVENTIONS The instructions given below assume the following "drive letters": A: or a: means your floppy drive. C: or c: means your hard drive. D: or d: means your CD-ROM drive. If your drives are configured differently, adjust the commands accordingly. "File Finder" means either "My Computer" (on the Desktop) or "Windows Explorer" (in the Start/Programs menu). "Shell" means the MS-DOS or command-line prompt. On Windows 98 it can be started from the "Start" menu under "Programs". On Windows XP it has a different name. I think it is "command prompt". I will show shell commands by a line starting with ">", representing the shell prompt, followed by the command. The prompt may actually be longer than ">", and it may change as you change working directories, e.g., "c:\Program Files\>". For example, the notation > mkdir c:\bin means, in the command or MS-DOS window, after the shell prompt, type in "mkdir c:\bin" and then press ENTER (or RETURN). HELP I am going to ask everybody to use the _class email list_ as a medium for discussion regarding the installation process. How to send a message to the list: see http://mypage.iu.edu/~gdweber/contact/listserv.html) If anyone finds an error in these instructions, please report it to the class mail list. If anyone needs help following these instructions, please ask your question on the class email list. If anyone knows how to answer a question that someone has sent to the list, please answer by replying to the list (not just to the individual). OVERVIEW Unfortunately, the installation process is somewhat complicated, because there are some errors on the software CD-R's distributed for this class. Some files were omitted from the CD-R's, some had the wrong file names, and some files were included that are not necessary or even useful. WHAT SHOULD I INSTALL? 1. Please do not install STk or NuTs! (yet). There are some major configuration problems that I need to work out. 2. If you want to use Ciao Prolog on your PC, then you need to install gzip, tar, Emacs, and Ciao Prolog. (You need gzip and tar in order to install Emacs. They are not on the CD-Rs.) 3. If you want to use Ciao Prolog and Emacs on the MIS server or any of the workstations in the lab, via remote login, install Secure Shell Client. If your remote login will use a high-speed Internet connection, also install VNC Client. --------------------------------------------------------------------------- I. INSTALLING GZIP AND TAR 1. Start an MS-DOS shell. (See "NOTATION CONVENTIONS", above.) 2. Create a directory C:\bin if it does not already exist. > mkdir c:\bin 3. Download tar and gzip for Windows from these URLs: (a) ftp://ftp.gnu.org/gnu/tar/tar-1.12.msdos.exe (b) ftp://ftp.gnu.org/gnu/gzip/gzip-1.2.4.msdos.exe You can do this with a web browser or with an FTP client. Save (a) on your hard drive as "c:\bin\tar.exe", and save (b) as "c:\bin\install-gzip.exe". Note: if you use a web browser to download, you should probably not type the extension ".exe" as the browser will supply that automatically. Some FTP clients might behave this way too. 4. Execute install-gzip.exe: > cd c:\bin > install-gzip.exe It is a self-extracting, compressed archive; when you run it, it uncompresses itself and extracts the archived files, putting them in your c:\bin directory. These files include gzip.exe and gzip386.exe. The tar program (tar.exe) is ready to run; no further action is needed to install it. 5. Verify that you can run each program: > gzip --version > gzip386 --version > tar --version Each of these commands should print out the version of its program. If gzip386 does not work on your computer, don't worry; just use gzip instead. But use gzip386 if you can, because it's faster. -------------------------------------------------------- II. INSTALLING EMACS 1. Insert your C201 CD-R into the D: drive. Copy Emacs to your "Program Files" folder: > copy d:\Windows\Emacs\emacs-21.3-fullbin-i386.tar.tar "c:\Program Files\emacs.tgz" Notes: (a) ".tar.tar" is the wrong extension and we are changing it to ".tgz"; (b) you must use the quotation marks in the command because "Program Files" contains a space. (Silly, huh?) 2. Uncompress and extract the Emacs program: > cd "c:\Program Files" > c:\bin\gzip386 -d -N emacs.tgz > c:\bin\tar xvf emacs.tar (in version 1.1, "xvf" was incorrectly given as "xvz") > dir Notes: (a) If gzip386 does not work, use gzip instead. (b) The dir command should show you have a new directory, "c:\Program Files\emacs-21.3". 3. Verify that you can run Emacs: > "c:\Program Files\emacs-21.3\bin\runemacs" Quit from Emacs (C-x C-c). 4. If you want to be able to run Emacs from the Start/Programs menu, there are two choices. (a) Run the program "c:\Program Files\emacs-21.3\bin\addpm.exe". (Close the window that pops up.) (b) OR, if you want more control over the process: (i) Click on "Start", then select "Settings", then "Taskbar", then choose "menu/Start Menu Programs". (ii) Choose "Add". Type in the command line (including quotation marks): "C:\Program Files\emacs-21.3\bin\runemacs.exe" (iii) Click on "Next". Choose a folder to contain the shortcut (this is where it will appear in the Start menu). For example, you could choose "Start Menu / Programs". (iv) Click on "Next". Enter a name for the shortcut (e.g., "Emacs"). (v) Click on "Finish", then "OK". (vi) Verify that you can run Emacs from the Start menu. Note: when Emacs starts, its window may be too big, so you cannot see the "minibuffer" at the bottom of the window because it is cut off below the screen. (The minibuffer is where Emacs displays the keystroke commands you enter, such as C-x C-f, and sometimes prompts you for information needed to complte a command.) Adjust the size and position of the Emacs window until you can see the minibuffer at the bottom. -------------------------------------------------------- III. INSTALLING CIAO PROLOG 1. Copy the file d:\Windows\Ciao\ciao-1.10p5Win32.zip to the 'c:\Program Files' directory: > copy d:\Windows\Ciao\ciao-1.10p5Win32.zip "c:\Program Files" 2. Unpack the zip file. (a) If you choose to use WinZip: Open "c:\Program Files" in the file finder. Double-click on the icon for ciao-1.10p5Win32.zip. In the WinZip window which comes up, choose "Select All" in the "Actions" menu; then choose "Extract" from the "Actions" menu. Choose "C:\Program Files" as the directory to extract to, and click on "Extract." (b) There are other programs which can unpack zip files, but I do not know the details. Note: Ciao Prolog is now installed (but you are not done yet). The installation does not put anything new in the Start menu, but that is not important. The important thing is to be able to run Ciao under Emacs -- see the next step. Note: After installing Ciao and rebooting my computer, I got some start-up error messages from Windows 98, but they were self-correcting. I don't know if the errors resulted from installing Ciao Prolog or from something else I did. 3. Now, as a result of the previous step, you have a new folder "c:\Program Files\ciao-1.10p5Win32". Open it, and follow the instructions in the "INSTALL" file (actually, "INSTALL.txt", but the File Finder suppresses the ".txt" in the file name). Hint: Double clicking on the INSTALL file icon opens it in Notepad. Alternatively, you can run Emacs and type C-x C-f to open the file. Notes: Don't omit the Emacs setup instructions. You must create the file "c:\.emacs" as described in the INSTALL file in order for Ciao Prolog and Emacs to work together. 4. Verify that Emacs can now run Ciao Prolog: (a) Start Emacs. (If Emacs is already running, quit and restart it.) (b) Create a file named "test-ciao.pl". You should see some new menus in the Emacs menu bar (CiaoSys, CiaoDbg, CiaoPP, LPdoc, CiaoOpts, CiaoHelp) and some colorul tools in the toolbar. Enter the following two lines in your test-ciao.pl buffer: happy(jack). happy(jill). Save the file. You will be asked: "Turn on changelog prompting on this file (y/n/q) ?q". Backspace to erase the "q" and type "n" RET. (c) Run a Ciao interpreter under Emacs: Give the Emacs command C-c t or, from the CiaoSys menu, choose "(Re)start ciao top level". Emacs splits into two "windows" (actually subwindows) and the lower one displays something like: Ciao-Prolog 1.10 #5: Mon Aug 9 21:16:40 EDT 2004 ?- The "?-" is the Ciao Prolog prompt. After the prompt, type "ensure_loaded('test-ciao.pl')." and press ENTER. (Don't type the double quotation marks, but do type the single quotation marks and the periord.) After the next prompt, type "happy(X)." and ENTER. After the next line of output, type ";" and ENTER. Do that again for the next line. Your session in the *Ciao/Prolog* buffer should look something like this: Ciao-Prolog 1.10 #5: Mon Aug 9 21:16:40 EDT 2004 ?- ensure_loaded('test-ciao.pl'). yes ?- happy(X). X = jack ? ; X = jill ? ; no ?- Then you may type "halt." ENTER at the Ciao prompt, or just quit from Emacs. -------------------------------------------------------- IV. INSTALLING SECURE SHELL CLIENT Open the folder "D:\Windows\SSH" in the File Finder and double-click on the icon of "current_win_ssh_client.exe". Answer the questions the installer program asks. Wow, wasn't that easy? Except we had to read a commercial end user license agreement. -------------------------------------------------------- V. INSTALLING VNC Open the folder "D:\Windows\Vnc" in the File Finder and double click on the icon "vnc-4.0-x86_win32.exe". Answer the installer's questions. Notes: You do not need to install the VNC server, only the viewer (client) If you do install the server, when it comes to "Select Additional Tasks", you may wish to UNCHECK "Start the VNC Server ..." for greater security. -------------------------------------------------------- VI. INSTALLING MOZILLA WEB BROWSER (IF DESIRED) This is an open-source web browser. I didn't ask for it to be put on the CD-R, but it's there. If you want to try an alternative to Microsoft Internet Explorer, install it. Mozilla is the browser used in the MIS/Linux lab.