Overview

Installation

Update needed.

Dependencies :

Ubuntu 10.10 :

sudo apt-get install libqt4-dev  qtcreator libpng-dev libopencv*-dev libqjson-dev cmake mercurial git tesseract* libfftw3-dev

Optional :

sudo apt-get install wine

Windows 7 + Vistual Studio 2008 9

  1. Tips :

    • [NOT WORKING ] .... Permanently set a user system variable from console :

      setx PATH "%PATH%;C:\Path to some directory\"

  2. Download and install cmake

    • IMPORTANT : check the radio button "Add cmake to the system PATH for all users".
  3. Download Mercurial -Mercurial 2.2.1 x86 - All Mercurial Downloads -

  4. Download Qt Libraries for Visual Studio within C:\Qt\4.8.2 - Qt 4.8.2 Visual Studio 2008 -

    • Once setup is finished, set your environement variable PATH to %PATH%;C:\Qt\4.8.2\bin (Right Click on Computer => Properties => Advanced System Setting => Environement Variables)
    • You can test by running 'qmake' in a cmd.exe.
  5. Download and install QJSON :

    • QJSON git-zip
    • Unzip it your workspace directory.
    • With cmd.exe (run as adminisitrator) :

      cd path\to\your\workspace\qjson
      mkdir build
      cd build
      cmake .. -G"Visual Studio 9 2008"
      cmake --build . --config Release --target install
      

      Or in Debug mode :

      cmake --build . --config Debug --target install
      
    • Add 'bin' installation path (C:\Program Files\qjson\bin) to you PATH environement variables. (Right Click on Computer => Properties => Advanced System Setting => Environement Variables)

  6. Install latest OpenCV (2.4 - trunk)

    • Install SVN (IMPORTANT : Activate command line client tools) TortoiseSVN
    • Get the code, Open a new cmd.exe as Administrator :

      cd path\to\your\workspace\
      svn co http://code.opencv.org/svn/opencv/trunk/opencv
      
    • Install :

      cd opencv
      mkdir build 
      cd build 
      cmake .. -G"Visual Studio 9 2008" -DCMAKE_INSTALL_PREFIX="C:\Program Files\OpenCV"
      cmake --build . --config Release --target install
      
    • Set a new environement variable named OPENCV_DIR=C:\Program Files\OpenCV

    • Add 'bin' installation path (C:\Program Files\OpenCV\bin) to you PATH environement variables.
  7. Download and install ZLIB (Optional but used for copressing json streams, it improves performances) :

    • zlib 1.2.7 zip
    • Unzip it your workspace directory.
    • With cmd.exe (run as adminisitrator) :

      cd path\to\your\workspace\zlib-1.2.7
      mkdir build
      cd build
      cmake .. -G"Visual Studio 9 2008" 
      cmake --build . --config Release --target install
      
    • Add 'bin' installation path (C:\Program Files\zlib\bin) to you PATH environement variables. (Right Click on Computer => Properties => Advanced System Setting => Environement Variables)

  8. TR1 Visual Studio Extention Pack Download

Windows 7 + Qt5 + MinGW

cmake .. -G"MinGW Makefiles" -DCMAKE_INSTALL_PREFIX="C:\Program Files\qjson" cmake --build . --config Release --target install

cmake .. -G"MinGW Makefiles" -DCMAKE_INSTALL_PREFIX="C:\Program Files\DoQuBook" cmake --build . --config Release --target install

cmake .. -G"MinGW Makefiles" cmake --build . --config Release --target install

Compiling doqubook :

On Linux or Mac OS X

hg clone https://bitbucket.org/clallier/doqubookcpp

cd DoQuBook
mkdir build
cd build
cmake .. -DCOMPRESSION=ON -DVERBOSE=OFF
make -j 5
sudo make install

On Windows 7 with Visual Studio 2008

Open a new administrator console and type the folowing :

hg clone https://bitbucket.org/clallier/doqubookcpp

cd DoQuBook
mkdir build
cd build
cmake .. -G"Visual Studio 9 2008" -DVERBOSE=ON

Simple build :

cmake --build .

Release build and install :

cmake --build . --config Release --target install

Debug build and install :

cmake --build . --config Debug --target install

Now you just need to add the DoQuBook.dll path in your system PATH variable.

On Windows with NMake Makefile :

cd DoQuBook
mkdir build
cd build
cmake .. -G"NMake Makefiles" -DVERBOSE=ON
cmake --build . --config Release --target install

On Windows with QtCreator and VS 9 :

The build step from QtCreator does not work yet.

cd DoQuBook
mkdir build
cd build
cmake .. -G"Visual Studio 9 2008" -DVERBOSE=ON

Also create a new folder buildqt just to genereate the QtCreator project file.

cd DoQuBook
mkdir buildqt

Open QtCreator. In File => Open File or project. Select DoQuBook/CMakeLists.txt. Select the build filder "buildqt", and click on Run CMake. Build from the command line in the folde build :

cd build 
cmake --build . --config Release

Compiling a plugin :

cd DoQuBookC++/Plugins/PLUGIN_NAME
mkdir build
cd build
cmake ..
make -j 2
sudo make install

Compiling an App :

cd DoQuBookC++/Apps/APP_NAME
mkdir build
cd build
cmake ..
make -j 2

And run the app ;-)

Packaging, distribution and deployment

On Windows with a Visual Studio build :

We made a simple cmake script to package "DoQuBook Apps". The goal is to create a little app that can be ditributed to your clients (ie. PhD Directors ;-) ). Your clients will only have to run a simple little Self-Extracting Archive setup executable to be able to run your app.

The only requirement on the deployment PC is to install :

On your PC :

  • Install NSIS

  • First you need to make sure that all your libraries and app are build together in Release mode.

    (for EVERY library and app (qjson, opencv, DoQuBook, ..., plugins)) cmake --build . --config Release --target install

  • Then run cpack with cmake in the build directory of your app :

    cmake --build . --config Release --target package

That's it ;-)

On Mac os x.

Well the first good thing is that you have nothing to install ;-). BUT, we are not yet able to build autonomous plugins - DIRECTLY -. You first have to create an app that uses your plugin. Then you can package a bundle of that app :

sudo make install
make package

At this step the application contains all your plugins and is ready to be given to someone that is running Mac. However if you want to just send one of the plugins without that app. Well extract it (MyApp.app/Contents/DoQuBook_plugins) and also extract all its bundle dependencies (MyApp.app/Contents/MacOS/*.dylib).