Subject IBO/FB clients with absolutely no installation - opinions wanted!
Author Frank Ingermann
Hello all,

all that IBO client apps for Firebird servers need to work is GDS32.dll.
So i thougt it would be nice to have the dll right inside the exe, thus
completely eliminating the need for an installation program - and i
ended up with the following:

If you include the frmGDS32 unit (source code below) as the very first
unit in your program, you'll have a FB client all-ready-to-go, adding
only about 200kb to the size of your exe. (the dll is ~352kb, but my
TffPersistentFile component uses TNanoZip to store it in zipped form
inside the dfm; the 200kb include the TNanoZip code and the form with
the zipped dll). When you launch such an app, it will unzip the dll
and tell IBO to use it.

Since imho this is almost to good to be true :-), i'm wondering if
there's anything i missed or didn't think of - so i'd like some
opinions on this, esp.:

- does it cause any harm to have the GDS3.DLL stored under a different
name?
- any implications with other IB/FB apps running on the same machine?
- what if those need/use other gds32's, e.g. for IB5.6 / IB6 / IB7?
- any legal implications wrt. storing the gds32 inside the exe (IPL)?
- anything else that could go wrong using this approach?

(if anyone's interested, i can upload the complete sources of a little
demo app. TNanoZip is open source, i used v1.45 from
nanozip@yahoogroups.com, and TffPersistentFile is just a little wrapper
i made that allows storing any file in zipped form in a dfm, also open
source).

so - comments anyone ?

regards,
fingerman

---------------

unit frmGDS32;

interface

uses
Windows, SysUtils, Classes, Forms, ff_PersistentFiles, IB_Constants;

type
TfrmGDS32 = class(TForm)
gds32: TffPersistentFile;
end;

implementation

{$R *.DFM}

const My_GDS32_FileExt : String = '.fbc'; // Firebird Client
var My_GDS32_Filename : String;

procedure EnsureGDS32;
var
frm : TfrmGDS32;
begin
My_GDS32_Filename := ChangeFileExt(ParamStr(0),My_GDS32_FileExt);

frm := TfrmGDS32.Create(NIL);
try
frm.gds32.SaveFile(My_GDS32_Filename);
finally
frm.Free;
end;
end;

initialization
EnsureGDS32;
IB_Constants.IB_GDS32 := My_GDS32_Filename;
end.

--
-------------------------------------------------------------------------
when parsers parse, and compilers compile, then why don't objects object?

fingerbirdy - fingerman's door to Firebird
http://www.fingerbird.de