There are two VisualStudio builds, msvc6 and msvc7. The msvc6 build is currently the official build environment for Firebird in a win32 environment.
Under the directory where you placed the 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
- ....
After you have built Firebird the following temporary directories will be created.
- gen (cpp files generated from epp, exe and fdb's.)
- temp (compiler temporary)
- output (build output)
To prepare the standard msvc6 build of FB you need to:
- Microsoft VisualStudio 6 or 7.
- A running Firebird server
If you intend to modify the dsql parser file (parse.y) you will need a parser generator, bison or byacc (Berkeley yacc) and the sed utility. At this time byacc 1.9 is the official parser generator, although in the future it will be switched to bison. The tested versions of byacc are 1.9 or newer and for bison 1.28 or newer.
If you intend to prepare an installable build, you will also need innosetup and the sed utility.
To download the utilities use the following links
- My Inno setup extensions 3.0.6.2 http://www.wintax.nl/isx/
- Sed and Bison 1.35 http://gnuwin32.sourceforge.net/
- Byacc 1.9 ftp://garbo.uwasa.fi/pc/unix/
2.1.-Visual Studio
- Install VisualStudio 6/7
- If you use VisualStudio 6, before building Firebird and its tools, you need to apply some patches from the following site
http://www.dinkumware.com/vc_fixes.html2.2.-Sed and bison
2.3.-Inno setup
4.1.-Standard build
- Open a command line window.
- Go to the firebird2 builds\win32 directory.
- Run the following batch files in order (your version of VisualStudio is detected automatically)
- prepare.bat [FIREBIRD] where FIREBIRD is equivalent to the root location of your running Firebird server e.g. C:\Program Files\Firebird.
- make_boot.bat
- make_all.bat [DEBUG] [CLEAN]
- make_examples.bat [DEBUG] [CLEAN] (this is only needed if you want to build the examples)
After the build has finished, the firebird directory containing the binaries created by the build are placed in an "output" directory below your main firebird directory.
- To make a clean build from scratch after making changes to the source code use the clean_all.bat script
4.2.-Parser rebuild
Remember, you will need sed and bison or yacc in the path to rebuild the parser
If you change parser.cpp or parser.sed you will need to rebuild parser.cpp, to do so use parser.bat
4.3.-Installer build
Remember, you need sed and innosetup in the path to build the installer
- Open a command line window.
- Go to the firebird2 src\install\arch-specific\win32 directory.
- The batch file used to build the installer is
BuildExecutableInstall.bat [DEBUG] [CS]
Where DEBUG defines if the build is a debug build or not and CS means a classic server installer.- After you start the batch file, you will get a InnoSetup window. To build the installation executable select the option compile, and a new executable will be created in builds/win32/install_image directory.