Packaging an Acedb database for easy installation on windows.
The aim is to make a single executable file which can be distributed by FTP, and easily installed on a computer running windows. The installation process involves unpacking all the files comprising the database and creating start-menu and desktop icons which will open the database.Note that this archive does not include the Acedb programs. These should be installed from a suitable installable archive before installing any databases.
Tools
You will need to download and install "Inno Setup" available from http://www.jordanr.dhs.org/isinfo.htmControl File
Inno Setup uses script files to control how it creates the program archive. Below is an example with commentary on how to customise it for your needs. The script files have names ending in .iss You can edit them either on Inno Setup or using the text editor of your choice. Red text is things you'll probably want to change. Green text is my comments, don't include that in your control file.
[Setup]
Bits=32
AppName=MyDatabase Used to name the program in the install wizard.
AppVerName=MyDataBase Used to name the program in the install wizard.
DefaultGroupName=Acedb Databases The group in the start menu where the database will be installed.
DefaultDirName={sd}\Acedb Databases\MyDatabase Where the files will be installed when the archive is installed - {sd} means system disk.
MinVersion=4,4
OutputBaseFileName=MyDatabase The archive will be called MyDatabase.exe
OutputDir=e:\ Where to put the finished archive.
SourceDir=e:\dbDir; Where to look for the files specified in [Files] below.
[Files]
Source: "database\*"; DestDir: "{app}\database"; Include all the files you want here.
Source: "wspec\*"; DestDir: "{app}\wspec"; Don't forget pictures and wgf, if needed.
[ini]
Filename: "{app}\MyDatabase.adb"; Section: "ACEDB"; Key: "path"; String: "{app}"; This creates the .adb file used in [Icons} below.
[Icons]
Line below makes an entry in the start menu in the sub-menu specified by DefaultGroupName.
Name: "{group}\MyDatabase"; Filename:"{app}\MyDatabase.adb"
Line below makes an icon on the desktop.
Name: "{userdesktop}\MyDatabase"; Filename: "{app}\MyDatabase.adb"
Don't change the section below or the uninstall function may not work.
[UninstallDelete]
Type: filesandordirs; Name: "{app}";
Once you have the correct control file, save it using the File/Save
menu, and then hit File/Compile. Inno Setup will grind through its
stuff and you will end up with a single .exe file which when executed
will install your database. Copy that to your FTP site and then go and have a nice
cup of tea.
Making a CDROM.
Once you have an install-archive of your database it is quite simple to go on and make a CD-ROM which allows for automatic installation of both Acedb and you database with only a few clicks. The recommended strategy is to make a CD containing three files.- The relevant install archive for Acedb itself, as distributed by the Acedb Team.
- The install archive for your database, created by following the instructions above.
- A small master installer, which guides the user through installing first Acedb, and then your database.
To create the master installer, use Inno Setup, in the way described above, with a control file which looks like this.
[Setup]
Bits=32
AppName=C Elegans Database CDROM
AppVerName=the 7th January 2000 beta release
CreateAppDir=0
MinVersion=4,4
OutputDir=.
OutputBaseFileName=Setup
InfoBeforeFile=cdromblurb.txt
Uninstallable=0
[Run]
Filename: "{src}\Acedb-4_8c.exe"; Parameters: "/SP-";
Filename: "{src}\MyDatabase.exe"; Parameters: "/SP-";
Compiling the above with Inno Setup will create Setup.exe, which will in turn run Acedb-4_8c.exe
and MyDatabase.exe from the CD-ROM.
The file cdromblurb.txt contains text which is displayed to the user as part of the install process. Note that this is copied into Setup.exe when you compile the control file with Inno Setup, so it needs to be available then: it does not have to be on the CD-ROM. Here is an example I used, customise it as necessary.
Welcome to the C. elegans Acedb database CD-ROM distribution. This installation program will install both the Acedb software and, when that is complete, the C. Elegans database. If you wish to install only one of these components (for instance if you already have the Acedb software installed) then click the Cancel button now and use the separate installation programs on this CD-ROM Acedb.exe - to install the acedb software. Wormace.exe - to install the C. Elegans data. If you wish to install both components, click the next button, which will take you first through installing the Acedb software, and then the C. Elegans data.Burn Setup.exe, the Acedb installer, and your database installer onto a CD-ROM and all is complete. Inno Setup compresses the data, so even rather large databases will fit on a single CD-ROM. If you database is too large, Inno setup has a spanning feature to allow it to be spread over more than one CD-ROM. See the documentation which comes with Inno Setup for details on this.
