Skip to content
⌘ NSIS Forum Archive

Bde?

61 posts

test#

Bde?

G'Day Group,

Does any of you have a script template to install (and hopefully configure) the Borland Database Engine from NSIS?

Thanks a million ! 😛
kichik#
It doesn't seem like Borland helps their developers to do it. They only have a MSI merge module (can anybody say monopoly? 😛). If you can find something that explains how to get it working with another installer I can help you convert it to NSIS script.
MoNKi#
I have found some information on how to install BDE using Inno, you only need to convert the script to use it in NSIS, but i don't know if i can post the url here.
kichik#
InnoSetup is open source too, I don't think there should be any problem. I personally wouldn't mind if it was the other way around.
MoNKi#
Ok kichik, here is the url:



It uses a program to create aliases, maybe someboy can make a nsis plugin for it.
kichik#
Well according to this page you have a file called BDEINST.CAB located in Program Files\Common Files\Borland Shared\BDE. Extract BDEINST.DLL from this file and use:

GetTempFileName $0
File /oname=$0 C:\Path\To\Extracted\BDEINST.DLL
RegDLL $0
As for the aliases DLL, you'd need Delphi or Borland C++ Builder to build it. Both of which I don't have. You can either use the EXE in there (if the license permits it) or find someone with Delphi or Borland C++ Builder to create the DLL for you. It's possible that you can use BDE in Visual C++ too but I'm afraid I don't know how. If you know it, please share 🙂
Vytautas#edited
I do have delphi and could try to create a dll for this purpose, however i am not sure how to interface delphi dll's to NSIS plugin.

[edit]I downloaded the AddAlias program from the specified link and it is a free program for any use.[/edit]

Vytautas
Vytautas#
Just a few questions about the plugin system:
1. Would it need to return a a value to indicate if the task was performed succesfully.
2. What calling convention does the NSIS plugin system use.
3. After having a look at the AddAlias program it looks like the plugin will have to take 3 string (PChar) arguments. How do you transfer arguments between NSIS and the plugin?

Vytautas
Vytautas#
Sorry about the delay, had some problems with the programming computer.

Attached is the BDE Alias Plugin. I will create an achive page for this ASAP.

Vytautas

BTW How do I attach a file to the archive page?

PS If you would like the delphi source code for the plugin please contact me.
kichik#
To upload files to the Archive you need admin privileges. You can send it to me, attach it here or upload it to somewhere I can download it and I'll upload it for you.

If you're already creating an archive page for this plug-in, how about including all of the required data to install BDE?

BTW, The standard with plug-ins is to get the arguments on the stack, not through the variables $0, $1, etc.
Vytautas#
I tried setting the data through the stack however I kept getting this error after the plugin command: 'the exception unknown software eception (0x0eedfade) ocurred in the application at location 0x77e8f142'.

After removing the variable transfer from the stack the error disapeared, so I think there might be some incompatibility between delphi 7 and NSIS.

Vytautas
Vytautas#
If you mean the exDLL example then yes it did work, although it only got one variable of the stack, if that makes any difference?

Vytautas
kichik#
The example only pops one value so it only gets one value. If the example works then there is probably something wrong with your code. If you upload/send me the related code part I can try to help you with it.
Vytautas#
Thanks kichik i'll post the code tomorrow as the 'original' source code is at work.

Vytautas
Vytautas#
Once again thanks kichik, I had deleted the original source code and only had a hard copy, so I descided to recreate the plugin using the stack from scratch and it worked. Now I think the problem was caused by me trying to convert PChar into delphi string or something similar. Attached is the new version of the plugin, if you could appach it to my archive page that would be greatly appreciated.

Vytautas
Vytautas#
Installer Error

I tried the compiled version of the BDE Installer program and for me it generates this error when installing BDE. See attached image of the error message. At first I thought it might be just a problem with the dll file however it works fine when using regsvr32, outside of NSIS.

Vytautas
Vytautas#
Lets try this again.

Vytautas
kichik#
Let me take a wild guess... You're running Windows 9x and it works when you use RegDLL /NOUNLOAD. Am I correct?
Vytautas#
Well no, I tried this on Win98, Win2k & WinXP with same results. When I tried using /NOUNLOAD switch the dialog in the dll did not show at all, i.e. it did not run. Am I using the switch correctly?
  GetTempFileName $0
File /oname=$0 BDEINST.DLL
RegDLL $0 /NOUNLOAD
Vytautas
Vytautas#
Same result😢. BTW I'm using MUI and newest CSV, from 30 seconds ago, if that makes any difference.

Vytautas
kichik#
A little confusion... Use:

CallInstDLL dllname.dll /NOUNLOAD DllRegisterServer

But on second thought, if the first wasn't right then the whole thing isn't right. Ramon is working on it right now, more examples would be nice.
Vytautas#
Thanks that seemed to work, no error message, will test further to make sure though. So is it better to use "CallInstDLL dllname.dll /NOUNLOAD DllRegisterServer" command instead of "regdll"?

Vytautas
Vytautas#
Do I need to 'unload' the dll after it is finished, it all works great in win2k but when i use win98se it install with no problems and the installer continues and displays the nsis finish page however the bde installation progress windows does not close down until nsis instoler is closed. Is there anything I can do to rectify this?

Vytautas

PS what examples do you need?
Vytautas#
Just in case it is possible with NSIS

After reading the info on the INNO Site I believe that this is not possible but knowing that NSIS is more powerfull I thought I'll ask anyway.

1) Is it possible to change the dir BDE is installed in from within the script, i.e. modify the dialog box in the BDE Installer.
2) Is it possible to programatically click 'next' in the message box that pops up when installing BDE.

Vytautas
Vytautas#
Just one more question: Is there a way to tell if the user canceled the BDE Installation and/or disable the cancel button. Using WinSpy++ I figgured out the name of the dialog and that it was made in delphi just not sure how to firstly find and then modify these elements.

Vytautas