PREVIOUS HEAD

28  Programming with the Setup Utility

The TRUETEX Setup program is our own custom application, and should not be confused with the Microsoft Setup Toolkit programs, InstallShield, or other third-party installers. It is a small, quick, and versatile executive for the installation process, and supports font installation, which many install utilities do not. This section is a detailed guide to using Setup and a guide for experts programming Setup for use with other applications.

28.1  How Setup Organizes Distribution Disks

TRUETEX Setup uses a file called manifest on the first Setup disk as a script to guide the installation process. You can examine this text file for details on what happens during installation but is ordinarily hidden from view. You can modify the manifest file to create a custom Setup for networked or site-licensed copies (assuming you have paid the appropriate royalties to us to legally make internal copies of TRUETEX, of course).

28.2  Modifying Setup for Network-Master Installation

You can make a master network copy of the TRUETEX installation resources on any host file server; from this master copy any user on the network could install TRUETEX on a given system. Such a master copy simply consists of all the files on the TRUETEX setup disks, which you copy into a single directory on the file server. Networked users can then run the Setup program from the file server's copy instead of from floppy diskettes. Setup and the manifest file do not depend on any particular arrangement of files on the Setup disks and will automatically adapt to the situation where all the files for installation are located together in a network file server directory.

28.3  Setup command-line syntax

Setup recognizes the following command-line syntax:

setup [opts] Use this form for a ``first pass'', that is, there are no arguments, and no -u option. After loading the manifest (which is not acted upon in the first pass other than to check syntax and note command-line options), displays a welcome message (unless -s is in effect), invokes an installation destination dialog (unless -f given), copies itself to the destination directory, and launches the ``clone'' with ``second pass'' arguments described below. The cloning is necessary because the executable file on the floppy disk (which floppy will possibly be removed and replaced with another during the installation process) cannot be removed during installation. If -u is in the options, the invocation is for an un-installation (see below).
setup [opts] src dest This form is a ``second pass,'' and is usually only used by the first pass to pass information to the ``cloned'' copy. Installs from files from the src directory to the dest directory using a manifest file (default name is ``manifest'' or other value from the -m option) relative to src directory. Not a valid form for un-installation (-u).

Command-line options are as follows. Certain options must precede others to take effect. The option arguments may not contain spaces; thus a there is a limitation on WIN32 long file names (they cannot contain spaces).

28.4  Other Setup Programming Considerations

You can create various sub-manifests for components of your application, and invoke Setup with combinations of them for customized installations, with the link `l' manifest action.

Later versions of setup.exe ( TRUETEX releases 4.1E and later) provide a `u' manifest action which will unzip archives using the UNZIP32.DLL library. Formerly, Setup called on self-extracting executable archives to unzip themselves; these were DOS programs and lacked some grace in running under Windows. The new, native unzipping ability in Setup means that the entire process runs in a controlled, 32-bit Windows environment.

Distribution media for use with Setup should contain not only setup.exe and the installation manifest (and possibly sub-manifests called by the starting manifest, depending on your design), but also UNZIP32.DLL if the manifest calls for unzipping (`u') actions. If your manifest uses ``x'' actions (now obsolete; use unzipping instead), then you must also include execfrom.exe and execfrom.pif. An un-installation manifest is strongly recommended. These recommendations imply that the installation manifest should begin with ``c'' actions for these auxiliary files (but not setup.exe itself, which Setup must copy itself before the manifest is loaded).

28.5  Examples of Using Setup

a:setup Does an interactive install of TRUETEX.
a:setup -p Blatz -d C:\Blatz Does an interactive install of ``Blatz''.
a:setup -s -f -d C:\TrueTeX -m manifest Installs to a known directory, silently.
c:\TrueTeX\setup -u -f -d C:\TrueTeX -m uninstal Un-installs from a known directory, C:\TrueTeX.


NEXT HEAD