Chapter I: INTRODUCTION
 |
3: 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
or Motif
(Lesstif is a free clone of Motif).
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.
Also note that many systems use shared libraries for LessTif,
and this may require some additional steps when installing.
This is because the LessTif libraries get installed in a place that the
shared library system doesn't know about.
If you have superuser access, you can use ldconfig to tell the system
where to find the libraries.
Otherwise, you can use the LD_LIBRARY_PATH environment variable.
This variable is a colon-separated list of paths to be searched for shared libraries.
For example, this setting will work on many systems:
LD_LIBRARY_PATH = /usr/X11R6/LessTif/Motif1.2/lib/
export LD_LIBRARY_PATH |
-
If you do not wish to use Lesstif/Motif, Electric can use
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.
- 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).
If the executable and the support files are not in the same directory,
then the executable needs to know where to find the support files.
There are three ways to do this:
- You can set the ELECTRIC_LIBDIR environment variable to point to the
location of the support files.
- You can change the #define of "LIBDIR" in "src/include/config.h" to point
to the location of the support files.
- You can keep a local copy of ".cadrc" (this file can be in your
home directory or in the current directory). Inside of the ".cadrc"
file, change the "electric library default-path" command to point to the remaining
support files (the lib and html directories).
- 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 |
- If you wish the "file" command to recognize Electric libraries, add these two lines
to "/etc/magic" (or wherever the "magic" information is stored):
0 long 031176377777 Electric library
0 long 037777774711 Electric library
- There are two command-line arguments that can be given which will control the
display.
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.