VisualStudio build Notes


Last Update: March 23 2016
Author: Blas Rodriguez Somoza blas@puertareal.com
Updated by: Popa Adrian Marius (mapopa at gmail.com)

0.-Introduction

There are a few VisualStudio solutions in the win32 folder . The msvc12 build is used for the official build of Firebird in Windows.

Under the directory where you put Firebird sources you will see the following directories

After you build Firebird you also will see the following temporary directories

1.-TODO

2.-Prerrequisites

To prepare the standard msvc build of FB you need:

If you intend to prepare an installable build, you will need innosetup 5

To download the utilities use the following links

2.-Installing the utilities

2.1.-Visual Studio

  1. Install VisualStudio 20xx
  2. You can compile it with Visual C++ 20xx Studio Express but it will not be able to build the control panel applet but for the Firebird server and the rest of utilities building is ok

2.2.-Sed

  1. Download Sed setup from GnuWin32 project I had to run the setup and i extract into c:\gnuwin32
  2. Add sed c:\gnuwin32\bin to the PATH environment variable , test it from a new console if it works by typing sed it should show you something abut gnu sed help

2.3.-Inno setup

  1. Run the Installer for Innosetup 5 that you downloaded from above setup-5.3.xx.exe
  2. Run the Innosetup pack Installer ispack-5.3.10.exe with the default options (next, next, next)

4.- Building

4.1.-Standard build

  1. Eliminate the fb2control from firebird3 solution if you are using Visual Studio Express (doesn't support MFC) and it's only the control pannel applet and try to build it, it should give you no errors when you build the solution.
  2. Open a command line window.
  3. Go to the builds\win32 directory.
  4. Run the following batches in order (your version of VisualStudio is detected automatically)
    1. make_icu.bat [DEBUG] [CLEAN]
    2. make_boot.bat [DEBUG] [CLEAN]
    3. make_all.bat [DEBUG] [CLEAN]

4.2.-Parser rebuild

If you change parser.y you will need to rebuild parser.cpp, to do so use parse.bat

4.3.-Examples build

The examples build prepare two databases that will be needed to compile the examples in a distribution. If you intend to prepare a distribution then run the examples batch before:

  1. make_examples.bat

4.4.-Installer build

Remember, you need sed and innosetup in the path to build the installer

4.5.-Building samples

After the standard build is finished, an output directory with the same structure as the installed FB directory is created.

If you want to build the examples just cd to firebird3\output\examples\build_win32 and run run_all.bat

Run_all.bat calls four other bats to make the example sets. Any example set can be build independently with its make_XXX script.

The example sets are: