Skip to content
⌘ NSIS Forum Archive

Bde?

61 posts

ramon18#
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
Vytautas#
ramon18 how would I use "CallInstDLL dllname.dll /NOUNLOAD DllRegisterServer" with nsExec plugin?

Vytautas
MoNKi#
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.


And more info about bde installation:
Vytautas#
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
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 😁
kichik#
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.
Vytautas#
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 😁
kichik#
Uploaded.

BTW, how did you get it to not use MSVCRT.dll or did compile with something else than MinGW?
cchian#
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.
Vytautas#
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
cchian#
Thanks for the offer. The 16-bit BDE Re-distributable can be downloaded from this page (see bottom of page):


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
franbenz#
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.
Vytautas#
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
franbenz#
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?
Vytautas#
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
kichik#
Try downloading again, there was a problem which caused an old version to be delivered instead of the new one. Sorry.
franbenz#
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.
Vytautas#
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
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.

Vytautas
franbenz#
Is this the correct url?

I've used it again and didn't work.

The stack panel appears empty before and after calling the plugin

Francisco.
Vytautas#
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
eccles#
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.
Vytautas#
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. 🙂
franbenz#
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.
Vytautas#
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 😉
Guest#
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"'