RXSETUP
Version: 0.2
Table of contents
Introduction
RXSETUP is just a simple program that installs files in your system and
optionally updates the CONFIG.SYS system file. It works more or less
like this:
- A programmer prepares a package, distributing files in several
directories and placing RXSETUP.CMD and a text file INSTALL.DAT in the
root directory.
- You unpack that package and find RXSETUP.CMD. Execute it and it will
ask you some simple questions:
- The place where files should go (Including an administrative file)
- Whether existing older files should be replace (Be careful with
this)
- Whether to update CONFIG.SYS or to save changes to a new file
(namely, CONFIG.SYS)
- Next, RXSETUP will read INSTALL.DAT and copy the files. If
something goes wrong you'll be given the possibility to delete the
installed files. Be careful with this option.
Finally, at any time after you've installed a package (maybe days,
years or simply a minute), you'll be able to use RXSETUP to uninstall
that package. The process is simple:
- Invoke RXSETUP with the name of the administrative file that
corresponds to the package.
- If there are conflicts (i.e., files that have change since first
installed) have a close look at them and decide whether to continue.
- Optionally, have a look at the list of files to be removed.
- Edit CONFIG.SYS by yourself -- RXSETUP is not that clever.
News in this version
- Cleaner, simpler, safer program. Just a bit larger.
- .
- Important bugs fixed: variables not already defined in CONFIG.SYS are
not appended to it, '#...#' macros do not work, Stream(...,'OPEN
REPLACE')
is not accepted by Warp 3's REXX
- Environment variables can be used to retrieve default values for
keys.
- It is possible to redefine the USRROOT and USRADM KEYS in the
INSTALL.DAT file.
- New unconstrained KEYS for general (non path) settings.
- New macro %%CANON%%
- Possibility to copy directories recursively or not.
- Time stamps stored in administrative files. They are taken into
account when removing those files.
- Search for conflicts in the installation routines.
- Search for problems in the deinstallation routine.
- Simple builtin pager for long text lists.
- New hypertext manuals.
- New sample INSTALL.DAT customized for XFree applications.
- New INSTALL.os2 file to be distributed with RXSETUP.
Features, bugs & limitations
This is what RXSETUP is capable of:
- It can install files and create directories and subdirectories at
the appropiate places.
- When installing it can check for the existence of simple conflicts:
files that are going to be overwritten, namely.
- It can modify and define new variables in CONFIG.SYS.
- It can either create a model CONFIG.NEW or replace the old one while
backing it up.
- It can store a list of all the files that were installed together
with time stamps.
- It can parse such a list and remove the files.
- When removing a package it can check for files that have been
modified (customized files?), and prompt the user for each new one.
This is what RXSETUP cannot do:
- Showing graphics: buttons, scroll bars, and so on.
- Installing right out of a package (ZIP file)
- Checking for disk space.
- Requiring packages to be installed.
- Checking package dependecies when removing packages.
- Updating CONFIG.SYS after removing a package.
- Creating WPS objects.
A sample session
This are the steps to install RXSETUP in ficticious path
(C:\OPT).
- Unzip the RXSETUP.ZIP package in a temporary place. Let's say you
use C:\TMP.
- Move to C:\TMP\RXSETUP. You'll find a INSTALL.DAT file and a
RXSETUP.CMD script.
- Run the RXSETUP.CMD script
- Type
1 C:\OPT\RXSETUP
and press ENTER. This will set the root directory for the installation
of the package.
- Enter '0'. This way you'll exit the menu.
- Answer 'Y' to 'Show a list with...'. You'll see a list with the
files that are to be copied.
- Answer 'Y' to 'Do you want me to check...'. If you run this example
a second time you'll see some warnings about files that are going to be
overwritten. It's up to you to scare or not :)
- Answer 'Y' to proceed.
- Answer 'N' to 'Update C:\CONFIG.SYS...'.
- And that's all. You'll see a C:\CONFIG.NEW file with a different
'SET PATH=...' line.
Now let's say you want to deinstall the program. You'll only have to
type
rxsetup -d C:\OPT\ADM\RXSETUP.ADM
and that'll delete all installed files & directories.
See below for a detailed explanation of how the program works.
Installing RXSETUP
It is not compulsory to install RXSETUP. However, if you keep a copy
of the program you'll be able to deinstall packages --and to build
your own.
You can place the 'rxsetup.cmd' almost wherever you want, but it is
recommended to place it in a directory that belongs to the PATH
environment variable.
To install RXSETUP just follow the steps in the preceding section.
Command line
options
To install:
rxsetup
To remove a package:
rxsetup -d admfilename
RXSETUP as installer
The rxsetup.cmd program acts as an installer when no command line
options are supplied.
The input file
The input file must be named 'install.dat' and be stored at the root
directory of the install package. If you wish to read examples of how to
code such a file, just have a look at RXSETUP's own 'install.dat'
together with the sample 'install.x11' which I designed for installing
XFreeOS/2 applications.
EMPTY LINES AND COMMENTS
- Spaces and tab characters are not significant.
- Lines begining with zero or more spaces/tabs plus a '#' are thought
to be comments and ignored.
SIZE SECTION
- This sentence sets the minimum required space in the destination
drive unit.
- Format
SIZE [bytes]
- Currently it is not supported.
INSTALL SECTION:
- Its purpose is to define values that the user may edit so as to
customize the installation.
- Format:
KEY [prompt] [variable] [default]
- The "prompt" field is a short string explaining the purpose of the
files that are to be installed under this path.
- The "variable" field is the name of ficticious.
- There are two
kind of keys: those that shall contain paths, and those that shall
contain anything. The latter are distinguished because of a leading
underscore. For example, in
KEY "Executables" bindir
KEY "User name" _user worm
"bindir" shall contain a canonified path, while
"_user" may contain any string.
- Values for path keys are defined using the '\' character. The
program translates '/' to '\'. Trailing '\'s are removed. And
afterwards, if the path is a relative one, the value of USRROOT is
prepended to it.
- Underscored keys suffer no kind of check.
- A suitable "default" value must be provided. That value may contain,
anywhere, a macro of the form %variable%, where "variable" is
the name of any environment variable. For example:
KEY "Root for the package" USRROOT %USRROOT%
EXPORT SECTION
- Format:
EXPORT [environ] [value]
- "environ" is either LIBPATH or the name of an environment variable
to be defined.
- "value" is a expression for the value of that environment variable.
You can use the following constructions
Macro name
| Placement
| Purpose
|
%%CANON%%
| At begining. Separated by a space.
| Format the following text as ';' separated list of paths,
without duplicate values.
|
%old%
| anywhere
| The previous value of the environment variable.
|
%variable%
| anywhere
| The path assigned to "variable" by a KEY section and later modified
by the user.
|
#variable#
| anywhere
| The same as above, but using '/' instead of '\'.
|
- The %%CANON%% macro is a very important one and should be
used whenever PATH, LIBPATH or any other list of directories needs to be
updated. Some examples of how it work:
EXPORT PATH %%CANON%% %OLD%;%bindir%
EXPORT LIBPATH %%CANON%% %OLD%;%dlldir%
EXPORT C_LIBRARY_PATH %%CANON%% %OLD%;#libdir#
EXPORT INCLUDE_PATH %%CANON%% %OLD%;#includedir#
FILES SECTION
User interaction
- The program shows a list of variables to be defined, including a
required one named "USRROOT" (with a default of "c:\usr") and one named
"USRADM" (with a default of "adm" relative to USRROOT)
- The values of those variables must be typed using '\', not '/'. Non
absolute paths are to be interpreted as relative to the value of
USRROOT. Trailing '\' are removed.
- Optionally a list of files to be copied is shown.
- Next, conflicts between existing files and to be installed ones are
shown.
- Confirmation is required to proceed.
- Directories are created and files are copied. In the process, a
list of installed files is generated and stored in the USRADM directory
with the name of the application (See APPLICATION above)
- The CONFIG.SYS file is parsed and updated with the exported
variables.
- Whenever the process fails, the user is given the chance to remove
any file that might have been copied or directories that might have been
created.
The installed files list
- This file consists in a list of absolute pathnames of the files that
were installed, plus a time stamp enclosed by square brackets ([]).
- It is followed by a list of directories that were created, with the
mark "[DIR]"
THIS LIST SHOULD NOT BE EDITED OR RENAMED!!!!
License
This package is completely FREE. However, I accept no resposibility
for possible damages, explosions, earthquakes, or any kind of
natural or innatural disaster that might arise because of the use
of this program.
You are free to change and improve the program. But in case you
distribute an altered version, you'll explicitely mention that I am not
responsible for that script and that it is not the original program I
wrote.
The author
Juan Jose Garcia Ripoll Web: http://www.arrakis.es/~worm
c/Sierra Alcubierre, 8 Mail: worm@arrakis.es
Alcorcon, E-28923 (Spain) Phn: +34-1-6124400