How-to: Install Borland Database Engine as a pre-requisite

Post specialized setup scripts you have created here.
Tinus
Posts: 204
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

How-to: Install Borland Database Engine as a pre-requisite

Postby Tinus » Mon Jul 31, 2006 11:07 am

Hi IA users,

this is a short "how-to" that will demonstrate how easily you can extend the powerful
InstallAware IDE with additional pre-requisites.

Why have I done this? I have one application which is still based on the Borland BDE.
I tried the BDE merge modul and dectected a couple of pitfalls with that. The biggest
problem is the fact, that the internal custom actions only run in UI mode. If you do a
slient install they do not work. And this affects the detection of an already installed BDE.
Futhermore the merge module ignores the use count on uninstall.

So I decided to create a new pre-requisite for the BDE. This has a couple of advantages.
The setup is smaller if the BDE is already present thanks to the web media blocks.
I have full control over the install/uninstall process and I can decide if I upgrade an
existing BDE or not. And finally I can fix the silent install issue.

Creating a new pre-requisite requires two parts: You need to create a setup package
for your pre-requisite and you need to create some scripts to check and install this package.

There's a pretty good description of the process on the InstallAware web:
http://www.installaware.com/installawar ... s_view.pdf
Start with this document to get some basic knowledge.

Now some details:
1. For my setup package I created an empty installation and added only the merge module.

2. Next I created a checkbde52 script. This scripts is used to check for the pre-requisite.
Here I check for an existing BDE. I check the registry, a files and the file version.
Do what ever you need here.

3. Then I created the setupbde52 script. This script is responsible for the
installation
of the pre-requisit. I use a file bag to wrap my setup package from step 1 above.
Now comes the tricky part. If checkbde52 found an already existing but outdated BDE
I have the installation path for the BDE. If not I can use the default. Either way I need
to tell my setup package what path to use. But how can I modify this path inside
the merge module? Borland has documented that the merge module's internal
custom action uses the variable
BDE_INSTALL_PATH.E966F0CB_76B3_11D3_945B_00C04FB1760A
for the path.

And now I can put it all together. Using an Install/Remove MSI command I add my
file bag as package file and use an Action string like this:

Code: Select all

ADDLOCAL=ALL BDE_INSTALL_PATH.E966F0CB_76B3_11D3_945B_00C04FB1760A="$BDEPATH$"


Have a look at the attached scripts for more details.

4. Finally create a RTM file. This file specifies any software requirements for this
new pre-requisite together with the script names above.

Copy all 3 files into the InstallAware 6 runtimes folder. If you want to use the attached
scripts you need to create your own setup package with the merge module
from step 1 and specify the path for the file bag/Install MSI in step 3.

That's all. You now have a perfectly working pre-requisit in the great InstallAware IDE.
With a simple click you can add the BDE to any setup you work on.

If you have similar requirements use the attached scripts as a starting point.

Enjoy.

File Attached:

bde_prerequisite.zip
Martin Rothschink
InstallAware MVP

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware

lextm
Posts: 23
Joined: Wed Aug 22, 2007 2:53 am
Contact:

Where is the version comparison?

Postby lextm » Mon Aug 27, 2007 12:22 am

Code: Select all

~InstallAware Clipboard Data~
~End~
~{E9A5E55E-3BDA-4E70-AFB6-47688DA9DA67}~
~Get File Version~
~{1156B297-543F-4DEB-B63D-5D89E627BD4E}~
~$DLLPATH$\\idapi32.dll~
~BDEVERS~
~Set Variable~
~{8486C7A4-7AB6-4FBA-A366-3B62789FC14A}~
~BDE52$MYAH$MYAH$FALSE~
~UPDATEOLD~
~If~
~{7AC073E3-ECF1-4678-A097-A96139956289}~
~BDEVERS~
~0~
~FALSE~
~FALSE~
~Check File Version~
~{4C3219B6-1CE5-4425-B68A-A3BE3245347D}~
~BDEVERS~
~$DLLPATH$\\idapi32.dll~
~FALSE~
~~
~5.2.0.1~
~Comment~
~{1645B91B-8D58-449B-98D0-8BE531CD8E05}~
~Check for version >5.2.0.1~
~Set Variable~
~{B8F7E6B4-30B4-41B9-BDF8-6EB7BD032BCA}~
~BDEPATH$MYAH$MYAH$FALSE~
~$DLLPATH$~


From the sample code I cannot see where you compare the versions of files. Could you provide more details in this section?

Tinus
Posts: 204
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Postby Tinus » Thu Aug 30, 2007 5:27 am

I simply read the file version from idapi32.dll and compare this with the constant version 5.2.0.1 (the latest from Borland). If different, BDE is installed (again).
Martin Rothschink
InstallAware MVP

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware

Zodex
Posts: 1
Joined: Fri Sep 14, 2007 10:17 am

Re: How-to: Install Borland Database Engine as a pre-requisite

Postby Zodex » Fri Sep 14, 2007 10:51 am

I have a few questions about your tutorial.

Tinus wrote:1. For my setup package I created an empty installation and added only the merge module.


1.Merge modul: I downloaded the merge modul from http://info.borland.com/devsupport/bde/bdeupdate.html. That is a exe file. How do you add this merge modul into your setup package? I only able to add merge modules like msm or msi files into a setup package.

2. setupbde52.mia: In this file there are these lines:

Code: Select all

"ADDLOCAL=ALL BDE_INSTALL_PATH.E966F0CB_76B3_11D3_945B_00C04FB1760A=""$BDEPATH$""",FALSE,,TRUE,"$BDESETUPPATH$\\Borland Database Engine 5.2.msi",,BDE52,,TRUE
mMSI.dll\\mMSIExec.dll
{ED4031C6-EAEB-43AD-AD0A-AB04B5C53223}
"replace with your path to Borland Database Engine 5.2 setup files",TRUE,BDESETUPPATH
mFileBagIDE.dll\\mFileBagEXE.dll


First of all where do you get the Borland Database Engine 5.2 setup files? You have mentioned only the BDE merge module that you have added into your seperate setup package. But i do not have any BDE setup "files".
Further, setupbde52.mia relates to mMSI.dll and myFileBagIDE.dll. Of course, i have to replace the names with my filenames, but again i do not have any of files like those after i have created the setup package.

I thank you in advance for replying.

Tinus
Posts: 204
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Postby Tinus » Fri Sep 14, 2007 10:54 am

The exe file actually is an installer.Run it and you get the merge modules in your borland subdirs.
Martin Rothschink
InstallAware MVP

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware

FrankMCook
Posts: 3
Joined: Mon Aug 11, 2008 1:30 pm

Postby FrankMCook » Mon Aug 11, 2008 1:41 pm

We have the Express version from C++Builder 2007. Can we use this technique to install the BDE or will we need a more powerful version of InstallAware?

We're having a lot of trouble trying to get the BDE to install properly in 64 bit Vista. I'm pretty sure we're going to have to install the BDE somewhere other than under Program Files and we'll need to set Registry Keys to tell it how to find itself and even more importantly to store everything it can in the cfg file instead of the Registry (in other words check the Win3.1 option box). Does anyone have this working using InstallAware?

FrankMCook
Posts: 3
Joined: Mon Aug 11, 2008 1:30 pm

Postby FrankMCook » Tue Sep 02, 2008 4:36 pm

We're well on our way to answering our own question. CodeGear does have a merge file that can be referenced in InstallAware Express. We're struggling a bit with the fact that it sets up the default configuration file under program files which means it can only be modified by the Administrator but we think we can get around that by addinga CFG file to our own distribution.

jmrunyan
Posts: 1
Joined: Thu Jun 14, 2018 9:51 am

Re: How-to: Install Borland Database Engine as a pre-requisite

Postby jmrunyan » Thu Jun 14, 2018 9:57 am

I am trying this with IA X8. The BDE project runs by itself. When I create the project that uses the BDE Application Runtime it does the check and starts the install but returns failure.

Any Ideas


Return to “Sample Scripts”

Who is online

Users browsing this forum: No registered users and 2 guests