Using Inno Setup 1.3.21 with dB2K Applications

Includes Deploying BDE 5.11
Updated: March, 2001
Ken Mayer, SQA Engineer
dBASE, Inc.
Thanks to Dan Howard, dBVIPS, for Editing ...


NOTE: This HOW TO document is aimed specifically at deploying a dB2K application. If you are using Visual dBASE 7.x, there is a different HOW TO document that discusses this topic ...

Contents


Introduction

Ok, you have an application ready to deploy, but you don't have InstallShield Express. So, what do you do?

Simple -- you use the copy of Inno Setup that is shipping with dB2K.

The software is called "Inno Setup", which is short for "Innovative Setup". It is a Delphi application, and has very little in the way of a graphical interface when building your deployment disk set. However, it is easy to use, very quick, and very flexible.

There is a folder on your dB2K CD called "Inno" -- in this folder you will find a .EXE file, which is the current Inno Setup install image (when run this will install the version current at the time we created the dB2K CD); a set of language files (*.ISL); and a sample template file (template.iss) which can be used to create your own setups.

If you are not using dB2K, or you wish to obtain a more recent version of this software, go to this website:

http://www.jordanr.dhs.org/isinfo.htm

The main website discusses the software, talks about functionality, etc. If you want to cut to the chase, you can download directly by using the information below.

Back to Contents


Downloading Inno Setup

There are several sites to download it from. This one works for me: http://www.jordanr.dhs.org/files/site1/is32.exe, you may want to change the "site1" to site2, or site3.

The author, Jordan Russell, has done a lot of work to give you a lot of functionality. He has, in addition, documented this software well, with details in the online help for the software itself.

Back to Contents


Installing Inno Setup

If you have dB2K, there is a folder on the CD named "Inno" -- insert the CD, and if the Launcher starts, use the option to exit. Then using the Windows Explorer (from the "Start Button" in the task bar, right click ...), find the "Inno" folder, and double-click on the executable using the name as noted below.

Note that in the Inno folder is an .exe named "isetup32-1_3_21.exe" -- this file is the version current at the time this document was last updated.

When you find or download the file, run it. It will install to some folder, by default:

C:\Program Files\Inno Setup 1.3

When the software is updated by the author, you can obtain new versions by downloading them from his website, or in some cases downloading a patch with a patch program to do the work.

Back to Contents


Getting Started with Inno

Although Inno doesn't look like much - it doesn't offer the kind of drag and drop functionality that you might be used to from other install programs - it's actually quite powerful and very functional. It also produces very fast install programs.

Some Basic Information

(Much of the following information is condensed from the help file ...)

This screen is simply an editor that can be used to create a setup script. The script created will have an extension of .ISS (Inno Setup Script). The program is also a "compiler" -- it will attempt to create your setup program based on the contents of the script - if there are errors during the "compile process", they will be described and the setup program will not be created.

The script itself is an ASCII file, so you could create it elsewhere rather than using this program, although using the program to create/edit the script makes as much sense as anything else.

The format of the "commands" in this script is similar to Windows .INI files - if you are familiar with these, you should be in pretty good shape.

Most of the script contains name/value pairs -- a name which references a value. These values will be things like filenames, or destinations for where to deploy to, and so on. These can also have parameters -- modifiers for what you want the deployer to do with them ...

Note that Inno Setup performs a top-down execution of your script -- there is no branching (IF/ELSE, etc.) possible, no error trapping during installation, and so on ... Everything is performed in a specific sequence, as shown in this document (and in the Inno Setup help file).

Inno Constants

Inno supports the use of special constants which represent certain directories on the user's machine. Some of these are defined by you in the setup section.

Also note that the constants defined below cannot be used in the SOURCE parameter of the Files section.

{app}
The application directory, which the user selects on the Select Directory page of the wizard. For example: If you used {app}\MYPROG.EXE on an entry and the user selected C:\MYPROG as the application directory, Setup will translate it to use C:\MYPROG\MYPROG.EXE.

{sys}
The system's Windows System directory (System32 in a 32-bit installation on Windows NT). For example: If you used {sys}\CTL3DV2.DLL on an entry and the system's Windows System directory is C:\WINDOWS\SYSTEM, Setup will translate it to use C:\WINDOWS\SYSTEM\CTL3DV2.DLL.

{src}
The directory in which the Source files are located. For example: If you used {src}\MYPROG.EXE on an entry and the user is installing from "S:\", Setup will translate it to use "S:\MYPROG.EXE".

{pf}
Program Files. The path of the system's Program Files directory, typically C:\Program Files.

{cf}
Common Files. The path of the system's Common Files directory, typically C:\Program Files\Common Files.

There are others, which you can look up in help.

Using Other Languages

The author of Inno Setup has written the code in such a way that the message strings used during an actual install are pulled from a file (*.ISL) -- this file contains the strings used, and can be changed for different languages.

We have placed on the CD as many of these files as were available when we created our install set for you. These will be in the "Inno" folder on the CD.

If you do not see the language you wish to use in the files that are on the dB2K CD, you can download a new file for a specific language from the Inno Setup website, at:

http://www.jordanr.dhs.org/is3rdparty.htm

Scroll down the page until you get to the language section. Make sure you go to the Inno Setup 1.3 link and download the language file you need from there. It is suggested that you either store this file in the folder that Inno Setup was installed to, or that you put it in your application directory -- my inclination would be to store it with Inno Setup, and the sample code in the template script assumes it is in that folder.

Back to Contents


Creating an Install for Vesper 8.10

This document from here on discusses a full install of the Vesper 8.10 application, which is a sample application written in dB2K release 0.1, available from my dBASE website and the mirrors of the same.

http://users.megapathdsl.net/~kmayer/dbase/dbase.htm

The script discussed here was used to test options and get something that worked -- what this means is that the sample script actually does work for my application ... There are notes throughout, to help explain what I did.

All of the following came from the Inno help, except for the information on installing the BDE and dB2K runtime, which comes from our own development team at dBASE, Inc.

To test this I went to a machine I wanted to test the install on, and uninstalled dB2K, and deleted any left-over folders and files, removed the runtime files from the Windows\System folder, and uninstalled the BDE. I checked the registry and made sure no remnants of either were there ... after each install test I did the same to make sure I was working on a "clean" machine.

Most of what is discussed below is specifically the Inno Setup Script needed to deploy the Vesper application, but there are a few places that digress into general topics ...

You can include comments by using the ";" at the beginning of the line.

The Setup Section

As you might imagine, this is important in a few ways. See the comments associated with each entry below ...

[Setup] 
; -----------------------------------------------------
; LANGUAGE
; If using English, ignore the following, otherwise
; remove the ";" from the beginning of the line, and
; change the filename ("default.isl") to the name
; of the language file ...
;MessagesFile=compiler:default.isl
;
; -----------------------------------------------------
; To Create 3 1/2" disks set this to 1, it is set currently
; to create a a CD image:
DiskSpanning=0
;
; -----------------------------------------------------
; Define the Source Directory
; This is the Source folder for files (where is your 
; application?)
SourceDir=C:\Vesper
;
; -----------------------------------------------------
; Define the default Destination Directory
; Default directory name, under the drive:\Program Files
; location
DefaultDirName={pf}\Vesper
;
; -----------------------------------------------------
; Disable Append Directory
; If the user decides to change directories, and then
; selects the same directory as above, Inno will append
; the directory name to the end 
; (i.e., C:\Program Files\Vesper\Vesper )
; By disabling this, it will not append the directory ...
DisableAppendDir=Yes
;
; -----------------------------------------------------
; Define the Group Name for the Programs menu
; Name of group that is created
DefaultGroupName=Vesper 8.10
;
; -----------------------------------------------------
; Application Name 
; As it will appear in Setup program (upper left corner)
AppName=Vesper 8.10
;
; -----------------------------------------------------
; Version -- required
AppVerName=Vesper version 8.10
;
; -----------------------------------------------------
; Copyright for display in lower right of setup screen
AppCopyright=Copyright © 2000, Golden Stag Productions 
;
; -----------------------------------------------------
; Background color (optional, default is blue)
BackColor=clGreen
; Second color (fade from one to other -- optional, default is clBlack)
BackColor2=clBlack
; Direction to fade (default is toptobottom)
BackColorDirection=lefttoright
;
; ----------------------------------------------------- 
; Uninstall icon (placed in the group):
AlwaysCreateUninstallIcon=1
;
; -----------------------------------------------------
; Uninstall Icon Name
; Text associated with the Uninstall Icon
UninstallIconName=Uninstall Vesper 8.10
;
; -----------------------------------------------------
; Output Directory 
; This is where the install program gets created 
; (this will normally be "under" the source, i.e,
; C:\Vesper\InstallImage):
OutputDir=InstallImage

There are a lot of other options that can be set there, read the online help if you are interested (this includes adding a license text file, a readme before and/or after the install starts, and a lot more ...).

The Dirs Section

The directory section is used to define directories to be created, besides the application directory ... it uses the constants that are defined elsewhere in the script. While you aren't required to create directories first before copying files to them in the [Files] section, directories will not be deleted by the uninstaller if they are not specified here.

[Dirs] 
; -----------------------------------------------------
; This section is used to define any directories/folders
; you need created for the use of your application
; -----------------------------------------------------
; IF you are storing the data in a different folder 
; than the folder the application is installed to 
; (Vesper does):
Name: "{app}\tables" 

The Files Section

The documentation states this "is optional, but necessary for most installations." Since it defines all of the files that are copied to the user's system, it is required ...

Each file has a "Source" and a "DestDir", and there are some parameters that you should examine ...

dB2K Runtime Installer

NOTE: The runtime/BDE installer is stored on your dB2K CD, in a special RUNTIME folder. I recommend that you copy the file or files that you wish to use for your application(s) to the dB2K directories, perhaps in a folder called Runtime. The sample below assumes that this is where the runtime file is stored.

Also note that there are six different install programs, one contains all languages currently supported and there are five for specific languages. If you wish to deploy the full multi-language runtime/BDE installer, use the file named: dB2KRuntimeEngine.exe. If you wish to use a language specific installer (which has the advantage of being smaller), you would use one of the files named dB2KRuntimeEngine_xx.exe, where the 'xx' letters correspond to one of the following:

EN = English
DE = German
ES = Spanish
IT = Italian
JA = Japanese

Back to the example:

[Files] 
; -----------------------------------------------------
; The files section is where you tell Inno Setup to 
; a) find the files to bundle them into your setup 
;    program and
; b) to copy them to during the installation process
;
; -----------------------------------------------------
; ----------------- dB2K Runtime Files and BDE --------
; dB2K runtime installer, includes the BDE, and will be installed
; to the temp folder, and run later ... Vesper uses
; the English runtime installer:
;
Source: "C:\Program Files\dBASE\dB2K 01\Runtime\dB2KRuntimeEngine_EN.exe"; DestDir: "{tmp}"
;

; -----------------------------------------------------
; ------------ USER DEFINED (for your application) ----
;
; The application itself, to the application folder:
Source: "VESPER.EXE"; DestDir: "{app}" 
;
; Don't forget your .INI file:
Source: "vesper.ini"; DestDir: "{app}"
;
; Misc. files (images, etc.)
Source: "Calendar.bmp"; DestDir: "{app}" 
Source: "Herald2.ico"; DestDir: "{app}"
Source: "pkzip.exe"; DestDir: "{app}"
Source: "stag.bmp"; DestDir: "{app}"
Source: "vdb7_t.gif"; DestDir: "{app}"
Source: "vdb7ico.gif"; DestDir: "{app}"
Source: "splash.bmp"; DestDir: "{app}"
;
; Readme file, note the flags parameter
Source: "README.TXT"; DestDir: "{app}"; Flags: isreadme
;
; Tables, indexes and .dbts to the application\tables folder
; Note the use of the CopyMode option -- this tells the application
; to only copy the tables if the ones in the current setup are
; more recent than the ones on an existing installation. 
Source: "inventor.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "inventor.mdx"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "library.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "library.mdx"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "ranks.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "ranks.mdx"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "regions.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "regions.mdx"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "roster.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "roster.mdx"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "roster.dbt"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "temp.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "temp.mdx"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "temp.dbt"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "temp2.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "temp2.dbt"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist

The Run Section

This section is used to define programs that are to be executed during the installation process. You can execute more than one program and Inno will, by default, wait for the next to complete. Any programs defined here will be run in the sequence given, and after the Files section is executed.

For our purposes, this section deals with running the BDE Install and dB2K runtime.

Note that the runtime installer may ask a question about storing files to the TEMP directory -- if you wish, you can "silence" that question (so your user does not need to see it), by adding a "-s" switch to the run instruction. In the code below, you would add to the end of the line:

  ; Parameters: "-s"

So it would look like:

   Filename: "{tmp}\dB2KRuntimeEngine_EN.exe"; Parameters: "-s"

Back to the example:

[Run]
; -----------------------------------------------------
; You can run external programs -- they will be executed after
; the files are copied ... 
; -----------------------------------------------------
;            dB2K Runtime/BDE Install
; This is necessary to install the dB2K runtime *and* the
; BDE:
; -----------------------------------------------------
; dB2K release 1 BDE/Runtime Installer:
;   Note to be careful of the language here, as noted
;   in the "Files" section, the language may be important to 
;   your application ...
Filename: "{tmp}\dB2KRuntimeEngine_EN.exe"
;

Someone in Jordan's newsgroups for Inno Setup asked about displaying the newly created group for the user after the install is complete. This is a nifty idea, especially since the install is very fast. You can do this by adding the following lines:

; Display the group when done:
Filename: "{group}\"; Flags: shellexec

The Icons Section

As with the files section above, this may not be 100% required, but it is really pretty much a necessity:

[Icons] 
; -----------------------------------------------------
; What Icons to set up in the Program Group
; -----------------------------------------------------
; Application icon
Name: "{group}\Vesper 8.10"; Filename: "{app}\Vesper.exe"; WorkingDir: "{app}"
; -----------------------------------------------------
; BDE Administrator - if you wish to allow your users to even
; know this exists ...
; Note that the problem here is that this assumes the user 
; didn't install the BDE to some other location -- you
; have no real control over this ...
Name: "{group}\BDE Administrator"; Filename: "{cf}\Borland Shared\BDE\BDEAdmin.exe"; WorkingDir: "{cf}\Borland Shared\BDE"
; -----------------------------------------------------
; Readme:
Name: "{group}\Readme.txt"; Filename: "{app}\readme.txt"; WorkingDir: "{app}"

You can add other icons for other programs if you wish.

The Registry Section

This is where you can place any registry keys your application may require. If you are not using any, you can leave this section out of your Inno Setup script.

Uninstall Option

The uninstall program created by Inno Setup is stored in the same directory as your application, and will be named: UNINS000.EXE, and there are a couple of other files (UNINS000.DAT and UNINS000.MSG). The uninstall is quick. Note that this does not uninstall the BDE or the dB2K runtime files, which are installed from a separate program ...

Compiling and Testing

Click on the "File" menu, and first save your script (always a good idea). Then click on the "File" menu again, and select the "Compile" option (or Press F9). By default, this program creates the images in a folder called "Output" under the folder that your script is in, but the example above actually tells it to create "InstallImage" so if your script is in C:\VESPER, the "Output" folder would be: C:\Vesper\InstallImage, and the disk images would be there.

If you set it to install to a CD (a single setup image), you will have only SETUP.EXE ....

If the DiskSpan setting is set to 1 (floppy disk), I am getting 14 images for 3 1/2" disks, with names of:
SETUP.EXE
Setup.1
Setup.2 etc.

The idea for a floppy disk install is to copy SETUP.EXE and SETUP.1 to the first disk, and the other disk images to the other disks, i.e., 14 3 1/2" floppy disks if using the "All Languages" runtime/BDE installer.

The reason that (if you used the "All Languages" install) there are 14 disk images for a floppy disk install is that the dB2K Runtime and BDE installer is designed to install six different languages -- the user is asked when the runtime installer executes, which language to install. This is to ensure that the correct language versions of the dB2K runtime files, the BDE Administrator, help files, and so on are installed ...

The reason there are the smaller, language specific runtime installers is to reduce the size of your installation disk set (this is also useful for web-installs ...).

Back to Contents


Installing the BDE With Your Application

Handling the Registry Settings

For the BDE registry settings, you may want to consider if you need them at all. One item that is very important is the default language driver. If you do not set this yourself, the default dBASE language driver will be "ascii ANSI". The Vesper application uses "Western European ANSI" ('WEurope' Ansi), as some of the characters used need that ... In order to save the registry settings you have for your installation of the BDE for the Language Driver, you may want to use a .REG file (created from "REGEDIT" -- the registry editor program on your computer) to copy the keys you need to a .REG file. Important Note: BDE Aliases are not stored in the registry -- see information further down in this document regarding these.

NOTE: If you are using Win 2K you should use REGEDIT4 for this, rather than the standard REGEDIT, as the registry entries are apparently written out in a different format using REGEDIT on Win 2K, and if you are creating an install for, say, a Win 98 machine the registry entries will not be recognized.

A .REG file is simply a text file, so you can open it and edit it yourself before deploying it. The following is an example of what you might want to do. You may want to ensure that the default dBASE language driver is one you specifically prefer to use for your application. This can be done by finding the following entry in the Registry:

If you open it in a text editor (notepad, wordpad, dBASE's source editor) it will look like:

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Borland\Database Engine\Settings\DRIVERS\DBASE]

[HKEY_LOCAL_MACHINE\Software\Borland\Database Engine\Settings\DRIVERS\DBASE\INIT]
"VERSION"="1.0"
"TYPE"="FILE"
"LANGDRIVER"="DBWINWE0"

[HKEY_LOCAL_MACHINE\Software\Borland\Database Engine\Settings\DRIVERS\DBASE\TABLE CREATE]
"LEVEL"="7"
"MDX BLOCK SIZE"="1024"
"MEMO FILE BLOCK SIZE"="1024"

If you wanted to, you could edit any of this. I would recommend leaving it "as is". The LANGDRIVER key will be set to whatever the language driver is currently set to for dBASE tables in the BDE Administrator.

You may also want to export the HKEY_LOCAL_MACHINE\Software\Borland\Database Engine\Settings\SYSTEM\INIT section. This contains the BDE memory and file settings like MaxFileHandles, MaxBufferSize etc. This could be important if you use higher settings than the BDE defaults.

Note that each registry export should be kept in their own seperate files. Don't combine them into a single REG file becauase the settings may not get into registry properly.

In order to update the target machine's registry, copy this file to your source code folder. Then, in the FILES section of the Inno Setup Script you are creating, add the following:

; -----------------------------------------------------
; BDE Registry settings (this assumes the .reg file
; is in the same folder as your application):
Source: "BDEStuff.reg"; DestDir: "{tmp}"; Flags: deleteafterinstall

This will copy the file to the temp folder of your users's computer. Then, in the RUN section, add this after the dB2K Runtime install (if it is before the runtime install, the new keys will be overwritten ...):

; -----------------------------------------------------
; 'Run' the Registry file with other BDE settings in it ...
Filename "{win}\REGEDIT.EXE"; Parameters "/S ""{tmp}\BDEStuff.reg"""

This will cause the .REG file to be "executed" by Windows after the BDE is installed. This avoids problems with setting the BDE registry before the BDE is installed (which then causes the registry settings to be overriden). Note that this actually runs the REGEDIT program with the "silent" switch so no dialog appears. (This information courtesy of Jordan Russel)

Merging BDE Configuration Files

Jordan Russel (author of Inno Setup) is not sure how to work with BDE Aliases, merge configuration files, and so on. Vic McClung, a developer who uses dBASE for many things, spent some time working out how to merge BDE Configuration files using the BDE API (Application Programming Interface), and created a simple-to-use program in dBASE code that is provided with this document. The program is named "Merge.prg".

To use this program, there are several steps you need to take, which are given in detail below.

  1. Create a Custom .CFG File
    Custom Configuration Files are created using the BDE Administrator. Make sure that in you current configuration that you have the BDE Alias (or aliases) that you need for your application.

    Use the "Object" menu, and select "Save as Configuration ...". This menu option will ask for the location/name of your new configuration file. You may want to put your custom configuration file in your application's directory (this will make it easier to deploy, later). Give it a name that makes sense for you, such as "MyApp.cfg" (where "MyApp" is the name of your application).

    Now, note that the currently active .CFG file in the BDE Administrator is the custom one. Go down to the list of aliases in the main screen (click the tab "Databases", and then click the "+" by the word "Databases" there to see a list of all aliases).

    You should delete the aliases that are not important to your application -- note that this does not affect the original file -- we'll re-set that in a moment. You can delete these aliases by clicking on the ones you wish to delete and pressing Ctrl+D, or by using the "Object" menu and selecting "Delete".

    Note if you have an alias that does not delete it is probably because this is an ODBC Driver setting -- you cannot delete it, but unless your user has the exact same ODBC Drivers set up on their computer(s) then they will not see these -- in other words, you don't have to worry about these.

    Now that you have your custom configuration file, you need to re-set the BDE Administrator to be using the original "IDAPI.CFG" file that it started with. Select the "Object" menu, and "Open Configuration ...". Select the path that the BDE was installed to - by default this is:

           C:\Program Files\Common Files\Borland\BDE
    

    And then select "Idapi.cfg", then "Open" -- you will see the list of databases collapse - if you re-open it you will see all of the aliases there that you had before this exercise.

  2. Compile the Merge Program
    This is done quite simply -- start dB2K, find the folder that you have the Merge.prg file in using the Navigator's "Look In" dialog, and in the Command Window, type the following:

           compile _dbwinhome+"samples\registry.prg"
           compile merge
           build merge.pro, _dbwinhome+"samples\registry.pro" to merge
    

    You now have your MERGE.EXE file, which is what will take your custom .CFG file and merge it with the BDE's .CFG file when your application is installed.

  3. Modify the Inno Setup Script For Your Application
    There are several places you need to modify your script.
    1. The "Files" Section
      This section is the one you use to define the files to deploy. Add the following:

              ; Path to the MERGE.EXE that you just created
              Source: "\PathToExe\MERGE.EXE"; DestDir: "{tmp}"
              ; Path to the custom .CFG file you just created --
              ; if you leave the path out, Inno will try to find
              ; it in the application directory where your application's
              ; .EXE and other files are.
              Source: "\PathToCFG\MyApp.CFG"; DestDir: "{tmp}"
      

    2. The "Run" Section
      This is where you tell Inno Setup to run any executables that need to be run. Add the following after the runtime part, or the MERGE.EXE will not run.

              Filename: "{tmp}\Merge.exe"; Parameters: "MyApp.CFG"
      

    When done, save your Inno Setup Script, and you'll be ready to go.

Another Method
If you are not comfortable with using this program, creating a custom configuration file, etc., there is a custom class in the dBASE Users' Function Library (in the Knowledgebase for dB2K) called "BDEAlias.cc" that can be used to create a BDE Alias in your own application when it starts. This works well, so it will give you another option for setting up your BDE Aliases.

Back to Contents

SQL Links Drivers

When your user installs the dB2K and BDE Runtime using the programs provided, all of the current SQL Links files necessary will be installed on your users' computer. This means that the Oracle, InterBase, Sybase, and other SQL Links drivers will be installed -- you do not have to do anything special to install them.

In addition, just because SQL Links are installed, does not mean you can just assume that your user has whatever Client software may be needed for the specific SQL Server (i.e., Oracle, etc.). SQL Links are the native drivers for these servers, but they will not allow your application to work without the proper software for the SQL Server/SQL Client being installed. See the documentation for the SQL software you are using for more details.

Back to Contents


Creating a CD Image

When you run your CD Burner software, whatever it is, you should be allowed to set up your CD image in whatever fashion works for you, including adding other software, if you feel that you need to. (And have space on the CD, which you probably will.)

One thing I found was not documented in my own CD software was how to tell the operating system what program to run, if Windows had AUTORUN set to on (which is the default).

After digging around, it is actually very simple. There is a file on any CD that is used when autorun is enabled, called AUTORUN.INF. It should contain the following three lines -- modify these as necessary for your own application/CD layout -- NOTE that this file must be created/saved as a DOS TEXT file:

   [autorun]
   OPEN=setup.exe
   ICON=MyApp.ico

If your CD layout is with all your files in folders, you would want to be sure that you point to the folders, using the root as "\", for example, if you examine the AUTORUN.INF file on the dB2K CD, you will see that the OPEN option points to the SETUP program in the root of the CD, but the ICON option points to a different folder ... Anyway, this is much easier than it sounds like it ought to be (which is handy ...).

Back to Contents


Final Thoughts

Note that the deployment of Vesper is for a single-user, relatively simple application. There are options in the setup program that you may need to examine for more complex application installs ... the idea of this document was to get you started.

Why Do It The Hard Way?

Well, for one thing it's a great way to learn how something works ... however, in the long run, it's probably easier to do this by using a graphical interface.

See the 'third party' section below ...

Contacting the Author

For assistance with Inno Setup, please contact the author via information at his website:

http://www.jordanr.dhs.org/isinfo.htm

In addition, Jordan has newsgroups for additional support for Inno Setup at:

http://www.jordanr.dhs.org/newsgroups.htm

For information on dB2K -- if you own dBASE, please see the CD which has the Knowledgebase on it, or you may visit the dBASE, Inc. website and check the Knowledgebase page there, which among other things is likely to be more up-to-date than the one on the CD.

3rd Party Add Ons

TaFWeb Software created a GUI for Inno called "ScriptMaker" It can be found at:

http://www.tafweb.com/scriptmaker.html

There are several others as well. See Jordan's 3rd party page http://www.jrsoftware.org/is3rdparty.htm for more information.

Back to Contents


The Complete Vesper 8.10 Inno Setup Script

Note that the script below works for the Vesper 8.10 application. However, there is a more generic script available in the Inno directory on your CD. This is named "template.iss".

; This is a test Inno Setup Script for the Vesper 8.10
; Application to see if we can get this to work
; and install everything as needed
;
; Note: This script contains installation instructions
; to handle deploying the runtime for dB2K release 1.
;
[Setup] 
; To Create 3 1/2" disks set this to 1, it is set currently
; to create a a CD image:
DiskSpanning=0

; Source folder for files (where is your application?):
SourceDir=C:\Vesper8

; Default directory name, under the drive:\Program Files
; location
DefaultDirName={pf}\Vesper

; If the user decides to change directories, and then
; selects the same directory as above, Inno will append
; the directory name to the end 
; (i.e., C:\Program Files\Vesper\Vesper )
; By disabling this, it will not append the directory ...
DisableAppendDir=Yes

; Name of group that is created
DefaultGroupName=Vesper 8.10
;
; Items involved in install program display:
; Application Name -- as it will appear in Setup program (upper left corner)
AppName=Vesper 8.10
; Version -- required
AppVerName=Vesper version 8.10
; Copyright for display in lower right of setup screen
AppCopyright=Copyright © 2000, Golden Stag Productions 
; Background color (optional, default is clBlue)
BackColor=clGreen
; Second color (fade from one to other -- optional, default is clBlack)
BackColor2=clBlack
; Direction to fade (default is toptobottom)
BackColorDirection=lefttoright
; 
; Uninstall icon (placed in the group):
AlwaysCreateUninstallIcon=1
; Uninstall Icon Name:
UninstallIconName=Uninstall Vesper 8.10
;
; Output directory -- where the install program
; gets created (this will be "under" the source, i.e,
; C:\Vesper\InstallImage):
OutputDir=InstallImage

[Dirs] 
; IF you are storing the data in a different folder than the folder 
; the application is installed to (Vesper does):
Name: "{app}\tables" 

[Files] 
; ----------------- dB2K Runtime Files and BDE --------
; dB2K runtime installer, includes the BDE, and will be installed
; to the temp folder, and run later ...
Source: "C:\Program Files\dBASE\dB2K 01\Runtime\dB2KRuntimeEngine_EN.exe"; DestDir: "{tmp}" 
;
; The application itself, to the application folder:
Source: "VESPER.EXE"; DestDir: "{app}" 
;
; Don't forget your .INI file:
Source: "vesper.ini"; DestDir: "{app}"
;
; Misc. files
Source: "Calendar.bmp"; DestDir: "{app}" 
Source: "Herald2.ico"; DestDir: "{app}"
Source: "pkzip.exe"; DestDir: "{app}"
Source: "stag.bmp"; DestDir: "{app}"
Source: "vdb7_t.gif"; DestDir: "{app}"
Source: "vdb7ico.gif"; DestDir: "{app}"
Source: "splash.bmp"; DestDir: "{app}"
;
; Readme file, note the flags parameter
Source: "README.TXT"; DestDir: "{app}"; Flags: isreadme
;
; Tables, indexes and .dbts to the application\tables folder:
Source: "tables\inventor.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\inventor.mdx"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\library.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\library.mdx"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\ranks.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\ranks.mdx"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\regions.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\regions.mdx"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\roster.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\roster.mdx"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\roster.dbt"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\temp.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\temp.mdx"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\temp.dbt"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\temp2.dbf"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
Source: "tables\temp2.dbt"; DestDir: "{app}\tables"; CopyMode: onlyifdoesntexist
;
; -----------------------------------------------------
; BDE Registry settings
Source: "BDEStuff.reg"; DestDir: "{tmp}"

[Run]
; -----------------------------------------------------
; dB2K release 1 BDE/Runtime Installer:
Filename: "{tmp}\dB2KRuntimeEngine_EN.exe"
;
; -----------------------------------------------------
; Registry file ...
Filename: "{win}\REGEDIT.EXE"; Parameters: "/S ""{tmp}\BDEStuff.reg"""
;
; -----------------------------------------------------
; Display the group when done:
Filename: "{group}\"; Flags: shellexec

[Icons] 
; Application icon
Name: "{group}\Vesper 8.10"; Filename: "{app}\Vesper.exe"; WorkingDir: "{app}"
; BDE Administrator - if you wish to allow your users to even
; know this exists ...
; Note that the problem here is that this assumes the user 
; didn't install the BDE to some other location -- you
; have no real control over this ...
Name: "{group}\BDE Administrator"; Filename: "{cf}\Borland Shared\BDE\BDEAdmin.exe"; WorkingDir: "{cf}\Borland Shared\BDE"
; Readme:
Name: "{group}\Readme.txt"; Filename: "{app}\readme.txt"; WorkingDir: "{app}"

[Registry] 
;
; None is necessary if using the dB2K runtime installer, unless
; your application needs a registry setting ...

; -----------------------------------------------------
; End of Vesper.iss Inno Setup script
; -----------------------------------------------------

Back to Contents