home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / smalltk / doc / install.txt next >
Text File  |  1991-10-12  |  10KB  |  244 lines

  1. --  --
  2.  
  3.  
  4.  
  5. 1. Installation Instructions
  6.  
  7.  The following lists installation instructions for those systems to which Version 3 of Little
  8. Smalltalk has been ported at present. Note that installation involves the creation of two programs. The
  9. first, called ``initial'', is run once to create the initial object image (usually a filed called ``systemIm-
  10. age''). The second program is the smalltalk interpreter. To run smalltalk, both these files must be
  11. accessible. Systems that use the supplied Makefile run initial automatically; in some other systems you
  12. may need to do this manually.
  13.  
  14.  If you receive the distribution on Mac or IBM disks and you want to run the system under Unix
  15. you must ``undo'' some of the changes described below.
  16.  
  17. 1.1. Atari
  18.  
  19.  I've been told (no first hand exprience) that the code works on the atari. I've set up a minimal
  20. description in env.h - could somebody tell me if the atari supports prototypes, signals, or some of the
  21. other features?
  22.  
  23.  You do have to make the 'rb' changes described for the IBM PC (below), however you keep the
  24. rm instruction instead of DEL, and change the editor to whatever your system has (memacs?).
  25.  
  26. 1.2. Gnu C Compiler (Sequent Balance)
  27.  
  28.  If at all possible, Use the Gnu C Compiler. I have found the code to be much smaller (up to 1/3
  29. smaller) and much faster (up to twice as fast). So far this has been used on the Sequent Balance sys-
  30. tem.
  31.  
  32.  Note that these sources support old style prototypes, as are used in Lightspeed C and Turbo C,
  33. and not the newer ANSI prototypes as are used in the gcc compiler. So do not define PROTO when
  34. using the gcc compiler
  35.  
  36. 1.3. HP-UX
  37.  
  38.  Simply say ``make sysvtty'' to make a version with the tty interface. (As of yet, I don't have
  39. access to a system v system with an X-window interface, so I can't test that code).
  40.  
  41. 1.4. IBM PC / Turbo C compiler
  42.  
  43. Note: If you receive the sources on 5\(12 disks containing both source and executable, the following
  44. changes have already been made to the system.
  45.  
  46.  Define the symbol TURBOC at the beginning of the file env.h.
  47.  
  48.  Edit the file file.st, changing the command used to delete files from rm to del (notice the space
  49. following the del):
  50.  
  51.   delete
  52.    ('del ', name) unixCommand
  53.  
  54. In the file file.st change the mode on the command to save images from w to wb.
  55.  
  56.   saveImage: name 
  57.    scheduler critical: [
  58.     " first get rid of our own process "
  59.     scheduler removeProcess: scheduler currentProcess.
  60.    File new;
  61.     name: name;
  62.     open: 'wb';
  63.     saveImage;
  64.     close ]
  65.  
  66. In a similar manner change the mode on the file open in the initialize method in file tty.st to use wb
  67. instead of w.
  68.  
  69.  
  70.  
  71.  
  72. --  --
  73.  
  74.  - 2 -
  75.  
  76.  
  77.  
  78.   initialize
  79.    " initialize the initial object image "
  80.    self createGlobals.
  81.    File new;
  82.     name: 'systemImage';
  83.     open: 'wb';
  84.     saveImage;
  85.     close.
  86.  
  87. And also in tty.st change the editor from vi to me (or whatever your favorite editor happens to be).
  88.  
  89.    editor \(<- 'me'.
  90.  
  91.  
  92.  Because of segmentation limits it is not possible to have an object table any larger than 6500
  93. objects (the current default). This value is set by a define found in memory.h
  94.  
  95.  # define ObjectTableMax 6500
  96.  
  97.  
  98.  Compile in the compact mode (small code, large data).
  99.  
  100. 1.5. Macintosh Lightspeed C
  101.  
  102.  NOTE: If you get the distribution on 3\(14 MAC Disks the source code changes described below
  103. have probably already been made for you.
  104.  
  105.  The mac distrubtion disk contains the following.
  106.  
  107. (a) A folder called ``C Sources'' that contains (naturally) all the C sources.
  108.  
  109. (b) A folder called ``ST Sources'' that contains (also naturally) all the Smalltalk sources, plus an
  110.  application called ``initial'' that can be used to create or recreate the initial object image. To
  111.  make changes to the image, simply edit the appropriate smalltalk files, run initial, and move the
  112.  file ``systemImage'' to the appropriate location.
  113.  
  114. (c) Two Lightspeed C projects called ``TextEdit'' and ``Stdwin'', containing code taken from Guido
  115.  van Rossums Standard Windows package.
  116.  
  117. (d) A file called ``systemImage'', which is the output of the application from part (b)
  118.  
  119. (e) An application called ``st'', which is the smalltalk interpreter.
  120.  
  121. (f) A folder called ``misc'' that contains various different files, such as documentation and other
  122.  things.
  123.  
  124.  It is only necessary to recompile if you make changes to the C source. If you make changes to
  125. the Smalltalk source you only need to rerun the application called ``initial'' contained in the ``ST
  126. Sources'' folder.
  127.  
  128.  If you get the sources from some other location (say off the net), you must make the following
  129. alterations. Change the mode on the file open in the saveImage command (in file.st) and in the initalize
  130. command (file stdwin.st). Define the symbol LIGHTC at the beginning of the file env.h (See instruc-
  131. tions for the IBM PC above for a fuller explanation).
  132.  
  133.  To compile you need guido van rossums Standard Windows package. Follow his instructions to
  134. create the stdwin and textedit projects (these are already on the distribution disk). To make the initial
  135. program, create a project ``initialProj'' with segments as follows. In the first segment place MacTraps.
  136. In the second segment place Stdwin. In the third place TextEdit. In the forth place the Unix library
  137. files math, stdio, storage, strings and unix. In the fifth place the sources filein.c, initial.c, interp.c,
  138. memory.c, names.c, news.c, primitives.c, unixio.c and winprims.c. In the sixth and final segment place
  139. lex.c and parser.c. To create the st program use the same structure, subsituting st.c for initial.c. You
  140. must check the ``separate STRS'' option on both projects.
  141.  
  142.  Make sure when you run the initial object that all the smalltalk sources are in the current direc-
  143. tory; it does not complain if it can't open a file, it simply goes on. Also when you fileIn a file, the file
  144.  
  145.  
  146.  
  147. --  --
  148.  
  149.  - 3 -
  150.  
  151.  
  152. must be in the current directory.
  153.  
  154.  The Mac version uses the windowing interface. It is currently very fragile. (A few known bugs;
  155. can't restore from saved image files, output sometimes goes wrong places, output often doesn't appear
  156. until you click the mouse).
  157.  
  158.  [ It would be nice if clicking on an image file would start the smalltalk application. If anybody
  159. knows how to make Lightspeed C do this, let me know. Thanks ].
  160.  
  161. 1.6. Sequent Balance
  162.  
  163.  Say ``make bsdtty'' to make a tty interface system.
  164.  
  165. 1.7. TekTronix 4315, Green Hills C Compiler
  166.  
  167.  Say ``make bsdtty'' to make a tty interface system. Say ``make bsdx11'' to make an x-windows
  168. interface system (still somewhat buggy).
  169.  
  170. 1.8. VAX / VMS
  171.  
  172.  Since VMS doesn't understand Unix Makefiles, the distribution tape supplies a command file you
  173. can use. First define the symbol VMS near the begining of the file env.h, then execute the command
  174. file called vms.com. This makes a version using the tty interface. A VMS version using the X-
  175. windows interface has not been created yet.
  176.  
  177. 2. Test Cases
  178.  
  179.  One you have a running system; the following can be used to run the standard test cases. First
  180. load the file test.st. If you are using the windowing interface select the fileIn menu item and the file
  181. ``test.st'' (from the ST Sources folder), if you are using the tty interface use the following command
  182.  
  183.  File new; fileIn: 'test.st'
  184.  
  185. Then give the command to run all test cases.
  186.  
  187.  Test new all
  188.  
  189. Messages will be displayed as test cases are performed, and if any test cases fail.
  190.  
  191. 3. The Standard Window Package
  192.  
  193.  There is an experimental windows style interface based on Guido van rossums standard window
  194. package. This permits the system to work on top of X-windows, as well as the macintosh. Information
  195. on standard windows can be obtained directly from guido at guido@mcvax.uucp, or mcvax!guido, or
  196. possibly gvr@src.dec.com. His paper mail address is Guido van Rossum, Center for Mathematics and
  197. Computer Science, P.O. Box 4079, 1009 AB Amsterdam, The Netherlands. Sources for the standard
  198. window package are not included on the Little Smalltalk distribution, but they are available public
  199. domain by ftp from DEC SRC, machine gatekeeper.dec.com (address [128.45.9.52]). The subdirectory
  200. is pub/stdwin. Contact guido for more details.
  201.  
  202.  To make the projects for the macintosh version, follow guidos instructions. For other versions,
  203. make a file stdw.o by linking together all of guidos sources for your particular system. Here is a
  204. makefile for the X11 version, for example.
  205.  
  206.  
  207.  
  208.  
  209. --  --
  210.  
  211.  - 4 -
  212.  
  213.  
  214.  
  215. #
  216. # X11 version of stdwins
  217. #
  218. x11 = caret.o draw.o font.o menu.o timer.o cutbuffer.o error.o general.o scroll.o window.o dialog.o event.o llevent.o system.o
  219. alfa = bind.o draw.o event.o keymap.o measure.o menu.o scroll.o stdwin.o syswin.o
  220. gen = askfile.o perror.o
  221. textedit = editwin.o textdbg.o textedit.o textlow.o textbrk.o
  222. tools = endian.o getopt.o glob.o monocase.o strdup.o swap.o
  223. x11files = ${x11} ${gen} ${textedit} ${tools}
  224.  
  225. stdw.o: ${x11files}
  226.  ld -r -o stdw.o ${x11files}
  227.  
  228.  
  229.  
  230.  I emphasize this interface is very fragile.
  231.  
  232. 4. Possible Changes
  233.  
  234.  There are a couple of easy changes you may want to make at your site. The default editor is vi
  235. (indicated by the value of the global variable set in the routine createGlobals in either tty.st or
  236. stdwin.st); this can be changed to any other editor you like. The system also prints the current object
  237. count prior to asking for commands from the user. This can be eliminated by removing the primitive
  238. <2> from the method initialize, class Scheduler, file tty.st.
  239.  
  240.  
  241.  
  242.  
  243. --  --
  244.