Chapter I: INTRODUCTION
 |
Macintosh Installation |
 |
Macintosh users must run System 7 or later.
Electric compiles best under Metrowerks, although it has been
built with MPW 3.0 and THINK_C 5.0.
A Metrowerks version 1.7 project file is included.
The Electric distribution is a single file in UNIX "tar" format, GNU-zipped.
On the Macintosh, use the program
MacGzip to un-zip the file, and
MacTar to un-tar the file.
To install Electric, follow this procedure:
- After the files have been extracted, there will be
a top-level directory called electric-VERSION with four subdirectories:
src, lib, examples, and html.
- Beware of Macintosh line-feed conventions, which are different from those on other
operating systems.
If you use an older "tar" program (other than MacTar), you may need to set the
"Convert Newlines" option before extracting the "tar" file.
To be sure that the extraction has worked properly, examine the file cadrc, which
is in the top level directory.
This file should have about 10 lines of text.
If the file appears as a single line, or if there are spurious unprintable characters
at the start or end of each line, then the text conversion has been done
incorrectly.
- The Metrowerks project can be found in ElectricProject.sea.hqx
which is a Stuffed and BinHex'ed file.
Simply drag this file onto "Stuffit Expander" to extract the project file,
which is called Electric.u (where the "u" is actually a Greek "mu").
Keep this file in the top level (alongside the src directory).
- Double-click the Metrowerks project file and compile Electric.
This will create the application Electric.
Note that the program is rather big, so you may have to increase the size
of the Metrowerks partition to get it to compile.
- Double-click the Electric application to run the system.
Here are some detail on the Electric distribution:
- Since the language extension is not distributed as part of the GNU download,
users who wish to add this facility must acquire the sources
separately.
Use the same procedure to extract the language extension file (which will also
be a GNU-zipped tar file).
Extract it into the same location as the main source distribution and it will
add the necessary files to the source tree.
Then extract the file ElectricLangProject.sea.hqx to obtain the
Metrowerks project for Electric with the language extension.
- The src directory contains the source code.
It is hierarchically organized by function.
- The html directory contains one subdirectory, manual, which is
this manual in HTML format.
To see the document, point your browser to the file index.html
inside of the manual directory.
- Electric makes use of an initialization file (cadrc) and a
library directory (lib) with other necessary files.
The file cadrc can be located in the same place as the Electric
application, or in the library directory.
If the file cadrc cannot be found, Electric will have
no graphical user interface and will function only in its native command-line mode
(just type "-quit" to kill it).
Therefore, if you move the cadrc file,
you must change the #define of "LIBDIR" in the source file
src:include:config.h to tell Electric where to find it.
If you wish to move the library directory, you must edit
the cadrc file and correct the "library default-path" command
(this command overrides the "LIBDIR" define).
When Electric is being used in a shared environment,
the lib directory should be in a shared location which is
coded into the "LIBDIR" define, and
the cadrc file should be inside of this directory.
You can then remove the "library default-path" command from the cadrc
file, or set it to the current location.
- The examples directory has some demo files.