Instructions for building Iomega Active Disk Installer
======================================================

Tomas Frydrych <tomas@frydrych.uklinux.net>, Nov 28, 2003


The process is relatively simple, and if you read this file to the
end, there should be no real problems.

You will need:

    * The Iomega Active Disk SDK (available from www.iomega.com)

    * A priestine installation of AbiWord (from the official AbiWord
      setup)

    * Any dlls that AbiWord relies on (e.g., fribidi.dll, c runtime
      library, etc)

    * A file compression utility capable of creating self-extracting
      archives _and_ automatically starting up an executable upon
      extraction

    * Patience :)

The SDK describes the file structure needed to create the installer,
familarity with those instructions is assumed. Make a working copy of
the directory in which this file is located including all its files
and subdirectories except the directories and files CVS uses for house
keeping. This working directory will now be the root the required file
structure. You will need to fill it with the appropriate files from
the SDK; the files that go into the root directory are all provided in
the SDK, so no further comments are necessary.


SystemFiles subdirectory
------------------------
You will need to copy the setup.exe programme from the SDK into the
SystemFiles subdirectory. The required autoZip.run should be already
there from the CVS.


SystemFiles/AbiSuite subdirectory
---------------------------------
The CVS version of this directory contains files readme.txt and
readme.rtf. The former is the introduction to AbiWord and its
licencing terms that are displayed when the user runs AbiWord from the
Active Disk for the first time. Its presence is required and it must
not be renamed (unless you want to edit the autoZip.run script, which
I would not recommend). You should check the contents of the file for
accuracy at each new release. To update it, you will probably find it
easier to edit readme.rtf, the margins and font size of which were
chosen so as to provide reasonable line width in the Active Disk
licence viewer when 'saved as text only with line breaks'. Once you
have uptodate readme.txt, you can delete the rtf version from your
working tree (leaving it will do no harm, but if you do, make sure the
two files are in sync).

Copy the contents of the AbiSuite directory of your priestine
installation into the SystemFiles/AbiSuite, making sure that the
readme.txt file is not overwritten in the process.

Now change to SystemFiles/AbiSuite/AbiWord/lib and copy the required
DLLs into there. NB: the lib directory must be present in the
tree; the CVS contains a small text file readme.txt to ensure this
directory will not be ingored by the compression utility if it remains
empty.

You might want to add extra dictionaries or pluggins, that's up to you.


Creating the Installer
----------------------
Simply compress the whole directory structure with your compression
utility telling it to execute 'spawn.exe /download.ini' when the
archive self-decompresses.


Testing
-------
In order to test the installer you will to have some kind of an Iomega
compatible device (my ancinent parallel port Zip drive works just
fine). Simply run the self-extracting archive and watch. If you have
not used Active Disk before, some libs will be installed requiring
restart. Once that is done, you will need to do it again (the messages
the Active Disk displays are not particularly helpful). On the second
run our files will be copied to your Iomega drive. Once that is done,
eject and reinsert the disk. You should see a small splash screen
telling you AbiWord is loading, and then AbiWord should appear.

WARNING: span.exe will delete the ./SystemFiles directory once it
creates the active disk. You are strongly advised NOT to start it from
within your sole working copy of the tree, lest you loose all your
work if things do not go as they should (speaking from experience).

If there is anything wrong, there should be message boxes popping
up. If they are not and nothing at all happens, chances are there are
syntax errors in the autoZip.run script. Debugging this is not
great. To check for syntax error, rename it to 'autoZip.js' and
execute; it will not work, but you will get messages about incorrect
syntax. Otherwise, you just need to make message boxes pop up as it
runs to find out where it is stuck (there are many commented out
.Popup() calls in there).


Modifying autoZip.run
---------------------
If you are going to modify the script, you might want to get the
documentation for the Windows Scripting Host available from MS
website.

If making any changes to the script, please make liberal use of try{}
and catch{} constructs and always pop some informative message box on
catching error.

If adding features, please make note of what changes you made and when
near the top of the file.

If doing any operations on registry or creating any temporary files on
the user's computer, make sure these are logged as described in the
Iomega SDK (see the NewShortcut() and AddRegistryEntry() functions for
examples).