Chapter I: INTRODUCTION
 |
4: Macintosh Installation |
 |
Macintosh users must run System 7 or later.
Electric compiles best under Metrowerks, although it has been
built with MPW and THINK_C.
A Metrowerks 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 less than 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 Electric.xml.
Run Metrowerks, import this file, and save it in the top level,
alongside the src directory.
- 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 import the project file ElectricLang.xml to create 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.
- Installation of Electric requires some care.
Although Electric will run properly from the directory where it was built,
you cannot move the executable to a different location and expect it to work.
This is because Electric makes use of a collection of support files.
The main support file is called cadrc.
In addition, Electric needs to find the lib and html directories.
If these support files cannot be found, Electric will not be able to initialize
its graphical user interface (just type "-quit" to exit the program if this happens).
It is sufficient to move the support files, along with the executable,
to a public location.
Then make an alias to the executable and place that anywhere you like.
When the alias is run, the directory with the executable will become the
current directory, and all of the needed support files will be found.
- The examples directory has some demo files.