QtRoot Installation ( Windows/Win32, Unix/X11, MacOS )

Overview

There are three installation modes and two optional steps: (be aware the Qt instllation is quite complex and time consuming process. Therefore if your envirtonment allows you are advised to use the pre-compiled Qt-binary distributions )
  1. Long and slow installation.
    1. Qt version
    2. ROOT version
    3. QtRoot version
    4. Coin3D versions
    5. Win32/Win32 features
    6. Run-time environment
    7. Test suite
  2. Short and quick one.
  3. Complement (for X11)
  4. Testing
  5. PyQt+PyROOT=PyQtRoot
  6. Appendix
If you are going to install the QtRoot for the first time you are advised to apply the "Long Installation"

1. Full (aka Long and slow) installation

To install ROOT with Qt-layer one is advised to

  • Download and execute the INSTALL_QTROOT.sh shell script. The script is to download and install all components needed, namely
    1. Qt 4.4.x - 4.6.x. The current default value is Qt 4.6.2
    2. ROOT. The current default value is 5.26 with the "latest patch".
    3. QtRoot. The current default - CVS HEAD
    4. Coin3D 3.x (optional). The current default CVS Coin-2 "trunk"
    5. Attention: Win32 / Win64 users.
    6. Set the package environment (see 2.1 )
    7. Run the test suite.( see 2.5)

    2. QtRoot upgrade (aka short and quick) installation

    To quickly upgrade the QtRoot package installed with the "Full installation" method you should:

    X11 platforms:

    1. Set the package environment. To do that you need to find and select one of the 3 shell scripts created by the "Full Installation"
            source set_environment.csh
            source set_environment.sh  # this script is Ok for Cygwin environment as well)
            source set_environment.tcsh
      
    2. Update the QtRoot source from SVN repository
            svn up qtRoot
      
    3. Rebuild the QtRoot package
            cd qtRoot
            qmake CONFIG+=debug # for non debug build use just qmake
            make
      
    4. Install the QtRoot package
            make install
      
    5. Test the QtRoot package
            cd qtExamples
            qmake
            make
      

    Win32/Win64 platforms:

    ATTENTION: The BNL CVS server has been retired and replaced with SVN
    1. From within Cygwin environment set the package environment. To do that you need to find and select the shell script created by the "Full Installation"
            source set_environment.sh
      
    2. Update the QtRoot source from CVS repository
            cd $ROOTSYS/graf2d/qt
            svn up
            cd $ROOTSYS/qtgui
            svn up
            cd $ROOTSYS/qt4gui
            svn up
            cd $ROOTSYS/qtimage
            svn up
            cd $ROOTSYS/qtgl
            svn up
            cd $ROOTSYS/qtExamples
            svn up
            cd $ROOTSYS/qtthread
            svn up
      
    3. Rebuild the ROOT with QtRoot package
            cd $ROOTSYS
            make
      
    4. Test the QtRoot package

      You should test QtRoot from the regular Windows Command Mode prompt rather from Cygwin environment.
      Set the Windows environment. To do that you need to find and select the Windows command batch file created by the "Full Installation"

            set_environment.cmd
      
      Then select the qtExamples directory and build the test suite:
            cd %QTROOTSYSDIR%\qtExamples
            qmake
            nmake
      

    3. Complement the existent ROOT installation with QtRoot plugin(x11 only)

    On X11 platforms one can complement any existent ROOT installation with the QtRoot package.

    First time installation

    First make sure you provide the correct ROOT and Qt environment. This means
    1. The env variables ROOTSYS and QTDIR are defined.
    2. $ROOTSYS/lib and $QTDIR/lib directory are present on your LD_LIBRARY_PATH
    3. $ROOTSYS/bin and $QTDIR/bin directory are present on your PATH
    Create some directory you want QtRoot to be installed in. For example "QtRoot".
     mkdir -p QtRoot/qtrootsys
     cd QtRoot
     setenv QTROOTSYSDIR `pwd`/qtrootsys # Use the dedicated directory 
                                         # to keep ROOT and QtRoot separately
    
     # setenv QTROOTSYSDIR $ROOTSYS      # This will merge ROOT and QtRoot 
                                         # libraries and header files
    
     svn co https://qtroot.svn.sourceforge.net/svnroot/qtroot/trunk  qtRoot
     cd qtRoot
     qmake
     make
     make install
    
    If you opt for the dedicated directory for Qt Root then do not forget to include the new package into your environment
       setenv LD_LIBRARY_PATH $QTROOTSYSDIR/lib:$LD_LIBRARY_PATH
    
    For MacOS one needs:
       export DYLD_LIBRARY_PATH=${QTROOTSYSDIR}/lib:$DYLD_LIBRARY_PATH
    
    and customize either .roootrc or $ROOTSYS/etc/system.rootrc file to turn the Qt-layer "on"

    Upgrade the existent installation

    To upgrade the "complement" installation with the latest QtRoot version one has to
     cd QtRoot
     setenv QTROOTSYSDIR `pwd`/qtrootsys # Use the dedicated directory 
                                         # to keep ROOT and QtRoot separately
    
     # setenv QTROOTSYSDIR $ROOTSYS      # This will merge ROOT and QtRoot 
                                         # libraries and header files
     svn co https://qtroot.svn.sourceforge.net/svnroot/qtroot/trunk  qtRoot
     cd qtRoot
     qmake
     make
     make install
    

    4. Test

    To test your installation
  • Set the package environment. To do that you need to find and select one of the 3 shell scripts created by the "Full Installation"
          source set_environment.csh
          source set_environment.sh  # this script is Ok for Cygwin environment as well)
          source set_environment.tcsh
    
    If you skipped the "Full Installation" you may want to set the environment "by hand" too. For example, set_environment.sh does
    #!/bin/bash
    export QTDIR=my/Qt-4.5.2
    export QMAKESPEC=
    export QT_CONF_OPTS= -fast -opensource -opengl
    export ROOTSYS=cernroot
    export QTROOTSYSDIR=cernroot
    export LD_LIBRARY_PATH=$ROOTSYS/lib:$QTDIR/lib:$LD_LIBRARY_PATH
    export PATH=$ROOTSYS/bin:$QTDIR/bin:$PATH
    
    For Mac OC one needs
    export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$LD_LIBRARY_PATH
    
    as well.
  • Select the qtExamples directory and build the test suite:
          cd qtExamples
          qmake
          make (or "nmake" for the Visual Studio environment)
    

    5. PyQt+PyROOT=PyQtRoot

    I have neither PyQt nor PyRoot installed. I do not feel myself comfortable providing the information I can not verify myself.

    The information about the Python / Ruby / Qt / Root integration is provided "as is". I would like to thank Zoltan MATHE for his time and experience that he agreed to share with us with his thorough "instruction"

    The other source of the useful information on the issue is the Python and Ruby Interfaces chapter from the ROOT User's Guide.

    Appendix

    (Under development. Job in progress . . . )

    Description Environment variable ROOT resource key Default value
    ROOT top directory ROOTSYS
    Coin3D top directory IVROOT
    Current user home directory HOME
    Current user name USER
    Qt4 top directory QTDIR
    X11 Display name (if any) DISPLAY
    Qt warning terminates the application QT_FATAL_WARNINGS
    Font factor to override the default ROOTFONTFACTOR
    Directory to accumulate the snapshot files SnapShotDirectory Gui.SnapShotDirectory
    The max number of the frames SnapShotFileCounter Gui.SnapShotFileCounter 10
    meta
    The base name of the snapshot file SnapShotFile Gui.SnapShotFile
    OffRootStereo
    TurnRootStereo
    OffRootStereo
    Movie parameters Movie.Parameters
    ROOT Gui factory Gui.Factory qtgui
    Screen font priority "Qt.Screen.TTF"
    Qt style Gui.Style native
    Do we need ROOT command prompt Gui.Prompt

    Qt Online books

    Qt Binary distributions

    Qt supported platfroms Please read:
    You are -th visitors since December 22, 2006