Firebird数据库
Firebird数据库源码编译说明
2022-12-20 15:10:14

       使用海钛瑞OA办公系统有必要学会Firebird数据库源码编译吗?对普通用户而言当然是没有必要,但是我们可以从这里看到OA办公系统不仅要看其本身,还要看其支持数据库相关情况,Firebird数据库是完全开源的。

 

一、英文版Firebird数据库源码编译说明编译说明

 Building the Code
Windows

Make sure you have the supported compiler (Microsoft Visual C++) installed. The required compiler version depends on the Firebird version you're willing to build:

    Firebird 4.x is officially built using MSVC 2017
    Firebird 3.x is officially built using MSVC 2010
    Firebird 2.x is officially built using MSVC 8.0

Besides the compiler, you will need the sed utility and, if you're going to have the complete installation package, the InnoSetup package.

The steps are the following:

    Download the source code from the repository.
    Open the command line window.
    Go to the /builds/win32 directory of the source code tree.
    Run the following batch files in order:
    make_icu.bat
    make_boot.bat
    make_all.bat
    make_examples.bat (optionally)

Once the build finishes, the resulting binaries are placed into the /output_win32 or /output_x64 (depending on your platform) directory of the source code tree.

Read here for more information, it's also mirrored in the /doc/README.build.msvc.html document inside the source code tree.

 

POSIX

Before building Firebird it is necessary to create the "configure" script, if one is not included with your distrubution. The configure script is generated by running the "autogen.sh" script. Autogen.sh is a shell script located in the root directory of the Firebird build.

Autogen.sh depends on the GNU autotools to create "configure". Modern LINUX distributions will already have the GNU autotools installed, but if you are attempting to build on AIX, HP-UX, or Solaris, you may need to install the necessary GNU utilities.

Once the "configure" script is generated, it can be run repeatedly without re-running the autogen.sh script. This allows the user to retest with different configuration options.

After that, all you need to do is to run make possibly followed by make install in the case you need to immediately deploy the created package.

So the basic compilation steps are the following:

    Download the source code from the repository.
    Run ./autogen.sh
    Run make
    Run make install (optional)

Read here for more information, it's also mirrored in the /doc/README.build.posix.html document inside the source code tree.

 

二、中文版Firebird数据库源码编译说明(海钛瑞OA办公系统研发团队)

构建代码
Window 平台

确保安装了受支持的编译器(Microsoft Visual c++)。所需的编译器版本取决于你想要构建的Firebird版本:

Firebird4.x使用MSVC 2017正式构建
Firebird3.x使用MSVC 2010正式构建
Firebird2.使用MSVC 8.0正式构建

除了编译器,你还需要sed实用程序,如果你想要完整的安装包,还需要InnoSetup包。

具体步骤如下:

从存储库下载源代码。
打开命令行窗口。
进入源代码树的/builds/win32目录。
按顺序运行以下批处理文件:
1.make_icu.bat
2.make_boot.bat
3.make_all.bat
4.make_examples.bat(可选)

构建完成后,生成的二进制文件被放置到源代码树的/output_win32或/output_x64(取决于您的平台)目录中。

阅读这里获取更多信息,它也被包含在源代码树中的/doc/README.build.msvc.html文档中。

 

POSIX平台

在构建Firebird之前,有必要创建“configure”脚本,如果你的发行版中没有包含这个脚本的话。配置脚本是运行“autogen.sh”脚本生成的。Autogen.sh是一个shell脚本,位于Firebird构建的根目录中。

sh依赖于GNU autotools来创建“configure”。现代LINUX发行版已经安装了GNU自动工具,但是如果您试图在AIX、HP-UX或Solaris上进行构建,则可能需要安装必要的GNU实用程序。

生成“configure”脚本后,无需重新运行autogen.sh脚本即可重复运行该脚本。这允许用户使用不同的配置选项重新测试。

在此之后,您需要做的就是在需要立即部署创建的包的情况下运行make和make install。

所以基本的编译步骤如下:

从存储库下载源代码。
1. ./autogen.sh
2. make
3. make install(可选)

阅读这里了解更多信息,它也被包含在源代码树中的/doc/README.build.posix.html文档中。

 

三、Firebird数据库源码编译注意事项

1.各种版本要同相应工具版本对应,否则可编译无法通过

2.POSIX平台依赖包比较多,有的高版本或低版本可能不兼容

 

本文档中文版由海钛瑞OA办公系统研发团队翻译制作,转载请在开始处标明来自于http://www.hitai.com.欢迎交流。