fb embedded2 Laz

From Free Pascal wiki
Revision as of 12:11, 24 January 2008 by Tatamata (talk | contribs) (New page: == About == Fb_embedded2.pas is a Pascal unit that can be included in a Lazarus project to enable embedding of Firebird database server (2.0.3) into an .exe file. It reads lib from memory ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

About

Fb_embedded2.pas is a Pascal unit that can be included in a Lazarus project to enable embedding of Firebird database server (2.0.3) into an .exe file. It reads lib from memory stream. The original code for Delphi was created by Fikret Hasovic and Samir Ribic, modified by Zlatko Matic for FPC/Lazarus.

Introduction

Currently, fb_embedded2.pas works only on Windows. It reads lib from memory stream. No installation is required. Just copy the content of this folder into your project directory and include fb_embedded2.pas into your application. When you unpack the zipped file "fb_embedded2_Laz_1_0", you will see it contains everything needed for embedding Firebird 2.0.3 into your .exe:

- Firebird embedded 2.0.3 -> all required DLLs - fb_embedded2.pas -> unit to be included into your Lazarus project, originally written by Fikret Hasovic - FB_Embedded.rc -> textual file to be converted to Windows resource file - FB_Embedded.res -> Windows resource file, used by fb_embedded2.pas - windres utility -> used to create FB_Embedded.res from FB_Embedded.rc - fb_embedded.bat - creates FB_Embedded.res - several other .pas and .pp files that should be included into your project. These are files from C:\lazarus\debugger\windebug folder. winddwarf.pas needed small modification. Alternatively, you could make neccessary modification in original source code. In that case, you need only fb_embedded2.pas and resource file to be included in your project.


Installation&Usage

No installation is required. Just copy the content of this folder into your project directory and include fb_embedded2.pas, as well as other .pas and .pp files from this folder into your application. You can check paths in FB_Embedded.rc. If you change paths, recreate FB_Embedded.res by double clicking the fb_embedded.bat. Then recompile your application. The Firebird embedded server will be included in your .exe, without need for external DLLs.

Contribution

Everybody is welcome to improve this code. Currently it works only in Windows. I hope somebody will rewrite it to be cross-platform.