Tree Viewer Prototype Build Instructions

The prototype uses the following tools and libraries:

CMake
Qt
Boost
Glew (Included in svn)

Windows build instructions with Visual Studio 2008

Additional Windows dependencies:

Freetype
Curl

CMake

Download installer

Qt

Download installer

Build Boost

Download source
Windows build instructions

Or, download Boost

Download installer

Glew

Open project file at svn_root/External/glew-1.5.2/build/vc6/glew.sln
Build release and debug configurations

Build FreeType
Build curl
Building prototype

Windows build instructions with MinGW

  1. Prerequisites:

    1. MinGW with gcc 4.4 and MSYS
      1. Install MinGW 5.1.6:
        http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe/download
        choose the current version and then the base tools and g++ compiler components
      2. Install MSYS 1.0.11:
        http://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/msys-1.0.11/MSYS-1.0.11.exe/download
        do the post-install
        when it asks for the location of MinGW, ignore the instructions and give the path in windows format (with backslashes like C:\MinGW)
      3. Unzip gcc 4.4 into your MinGW directory:
        http://sourceforge.net/projects/mingw/files/GCC%20Version%204/Current%20Release_%20gcc-4.4.0/gcc-full-4.4.0-mingw32-bin-2.tar.lzma/download
        Requires an archive program that handles lzma compression, like 7-Zip
        Allow it to replace the existing mingw files
      4. Get DbgHelp.Dll
        http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=cd1fc4b2-0885-47f4-af45-7fd5e14db6c0
        run the installer and find the file DbgHelp.Dll and copy it to your MinGW /lib directory
      5. (optional) get gdb version 6.3-2 or greater
        http://sourceforge.net/projects/mingw/files/GNU%20Source-Level%20Debugger/Release%20Candidate_%20gdb-6.3/gdb-6.3-2.exe/download
        (This may make the previous step, "Get DbgHelp.Dll", unnecessary. I haven't gone back and checked yet.)
      6. Add the bin directories of MinGW and MSYS to your PATH. (Make sure MSYS appears first in your path.)
    2. Qt
      1. Install Qt for MinGW:
        http://get.qt.nokia.com/qt/source/qt-win-opensource-4.6.2-mingw.exe
        (I get a message that my mingw version may be wrong, but it installs without errors.)
      2. Add the bin directory of Qt to your PATH
    3. Cmake
      Install CMake http://www.cmake.org/files/v2.8/cmake-2.8.0-win32-x86.exe
    4. Boost
      1. Unzip and build Boost
      2. Install boost (Install dir can be set with bjam install --prefix flag.)
        bjam install
        set BOOST_DIR={boost install dir}
        
    5. Freetype
      http://sourceforge.net/projects/freetype/files/freetype2/2.3.12/freetype-2.3.12.tar.gz/download
      unzip and follow the install directions in docs/INSTALL.UNIX
      take note of the directory that "make install" installs to. (Can be set with ./configure --prefix flag.)
      set FREETYPE_DIR={freetype install dir}
    6. Curl
      http://www.gknw.net/mirror/curl/win32/curl-7.20.0-devel-mingw32.zip
      unzip
      set CURL_DIR={unzipped curl-7.20.0-devel-mingw32 dir}
  2. Building the viewer:

    1. Check out source code
      svn co http://svn.iplantcollaborative.org/iptol/visualization/tv_prototype/trunk tv_prototype
    2. Build Glew
      cd /path/to/code/tv_prototype/External/glew-1.5.2
      chmod u+x config/config.guess
      make
      
    3. Configure environment
      set BOOST_INC_DIR=%BOOST_DIR%\include\boost-1_42
      set BOOST_LIB_DIR=%BOOST_DIR%\lib
      set CURL_INC_DIR=%CURL_DIR%\include
      set CURL_LIB_DIR=%CURL_DIR%\bin
      set HOME=%HOMEDRIVE%%HOMEPATH%
      
    4. Build viewer
      cd /path/to/code/tv_prototype
      mkdir build
      cd build
      cmake -L -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release ../
      make
      

      Eclipse

      Use the generator flag -G "Eclipse CDT4 - Unix Makefiles" to create an Eclipse project

  3. Running the viewer:

    cd /path/to/code/tv_prototype/bin
    set PATH=%PATH%;%CURL_LIB_DIR%
    set PATH=%PATH%;%FREETYPE_DIR%\bin
    set PATH=%PATH%;/path/to/code/tv_prototype/External/glew-1.5.2/lib
    iPToLTreeViewer.exe
    

Mac build instructions

Install required dependencies

CMake

Download installer

Qt

Download installer

Boost

Download source

Build and install:

tar -xf boost_1_41_0.tar.bz2
cd boost_1_41_0
./bootstrap.sh
./bjam link=shared runtime-link=shared stage
sudo ./bjam install
Check out the source code for prototype
svn co http://svn.iplantcollaborative.org/iptol/visualization/tv_prototype/trunk tv_prototype
Build Glew
cd /path/to/code/tv_prototype/External/glew-1.5.2/config
chmod u+x config.guess
cd ..
make
Building prototype.
cd /path/to/code/tv_prototype
mkdir build
cmake ../ -DDESIRED_QT_VERSION=4.6
make

To run application from command line:

cd ../bin
./iPToLTreeViewer.app/Contents/MacOS/iPToLTreeViewer