          ---------------------------------------------
          PRELUDE 1.3 -- UNIVERSAL INSTALLATION UTILITY
                    SICHEMSOFT -- NETHERLANDS
          ---------------------------------------------


INTRO

PRELUDE is a simple but good looking generic installation utility.
It gives your users a professional first impression of your
products. First, you build your distribution disks as if you were
using an old fashioned install.bat file. Then, you create a simple
installation script, copy that and install.exe to the first disk
and presto. Key features of PRELUDE are:

- DOS text, DOS graphics and Windows versions of install.exe

- professional looking installation screens in graphics/text mode

- (human) language independent !!!

- checks available memory, disk space, graphics adapter, network

- allows users to select a destination other than your default

- allows users to install only selected parts (maximum of 6)

- prompts for correct disk and refuses wrong one

- warns against overwrite of existing directories

- shows progression of installation

- displays text files (e.g. read.me) if desired

- runs any program as a daughter process

- unpacks archive files created by PkZip

- allows users to abort the installation at any time

- optionally adds program group and icons to Windows program manager


------------------------------------------------------------------


INSTALLATION

Copy all files to a temporary directory, make this the current
directory and type INSTALL to make PRELUDE install itself. This is
an example installation.
You will be asked if you want to install LINGUA as well. You need
this for creating language independent installations. After
installation you can remove the temporary directory. Do NOT use
the temporary directory as the directory to install PRELUDE in.
The programs should run on any IBM-PC compatible computer with at
least 640KB memory and running under DOS 5.x or later. For the DOS
graphics version an EGA, VGA or Hercules adapter is required. If
such an adapter is not found, the installation program uses text
mode. A mouse is recommended but not required. The Windows version
requires MS Windows 3.1x.


------------------------------------------------------------------


IMPORTANT NOTICE

The PRELUDE package is provided as is. There are no warranties
expressed or implied. By using it you agree not to hold Sichemsoft
VoF liable for any damages resulting from the use of or inability
to use this software. Sichemsoft VoF specifically disclaims all
warranties, expressed or implied, including but not limited to
implied warranties of merchantability and fitness for a particular
purpose. In no event shall Sichemsoft VoF be liable for any loss
of profit or any other commercial damage, including but not
limited to special, incidental, consequential or other damages.
PRELUDE may not be used at all in places where this exclusion is
not legal.

PRELUDE is distributed as shareware. You may use it without charge
on a trial basis to determine its suitability for you. If you
intend to use it for the distribution of your own software, you
must purchase a registered copy for NLG 100. A registered copy has
no shareware message but a welcoming message according to your
wishes. Otherwise there are no differences. For registration
print the file REGISTER.TXT and send it with payment to:

Sichemsoft VoF
Roghorst 160
6708 KS Wageningen
Netherlands

The authors can be reached by email:
info@sichemsoft.nl -or- anneke@chem.ruu.nl


------------------------------------------------------------------


COPYRIGHTS

PRELUDE is (C) Sichemsoft VoF, Roghorst 160, 6708 KS Wageningen,
Netherlands.
PRELUDE was written in Borland C++ 4.02 and uses Zinc Application
Framework 4.0 for it's GUI.
PRELUDE uses the SPAWNO 4.3 routines by Ralf Brown to minimize
memory use while spawning child programs in MS DOS.
The DOS executable was compressed using LZEXE of Fabrice Bellard.


------------------------------------------------------------------


FILES

MANUAL.TXT     Documentation
REGISTER.TXT   Registration form
PRELUDE.EXE    Installation script encoding utility
TESTFIL.EXE    Test program to check encoded script
INSTALL.EXE    Installation program - DOS graphics version
TINSTALL.EXE   Installation program - DOS text version
WINSTALL.EXE   Installation program - Windows 3.1 version
INSTALL.SCR    Install script example (text file)
INSTALL.FIL    Install script example (binary file)
INSTALL.TXT    Install's own dialog text (text file)
INSTALL.ETF    Install's own dialog text (binary file)
OEM2ISO.EXE    Text conversion utility
LINGUA14.ZIP   International language support package
DUMMY.EXE      Program to demonstrate spawn capability
SURPRISE.ICO   Icon for Prelude utility (Windows)


------------------------------------------------------------------


USAGE

Using any ascii text editor, create an installation script
according to the syntax described below. Call this INSTALL.SCR.
Then run PRELUDE (with no parameters). If all goes well a binary
encoded file INSTALL.FIL is created. Copy this, plus one of the
?INSTALL.EXE's to the first floppy. Also, copy INSTALL.ETF to
this floppy. This contains all INSTALL's own dialog text and was
generated from INSTALL.TXT with our utility LINGUA (see below
under International Language Support).
You can choose from INSTALL.EXE (the DOS graphics version),
TINSTALL.EXE (the DOS text version), and WINSTALL.EXE (the Windows
3.1x version). Be sure to rename your choice to INSTALL.EXE on the
floppy if necessary. You may use the provided INSTALL.SCR as a
template for your own scripts.
NOTE: At present the PRELUDE package only takes care of the
installation part, not of the diskette preparation part. We use
Opticopy for this.


------------------------------------------------------------------


INTERNATIONAL LANGUAGE SUPPORT

The INSTALL.ETF file was created from INSTALL.TXT with LINGUA. The
current version of this package is included with PRELUDE. See
LINGUA.DOC for details.
You can translate INSTALL.TXT to your language of choice and put
the resulting INSTALL.ETF on your first disk. Now INSTALL speaks
that language. If this language uses diacritical characters (like
 or ) you must first convert your INSTALL.TXT with OEM2ISO.EXE
because INSTALL does not use the IBM character set but the ISO
8859 set. This allows for one INSTALL.FIL that can be used by both
the Windows and the DOS version.


------------------------------------------------------------------


SCRIPT SYNTAX

While writing an installation script the following rules must be
observed:
- A script file may contain a maximum number of 200 commands
- Comment lines must start with * on the first position
- Lines should not be more than 250 characters long
- Labels must be one word starting with : on the first position

NOTE: in the following description, [ ] is used to designate
optional command parts, { } to designate multiple optional parts.


Startup commands
----------------

DESTINATION  mnemonic  path  space  name

The DESTINATION command lets you define what default destination
directory should be displayed in the field(s) that the user can
edit if he/she so wishes before the installation is started. A
maximum of 6 DESTINATION commands is allowed.
The mnemonic parameter serves as a placeholder for the directories
that the user chooses. These mnemomics can then be used in any
subsequent commands that refer to files.
The path parameter defines the default destination path.
The space parameter is a number that represents kilobytes of
required space. If (one of) the drive(s) is short of space, a
warning message is the result.
As fourth parameter, a name must be given to display in the path
selection dialog.
There must at least be one DESTINATION command in install.fil.
If there is more than one DESTINATION command, the user will be
given the opportunity to select parts to install. Any subsequent
command that contains a mnemonic pertaining to a part that is not
selected for installation is automatically skipped.
All DESTINATION commands must be grouped together and must precede
any commands that use path mnemonics. The chosen directories are
created automatically. Examples:

DESTINATION EXECS  c:\moonshine       500 Executables
DESTINATION EXTUTL c:\moonshine\still 300 Examples and tutorial
DESTINATION DATA   c:\moonshine\data  800 Data files


MEMORY  conventional  [ extended ]

If you use this command, it will be verified if the target
computer has enough memory to execute your program(s). If the
available memory is not sufficient, a warning message is
displayed. The user can then choose to abort or continue.
The numbers in the MEMORY command for conventional and,
optionally, extended memory must be given in kilobytes. Examples:

MEMORY 384
MEMORY 512 2048

NOTE: the Windows version ignores the MEMORY command.


PACKAGE  name

This command defines the name of the package that is about to be
installed. This name will be displayed in the title bar of the
main window and in various dialogs and should not be too long.
This command is required and must be the first command in the
script. Examples:

PACKAGE Lingua
PACKAGE Universal Punchcard System 17.6


UPDATE

The UPDATE command suppresses the directory overwrite warnings
that would otherwise be issued before the copying starts.
Example:

* this will suppress "make directory warnings"
UPDATE


VIDEO  HERCULES and/or CGA and/or EGA and/or VGA

The VIDEO command verifies that the target machine has the right
kind of video adapter. In the list you may use either or all of
the following: HERCULES, CGA, EGA, VGA. If none of the adapters
in the list is found, a warning message is issued. Examples:

VIDEO EGA HERCULES
VIDEO VGA

NOTE: the Windows version ignores the VIDEO command.


Sequential commands
-------------------

CHDIR  directory

The CHDIR command changes the current working directory to the one
given. The path mnemonics may be used. Examples:

CHDIR  c:\test
CHDIR $EXECS\bin


COPY  source  destination  [ number ]

The COPY command is used to copy one or more files from the
distribution disks to their respective destination directory. In
the source specification wildcards may be used. The optional
number parameter comes in here. The actual number of files to be
copied can be stated here, if omitted this defaults to 1.
These numbers are used to display the progression in a slider bar
(not in the DOS text version). Do use the path mnemonics of the
DESTINATION command for the destination drive/path names. To distinct
the mnemonics from real names, a $ must be prepended. Also, the
$SOURCE mnemonic may be used. Do NOT give file names in the
destination path. If no path mnemonic is given, the current working
directory is used. The first COPY, RUN or UNZIP command in the script
causes a progression window to appear. This is deleted by the DONE
command. Examples:

COPY $SOURCE\*.exe   $EXECS  4
COPY $SOURCE\read.me $EXTUTL\docs


DELETE  filename

The DELETE command erases the named file. The filename may
contain a path mnemonic. If no path is used the current directory
will be searched for the file.

DELETE temp.tmp
DELETE $EXEC\install.dll


DISPLAY  filename

The contents of an entire file can be displayed in a scrollable
window with the DISPLAY command. The filename may contain a path
mnemonic. If no path is used the current directory will be
searched for the file. The file should not be too long and must
not be longer than 64KB. Examples:

DISPLAY read.me
DISPLAY $EXECS\info.doc


DONE

The DONE command deletes the window that shows the progression of
the installation. After that, e.g. a readme.txt file can be displayed.
Example: see GOTO.



ERROR  text

If a fatal error occured (e.g. during the execution of a RUN
command), you must be able to notify the user of this. The ERROR
command displays an error message and aborts the installation
after the user has pressed a key. Example:

RUN murphy
IF 0 ok
ERROR Murphy's Law has done it again!
* installation aborts automatically
:ok


INPUT  length  text

You can ask the user for one line of input. Afterwards the input
is available by use of the $INPUT mnemonic. This mnemonic may be
used in the ERROR, QUESTION and RUN commands. The length parameter
gives the maximum length of the input line. This value may not
exceed 40 characters.

INPUT 20 Which show would you like to see?
RUN IO $INPUT.exe


MKDIR  directory

The MKDIR command creates a given directory. The path mnemonics may
be used. Examples:

MKDIR c:\prelude
MKDIR $EXECS\utils

NOTE: The DESTINATION commands make directories automatically. Other
directories, preferably subdirectories of the ones from the
DESTINATION commands, may be created by MKDIR.


MKGROUP  [ X ]  filename  caption

In the MS Windows version it is possible to create a program group
and add icons to it. The filename of the group must be given without
path or extension. The group file will be created in the WINDOWS
directory with this name and the extension ".grp". The caption
is the text that is displayed as the group window title. A MKGROUP
command should precede any MKICON commands that belong to it. At
present only one MKGROUP command is allowed. If the optional parameter
X is given, the user is asked if a program group should be made. 
Examples:

MKGROUP  prelude  Prelude Installer
MKGROUP  X  strukto  StruktoGraaf  

NOTE: the DOS version ignores the MKGROUP command.


MKICON  execpath  iconpath  iconindex  caption

In the Windows version it is possible to create a program group
and add icons to it. A MKICON command should always be preceded
by a MKGROUP command. The execpath is the full pathname of
the application that can be run by clicking on the icon. The
iconpath is the full pathname of the file that contains the
icon. The iconindex is the serial number of the icon in this
file, starting at 0. The caption is the text that is displayed
below the icon. Examples:

MKICON $EXECS\skunk.exe $EXECS\skunk.ico 0 The Skunk Works
MKICON c:\menu.exe c:\menu.exe 1 MiniMenu
MKICON $DOCS\readme.txt notepad.exe 0 README

NOTE: the DOS version ignores the MKICON command.


QUESTION  text

You can ask the user a question which can be answered by Yes or
No. After that, the IF command (see below) can be used to act
upon the answer. A Yes answer results in an exit status of 1 and a
No answer results in an exit status of 0. Example:

RUN myprog
IF 0 ok
QUESTION Do you want to continue?
IF 0 abort
: ok
..
:abort
STOP


RUN  IO/NOIO  programname  {parameter}

The RUN command executes any program as a daugther process
("spawn"). The exit status of the program can be tested and acted
upon by means of the IF command (see below). The .exe, .com or
.pif extension must be given in the command. The IO/NOIO parameter
determines if the program will do console i/o of its own or not.
If IO is chosen, the installation display is cleared before the
program is executed and restored after it has finished. If NOIO
is chosen, a message like "Running AUTHORIZ" is displayed and
even output to stdout that might come from the spawned program is
suppressed. The first COPY, RUN or UNZIP command in the script causes
a progression window to appear. This is deleted by the DONE command.
Examples:

RUN IO   datapack.exe
RUN NOIO $EXECS\authoriz.exe


TEXT  [ X ]
ENDTEXT

The text between the TEXT and ENDTEXT commands is displayed on the
screen for the user to read until a key is pressed. If the X
parameter is used, the user has the opportunity to abort at this
point. Example:

TEXT  X
You will be asked for your company name and
serial number during this installation procedure.
Be sure to have them ready before you proceed.
ENDTEXT

NOTE: After the first COPY, RUN or UNZIP command and before the DONE
command the X parameter is ignored. During the installation process
there is always the possibility to abort.


UNZIP  source  destination  [ number ]

The UNZIP command is used to unpack the file(s) from the stated
source zipfile to the stated destination directory. The zipfile
should be created by a PKZIP 2.04g compatible packing utility. The
unpacking takes place as if the -d -o parameters were given in
a normal PKUNZIP command. The optional number parameter gives the
actual number of files in the zipfile; if omitted this defaults to 1.
These numbers are used to display the progression in a slider bar
(not in the DOS text version). Do use the path mnemonics of the
DESTINATION command for the destination drive/path names. To distinct
the mnemonics from real names, a $ must be prepended. Also, the
$SOURCE mnemonic may be used. Do NOT give file names in the
destination path. If no path mnemonic is given, the current working
directory is used. The first COPY, RUN or UNZIP command in the script
causes a progression window to appear. This is deleted by the DONE
command. Example:

UNZIP $SOURCE\pack1.zip $EXECS 15


VOLUME  label  name

The VOLUME command prompts for a specified disk. It checks the
volume label and reprompts if necessary. The label parameter is
the exact volume label of the requested disk, the name parameter
should be the name on the diskette label, so the user can identify
the correct disk. If this disk is already in the drive when the
VOLUME command is executed, no messages are given and PRELUDE will
proceed to the next command immediately. Example:

VOLUME  LINGO_2  Disk 2 of 2

NOTE: When installing from hard disk the VOLUME command is ignored.


Control commands
----------------

EXIST  filename

The EXIST command verifies if a specified file exists. The path
mnemonics may be used. If the file exists an exit status of 1 is
the result, and 0 otherwise. Example:

EXIST $UTIL\transfer.exe
IF 1 ok
ERROR TRANSFER.EXE does not exist
:ok


GOTO label

The ugly GOTO command jumps to the command after the label. A
label is any word on a line of its own preceded by a :. Example:

RUN decomp blabla.z
IF >=1 exit
RUN blabla
GOTO ok
:exit
TEXT
Goodbye!
ENDTEXT
STOP
:ok
DONE
DISPLAY read.me


IF  [operator]value  label

After an EXIST, NETWORK, QUESTION, RUN, SELECTED or WINDOWS command
finishes the exit status can be tested by the IF command. This
works somewhat like the errorlevel testing in batch files. The exit
status is compared to the given value according to the operator. If
this comparison evaluates to TRUE, execution of install.fil continues
from the given label, otherwise the next command is executed. The
label parameter must refer to a label in the same script. The
operators that can be used are: =, =>, >, <, <=, <>. If the operator
is omitted, = is assumed. There must be no space between the operator
and the value! Examples:

IF 5 error
IF >=3 warning
IF <2 exit


NETWORK

The NETWORK command checks to see if an active network is present.
If it is, an exit status of 1 is the result, and 0 otherwise.
Example:

NETWORK
IF 1 ok
ERROR This is a network version only!
:ok


SELECTED  mnemonic

The SELECTED command verifies if a specified part is selected for
installation. Normally it is not necessary to check if some part
has been selected or not. The COPY, CHDIR, DELETE, DISPLAY, EXIST,
MKDIR, MKICON, RUN and UNZIP commands are ignored for pathnames that
pertain to parts that are not selected for installation. Sometimes,
however, you may e.g. need to display some text if a specific
part is selected for installation. This is what the SELECTED
command is for. If a part is selected, an exit status of 1 is
the result, and 0 otherwise. Example:

SELECTED $AUTH
IF 0 skip
INPUT Enter the serial number of disk 1
RUN NOIO $AUTH\burnin.exe $INPUT
:skip


STOP

The STOP command aborts the installation. Example: see QUESTION
and GOTO.


WINDOWS

The WINDOWS command returns an exit status of 1 for the Windows
version and an exit status of 0 for the DOS version.
Example:

WINDOWS
IF 1 win
RUN dosauth.exe
GOTO ok
:win
RUN winauth.pif
:ok

------------------------------------------------------------------


VERSION HISTORY

1.0 - 940220 - initial release
1.1 - 940808 - added progression slider bar (not in DOS text)
				 - faster DISPLAY function with added horizontal
					scroll bar
				 - improved destination drive choice
				 - slightly improved documentation
				 - some minor bug fixes
				 - added email address
1.2 - 940824 - faster display of COPY and RUN commands
				 - added MKDIR command
				 - added SELECTED command
				 - some additional minor bug fixes
1.3 - 960617 - Windows install starts Windows if necessary
				 - improved progression window
				 - added DELETE command
				 - added MKGROUP command (Windows)
				 - added MKICON command (Windows)
				 - added UNZIP command
				 - added UPDATE command
				 - added WINDOWS command
				 - changed NETWORK command
				 - expanded COPY command
				 - expanded INPUT command
				 - changed email address

future plans - adding automatic choice of language
				 - adding text and picture display during install
				 - adding uninstall with install.log
				 - adding script generator

------------------------------------------------------------------
    SICHEMSOFT, ROGHORST 160, 6708 KS WAGENINGEN, NETHERLANDS
------------------------------------------------------------------
