next up previous contents index
Next: The tbsetup Command Up: The WRspice User Interface Previous: Sparse Matrix Package   Contents   Index

Initialization Files

Prior releases of WRspice could be configured to check for the availability of program updates on startup. There was also provision for display of a message if one was ``broadcast'' from the Whiteley Research web site. This latter feature was never used, and neither feature is currently supported in WRspice. Thus, there is no longer a network access attempt on program startup, which may save time.

Program updates are handled in the help system (see [*]), for all of the XicTools packages. Either the help system built into Xic and WRspice, or the stand-alone mozy program can be used to check for, download, and install updates. Giving the keyword ``:xt_pkgs'' will display a page that provides update information and download/install buttons.

If a new WRspice release is run for the first time, the release notes will appear in a pop-up window, as if the Notes button in the Help menu was pressed. There is a file in the user's .wr_cache directory named ``wrspice_current_release'' that contains a release number. If, when WRspice starts, this file is missing or the release number is not current, WRspice will show the release notes and update the file. If the release numbers match, there is no action.

WRspice will attempt to source startup files used for initialization when the program is started. First, a file named ``wrspiceinit'' is searched for in the system startup directory, and if found is sourced into WRspice. The system startup directory has a default location built into the program
(/usr/local/xictools/wrspice/startup, or if XT_PREFIX is set in the environment, its value replaces ``/usr/local''), but this can be changed by setting the SPICE_LIB_DIR environment variable to another location.

.wrspiceinit file
Files named ``.wrspiceinit'' are searched for in the user's home directory, and the current directory, and are sourced, if found, in that order. If running on Microsoft Windows which does not support the notion of a home directory, WRspice will look in the environment for a variable named ``HOME'', and its value will be taken as the path to the "home directory". If not set, the search is skipped.

These files have identical format, and contain ordinary script commands, which can be used to set the default behavior of WRspice. The first line is ignored, but all remaining lines are taken as script commands. The special directive tbsetup, which can only appear in these files, provides the setup information for the graphical interface. Unlike ordinary input files, it is not necessary to enclose the commands in .control or .exec blocks in the startup files.

X Resources
When using the X-window system, the X resource-passing mechanism can be used to set the default colors used in plots. The resource mechanism is otherwise ignored in the current version of WRspice. The base names for the color resources are ``color0'' through ``color19'', with the corresponding class names capitalized. Thus, one way to define alternative plotting colors is to create a file named ``Wrspice'' in the user's home directory, which contains lines like
*color2: red
for each new color definition. The color name should be known to the X window system, i.e., be listed in the rgb.txt file in the X-windows system library.

The same definitions could be placed in a .wrspiceinit file with lines like ``set color2 = red''.

next up previous contents index
Next: The tbsetup Command Up: The WRspice User Interface Previous: Sparse Matrix Package   Contents   Index
Stephen R. Whiteley 2017-11-08