Using Inno Setup with dBASE Applications
Includes Deploying the BDE
Updated: October, 2003
Ken Mayer, SQA Engineer
dBASE, Inc.
Thanks to Dan Howard, dBVIPS, for Editing ...


NOTE: This HOW TO document is aimed specifically at deploying a dASE Plus. If you are using earlier versions of dBASE (dB2K, Visual dBASE 7.5), there are different HOW TO documents that discuss these topics ...

This document was originally written for Inno Setup version 1.3.21, and modified over time to try to keep up with changes made in versions 2.x and 3.x of Inno Setup and now Inno Setup 4.0.9. Provided on your dBASE CD is the latest version of Inno Setup at the time this article was last updated. There are options not discussed in this document you may wish to examine/use -- check the help when you run the Inno Setup compiler.


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 dBASE.

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 dBASE Plus 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 dBASE CD) and a sample template file (template.iss) which can be used to create your own setups.

If you are not using dBASE, 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.jrsoftware.org/isdl.php -- Jordan links from here to other sites.

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

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 "isetup-4_0_9.exe" -- this file is the version current at the time this document was last updated. (Note that the version number may have changed, if it's not identical to that shown here, don't panic -- it's a more recent version ...)

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

C:\Program Files\Inno Setup 4

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. If you work with it a bit you will see that it provides a wizard, as well as other features, including syntax highlighting (colors for specific parts of the script, etc.).

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 either your computer or the person using your install's computer. 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.

You can download a new file for a specific language from a third-party website:

http://www.jrsoftware.org/files/istrans/

When you find the language file you need, 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.

Back to Contents


Creating an Install for Vesper 9.0

This document from here on discusses a full install of the Vesper 9.0 application, which is a sample application written in dBASE Plus 2.01, available from my dBASE website:

http://www.goldenstag.net/dbase

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 dBASE Plus 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 dBASE Plus, 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.

This sample script shown in this article was last actually updated for version 3.0.7 of InnoSetup, but has been tested under the more recent versions, and no changes appear to be necessary.

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
;
; -----------------------------------------------------
; Application Name 
; As it will appear in Setup program (upper left corner)
AppName=Vesper 9.0
;
; -----------------------------------------------------
; Version -- required
AppVerName=Vesper version 9.0
;
; -----------------------------------------------------
; Copyright for display in lower right of setup screen
; NOTE: To get the copyright symbol to appear, it is
; ANSI character 169, which can be gotten to by holding
; down the ALT key, and on the numeric keypad, typing
; 0169  and releasing the ALT key. If this doesn't work,
; you may need to make sure you are using a Windows (ANSI)
; language driver ...
AppCopyright=Copyright © 2003, Golden Stag Productions 
;
; -----------------------------------------------------
; 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" 
; HTML Stuff:
Name: "{app}\HTML"
Name: "{app}\HTML\Roster"
Name: "{app}\HTML\TextImages"

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 unless you don't wish to actually deploy any files ...

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

dBASE Plus Runtime Installer
NOTE: The runtime/BDE installer is stored on your dBASE 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 dBASE 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: dBASEPlusRuntimeEngineNNNN.exe.

The "NNNN" in red is the build number of dBASE Plus.

If you wish to use a language specific installer (which has the advantage of being smaller), you would use one of the files named dBASEPlusRuntimeEngineNNNN_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
;
; -----------------------------------------------------
; ----------------- dBASE Plus Runtime Files and BDE --------
; dBASE Plus 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\Plus\Runtime\dBASEPlusRuntimeEngine1703_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}"
;
; Help Files (HTML and JPG)
;
Source: "main.htm"; DestDir: "{app}"
Source: "roster.htm"; DestDir: "{app}"
Source: "roster1.jpg"; DestDir: "{app}"
Source: "roster2.jpg"; DestDir: "{app}"
Source: "roster3.jpg"; DestDir: "{app}"
Source: "roster4.jpg"; DestDir: "{app}"
Source: "Inventory.htm"; DestDir: "{app}"
Source: "Inventory.jpg"; DestDir: "{app}"
Source: "Library.htm"; DestDir: "{app}"
Source: "Library.jpg"; DestDir: "{app}"
Source: "Reports.htm"; DestDir: "{app}"
Source: "ReportViewer.jpg"; DestDir: "{app}"
Source: "ReturnAddress.jpg"; DestDir: "{app}"
;
; Misc. files (images, etc.)
Source: "Herald2.ico"; DestDir: "{app}"
Source: "pkzip.exe"; DestDir: "{app}"
Source: "stag.bmp"; DestDir: "{app}"
Source: "PlusIcon.jpg"; DestDir: "{app}"
Source: "splash.bmp"; DestDir: "{app}"
;
;Font File -- must be installed in the correct location:
Source: "C:\Windows\Fonts\Priory.ttf"; DestDir: "{fonts}"; FontInstall: "Priory"; Flags: uninsneveruninstall onlyifdoesntexist
;
; 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 Flags 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"; Flags: onlyifdoesntexist
Source: "inventor.mdx"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "library.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "library.mdx"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "LocalGroups.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "LocalGroups.mdx"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "ranks.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "ranks.mdx"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "regions.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "regions.mdx"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "roster.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "roster.mdx"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "roster.dbt"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "RosterForReport.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "RosterForReport.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "RosterForReport.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "temp.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
;
; For HTML Output of Roster (see RosterToHTML.prg for details):
Source: "HTML\herald.gif"; DestDir: "{app}\HTML"
Source: "HTML\PoweredBydBASE.gif"; DestDir: "{app}\HTML"
Source: "HTML\westarms.gif"; DestDir: "{app}\HTML"
Source: "HTML\TextImages\WKCoHText.jpg"; DestDir: "{app}\HTML\TextImages"

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 dBASE Plus 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}\dBASEPlusRuntimeEngineNNNN_EN.exe"; Parameters: "-s"

Back to the example:

[Run]
; -----------------------------------------------------
; You can run external programs -- they will be executed after
; the files are copied ... 
; -----------------------------------------------------
; dBASE Plus 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}\dBASEPlusRuntimeEngine1703_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 9.0"; 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 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 dBASE Plus or 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 dBASE Plus or 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 dBASE Plus Runtime With Your Application

Your best bet to install the Runtime for dBASE Plus is to use the installer that comes with the product. This installer includes the BDE, and can make life a lot easier.

However, for whatever reason, you may wish to deploy only the runtime files (an update to your application or some other reason).

If that is the case, you need to install the following:

dBASE Plus   dB2K
PlusRun.exe   dB2KRun.exe
PlusR_en.dll   db2kr_en.dll
Resource.dll   Resource.dll

Note: the runtime DLL file (PlusR_xx.dll) needs to have the correct language reference -- the default is "en" for English -- use the following for the two-letter language code:

LanguageCode
Englishen
Germande
Spanishes
Italianit
Japaneseja

In addition, you need to deploy "resource.dll" if you are using any images (pushbuttons, etc.) that use this file in your application. If you are deploying a web-based application this should not be necessary.

Back to Contents


Installing the BDE With Your Application

Some people are not comfortable with using the Runtime Installer that ships with dBASE Plus, and would prefer to install the BDE themselves. If you do that, you need to get a BDE Installer from Borland. That said, you may have a need to create your own settings ...

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)

A Simpler Way
The most recent versions of the dBASE Users' Function Library (dUFLP), which should be in the Knowledgebase that is installed with dBASE Plus 2.02 or later, have a couple of programs that you can use to do similar things. These are "BDERegistrySettings.wfm" and "BDERegistrySettingsLight.wfm". These can be used to a) modify your own BDE Registry settings; and/or b) create a program that can be deployed to modify the BDE Registry settings on your users' machines. These settings are specifically the ones noted above, and others that might be useful for your own application(s).

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 dBASE Plus or 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 dBASE Plus) 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 dBASE Plus Runtime and BDE 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 dBASE Plus 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.

NOTE: Version 3.x and later has a wizard that can be used. When you first start Inno Setup, it asks if you want to use it. So, it appears that Mr. Russel has decided to make this even easier. I have not used the Wizard, and cannot say how good it is.

The dBASE Users' Function Library, as of the first version for dBASE Plus, will have a new form called "InnoScriptBuilder.wfm" -- this is a simple one-way-tool, Inno Setup Script Builder, which is designed to get you started. It does not cover all possible options in Inno Setup, and is meant to give you the basic stuff that you need, and help get your script started. You may need to modify it when done ...

In the dBASE newsgroups (specifically dbase.deployment) one of the users (Jonny Kwekkeboom) has posted a huge amount of information on using Inno Setup for deploying dBASE applications, and he's been working on a dBL (dBASE Language) two-way tool that can be used ...

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 dBASE Plus -- 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 9.0 Inno Setup Script

Note that the script below works for the Vesper 9.0 application. However, there is a more generic script available in the Inno directory on your CD. This is named "template.iss". This script is based on the classic wizard style, and in the text below I have added the necessary value to use the classic style. If you leave that out, as noted elsewhere in this document, it will default to the modern style.

; This is a test Inno Setup Script for the Vesper 9.0
; Application to see if we can get this to work
; and install everything as needed
;
[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:\Vesper

; 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

; Items involved in install program display:
; Application Name -- as it will appear in Setup program (upper left corner)
AppName=Vesper
; Version -- required
AppVerName=Vesper, ver. 9.0
; Copyright for display in lower right of setup screen
AppCopyright=Copyright © 2003, Golden Stag Productions

; 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"
;
; HTML Stuff:
Name: "{app}\HTML"
Name: "{app}\HTML\Roster"
Name: "{app}\HTML\TextImages"

[Files] 
; ------------------- dBASE Plus Runtime/BDE Install File -----------
Source: "C:\Program Files\dBASE\PLUS\Runtime\dBASEPlusRuntimeEngine1703_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}"
;
; Help files (HTML)
; // CHECK THIS CAREFULLY ...
Source: "main.htm"; DestDir: "{app}" 
Source: "roster.htm"; DestDir: "{app}"
Source: "roster1.jpg"; DestDir: "{app}"
Source: "roster2.jpg"; DestDir: "{app}"
Source: "roster3.jpg"; DestDir: "{app}"
Source: "roster4.jpg"; DestDir: "{app}"
Source: "Inventory.htm"; DestDir: "{app}"
Source: "Inventory.jpg"; DestDir: "{app}"
Source: "Library.htm"; DestDir: "{app}"
Source: "Library.jpg"; DestDir: "{app}"
Source: "Reports.htm"; DestDir: "{app}"
Source: "ReportViewer.jpg"; DestDir: "{app}"
Source: "ReturnAddress.jpg"; DestDir: "{app}"
;
; Misc. files
Source: "Herald2.ico"; DestDir: "{app}"
Source: "pkzip.exe"; DestDir: "{app}"
Source: "stag.bmp"; DestDir: "{app}"
Source: "PlusIcon.jpg"; DestDir: "{app}"
Source: "splash.bmp"; DestDir: "{app}"
;
; Font file -- have to be careful with these -- special details are used:
Source: "C:\Windows\Fonts\Priory.ttf"; DestDir: "{fonts}"; FontInstall: "Priory"; Flags: uninsneveruninstall onlyifdoesntexist
;
; 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"; Flags: onlyifdoesntexist
Source: "tables\inventor.mdx"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\library.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\library.mdx"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\LocalGroups.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\LocalGroups.mdx"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\ranks.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\ranks.mdx"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\regions.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\regions.mdx"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\roster.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\roster.mdx"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\roster.dbt"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\RosterForReport.DBF"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\RosterForReport.MDX"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\RosterForReport.DBT"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
Source: "tables\temp.dbf"; DestDir: "{app}\tables"; Flags: onlyifdoesntexist
;
; Files needed for HTML Output (see RosterToHTML.prg for details):
Source: "HTML\herald.gif"; DestDir: "{app}\HTML"
Source: "HTML\PoweredBydBASE.gif"; DestDir: "{app}\HTML"
Source: "HTML\westarms.gif"; DestDir: "{app}\HTML"
Source: "HTML\TextImages\WKCoHText.jpg"; DestDir: "{app}\HTML\TextImages"

[Run]
; -----------------------------------------------------
; dB2K Runtime and BDE Install:
Filename: "{tmp}\dBASEPlusRuntimeEngine1703_EN.exe"

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

[Icons] 
; Application icon
Name: "{group}\Vesper"; 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}"

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

Back to Contents