There are three VisualStudio builds: msvc8, msvc9 and msvc10. The msvc8 build is used as the official build for Firebird 2.x and msvc10 is used as the official build for Firebird 3.0.
Under the directory where you put Firebird sources you will see the following directories
- builds
- mac_os_x (Mac os X build scripts)
- posix (Posix build scripts)
- win32 (Msvc build scripts)
- .....
- doc
- sql.extensions
- src
- ....
- lang_helpers
- ....
- examples
- ....
After you build Firebird you also will see the following temporary directories
- gen (cpp files generated from epp, exe and fdb's.)
- temp (compiler temporary)
- output_Win32 (build output)
To prepare the standard msvc build of FB you need:
- Microsoft VisualStudio 8 (2005) or greater
- sed unix utility
If you intend to prepare an installable build, you will need innosetup 5
To download the utilities use the following links
- Innosetup (Note: This is the classic version, not the new unicode version.) http://www.jrsoftware.org/download.php/is.exe
- Innosetup pack http://files.jrsoftware.org/ispack/ispack-5.3.10.exe
- Sed http://gnuwin32.sourceforge.net/packages/sed.htm
2.1. Visual Studio
- Install VisualStudio 20xx
- You can compile it with Visual C++ 2008 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
Download Sed setup from GnuWin32 project I had to run the setup and i extract into c:\gnuwin32 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 help2.3. Inno setup
- Run the Installer for Innosetup 5 that you downloaded from above setup-5.3.xx.exe
- Run the Innosetup pack Installer ispack-5.3.10.exe with the default options (next, next, next)
4.1. Standard build
- 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.
- Open a command line window.
- Go to the builds\win32 directory.
- Run the following batches in order (your version of VisualStudio is detected automatically)
- make_icu.bat [DEBUG] [CLEAN]
- make_boot.bat [DEBUG] [CLEAN]
- make_all.bat [DEBUG] [CLEAN]
After the build finish, an output directory with the binaries is created below your firebird3 directory.
- To make a clean build from scratch after making changes to the code use the clean_all.bat script
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:
- make_examples.bat
4.4. Installer build
Remember, you need sed and innosetup in the path to build the installer
- Open a command line window.
- Go to the builds\install\arch-specific\win32 directory.
- The batch to build the installer is
BuildExecutableInstall.bat [DEBUG] [CS]
Where DEBUG means if the build is a debug one or not and CS means classic server installer.- After you start the batch, you will get a InnoSetup window. To build the install exe select the option compile, and a new exe will appear in builds/win32/install_image
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:
- api (API Interface)
- dyn (embedded dynamic SQL)
- stat (embedded static SQL)
- udf (User defined functions)