Installer - Can we do better?

This discussion is both a way for me to get more information about the current Installer, and what Amiga users like/dislike/would like in a future Installer, and to propose a simple concept for improving a future Installer.

I post it here because I know I will get _lots_ of constructive feedback here. For those that do not wish to keep up with the discussion, but would like to see the results of it, a copy of this first post and a digest of follow-ups can be found at http://www.crusaders.no/Amiga/installer/

Responses can be posted in comp.sys.amiga.programmer or directly to me at donv@crusaders.no

Installer - Can we do better?

Everyone agrees that the Installer is a good thing. It makes the process of installing new software easier for a number of reasons.

Here are some:

  1. Installer gives the user a single focus for the interface
  2. The interface is the same for all installations, it is recognizable.
  3. Installer adds functionality through new commands like copylib etc.
  4. It let's the user set how much control he would like: Beginner, Average, Expert.
  5. Installer allows expansion by execution of cli commands

This is all very well, but there are some points which I really dont like. Here are some:

  1. Installer uses it's own scripting language. Why?
  2. The added funtionality like copylib etc. is not accessable by other programs.
  3. The scripts cannot be localized in the usual way by adding a catalog file. You have to change the script.

So we have some good points, and some (in my opinion) bad points. Let's try to put them together by trying to eliminating the bad points without compromizing the good points.

There are a lot of issues not discussed in this post. Either I have not though of them :) or they would require a change in how Instaler communicates with the _user_. This discussion is about changes to the way Installer works "behind the scene". One improvement is listed below:

  1. Improve the "Ask questions first, _then_ install" approach of Installer. This includes the ability to go back and change an earlier setting.

    As an example you may get several "Where do you want to copy/install this file/application?" questions, and on the last one you realize that you are out of space on the disk chosen. you would most often like to change the earlier answers so you can have all the parts of the installation on the same disk.

Eliminating bad points

1 - Installer uses it's own scripting language. Why?

Why indeed? The language is not bad, but does not add any functionality vs. AREXX. Here I must admit I have only made _one_ installer script, but I could not see anything in the language which I could not find in AREXX.

I expect that someone will enlighten me on this subject.

I propose to use AREXX as the official installer scripting language. The new installer could be made to accept both the old format and the new by recognizing AREXX files by the '/*' at the beginning. However, one should consider making a new application as the successor of Installer that only uses AREXX to keep size down.

2 - The added funtionality like copylib etc. is not accessable by other programs.

Installer adds funtionality which other apps might need. I.e. you wish to copy a file from ftp:user@site/dir at application startup, but only if the version of the file is higher than the version of the local file.

There are two ways to do this:

I prefer the first alternative. Any comments? A combination of the two, a cli command that send the command to Installer's AREXX-port is possible and gives maximum freedom of use, but has all the downsides of both solutions, i.e. lots of files.

3 - The scripts cannot be localized in the usual way by adding a catalog file. You have to change the script.

Installer itself is fully localized. Good. But the script is not. Currently localization of Installer scripts is done by having a section at the start of the script that assigns localized text-strings to variables which are then used later in the script. The language is usually chosen by using several different icons with different 'language' tooltypes, not using the 'sys/language' environment variable.

Adding a new language to the installer script needs a re-distribution of the entire script, and usually this means redistributing the whole archive.

A 'SetCatalogName' (or a much better name :) ) function in Installer combined with 'GetLocalString' (better use the same names as in Locale.library) adds localization easily. You then only have to distribute a new catalog-file to add a new language to the Installer-script.

Keeping the good things

To ensure we get a better application let's see if we manage to keep what is good in the current Installer.

1 - Installer gives the user a single focus for the interface
2- The interface is the same for all installations, it is recognizable

I propose three ways to use Installer:
  1. Send commands to Installer to be executed immediately possibly in parallel and independently from each other. All you have to do is send the command to Installer and it will be executed. You can choose to wait for completion and return value, or you can choose to continue if you don't want a return value. The commands are not guaranteed to execute in sequence if you choose not to wait for completion.
  2. Get a process ID from Installer and send it as a parameter with every command to ensure that the commands are executed in sequence. You always wait for completion and always get a return value, even if you don't have to use it. You do not get a display.
  3. Get a display ID from Installer and send it as a parameter with every command. You are guaranteed that the commands are executed in sequence, are displayed on the chosen display, and you always wait for completion and get a return value. Basically this is like the second option with a display.
The three types of communication can be combined. You can have a main window for the installation, and then get a new display ID to open a new window for a sub-installation if you wish. Nesting of Installer-scripts (a script calls another script) allows the called script to use the callers window or create it's own window. Keeping it all in one window keeps user-communication simple and focused, opening a new window signals that a separate part of the installation is now running.

3 - Installer adds functionality through new commands like copylib etc.

All the existing functions must be kept.

4 - It let's the user set how much control he would like: Beginner, Average, Expert.

In addition to a function in Installer to allow the user to set his/her user-level, I propose an environment variable 'sys/userlevel' which determines how much communication, control, and interaction the user will get with Installer. At installation-time it will be determined like this:

  1. If using the user-level dialog function the value the user chooses will be used.
  2. The author of the script can set a minimum user-level, and a recomended user-level. These will be used in the user-level dialog as a lower bound and default.
  3. The user-level is read from the 'sys/userlevel' environment variable. If the value is not set by the author of the script, and no user-level dialog is used, this value vil be used.

5 - Installer allows expansion by execution of cli commands

AREXX allows execution of cli commands.

donV


Last modified: Mon Sep 1 09:31:29 MET DST 1997