2 -----------------------------------------------------------------------------
4 An X11 drawing program [especially for circuit schematics]
5 (c) 2017 Tim Edwards (see copyright notice in ./COPYRIGHT)
6 August 1993 -- April 2017
7 -----------------------------------------------------------------------------
9 Compilation/Installation notes:
10 (Online version at http://opencircuitdesign.com/xcircuit/install.html)
12 1) All compile-time features are set during the ./configure process.
13 Run "./configure --help" for a list of configure options. For most
14 users, the relevant options are the following:
16 --with-cairo Enable cairo graphics
18 --with-tcl Configure xcircuit as an extension to Tcl/Tk. Tcl
19 becomes the default interpreter. Option is mutually
20 exclusive with "--with-python". A feature of this
21 version is that the interpreter is available from
22 the calling terminal concurrently with the GUI.
23 Another feature of this version is that the graphics
24 are handled by Tk widgets instead of the troublesome
25 "Xw" widgets in the distribution. As of version
26 3.1.7 where most of the bugs have been resolved,
27 use of this option is highly encouraged.
29 --with-python Configure xcircuit with the embedded Python
30 interpreter. Option "--with-python" is disabled
31 by default, and has no effect if "--with-tcl" has
32 been selected. The python interface is less
33 well-developed than the Tcl interface. If you do
34 not intend to make use of the interpreter
35 command-line interface, there is probably no reason
38 --prefix=PREFIX Location to install xcircuit. Defaults to
39 /usr/local/. The executable goes to /usr/local/bin/,
40 man pages to /usr/local/man/man1/, and everything
41 else to /usr/local/lib/xcircuit-VERSION/. Defaults
42 can be separated by explicitly declaring
43 --exec-prefix=DIR, --mandir=DIR, and --libdir=DIR.
45 The following option is experimental at present and will be changed to
46 be enabled by default when the package is deemed stable:
48 --enable-asg Configure XCircuit with the automatic schematic
49 generation (ASG) package. This package allows
50 XCircuit to read SPICE decks and produce schematics
51 from them. Future functions include reading EDIF
52 netlists (from Verilog and/or VHDL), and automatially
55 The following options are probably not worth messing with:
57 --disable-lgf Save space by not compiling the compatibility with
58 "analog" and "diglog" .lgf-format files.
60 --disable-schema Don't compile the schematic capture system. This
61 is a major feature of xcircuit, so disabling it is
62 not recommended. However, you may do so if you
63 anticipate having no need for circuit netlists.
65 There are some other options which can be supplied to the "configure"
66 command-line which should only be needed in rare circumstances. Most
67 users can ignore these.
69 --with-tcl=DIR Tcl can be enabled with "--with-tcl" or
70 "--with-tcl=yes", and the Tcl library and include
71 directories will be automatically searched. For
72 Tcl/Tk installations which cannot be found by the
73 automatic search, DIR should be the directory
74 containing "tclConfig.sh".
76 --with-tk=DIR Enabling Tcl for XCircuit implies "--with-tk".
77 However, for Tk installations which cannot be
78 found by automatic search and which cannot be
79 found by specifying "--with-tcl=DIR", DIR should
80 point to the directory containing "tkConfig.sh".
82 --with-python=DIR If the configure step cannot find a Python
83 interpreter, it can be explicitly referenced.
84 Requires the Python library (libpythonVERSION.a
85 or libpythonVERSION.so) and the python include
86 file Python.h. The Python option uses the Python
87 language as an interpreter for xcircuit.
89 --disable-double-buffer
90 This option is almost wholly deprecated due to the
91 speed of modern processors. However, if you have
92 problems with slow rendering, you might find it
95 --with-xpm=DIR If the configure step cannot find the XPM package,
96 it can be explicitly referenced. The XPM package
97 enables the toolbar and an icon when xcircuit is
100 --with-gs=DIR If the configure step cannot find ghostscript,
101 it can be explicitly referenced. The Ghostscript
102 option allows any PostScript file to be rendered
103 on the xcircuit background and saved with the
106 NOTE: When xcircuit went from "imake" to GNU make, the default install
107 directory changed from /usr/local/lib to /usr/local/share/. Since all
108 the other CAD tools xcircuit works with install by default to
109 /usr/local/lib, xcircuit version 3.1 has reverted to /usr/local/lib for
110 reasons of compatibility. See item (4) below, "uninstall".
112 2) Compile with the usual GNU-compile steps:
118 The final step must be done as root if you are installing to default
119 locations (/usr/local/lib and /usr/local/bin). XCircuit can be run
120 in test mode before installation (see item (3), below).
121 For the Tcl/Tk version the make steps are the same, assuming that
122 Tcl/Tk libraries and include files can be found on the system. If
123 you specifically *don't* want the Tcl/Tk version, then do:
125 ./configure --without-tcl
129 If you want to test before installing, do the following (csh/tcsh
130 version; see item (3) for changes to line 4 for bash/ksh/sh):
134 setenv XCIRCUIT_LIB_DIR ./lib
135 setenv XCIRCUIT_SRC_DIR ./lib/tcl
138 after which, if all goes well, you can do "make install".
140 3) NOTE: To test xcircuit before installation, set environment variable
142 setenv XCIRCUIT_LIB_DIR ./lib (csh, tcsh)
143 setenv XCIRCUIT_SRC_DIR ./lib/tcl
145 export XCIRCUIT_LIB_DIR=./lib (bash)
146 export XCIRCUIT_SRC_DIR=./lib/tcl
148 before running the xcircuit executable.
151 If you have compiled previous versions of xcircuit, the only thing you
152 need to do to uninstall these versions is to remove the directory tree
153 at /usr/local/share/xcircuit-(version) or /usr/local/lib/xcircuit-(version)
154 for any version numbers which are not current.
156 5) HP/IRIX users: If the "make" process dies with an error creating the man
159 /usr/ccs/bin/m4:xcircuit.1.m4:911 more than 4096 chars of argument text
161 be sure to use GNU m4. This can be done during the configure process
162 (using appropriate substitutions) with the following command:
164 M4=<path to GNU m4> ./configure [options]
166 6) 64-bit system users: Proper compile may require specifically using
167 configure option "--x-libraries=" to point to 64-bit libraries.
168 This has been fixed for the AMD Opteron under Fedora Core; other
169 64-bit systems are untested.
171 7) aclocal problems: In case during the make process the system complains
172 about a missing or out of date aclocal, rebuild the configure file with:
176 And restart the ./configure command
178 -----------------------------------------------------------------------------
180 Shared Python Library:
182 NOTE: The XCircuit build will be *much* smaller if you have a shared
183 python library. However, the build instructions as of Python-2.1c2
184 don't include instructions for building a shared library under linux.
185 Here's how you do it:
186 1) In the Makefile: set
187 LDLIBRARY=libpython2.1.so
188 2) Also in the Makefile:
189 Add a case for libpython$(VERSION).so which looks
190 exactly like the case statement for unixware:
193 $(LDSHARED) -o $@ $(LIBRARY_OBJS) \
196 3) Make until error (can't find libpython2.1.so)
197 4) Copy or move libpython2.1.so to /usr/local/lib or /usr/lib
198 5) Run (as root!) ldconfig -v -n /usr/local/lib (or whereever
199 you just put the shared library) and confirm that it
200 found libpython2.1.so.
201 6) Finish "make" (should run to normal completion).
203 On my system, this is the difference between a 4MB xcircuit executable
204 and a 1.5MB executable. That's a big difference! Of course, Python
205 purists would say I should be embedding xcircuit in python, not the
206 other way around, then what need do I have for a shared library,
209 Python source (and other information relating to Python) can be found
210 at www.python.org. The Python interpreter is recommended, as XCircuit
211 eventually will rely on Python to handle writing netlists, for
212 flexibility in formatting.
214 -----------------------------------------------------------------------------
218 The file examples/.xcircuitrc shows how to make a home-directory file
219 to alter the behavior of xcircuit on startup. It shows how to change the
220 color scheme, add new fonts, override the default libraries, and change
221 the editing behavior for polygons. Note that if xcircuit is built with
222 embedded Python, the syntax for .xcircuitrc will be Python syntax, and
223 may use any Python commands in addition to the commands which hook into
224 xcircuit functions. The file examples/test.py is a sample Python script
225 which features use of Python to create animated graphics within the
226 xcircuit window, shows how to access on-screen elements and change
227 their properties, and contains convenience function definitions for
228 manipulating xcircuit elements.
230 Other files in the examples directory show how xcircuit can be
231 used to draw various things, from a simple circuit schematic
232 (vcoblock.ps) to an entire publishable-quality page of music
233 (prelude.ps), plus an example of a fancy page border for slide
236 The files psfiles/signal.lps and psfiles/musiclib.lps are examples
237 of alternate or additional object libraries. The library file lgf.lps
238 is used primarily by the lgf-to-ps conversion routines, but has some
239 different circuit objects in it.
241 The file psfiles/fonttest.ps is a short PostScript program you can
242 use to get your printer to give you the names of all the built-in fonts
243 that it knows about, which is useful because if you add a font name to
244 xcircuit, the spelling has to be exactly correct or else the printer
247 The file examples/gettext.py is a sample Python script which adds
248 a Python command called "gettext(filename)". gettext(filename) reads
249 in file "filename", which should be an ASCII text file, and turns it
250 into a label in XCircuit positioned at the cursor position.
252 -----------------------------------------------------------------------------
256 The Tcl/Tk version of XCircuit does not use the X resources but
257 picks up resources from the file "resource.tcl" in the run-time
258 library path (e.g., /usr/local/lib/xcircuit-3.8/resource.tcl). The
259 resource names are the same as those described below but are specified
260 using the Tk "option add" command.
262 The color scheme of xcircuit has a default setup, but accepts
263 alternate color schemes using the following keywords which can be put
264 in the X Defaults (.Xdefaults, .Xresources) file:
266 Resource name Description Default
267 ------------------- ---------------------------- -------
268 xcircuit*foreground color of buttons and popups; White
269 xcircuit*background background of buttons & popups; DarkSlateGray
270 xcircuit.foreground drawing area foreground; White
271 xcircuit.background drawing area background; Black
272 xcircuit*gridcolor color of the grid lines; Gray40
273 xcircuit*snapcolor color of the snap-to points; Red
274 xcircuit*selectcolor color of a selected object; Gold
275 xcircuit*querycolor to differentiate multiple objects; Turquoise
276 xcircuit*axescolor color of the x, y axes; NavajoWhite4
277 xcircuit*offbuttoncolor text color of an inoperable button; Gray70
278 xcircuit*auxiliarycolor text cursor and other things Green
279 xcircuit*barcolor color of panning bars Tan
281 A secondary color scheme (for example, black-on-white) can be specified by
282 adding "2" to each of the above resource names. For example:
284 xcircuit*foreground2 color of every object drawn; Black
285 xcircuit*background2 screen background color; White
287 Other resources accepted by xcircuit are:
289 xcircuit*width width of the drawing area (pixels); 600
290 xcircuit*height height of the drawing area; 500
292 Normally, you will want to put the defaults in /usr/lib/X11/app-defaults.
293 If you do not have root access, you will want to have them in your own
294 home .Xdefaults file. If the file is not found by xcircuit, the program
295 will use its default color schemes, the main one being black-on-white,
296 and the alternate being white-on-dark-gray.
298 -----------------------------------------------------------------------------
300 Altering, Copying, and/or Redistributing XCircuit:
302 XCircuit is distributed under the GNU GPL (General Public Licence). See
303 the file COPYRIGHT in the top-level directory for details.
305 -----------------------------------------------------------------------------
308 "http://opencircuitdesign.com/xcircuit/"
311 "http://opencircuitdesign.com/xcircuit/tutorial/tutorial.html"
313 Schematic capture tutorial:
314 "http://opencircuitdesign.com/xcircuit/tutorial/tutorial2.html"
316 -----------------------------------------------------------------------------
318 Contact address (check the website above for a current address):
320 19412 Cissel Manor Road
321 Poolesville, MD 20837
323 Phone: (301) 528-5030 (home)
325 -----------------------------------------------------------------------------