Even if you are familiar with our earlier Merge Modules for Firebird, you should read this page.
Firebird 2.0 is a significant upgrade. For client installations, there is little change, but the server installation is complicated by an upgrade to the security database, a change of base directory and the need to preserve user changes to "firebird.conf" and "aliases.conf".
As in previous releases, there is still the problem of backwards compatibility with applications that expect the old library (dll) name: especially Delphi applications using IBX. There is also the new embedded server to consider.
Building a set of install modules for Firebird 2.0 is straightforward, but taking into account the issues of compatibility and backwards compatibility makes for a more complex decision process.
Our set of merge modules will allow you to build the following installations:
- A Firebird 2.0 client which should no have compatibility issues with older versions of Firebird or InterBase
- A Firebird 2.0 client as above, but with additional support for IBX based applications and any other application that expects to use the gds32.dll interface.
- A Firebird 2.0 Server. If a Firebird 1.5 installation is being upgraded then the security database will automatically be upgraded during the installation process.
The Server install will complain if it finds any earlier InterBase or Firebird Server installed by any means and will refuse to install until it is removed. This is because it is not possible, in general, to uninstall the incompatible Server and the user must do it explicitly. Our earlier merge modules solved this problem by simply over-writing the installed files, but this is not possible now that they have been renamed.
Note that uninstalling a Firebird 1.5 Server should leave behind the security database and configuration files.
Client Install
For a basic client install, all you need to do is to include the fb20client.msm merge module in your installation package. This will install the fbclient.dll in its default location along with the firebird.conf, firebird.msg and the all important licence file. The default Firebird registry entry will also be created.
It will also set the PATH environment variable to include the directory containing fbclient.dll. This is so that your application can readily load the dll without having to know its exact location. The effect is similar to placing the file in the Windows system directory. This install has no conflicts with earlier InterBase and Firebird installations.
IBX Compatible Client Install
If you also want IBX compatibility or to install any application that expects the Firebird client library to be called gds32.dll, then you need to do a bit more work. Firstly, the fb20client.msm should be included in your installation package. We then recommend including in your application directory a copy of fbclient.dll renamed to gds32.dll and patched so that its version number is 6.3.4. A suitable copy of fbclient.dll is included in the distribution zip for our merge modules in the "gdsclient" subdirectory. You include it in the install script in the same way that you include your own application's files. Including this gds32.dll in your application's directory means that it will always be loaded by your application in preference to any other copy of gds32.dll that may be on the same computer. It is thus possible to have other InterBase or Firebird 1 clients on the same computer. Patching it to version 6.3.4 also allows IBX to detect it as an InterBase version 6 library providing the additional functions available in InterBase 6.
You must also include the fb20client.msm merge module as this includes the configuration and message files that the patch gds32.dll needs.
Note that this file cannot be provided as a merge module, as merge modules are intended to be common components installed in a single location and available to all users. The gds32.dll file is installed as part of the application and not as a common component.
Command Line Tools
The command line tools: gbak, isql, etc. are contained in the fb20clienttools.msm. Include this merge module in your client installation if you also want these tools available to your application.
Including this merge module automatically includes the fb20client.msm merge module. As this already adds the installation directory to the environment PATH, the command line tools can be invoked from a DOS box without having to include the full installation path.
Note that unlike previous versions of our merge modules, there are now separate client and server tools msms.
Firebird Server
The Firebird 2.0 Server (Super Server) is included in the fb20server.msm merge module. Include this merge module when you want to include the Firebird Server in your installation. The fb20client.msm merge module will automatically be included.
This merge module will install the Firebird Server files in their default location.
- Under Windows NT/2000/XP, it will automatically install and start the server as a Windows Service under the "LocalSystem" user. The Firebird Control Panel applet will also be installed.
- Under Windows 9x, the service has to be run as an application. The installation will automatically start this application after the installation and update the registry so that the Firebird 1.5.x Server is started automatically on system start up.
If the Firebird 1.5 security database is present in the default Firebird 1.5 installation directory, it will be automatically upgraded.
If a version of InterBase or Firebird is detected and had been installed by any other means then the installation will abort with an error message informing the user that the installation cannot be completed until this earlier version is removed. Note that the installation is detected by determining the presence of the "ibserver.exe" or "fbserver.exe" file and is independent of whether or not the server is actually running.
Server Install Issues
These merge modules cannot prevent a user subsequently installing an incompatible version of InterBase or Firebird that failed to detect the Firebird 1.5.x installation. This is likely to result in unpredictable results depending on which service gains access to the TCP Port.
There is also a possible problem if two separate products had installed our merge modules (server) on the same system prior to the upgrade to Firebird 2.0. In this situation, the earlier Server may not be uninstalled and unpredictable results may again follow. Your release notes should alert users to this potential problems.
Preventing a Silent Install/Uninstall
The default server installation script will silently stop any running server on both install and uninstall. This may not always be desirable with production servers as users may still be active. Data loss may result.
To avoid this problem, you should also include the fb20StopServer merge module. This adds an additional check that:
- Aborts the install/uninstall if no user interface is active and the server is running.
- Alerts the user if the user interface is active and the server is running, and gives the option of stopping the server or aborting the installation.
Installing the Embedded Server
There is no merge module for the embedded server. This is because merge modules are intended to be common components installed in a single location and available to all users. The embedded server is installed as part of the application and not as a common component.
The embedded server files should be included along with your application's files as part of the installation script. There should be no compatibility issues with other InterBase or Firebird installations because the embedded server does not listen on a TCP Port. If only for this reason, you should use the embedded server whenever there is no requirement for remote access to database files.
The embedded server is provided in the fbembed.dll file that is available from the Firebird SQL website. This file has to be renamed to either fbclient.dll or gds32.dll depending on how your application accesses the Firebird library. For IBX based applications, fbembed.dll must be renamed to gds32.dll and patched so that its version number is 6.3.4.
In the distribution zip for our merge modules, we have also included a minimal set of files for the embedded server in the "embed" subdirectory. This includes "fbclient.dll" and "gds32.dll" files that are renamed versions of fbembed.dll. In the latter cases, gds32.dll has been patch to version 6.3.4.
To install an embedded server, all you should need to do is to include, in your installation script, all the files in the embed directory including subdirectories, and install them into your application directory. You may omit either "fbclient.dll" or "gds32.dll" depending on which version your application uses. Note that Firebird Command Line Tools, such as gbak always use fbclient.dll.