============================================ BRAT - Basic Radar Altimetry Toolbox INSTALL ============================================ INSTALLING FROM THE BINARY DISTRIBUTION ======================================= Full information on installing BRAT from a binary distribution can be found in the BRAT User Manual available in the file brat_user_manual_2.0.1.pdf in the 'doc' directory of the BRAT distribution or installation. The short version is as follows: + For Windows XP: double-click the installer file brat-2.0.1-windows-installer.exe and follow the instructions. + For Linux: double-click in your desktop manager (or execute from the command-line) the installer file brat-2.0.1-linux-installer.bin and follow the instructions. (If necessary use 'chmod +x ' to ensure the installer is executable.) + For Mac OS X: double-click the image file appropriate for your platform (brat-2.0.1-macosx-ppc.dmg for PowerPC Macintoshes, brat-2.0.1-macosx-i386.dmg for Intel Macintoshes), and drag the 'BratGui' application to the 'Applications' folder on your machine. You can optionally drag the 'brat' folder to a location of your choice if you want to have the non-gui components of BRAT installed as well. The remainder of this INSTALL file concerns itself with compiling and installing BRAT from source code, and assumes that you have an understanding of the various components BRAT consists of (see the User Manual for details). INSTALLING FROM SOURCE ====================== Generally, installation from source will be necessary if: + You are on Linux or Mac OS X and you want to use the IDL or MATLAB interfaces to BRAT. + You are on a Linux system that is older than the one used to create the BRAT Linux binary distribution (in which case BRAT will fail to run if installed as a binary). + You are on a Windows system, and your version of MATLAB or IDL is not supported by the pre-compiled interfaces in the Windows binary distribution. + You are on another Unix-based system not supported by the binary distributions. In summary, the process of compiling BRAT is as follows: + Get and unpack the source distribution. + Install the various software prerequisites. + Configure the build using CMake options. + Compile the build. + Install the build. BRAT PREREQUISITE SOFTWARE ========================== The prerequisite software for running BRAT (as mentioned in the User Manual) is of course also prerequisite software for compiling it: + X11 Windowing System (BRAT has been tested on Xorg Xserver v1.1.1 and higher) + GTK 2 libraries (BRAT has been tested on libgtk2 v2.8.20 or higher) + C run-time libraries (BRAT has been tested on libc6 v2.3.6 or higher) The following additional software must be installed before any component of BRAT can be compiled: + C++ Compiler Most Unix platforms come with their own C++ compiler (or one can be downloaded using the native package manager) so this should not be a problem. For Linux and Mac OS, BRAT was developed with GNU g++ (version 4.0.x or higher), for Windows with Visual Studio C++ 6.0 service pack 5 (higher versions may require tweaking). On Mac OS X you should make sure you have installed the Developer Tools. + CMake v2.6.1 Link: http://www.cmake.org/ CMake is a multi-platform makefile generator. Earlier versions than 2.6.1 will not work; nor will v2.6.2. + Perl v5.8.x (or higher) Link: http://www.perl.com/ Perl is a multi-platform scripting language. On Windows, the ActiveState Perl (http://www.activestate.com/activeperl/) distribution works well. With a compiler and CMake and Perl in place, you should be able to build the CODA and BRATHL libraries and the Console Applications. + IDL V6.3 (or higher) Link: http://www.ittvis.com/idl/ With IDL installed you will be able to build the CODA and BRATHL IDL interfaces. + Matlab V7.5/R15 (or higher) Link: http://www.mathworks.com/ With MATLAB installed you will be able to build the CODA and BRATHL MATLAB interfaces. + wxWidgets v2.8.9 (or higher) Link: http://www.wxwidgets.org/, http://www.wxpython.org/ WxWidgets is a multi-platform GUI building tool. On Linux and MacOS the instructions below will refer to the wxPython distribution (which contains wxWidgets), for Windows we refer to the wxMSW distribution. + VTK v5.0.4 Multi-platform graphic tool. Link: http://www.vtk.org/files/release/5.0/ VTK is a (3D) computer graphics and visualisation toolkit. Note that BRAT absolutely requires VTK v5.0.4 -- more recent VTK versions will cause compatibility problems. Note that v5.0.4 is no longer explicitly linked to on the VTK home or download pages. It can still be found in the VTK release archive at the link given above, however. VTK and wxWidgets are only necessary if you want to build the GUI Applications (BratDisplay and BratGui). They are large, complex packages, so if you do not need to compile the GUI applications, you can save a lot of time and effort. Many Linux package managers offer pre-installed versions of VTK and wxWidgets, but these versions are often not compiled with the exact options BRAT requires. Separate compilation is recommended. + BitRock InstallBuilder v5.4.13 Link: http://www.bitrock.com InstallBuilder is a commercial product; a license is needed. (Licenses for GPL applications are available from BitRock at no cost). InstallBuilder allows you to build the binary installer for the Windows and Linux platforms. (The MacOS X images can be generated without the help of additional software.) + Fortran compiler A Fortran compiler is needed to build the Fortran interface to BRATHL. PLATFORM-SPECIFIC INSTRUCTIONS FOR SOURCE BUILDING ================================================== Building the prerequisites (Linux) ---------------------------------- Note: VTK and wxWidgets may themselves have dependendencies on other (development versions of) software packages that may or may not already be present on your system. This INSTALL file only covers BRAT-specific compilation details, and assumes all subdependencies are covered. Please consult the installation instructions for VTK and wxWidgets found in their source directories for more detailed information on their prerequisites. + VTK Unpack the VTK sources. Create a build directory, cd into it and call CMake with the following flags: $ cmake -DCMAKE_INSTALL_PREFIX:PATH= \ -DBUILD_TESTING:BOOL=OFF \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DVTK_WRAP_PYTHON:BOOL=OFF \ -DVTK_WRAP_TCL:BOOL=OFF \ -DVTK_USE_TK:BOOL=OFF \ Note that whatever CMAKE_BUILD_TYPE you specify (Release, Debug, etc.), you must later use exactly the same one when compiling BRAT (see below). Call "make", "make install", and then specify as the value for VTK_DIR when building BRAT (see below). Note: it is important that VTK is compiled with the VTK_USE_ANSI_STDLIB flag set to "ON". Because should be the case by the default, it is not listed in the invocation given above, but it is something to watch out for when debugging or using an existing installation. You can find a log of the settings with which a particular installation of VTK was compiled in the file /lib/vtk-5.0/VTKConfig.cmake. Note: VTK 5.0.4 will not compile out of the box with GNU g++ 4.3 or higher (earlier versions are no problem). The fix is very simple. Add the line: #include to each of the following source files: /Utilities/DICOMParser/DICOMFile.cxx /Utilities/DICOMParser/DICOMParser.cxx /Utilities/DICOMParser/DICOMAppHelper.cxx + WxWidgets Unpack the WxWidgets sources (the following assumes you are using the wxPython distribution -- follow the wxWidgets instructions for other versions). Create a build directory, cd into it, and call the configure script (wxWidgets is not a CMake application, but uses the GNU autotools) with the following flags: $ /configure \ --prefix= \ --enable-monolithic \ --disable-shared \ --disable-unicode \ --with-opengl \ --enable-geometry \ --enable-display \ --with-expat=builtin \ --with-libpng=builtin \ --with-libjpeg=builtin \ --with-libtiff=builtin Call "make", "make install", and then specify /bin/wx-config as the value for wxWidgets_CONFIG_EXECUTABLE when building BRAT (see below). Building the source package (Linux) ----------------------------------- The following steps will guide you through the process of building the BRAT libraries and executables (including CODA and the IDL and MATLAB interfaces) on a Linux-based platform: + Go to the directory that contains the downloaded brat-x.y.z.tar.gz file and unpack this package: $ gzip -d brat-x.y.z.tar.gz $ tar xf brat-x.y.z.tar Make sure you replace x.y.z with the appropriate version number. You should now have a brat-x.y.z directory. + Create your so-called build directory. This should be a new empty directory, preferably located outside of the brat-x.y.z directory. Go to this directory: $ mkdir build $ cd build + Next you will have to configure and run CMake. This will check what system you are on and set up the build environment. There are several options and environment settings you can pass to cmake in the form of -D