2003-07-04 14:40:38 +02:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2010-08-25 14:00:07 +02:00
< html >
< head >
< title > Build procedure for MSVC compiler< / title >
< meta name = "Generator" content = "Vim" >
< meta name = "Author" content = "" >
< meta name = "Keywords" content = "" >
< meta name = "Description" content = "" >
< / head >
2003-07-04 14:40:38 +02:00
2010-08-25 14:00:07 +02:00
< body >
< h2 > VisualStudio build Notes< / h2 >
2003-07-04 14:40:38 +02:00
< hr / >
2010-08-25 14:00:07 +02:00
Last Update: Aug 25 2010< br >
2003-07-04 14:40:38 +02:00
Author: Blas Rodriguez Somoza < a href = "" > blas@puertareal.com< / a > < br >
2010-08-25 14:00:07 +02:00
Updated by: Popa Adrian Marius (mapopa at gmail.com)
2003-07-04 14:40:38 +02:00
< h3 > 0.-Introduction< / h3 >
< blockquote >
2010-08-25 14:00:07 +02:00
< p > There are two VisualStudio builds, msvc8 and msvc9. The msvc8 build is used for the official build of Firebird in win32.< / p >
2003-07-11 12:01:16 +02:00
< p > Under the directory where you put Firebird2 sources you will see the following directories< / p >
2003-07-05 16:48:35 +02:00
< ul >
< li > builds< / li >
< ul >
< li > mac_os_x (Mac os X build scripts)< / li >
< li > posix (Posix build scripts)< / li >
< li > win32 (Msvc build scripts)< / li >
2003-07-11 12:01:16 +02:00
< li > .....< / li >
2003-07-05 16:48:35 +02:00
< / ul >
< li > doc< / li >
< ul >
< li > sql.extensions< / li >
< / ul >
< li > src< / li >
< ul >
< li > ....< / li >
< / ul >
2003-07-11 12:01:16 +02:00
< li > lang_helpers< / li >
< ul >
< li > ....< / li >
< / ul >
< li > examples< / li >
< ul >
< li > ....< / li >
< / ul >
2003-07-05 16:48:35 +02:00
< / ul >
< p > After you build Firebird you also will see the following temporary directories< / p >
< ul >
< li > gen (cpp files generated from epp, exe and fdb's.)< / li >
< li > temp (compiler temporary)< / li >
2010-08-25 14:00:07 +02:00
< li > output_Win32 (build output)< / li >
2003-07-05 16:48:35 +02:00
< / ul >
2003-07-04 14:40:38 +02:00
< / blockquote >
< h3 > 1.-TODO< / h3 >
< blockquote >
< / blockquote >
< h3 > 2.-Prerrequisites< / h3 >
< blockquote >
2006-05-27 20:07:27 +02:00
< p > To prepare the standard msvc build of FB you need:< / p >
2003-07-04 14:40:38 +02:00
< ul >
2009-10-12 16:21:20 +02:00
< li > Microsoft VisualStudio 8 (2005) or 9 (2008).< / li >
2003-07-10 17:36:59 +02:00
< li > sed unix utility< / li >
2003-07-04 14:40:38 +02:00
< / ul >
2010-08-25 14:00:07 +02:00
< p > If you intend to prepare an installable build, you will need < a href = http://www.jrsoftware.org/isdl.php > innosetup 5< / a > < / p >
2003-07-04 14:40:38 +02:00
< p > To download the utilities use the following links< / p >
< ul >
2010-08-25 15:25:07 +02:00
< li > Innosetup (Note: This is the classic version, not the new unicode version.) < a href = http://www.jrsoftware.org/download.php/is.exe > http://www.jrsoftware.org/download.php/is.exe< / a > < / li >
2010-08-25 14:00:07 +02:00
< li > Innosetup pack < a href = "http://files.jrsoftware.org/ispack/ispack-5.3.10.exe" > http://files.jrsoftware.org/ispack/ispack-5.3.10.exe< / a > < / li >
2010-08-25 12:16:43 +02:00
< li > Sed < a href = "http://gnuwin32.sourceforge.net/packages/sed.htm" > http://gnuwin32.sourceforge.net/packages/sed.htm< / a > < / li >
2003-07-04 14:40:38 +02:00
< / ul >
< / blockquote >
< h3 > 2.-Installing the utilities< / h3 >
< blockquote >
< h4 > 2.1.-Visual Studio< / h4 >
< ol >
2009-10-12 16:21:20 +02:00
< li > Install VisualStudio 8/9< / li >
2010-08-25 15:36:24 +02:00
< li > You can compile it with < a href = http://www.microsoft.com/express/downloads/#Visual_Studio_2008_Express_Downloads > Visual C++ 2008 Studio Express< / a > but it will not be able to build the < a href = http://firebird.1100200.n4.nabble.com/building-head-with-visual-studio-2008-vc9-td1127168.html > control panel applet< / a > but for the firebird server and the rest of utilities building is ok< br >
2003-07-04 14:40:38 +02:00
< / li >
< / ol >
2006-05-27 20:07:27 +02:00
< h4 > 2.2.-Sed< / h4 >
2010-08-25 12:16:43 +02:00
< ol >
< li class = "level1" > < div class = "li" > Download < a href = "http://sourceforge.net/projects/gnuwin32/files/sed/4.2-1/sed-4.2-1-setup.exe/download" class = "urlextern" title = "http://sourceforge.net/projects/gnuwin32/files/sed/4.2-1/sed-4.2-1-setup.exe/download" rel = "nofollow" > Sed setup< / a > from < a href = "http://gnuwin32.sourceforge.net/packages/sed.htm" class = "urlextern" title = "http://gnuwin32.sourceforge.net/packages/sed.htm" rel = "nofollow" > GnuWin32 project< / a > I had to run the setup and i extract into c:\gnuwin32 < / div >
< / li >
< li class = "level1" > < div class = "li" > 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< / div >
< / li >
< / ol >
2003-07-04 14:40:38 +02:00
< h4 > 2.3.-Inno setup< / h4 >
2010-08-25 14:00:07 +02:00
< ol >
< li > Run the Installer for Innosetup 5 that you downloaded from above
setup-5.3.xx.exe< / li >
< li > Run the Innosetup pack Installer ispack-5.3.10.exe
with the default options (next , next , next)< / li >
< ol >
2003-07-04 14:40:38 +02:00
< / blockquote >
< h3 > 4.- Building< / h3 >
< blockquote >
< h4 > 4.1.-Standard build< / h4 >
< ol >
2010-08-25 15:36:24 +02:00
< li > Eliminate the fb2control from firebird2 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.< / li >
2003-07-04 14:40:38 +02:00
< li > Open a command line window.< / li >
2010-08-25 15:36:24 +02:00
< li > Go to the builds\win32 directory.< / li >
2003-07-05 04:35:41 +02:00
< li > Run the following batches in order (your version of VisualStudio is detected automatically)< / li >
2003-07-04 14:40:38 +02:00
< ol >
2006-05-27 20:07:27 +02:00
< li > make_icu.bat [DEBUG] [CLEAN]< / li >
< li > make_boot.bat [DEBUG] [CLEAN]< / li >
2003-07-05 04:35:41 +02:00
< li > make_all.bat [DEBUG] [CLEAN]< / li >
2003-07-04 14:40:38 +02:00
< / ol >
< / ol >
< ul >
2006-05-27 20:07:27 +02:00
< p > After the build finish, an output directory with the binaries is created below your firebird2 directory.< / p >
2003-07-04 14:40:38 +02:00
< li > To make a clean build from scratch after making changes to the code use the clean_all.bat script< / li >
< / ul >
< h4 > 4.2.-Parser rebuild< / h4 >
2006-05-27 20:07:27 +02:00
< p > If you change parser.y you will need to rebuild parser.cpp, to do so use parse.bat< / p >
2003-07-16 21:40:47 +02:00
< h4 > 4.3.-Examples build< / h4 >
< p > 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:< / p >
< ol >
< li > make_examples.bat< / li >
< / ol >
< h4 > 4.4.-Installer build< / h4 >
2003-07-04 21:21:21 +02:00
< p > Remember, you need sed and innosetup in the path to build the installer< / p >
2003-07-07 13:34:09 +02:00
< ul >
2003-07-04 21:21:21 +02:00
< li > Open a command line window.< / li >
2010-08-25 15:36:24 +02:00
< li > Go to the builds\install\arch-specific\win32 directory.< / li >
2003-07-04 21:21:21 +02:00
< li > The batch to build the installer is< br >
2003-07-05 04:35:41 +02:00
BuildExecutableInstall.bat [DEBUG] [CS]< br >
Where DEBUG means if the build is a debug one or not and CS means classic server installer.< / li >
2003-07-07 13:34:09 +02:00
< li > 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
< / ul >
2006-05-28 02:43:57 +02:00
< h4 > 4.5.-Building samples< / h4 >
2003-07-11 12:59:01 +02:00
< p > After the standard build is finished, an output directory with the same structure as the installed FB directory is created.< / p >
2006-05-27 20:07:27 +02:00
< p > If you want to build the examples just cd to firebird2\output\examples\build_win32 and run run_all.bat< / p >
< p > Run_all.bat calls four other bats to make the example sets. Any example set can be build independently with its make_XXX script.< / p >
2003-07-11 12:59:01 +02:00
< p > The example sets are:< / p >
< ul >
< li > api (API Interface)< / li >
< li > dyn (embedded dynamic SQL)< / li >
< li > stat (embedded static SQL)< / li >
< li > udf (User defined functions)< / li >
< / ul >
2003-07-04 14:40:38 +02:00
< / blockquote >
2010-08-25 14:00:07 +02:00
< / body >
< / html >