---------------- This is Electric, Version 5.4g3 ----------------

This README file contains installation instructions for all 3 of the platforms
supported by Electric: UNIX, Macintosh, and Windows.

---------------- Requirements:

UNIX:
  Electric runs on most UNIX variants, including SunOS 4.1.3, Solaris 2.5.1 and
  2.6, GNU/Linux v1.x and v2.x kernels with related distributions.  It also runs
  on HPUX, AIX and older versions of SunOS.

Macintosh:
  Macintosh users must run System 7 or later. Electric compiles best under
  Metrowerks version 1.7, although it has been built with MPW 3.0 and
  THINK_C 5.0.  A Metrowerks project file is included.

Windows:
  Electric runs under Windows 95/98 or Windows NT 4.0.  The system compiles with
  Visual C++ 5.0.  The Visual C project files are included.

---------------- Distribution:

The Electric distribution is a single file in UNIX "tar" format, GNU-zipped.
> Macintosh users: You will have to locate a program that can read this
  file ("MacGzip" and then "tar" or "SunTAR", for example).  Beware of
  Macintosh line-feed conventions, which are different from those on
  other operating systems.  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 at the top level (just inside
  of the "Electric" 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 and you will have to try again.
> Windows users: You can use "WinZip" to extract this file.

When extracted, there will be a directory called "electric-VERSION" (where
the VERSION is the particular version number).  This directory will have
four subdirectories: "src", "lib", "examples", and "html".

The "src" directory contains the source code.  It is hierarchically
organized by function.

The "lib" directory has library files (more on that later).

The "examples" directory has some sample files.

The "html" directory contains one subdirectory, "manual", which is
the user's manual in HTML format.  To see the document, point your
browser to the file "index.html" inside of the "manual" directory.
> Macintosh users: The subdirectory "images" in the "manual"
  directory contains all of the image files, which are binary and
  probably did not survive the tar extraction process.  Therefore,
  all of these files are duplicated in the file "AllImages.sea.hqx",
  which is a Stuffed and BinHex'ed file.  Simply drag this file onto
  "Stuffit Expander" to extract proper versions of the image files.
  The resulting "images" folder should replace the existing one.

---------------- Building (UNIX):

To configure for your system, go into the top-level directory and type:
        ./configure
This will examine the system and create a file called "Makefile".

To build electric you now only need to type:
        make
This creates a new directory called "obj" with object modules.
It also creates the executable file "electric" in the top level
directory.  Type "./electric" to run the system.

---------------- Building (Macintosh):

The Metrowerks project can be found in "Electric: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 directory.

Double-click the Metrowerks project file and compile Electric.
This will create the application "Electric".  Double-click the "Electric"
application to run the system.  Note that the program is rather big,
so you may have to increase the size of the Metrowerks partition
to get it to compile.

---------------- Building (Windows):

There are a number of binary-format files that have been text-encoded into
the file "\src\graph\graphpc.uue".  Use "WinZip" to extract the files into
the same directory (there should be 5 cursor files that end in ".cur" and
2 icon files that end in ".ico").

Run Visual C++ and open the workspace file "electric.dsw" (both it and the
associated file "electric.dsp" are in the top level, alongside the "src"
directory).  Compile Electric.  This will create a new directory in the top
level called "Debug", which will contain all of the object files.

Inside of the "Debug" directory, you will find the executable file "Electric".
Move this file out of the "Debug" directory and place it in the top-level
directory.  Double-click the "Electric" executable to run the system.

---------- Additional Details:

Electric makes use of an initialization file ("cadrc" or ".cadrc", the
version without the dot is for non-UNIX users) and a library directory ("lib")
with other necessary files.  The file ".cadrc" can be located in the same
place as the "Electric" application, the user's home directory (UNIX only),
or the library directory (this is the search order).  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).

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 (or you can put "setenv LIBDIR NEWPATH" into your "cshrc" file).
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.

On UNIX, Electric makes use of external programs for simulation.
The location of these programs can be found in the various #defines in the
file "src/include/config.h", which can be overridden with the following
variables in your "cshrc" file:
   setenv SPICELOC   /usr/local/bin/spice
   setenv ESIMLOC    /usr/local/bin/esim
   setenv RSIMLOC    /usr/local/bin/rsim
   setenv PRESIMLOC  /usr/local/bin/presim
   setenv RNLLOC     /usr/local/bin/rnl

Under X-Windows, there are two command-line arguments that can be given
which will control the display.  If you use the "-f" option, Electric
will start with a full-screen graphics window.  If you use the
"-geom WxH+X+Y", it will set the graphics window to be "W" wide,
"H" high, and with its corner at (X, Y).  Additional X-Windows options
can be typed into the file ".Xdefaults".  The resources "Electric.font0"
through "Electric.font8" set the font to use for point sizes 4, 6, 8, 10,
12, 14, 16, 18, and 20.  The resource "Electric.fontmenu" controls the
text used in the component menu, and the resource "Electric.fontedit"
controls the text used in the text editor.  Here is a sample line from
the file:
   Electric.font5: -misc-fixed-medium-r-normal-*-*-140-*-*-*-*-*-*
To see what all of these fonts look like, load the library "samples.txt"
(with the "Readable Dump" subcommand of the "Import" command of the "File"
menu) and edit the facet "tech-Artwork".  The top part of the facet shows
text in sizes 4 through 20.