Chapter 1: INTRODUCTION
1-5: Windows Installation
Electric runs under Windows 95/98/ME, Windows NT 4.0, Windows 2000, or Windows XP.
The system compiles with Visual C++ 5.0 or later
(project files are included).
The Electric distribution is a single file in UNIX "tar" format,
This can be extracted by a number of programs, including "WinZip"
(see http://www.gzip.org for more information).
To install Electric, follow this procedure:
- Extract the contents of the "tar" file.
When using WinZip, make sure that the "TAR File Smart CR/LF Conversion"
box is checked in the "Configuration..." dialog of the "Options" menu.
you will have a top-level directory called electric-VERSION with four subdirectories:
src, lib, examples, and html.
- For users of Visual C++ 5.0 or 6.0, open the workspace file Electric.dsw
(both it and the associated file Electric.dsp are in the top level, alongside
the src directory).
Visual Studio .NET users can open Electric.vcproj.
If you have trouble with any of these files, use the MAKE file
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.
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.
- The IRSIM simulator, LISP interpreter, and Foreign language interfaces are 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 this 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 use the file ElectricLang.dsw to build Electric with the language extension.
The resulting executable will be in the DebugLang directory.
- To add the Java interpreter, follow these instructions:
- Download the Java Development Kit (JDK) from http://java.sun.com.
Although it can be placed anywhere,
these instructions will assume that you have installed it in location C:\Program Files\JavaSDK.
If you install it elsewhere, adjust these instructions accordingly.
- Edit the environment variables in the "System" Control Panel.
On some systems, you click on the "Environment" tab;
on others, click on the "Advanced" tab and then click the "Environment Variables" button.
Under "System variables", select "Path" and in the "Value:" area, add this string to the end:
;C:\Program Files\JavaSDK\jre\bin\classic;C:\Program Files\JavaSDK\bin
On some newer versions of the Java Development Kit, you may also have to include this path:
On Windows 95 and Windows 98 systems, you may have to edit C:\AUTOEXE.BAT and append this to the PATH variable.
You must restart your computer after making this change.
- In Visual C++ 5.0 or 6.0, use the "Settings" command of the "Project" menu.
Select the "C/C++" tab and the "Preprocessor" category.
In the "Preprocessor definitions" area, add this to the end:
In the "Additional include directories" area, add this to the end:
,C:\Program Files\JavaSDK\include,C:\Program Files\JavaSDK\include\win32
Select the "Link" tab and the "General" category.
In the "Object/library modules" area, enter this:
Select the "Link" tab and the "Input" category.
In the "Additional library path" area, enter this:
- In Visual Studio .NET, right-click on the "Electric" solution and choose "Properties".
Select "C/C++" on the left and choose the "General" category under it.
In the "Additional Include Directories" area, add this to the end:
;C:\Program Files\JavaSDK\include,C:\Program Files\JavaSDK\include\win32
Next choose the "Preprocessor" category of "C/C++" and in the
"Preprocessor Definitions" area add this to the end:
Select "Linker" on the left and choose the "General" category under it.
In the "Additional Library Directories" area, enter this:
Next choose the "Input" category of "Linker" and in the "Additional Dependencies" area enter this:
- Electric's Java interface works better if you also install the "Bean Shell"
Download the ".jar" file and place it in the "java" subdirectory of your "lib" directory.
You must use version 1.1Alpha4 or later (version 1.01 is not acceptable).
- Once Java is installed, you must compile the ROM generator.
In a command window, change directories to the lib\java directory and run the command:
- To add the TCL interpreter, follow these instructions:
- Download ActiveTcl from http://www.tcl.tk and install it.
- In the compiler, edit the Project Settings and find the field "Additional include directories" (under "C/C++").
Add a new path to the installed TCL Includes (typically "C:\Program Files\Tcl\include").
- Also in the compiler, edit the Project Settings and find the field "Additional library path" (under "Linker").
Add a new path to the installed TCL Libraries (typically "C:\Program Files\Tcl\lib").
- Edit the file src/include/config.h and make sure that the constant "TCLLIBDIR" points
to the proper location of the initialization files ("init.tcl" and others).
This is typically "C:\Program Files\Tcl\lib\tcl8.3"
(note that each backslash is doubled in this file, and you should follow this convention).
- Electric must run on a display that is set to "65536 Colors" or "True Color".
Anything less will cause the colors to appear wrong.
- If you have trouble reading the cursor or icon files (".cur" or ".ico")
you can find a text-encoded version of these binary files in \src\graph\graphpc.uue.
Use "WinZip" to extract the files into the same 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 a shortcut to the executable and place that anywhere you like.
When the shortcut is run, the directory with the executable will become the current directory,
and all of the needed support files will be found.
- Electric can speak your language!
Currently, it has been translated into French.
Contact Static Free Software if you are interestested in doing a translation.
To use this facility, you must obtain the Static Free Software
extensions and build the "International" version of Electric.
Before compiling, set the
desired language by changing the routine "elanguage()" in "graph/graphpccode.cpp".
At any time, you can disable the foreign language and return to English by moving the
These files are in the "lib/international" folder, with a subfolder
that has the language name (for example, French translations are in "lib/international/fr").
Beneath that is a folder called "LC_MESSAGES" and inside of that are the translation files.