Chapter I: INTRODUCTION
 |
UNIX Installation |
 |
Electric runs on most UNIX variants, including SunOS, Solaris, BSD, HPUX, AIX,
and (of course) GNU/Linux.
The Electric distribution is a single file in UNIX "tar" format,
GNU-zipped (see http://www.gzip.org for
more information).
To install Electric, follow this procedure:
- Extract the contents of the "tar" file.
This will create a top-level directory called electric-VERSION with four subdirectories:
src, lib, examples, and html.
- 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 compiles Electric and creates the executable file
electric in the top level.
- Type "./electric" to run the system.
Here are some detail on the Electric distribution:
- 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.
- The examples directory has some demo files.
- 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 edit Makefile and you will find the modifications necessary to enable
the language facility.
It will be necessary to recompile all of Electric when adding the language extension.
- Electric uses "widget libraries" to control the windows on the display.
The default widget library is Lesstif,
a free clone of Motif.
If you do not already have Lesstif on your system, visit their site to download it.
Note that when you download Lesstif, you must download both the libraries
for your system and the "devel" package which has header files for the compiler.
-
If you do not wish to use Lesstif, Electric can use
Motif (which is not free)
or the MIT Athena widget library which
is free and usually installed (HP UNIX users may have to install it specially
and modify the Makefile to locate it).
To switch to these, edit Makefile after running "configure"
(comments near the top explain what to do).
- Electric has two ways to control the display.
By default, the system runs on any depth monitor, but is slow on older
machines and must be run locally (that is, the client and the
server must be on the same computer).
The alternate method of display is faster and can run over the network,
but it can only support displays that are set to 8bpp (8 bits per pixel).
In addition, this alternate method will suffer from "colormap flashing" when the
cursor enters and leaves the Electric windows.
To switch to this alternate method, edit Makefile after running "configure"
(comments near the top explain what to do).
Note also that Motif and Lesstif do not work well with this alternate display
method, so you will also have to switch to using the Athena widgets.
- 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,
the user's home directory, 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).
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
(or you can type "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.
- 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 ELECTRIC_SPICELOC
setenv ELECTRIC_ESIMLOC
setenv ELECTRIC_RSIMLOC
setenv ELECTRIC_PRESIMLOC
setenv ELECTRIC_RNLLOC |
/usr/local/bin/spice
/usr/local/bin/esim
/usr/local/bin/rsim
/usr/local/bin/presim
/usr/local/bin/rnl |
- There are three 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 "-m" option, Electric will look for multiple displays and use them
(it searches for files named "/dev/fb*").
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.
Don't forget to restart X after making changes to the ".Xdefaults" file.