Whiteley Research Incorporated


Windows Installation
IC Design Software for Unix/Linux and Windows
Whiteley Research Inc., 456 Flora Vista Avenue, Sunnyvale CA 94086    wrcad.com
Microsoft Windows Installation, Updating, and Removal

Installation

Please read and understand this document before first-time installation!

The XicTools for Windows are supported on Windows 10. They should run on Windows 8.1 and maybe 8.0 and 7, but I have no hardware to test this, or to diagnose/fix any problems.

The programs retain the "look and feel" of the Linux versions as much as possible, given the constraints of the Windows operating system. The programs use the GTK-2 graphical interface toolkit, as used by the other releases. The GTK-2 libraries are supplied in a separate installation module (the "gtk2-bundle"). Installation is mandatory, but the libraries are quite static so will not require much attention after the initial installation. You must install this even if you have another "gtk-bundle" (such as the one from gtk.org) installed.

The distribution files are self-extracting executable archives, as is common for Windows. Simply execute the file, and a familiar install wizard will appear, guiding you through the process. Executing the distribution file will either update an existing installation, or install a new installation. When updating, the previous release will be saved using the Safe Install format. The Safe Install feature, available with Windows starting with 4.3 releases, allows easy reversion to the earlier installation after an update, if needed.

Registry Usage Warning
The programs use an entry in the Windows Registry to find their startup files, etc. This entry is created by the installer program. Thus:

  1. Never copy installation files (including the gtk bundle) to a different location and expect things to work! They won't!

    The correct way to move an existing installation to another location is to uninstall the program, then reinstall to the new location using the standard distribution file. If you simply copy the files to a new location, the Registry won't be updated and the program won't run correctly.

  2. You can not simply copy files from another machine when creating a new installation. The files must be installed through the distribution (".exe") files, or the Registry entry won't be set.

Installation location
The programs are installed by default under C:\usr\local, which will be created if necessary. The structure of the tree is very similar to that under Linux, which simplifies compatibility. All executables will be found in C:\uer\local\xictools\bin.

Although the installation program allows the user to specify an alternative location for the installation, and an alternative name for the program group, life will be simpler if the defaults are selected. However, the drive letter of the installation path can be set arbitrarily. In particular, installing in a place like C:\Program Files, with the space-containing path, will provide a guaranteed migraine.

Cygwin
Those used to a Unix/Linux environment are encouraged to download and install the Cygwin tools. These include all of your favorite Unix commands, plus a complete compiler toolchain for application development. In particular, the bash shell is quite useful, as it provides a "Command Prompt" window that responds to Unix shell commands, and from which one can execute shell scripts, and easily set the search path and environment variables. Your humble author would be completely unable to work on Windows without Cygwin, and installation is recommended. It is further recommended that the 64-bit version be installed, as the 32-bit version apparently suffers from some dll interaction problems.

With Cygwin installed, you can use the WR_install and wr_uninstall scripts from a bash shell to install and uninstall the programs, very similar to the OS X/Linux procedure. In fact, it is even easier, since you can forget about being root, and using sudo. However, you do have to create a dummy sudo command. In a bash window, create a file named "sudo" somewhere in your search path. Give it the following content:

#!/bin/bash
$@
Then give "chmod 755 sudo" to make it executable. When the scripts call sudo, this micro-script simply starts a shell with the given arguments.

Installation procedure

  1. Download the necessary distribution files and scripts. Probably, the easiest course is to download everything in the Windows distribution directory into a new, empty temporary directory. Presently, there are nine package (".exe") files and four scripts. If you already have an XicTools installation, you do not have to download/install the gtk2-bundle, since you should already have this. When downloading completes, cd to the new directory, from a Cygwin window or DOS box.

  2. If you have Cygwin, you can follow the Linux procedure (see note above) and you're done. Otherwise, or alternatively, continue the procedure listed here.

  3. If you have any XicTools programs currently installed, it is important that they be uninstalled before installing any of the new 4.3 packages. This is most conveniently done by running the cleanold.bat script. Simply type the script name in a DOS box. If there are Xic or WRspice installations found, you will be prompted whether to save them (into the Safe Install format). This will give the option of running them again in the future if necessary. Alternatively, old releases can be removed with the Windows Add/Remove Software panel.

  4. Run each of the package (".exe") files. It may be more convenient to fire up Exprorer and display the directory, then run the package files by double-clicking on the names in the listing. Otherwise you can run them from the command line. This will actually install the programs. Unless there is a very good reason, it is best to use the defaults in the wizard pages. A program group XicTools is created in the Start page from which the programs can be run. The programs can also be started from a command line, though the ...\xictools\bin folder should be added to the search path to avoid having to type the full path name.

Cygwin Setup

Unfortunately, Cygwin currently defaults to a new mintty terminal emulator. This does not work at all with WRspice, or any other native Windows application that interacts with the console. The same applies to xterm and rvxt terminal emulators compiled under Cygwin. These work better for running Xic, or running WRspice from Xic, where the terminal window is not interactive, but there are subtle problems so this is not recommended.

WRspice can be run from the old-style native bash window, or a native Command Prompt window. For example, start a Command Prompt window from Windows, and give the commands

cd c:\cygwin64\bin
bash --login -i
This gives the traditional Cygwin window, suitable for running WRspice. This can be encapsulated in a .bat file that can be run from an icon, there may be a c:/cygwin/Cygwin.bat file in the Cygwin distribution that does exactly this. If not, create a Cygwin.bat file somewhere with the contents
@echo off
C:
chdir C:\cygwin64\bin
bash --login -i
This assumes that Cygwin in installed in C:\cygwin64, modify the file text appropriately of not. Create a desktop icon that will run this .bat file, and use it to launch Cygwin windows for running native Windows applications including WRspice and Xic.

By running Cygwin, the setting of environment variables and similar becomes very familiar to a Linux user. In particular, running Xic from a Cygwin bash-shell window emulates pretty well the Linux experience. This is a recommended approach for those familiar with Unix/Linux.

Setup and Configuration

DLL issues
There shouold be no DLL issues. The programs that use the gtk2-bundle dll are run from batch files located in /usr/local/xictools/bin, which set appropriate environment variables before launching the binary executables. You should NOT have the gtk2-bundle/bin in your search path, as it might then interfere with other programs.

The directories that contain the dll and exe files for Xic and WRspice, for example /usr/local/xictools/xic/bin also should NOT be listed in the shell search path. If found in your search path, they should be removed.

Environment variables
The "environment variables" mentioned in the Xic/WRspice documentation are available, and can be set in a Command Prompt window with the "set" command before starting the programs, or from the System entry in the Control Panel (or wherever this capability lives at present). Only the latter method works if the programs are started from an icon or menu. This procedure is described below.

Home directory
Under Windows, where the concept of a "home directory" is somewhat tenuous, the programs will look for environment variables, particularly HOME, and if found interpret the value as a path to the home directory. This is true when programs look for startup files. When the program is started from an icon or shortcut, and the start directory is not explicitly set in the icon properties (it defaults to C:/), the current directory will be the home directory, rather than C:/.

If not running Cygwin, environment variables can be set manually in a Command Prompt window from which the programs are run. The .bat files (used in Generation 4 for Xic and WRspice executables) can be modified and "set" lines added, as an option to avoid manual setting of variables that should always be in force. Another option is to set the system default environment variables. Be aware that all other programs will see the variables. Setting the system environment variables is probably something to avoid if possible. If you insist, here is the procedure for Windows 8.1. Other supported Windows releases are probably not horribly different.

  1. Go to the infamous Start page, click on the circle with down arrow icon near the bottom-left corner. This shifts to the Apps page.
  2. Find the Control Panel, it is listed on the Apps page under Windwos System. You can use the search tool if necessary. Eventually, you'll find the icon, then click it to bring up the Control Panel.
  3. Click System and Security. The display will change to a new set of choices.
  4. Click System.
  5. Click Advanced system settings along the left. This brings up a System Properties window.
  6. Click the Environment Variables button near the bottom of the Advanced page (this page should be shown initially).
There are a couple of things one may want to do here, as examples.
  1. Add the XicTools bin directory to the system search path.

    Scroll the lower System variables window to find the Path entry. Click on this to select it. Click the Edit... button below, which brings up a text entry window. In the Variable value window, scroll all the way to the right, and append, for example (use the actual path if different on your system),
    ;c:\usr\local\xictools\bin
    Check the spelling, and make sure there is no white space, and that the character before the 'c' is a semicolon, and the character that follows the 'c' is a colon. Then click the OK button.
  2. Add a HOME variable to define a "home directory".
    Press the New... button below the UPPER listing window (not the one you just used). This brings up a text entry as we saw before. Enter HOME for Variable name, For Variable value, enter a path to some directory which you want to be your "working" directory, where Xic and WRspice will look for startup files, license files, etc. Enter the full path to this directory. Check spelling, Click OK.
  3. Click the OK button at the bottom of the window, we're done.
When a program is started from an icon, an icon property specifies the directory where the program logically starts from. This is the apparent current directory seen by the user when running the program. By default, this is usually sonething like "C:\", which is not a good choice. The user should have a directory dedicated for this, and the following procedure can be used to cause the programs started from an icon to start in this directory.
  1. Go to the Start page, click on the circle with down arrow icon near the bottom-left corner. This shifts to the Apps page.
  2. Find the XicTools program group. There should be entries for the programs that you have installed.
  3. For each program:
    1. Click on the program icon with the RIGHT mouse button. An icon banner along the bottom of the screen will appear.
    2. Click on Open File Location. This brings up a listing showing the XicTools programs.
    3. Above the list, find the Properties icon and click it. This brings up a multi-page Properties pop-up.
    4. In the Shortcut page, change the entry in the Start in entry area to a full directory path to the directory where the program should start. This might be the same directory that you used for the HOME environment variable.
    5. Then click the Apply button, and click OK if there is a confirmation pop-up.
This applies to the icon in the Apps page. Other icons can be set similarly.

Notes

Conformity
Most basic features are available under Windows. Many of the more advanced features are not.

  • There is no support for plug-ins, so presently no Tcl/Tk or Python script language support, and no OpenAccess connectivity.

  • There is no provision for remote running of the programs as with the X window system in Linux.

  • Windows does not provide a reliable interface for internet mail, so the email clients and crash-dump report in the XicTools may not work. The mail in XicTools works by passing the message to a Windows interface called "MAPI", which in turn relies on another installed program to actually send the mail.

    To get this working in Windows 8, I had to download and install something called "live mail" from Microsoft, which eventually worked. This app supports MAPI, apparently the Windows 8 Mail app does not(?). The Windows 8 app also does not work with POP3 servers.

Directory separation character
Directory path names used by the programs can use either '/' or '\' as the directory separator character, interchangeably. The path can also contain a drive specifier.

Directory path separator character
The path variables used by Xic that contain lists of directory paths must use either a space or ';' (semicolon) as a separator. Under Unix, the separation characters are space and ':' (colon).

Text line termination
The text files used by the programs can have either DOS or Unix line termination. Text files produced by the programs under Windows will use the DOS format.

The tmp directory
If it is needed and does not exist, Xic and WRspice will create a \tmp directory on the current drive. This will contain temporary files, used by the programs. These should be removed automatically when the programs terminate, but if not the files can be safely deleted if Xic and WRspice are not running.

Removal

To remove an installation, one can use the uninstall.bat script. Arguments are program names from among adms, fastcap, fasthenry, mozy, mrouter, vl, wrspice, xic. If a package for a given program is currently installed, it will be uninstalled. One can also use the Windows Add/Remove Software tool.

It is not necessary to uninstall a program before an update (this would prevent Safe Install). There are probably only a couple of reasons to uninstall a program: you are done with it and want to get rid of it permanantly, of you need to reinstall for some reason, such as a location change.

Updating

Once the Xic and WRspice have been installed, updating could not be simpler. See the program documentation:
In WRspice, give the commands "help passwd" and "help wrupdate". In Xic and friends, with the mouse pointer in the main drawing window, type "?!passwd" and "?!update"". These help topics explain how to set up and use the update features. The programs will check for updates when started, and updates can be downloaded and installed. Other programs will have a simplified update checking/installing mechanism to be determined. The programs can also be updated manually by following the installation procedure.

Copyright © Whiteley Research Inc. 2017