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 ! :p
Archive: Bde?
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 ! :p
It doesn't seem like Borland helps their developers to do it. They only have a MSI merge module (can anybody say monopoly? :p). If you can find something that explains how to get it working with another installer I can help you convert it to NSIS script.
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.
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.
Ok kichik, here is the url:
http://www.jrsoftware.org/ishowto.phtml?a=bde
It uses a program to create aliases, maybe someboy can make a nsis plugin for it.
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
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
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
There's an example Delphi plug-in in Contrib\ExDLL. It answers everything you've asked.
Thanks, I'll try to convert the AddAlias program into a plugin dll.
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.
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.
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
Does the example work?
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
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.
Thanks kichik i'll post the code tomorrow as the 'original' source code is at work.
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
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
Lets try this again.
Vytautas
Let me take a wild guess... You're running Windows 9x and it works when you use RegDLL /NOUNLOAD. Am I correct?
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
No, the other way around. RegDLL /NOUNLOAD $0.
Same result:cry:. BTW I'm using MUI and newest CSV, from 30 seconds ago, if that makes any difference.
Vytautas
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.
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
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?
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
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
Not easy, I think that is good idea forget it, try to check the return value
nsExec::ExecToLog ...
pop $0 -> check if this value is different when you cancel or when setup finish with success.
good luck,
Ramon
ramon18 how would I use "CallInstDLL dllname.dll /NOUNLOAD DllRegisterServer" with nsExec plugin?
Vytautas
I have found this, a program that checks if bde is installed or not (with delphi source code) and a wise setup script. Is better than nothing.
http://ibinstall.defined.net/dl_bdeinfo.htm
And more info about bde installation:
http://www.bdesupport.com/deploy.htm
The problem with the BDE installation dll appears to be fixed in the latest CSV version. Thanks to all the devs for making NSIS as bug free as possible.
Vytautas
Could someone upload this update to the AddAlias Plugin. Now it allows to specify other parameters when adding an alias such as the user name.
Vytautas :D
SF shell servers doesn't seem to like me at the moment. Status page says it's ok, but I can't connect :(
I'll try again tomorrow.
Will this also work for 16-bit BDE?
Not sure since I do not have a 16-bit version. Just try it on your system with a test script and then check using BDE Admin to see if the Alias was created or not.
Vytautas :D
Uploaded.
BTW, how did you get it to not use MSVCRT.dll or did compile with something else than MinGW?
Well actually this plugin was made with Delphi, no need for MSVCRT.dll :D
Vytautas
Archive: Bde?
Oh, heh :D
I tried to add an Alias to c:\idapi\idapi.cfg (16-bit DBE), but idapi.cfg was not modified. I guess old 16-bit BDE is not supported.
Are you able to add an alias to that file using delphi or some other programming language. If so could you post a sample of code and I'll try to add that functionality to the plugin.
Vytautas
Thanks for the offer. The 16-bit BDE Re-distributable can be downloaded from this page (see bottom of page):
http://info.borland.com/devsupport/bde/oldver.html
We use BDE 2.51 although 2.52 is more current. The info gets saved in c:\idapi\idapi.cfg. Everytime you make a change, a backup copy of the idapi.cfg file is created. The installer also adds the following lines in win.ini inside the Windows directory:
[IDAPI]
DLLPATH=C:\IDAPI
CONFIGFILE01=C:\IDAPI\IDAPI.CFG
[Borland Language Drivers]
LDPath=C:\IDAPI\LANGDRV
I wouldn't spend too much on this as probably not that many people uses it. We only use this internally in very few PC's and the developers tell me to do it manually because of the risk of corrupting idapi.cfg which could also break other programs that may use it.
Carlos
I'm trying to use the BDEAlias plugin to add a BDE alias for a remote interbase database(192.168.16.250:/opt/interbase/data/tape.gdb)
I've used this line to do it(and many variations of the parameters):
BDEAlias::AddAlias 'TAPE' '/opt/interbase/data/tape.gdb' 'INTRBASE' "SERVER NAME:192.168.16.250:/opt/interbase/data/tape.gdb;USER NAME:test;SQLQRYMODE:SERVER;SQLPASSTHRU MODE:SHARED NOAUTOCOMMIT"
The example(found here: http://nsis.sourceforge.net/archive/...instances=0,32) didn't seem to work either:
BDEAlias::AddAlias 'NSIS' 'V:\' 'PARADOX'
Is there any documentation for BDEAlias::AddAlias? or even the source code?
Thanks.
Have you tried this code: BDEAlias::AddAlias 'TAPE' '/opt/interbase/data/tape.gdb' 'INTRBASE' 'SERVER NAME:"192.168.16.250:/opt/interbase/data/tape.gdb";USER NAME:"test";SQLQRYMODE:"SERVER";SQLPASSTHRU MODE:"SHARED NOAUTOCOMMIT"'
Does it produce any errors?
Vytautas
I've tried
BDEAlias::AddAlias 'TAPE' '/opt/interbase/data/tape.gdb' 'INTRBASE' 'SERVER NAME:"192.168.16.250:/opt/interbase/data/tape.gdb";USER NAME:"test";SQLQRYMODE:"SERVER";SQLPASSTHRU MODE:"SHARED NOAUTOCOMMIT"'
pop $9
MessageBox MB_OK $9
and in the messagebox appears this string:
DATABASE NAME:"/opt/interbase/data/tape.gdb";SERVER NAME:"192.168.16.250:/opt/interbase/data/tape.gdb";USER NAME:"test";SQLQRYMODE:"SERVER";SQLPASSTHRU MODE:"SHARED NOAUTOCOMMIT"
but the file idapi32.cfg(where I think the aliases are saved) is not modified. The BDEAdmin doesn't show any new alias after the installation.
No error is produced during the installation. Is there a way I can check for errors?
Are you sure that you have the latest version of the BDE Alias plugin, previous versions did not support extra parameters which is what your version appears to do.
You should also try the dumpstate plugin to help diagnose the problem. CAll it before the call to the plugin and again after the message box command and if the stack is not the same then there is something wrong with the call to the plugin, e.g. wrong version.
Vytautas
Try downloading again, there was a problem which caused an old version to be delivered instead of the new one. Sorry.
I'm using BDEAlias-0.3(date: December 18, 2003).
The dumpstate plugin prints(before AddAlias):
$0:
$1:
$2:
$3:
$4:
$5:
$6:
$7:
$8:
$9:
$R0: Linux
$R1: 192.168.16.250:/opt/interbase/data/tape.gdb
$R2:
$R3:
$R4:
$R5:
$R6:
$R7:
$R8:
$R9:
$CMDLINE: "C:\Archivos de programa\NSIS\Copia de Examples\ConfiguradorTape.exe"
$INSTDIR:
$OUTDIR:
$EXEDIR: C:\Archivos de programa\NSIS\Copia de Examples
$LANGUAGE: 1033
after AddAlias:
$0:
$1:
$2:
$3:
$4:
$5:
$6:
$7:
$8:
$9: DATABASE NAME:"/opt/interbase/data/tape.gdb";SERVER NAME:"192.168.16.250:/opt/interbase/data/tape.gdb";USER NAME:"test";SQLQRYMODE:"SERVER";SQLPASSTHRU MODE:"SHARED NOAUTOCOMMIT"
$R0: Linux
$R1: 192.168.16.250:/opt/interbase/data/tape.gdb
$R2:
$R3:
$R4:
$R5:
$R6:
$R7:
$R8:
$R9:
$CMDLINE: "C:\Archivos de programa\NSIS\Copia de Examples\ConfiguradorTape.exe"
$INSTDIR:
$OUTDIR:
$EXEDIR: C:\Archivos de programa\NSIS\Copia de Examples
$LANGUAGE: 1033
Which BDE version do you use?
Francisco.
Yes, version 0.3 is the right version. Just in case could you download it again as kichik said.
With the results from dumpstate, was there a change in the bottom windows, the nsis stack?
Vytautas
Two things, firstly I have found the problem and I don't think its related to the plugin rather its a fault with nsis? This code works:
push 'NSIS'
push 'V:'
push 'PARADOX'
BDEAlias::AddAlias
pop $9
MessageBox MB_OK $9
where as this code does not:
BDEAlias::AddAlias 'NSIS' 'V:' 'PARADOX'
pop $9
MessageBox MB_OK $9
Secondly I'm attaching a new build of the plugin as I had posted the version I used for debugging, it was not pushing 'OK' on sucsess but reather the paramater list.Is this the correct url?
http://www.qedsystems.com.au/~vytaut...EAlias-0.3.zip
I've used it again and didn't work.
The stack panel appears empty before and after calling the plugin
Francisco.
Yes that the right link, also you can use the files posted above and I'm sure kichik or some other admin will update the archive download page with it soon.
Have you tried the first method shown in my previous post?
Vytautas
No, this is not a fault in NSIS.
mydll::function A B C
is the same as
Push C
Push B
Push A
mydll::function
The parameters are pushed right-to-left so the first parameter popped by the DLL is the first parameter.
New Version of BDEAlias Plugin.
No longer nessesary to specify the arguments in a specific order.
Please note that now you have to specify a special flag infromt of all arguments. *A* before alias, *D* before driver, *P* before path, *O* before any other parameters.
Example:
BDEAlias::AddAlias '*D*INTRBASE' '*A* TAPE' '*P*/opt/interbase/data/tape.gdb' '*O*SERVER NAME:"192.168.16.250:/opt/interbase/data/tape.gdb";USER NAME:"test";SQLQRYMODE:"SERVER";SQLPASSTHRU MODE:"SHARED NOAUTOCOMMIT"'
Also added to this release are debug versions of the plugin functions which display the data as it is poped into the plugin.
Vytautas
PS: I will update my archive page later today. :)
Sorry for not posting this before. This is how it finally worked with the bdealias.dll version 0.3(the one that outputs the correct message, not the parameters):
push "USER NAME:test;SQLQRYMODE:SERVER;SQLPASSTHRU MODE:SHARED NOAUTOCOMMIT"
push 'ALIAS1'
push "192.168.16.250:/opt/interbase/data/tape.gdb"
push 'INTRBASE'
BDEAlias::AddAlias
or
BDEAlias::AddAlias 'INTRBASE' "192.168.16.250:/opt/interbase/data/tape.gdb" 'ALIAS2' "USER NAME:test;SQLQRYMODE:SERVER;SQLPASSTHRU MODE:SHARED NOAUTOCOMMIT"
The only thing I needed was to know the correct order of the parameters.
Thanks to Vytautas(for the plugin) and eccles(for the pushing-to-the-stack comment).
BTW: how do you get that very cool 'Senior member' status?
Francisco.
Thanks, now you can use the updated version with the prefixes and you can push the info in any order.
The senior member status is achieved when you post over 100 posts, if I remember right.
Vytautas ;)
bde installation
Hi,
this is my way how to install bde using bdeinst.dll:
File "D:\1\BdeInst.dll"
WriteRegStr HKLM "Software\Borland\Database Engine" "DLLPATH" "C:\Program Files\Common Files\Borland Shared\BDE"
ExecWait '"$SYSDIR\regsvr32.exe" "$INSTDIR\BdeInst.dll"'
er
sorry, it should goes here: http://forums.winamp.com/showthread....hreadid=141472
uninstall bde
Hi,
Does anyone has a script that uninstalls BDE?
Greets,
Laszlo