Readme for LambdaFit 1.7
www.feiten.de/LambdaFit

Linus Feiten (feiten@informatik.uni-freiburg.de)
03.04.2012



Table of Contents:

1. Acknowledgements
2.1. Setup instructions to compile under Windows
2.2. Setup instructions for Linux (Ubuntu)
3. Compilation instructions




1. Acknowledgements

  LambdaFit uses the follwing libraries:
   - OpenCV 2.1.0 (BSD license)
   - Qt 5.0.2 (LGPL 2.1 licence)
   - libexif 0.6.20 (LGPL 2.1 licence)

  To compile the Windows version, MinGW and MSYS are used. 



2.1. Setup instructions to compile under Windows

  These instructions are for specific versions of the respectively
  used libraries. You should still be able to find and download them
  on the internet. It should work with newer versions as well, but
  you do so on your own risk.
  
  (We are installing all files in the directory C:\Coding\)
  
  
  1. OpenCV
  
     The OpenCV libraries are used for the image processing of LambdaFit.
  
     Get the file OpenCV-2.1.0-win32-vs2008.exe from
     http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.1/OpenCV-2.1.0-win32-vs2008.exe/download
     and execute it on your windows system.
     
     -- When asked for a destination directory, make sure that the path does not
        contains directory names with blanks in them.
        We chose C:\Coding\OpenCV2.1
  
  
  2. Qt
     
     The Qt libraries are used to create the GUI.
     Qt also includes the build tools.
     
     Download the Qt installer at
     http://download.qt-project.org/official_releases/qt/5.0/5.0.2/qt-windows-opensource-5.0.2-mingw47_32-x86-offline.exe
     and execute this file.
     
     -- When asked for a destination directory, make sure that the path does not
        contains directory names with blanks in them.
        We chose C:\Coding\Qt\Qt5.0.2
     
     -- When selecting the components to be installed, do not change the default and install:
        * Qt/Qt 5.0.2/MinGW 4.7/Essential modules
        * Qt/Qt 5.0.2/MinGW 4.7/Add-On modules
        * Qt/Qt 5.0.2/Tools/MinGW 4.7
        * Qt/Qt 5.0.2/Tools/Qt Creator
     


  3. MSYS
  
     This is needed to build the EXIF Tag Parsing Library (step 4).
  
     Get the latest version of the installer program at  
     http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/
     Browse to mingw-get-inst-YYYYMMDD, with YYYYMMDD being the current date.
     The file is called mingw-get-inst-YYYYMMDD.exe
     
     Execute this file on your windows system.
     
     -- You can allow the installer to download the latest repository catalogue,
        if the date of the installer (YYYYMMDD) is very old.
        If you just downloaded the installer, there is no difference, as it
        already includes the latest repository catalogues. Downloading the
        latest repository catalogue takes some time.
        
     -- When asked for a destination directory, make sure that the path does not
        contains directory names with blanks in them.
        We chose C:\Coding\MinGW\
        
     -- When selecting the components to be installed, select only
        * MSYS Basic System
        (We do not need "C Compiler" and "C++ Compiler" because they are
        already distributed with Qt's component Qt/Qt 5.0.2/Tools/MinGW 4.7.)

     -- As we have not installed MinGW together with MSYS, we need to tell MSYS
        where the MinGW distributed with Qt is located. This is done by editing
        the file
        C:\Coding\MinGW\msys\1.0\etc\fstab
        
        Exchange the line:
        C:\Coding\MinGW\   /mingw
        for
        C:\Coding\Qt\Qt5.0.2\Tools\MinGW\   /mingw
        
        
     -- Now, start MSYS a first time. The programm is
        C:\Coding\MinGW\msys\1.0\msys.bat
        but it can also be started by selecting "MinGW Shell" from the Windows Start menu.
  
        Running MSYS a first time is important because only now a "home" directory is created at
        C:\Coding\MinGW\\msys\1.0\home\{your user name}
        
        
  4. EXIF Tag Parsing Library
     
     This library is needed to extract the exif data like time and date from JPG files.
     
     Get the file libexif-0.6.20.zip from
     http://sourceforge.net/projects/libexif/files/libexif/0.6.20/libexif-0.6.20.zip/download
     and extract the contained directory libexif-0.6.20 into the directory into
     C:\Coding\MinGW\\msys\1.0\home\{your user name}
     
     In the MSYS shell go into 
     C:\Coding\MinGW\\msys\1.0\home\{your user name}\libexif-0.6.20
     
     Then run the following three commmands:
     
     ./configure
     make
     make install

     
     
  7. The following entries have to be defined under Windows "System variables"->"Path":
          
     For all dll's when a compiled program is started.
     C:\Coding\MinGW\msys\1.0\local\bin
     C:\Coding\OpenCV2.1\bin
     
     For all dll's when a compiled programm is started,
     and for qmake.exe in the console
     C:\Coding\Qt\Qt5.0.2\5.0.2\mingw47_32\bin
     
     For mingw compiler in console
     C:\Coding\Qt\Qt5.0.2\Tools\MinGW\bin

     Because make.exe did not come with Qt...
     C:\Coding\MinGW\msys\1.0\bin
     
     
  8. In the myqtapp.pro file make sure these lines correspond to your
     chosen installation directories!

     OPENCVDIR_WINDOWS = "C:/Coding/OpenCV2.1"
     EXIFDIR_WINDOWS = "C:/Coding/MinGW/msys/1.0"
  

  
2.2. Setup instructions for Ubuntu (Linux)

  Make sure, you installed the following packages:
  -- libhighgui-dev
  -- libhighgui4
  -- libcv4
  -- libexif-dev 
  -- libexif12
  
  -- and all qt and gcc packages...




3. Compilation instructions

  Use the console (both Windows and Ubuntu) and go to the directory
  where the LambdaFit source files are.

  Run "qmake" once.

  Afterwards you can use "make", "make clean" to compile.
  
  (In windows there is also the option of "make debug", "make release"
  or "make all".)


