4. Installing the module

[<<<] [>>>]

The module comes in source form or as compiled binary. Binary is usually available for the Win32 platforms and for Linux in Debian and RedHat packages only. The compilation of the source code is simple. Compile the source files to a .dll or to .so shared library. To help compile the module under Win32 the Visual C++ workspace and project files are delivered in the source distribution. To successfully link the application you need the static library version of the Berkeley DB system. The Windows NT version linkable using the Microsoft Visual C++ linker can be downloaded from the ScriptBasic web site in a separate ZIP file along with the library files of the other modules.

The library file is called `libdb30s.lib'. If for some reason you miss this file or perhaps you want to try (at your own risk) a newer version of the Berkeley DB than provided with the source you should download the Berkeley source distribution from Sleepy Cat Software. They usually provide Visual C++ v5.0 workspace and project files.

To use Visual C++ v6.0 you have to start the integrated environment and open the workspace. The Visual C++ development environment automatically converts the workspace and the projects. Note that you should not try to start Visual C++ v6.0 clicking on a v5.0 workspace file. In that case Visual C++ starts to convert the workspace and then crashes. So start the development environment from the start menu and use the menu "file/open workspace".

If you do not have the project file for the module, create a project file that creates a Win32 dll. Specify /nodefaultlib:"LIBCMT" in the project link options.

The source distribution of the Windows version compiles the module when ScriptBasic is built. Note that this `Makefile.nt' is generated from `Makefile.nt.jam' during executing the command file `precompile'.

On UNIX systems you have to download the Berkeley DB from its original location. Note that the module uses a specific version and may not work with further versions. However we will try to follow the version updates of the DB system.

Before starting to compile the module you have to configure and compile the Berkeley DB library file that results the files db.h and libdb.a (among other files, but we specifically need these two files). These are usually created in the directory ~/db-3.0.55/build_unix/. Copy these files into the ScriptBasic source directory ~/scriba/source/extensions/berkeley_db/.

After you have successfully performed these operations compile and install the module typing make install.

The compiled module contains a dynamic load binary file and a basic include file named `bdb.bas'. If your configuration is different from the default the include file `bdb.bas' should be placed in a module include directory file configured in the configuration file. The configuration file usually named scriba.conf.unix.lsp should include a line

include "/etc/scriba/include/"

defining the include files location for the modules and other generally used include files. The actual directory can be different.

The binary part of the module should be placed in another directory specified in the configuration file, like

module "/usr/scriba/modules/"

There can be more than one include and module statements in the configuration file. In that case the interpreter searches the directories in the order they are specified until the include file or the module is found.

Before starting any program using the module bdb you almost certainly have to edit the ScriptBasic configuration file. The keys in the configuration file included in the bdb configuration group control the initialization and use of the underlying Berkeley Database module.

We describe the keys here briefly in a manner that allows most implementations to start using the database from ScriptBasic programs. However at some cases we refer to the original documentation, deep understanding of the behavior of the software can be gained reading the original documentation.

The configuration keys the module supports:

To specify the value you have to specify the access value as decimal number between " double-quote characters.

[<<<] [>>>]