home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 October / CHIP_CD_1999_10_PL.iso / software / linux / qt / INSTALL next >
Encoding:
Text File  |  1999-07-20  |  3.8 KB  |  144 lines

  1.               INSTALLING QT FOR X11
  2.  
  3.  
  4. You may need to be root, depending on the permissions of the directories
  5. where you choose to install Qt.
  6.  
  7.  
  8. 1.  Unpack the archive if you have not done so already:
  9.  
  10.     cd /usr/local
  11.     gunzip qt-2.0.1.tar.gz    # uncompress the archive
  12.     tar xf qt-2.0.1.tar    # unpack it
  13.  
  14.     This creates the directory /usr/local/qt-2.0.1 containing the
  15.     files from the main archive.
  16.  
  17.     Rename qt-2.0.1 to qt (or make a symlink):
  18.  
  19.     mv qt-2.0.1 qt
  20.  
  21.     The rest of this file assumes that Qt is installed in /usr/local/qt.
  22.  
  23.  
  24. 2.  Set some environment variables in the file .profile (or .login,
  25.     depending on your shell) in your home directory. (Create the
  26.     file if it is not there already.)
  27.  
  28.     QTDIR            - wherever you installed Qt
  29.     PATH            - to locate the moc program
  30.     MANPATH         - to access the Qt man pages
  31.     LD_LIBRARY_PATH        - for the shared Qt library
  32.  
  33.     If you're using GNU g++, you may also want to set these:
  34.  
  35.     LIBRARY_PATH        - contains library file path
  36.     CPLUS_INCLUDE_PATH    - contains C++ include file path
  37.  
  38.     This is done like this:
  39.  
  40.     In .profile (if your shell is bash, ksh, zsh or sh), add the
  41.     following lines:
  42.  
  43.     QTDIR=/usr/local/qt
  44.     PATH=$QTDIR/bin:$PATH
  45.     if [ $MANPATH ]
  46.     then
  47.         MANPATH=$QTDIR/man:$MANPATH
  48.     else
  49.         MANPATH=$QTDIR/man
  50.     fi
  51.     if [ $LD_LIBRARY_PATH ]
  52.     then
  53.         LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
  54.     else
  55.         LD_LIBRARY_PATH=$QTDIR/lib
  56.     fi
  57.     LIBRARY_PATH=$LD_LIBRARY_PATH
  58.     if [ $CPLUS_INCLUDE_PATH ]
  59.     then
  60.         CPLUS_INCLUDE_PATH=$QTDIR/include:$CPLUS_INCLUDE_PATH
  61.     else
  62.         CPLUS_INCLUDE_PATH=$QTDIR/include
  63.     fi
  64.  
  65.     export QTDIR PATH MANPATH LD_LIBRARY_PATH LIBRARY_PATH
  66.     export CPLUS_INCLUDE_PATH
  67.  
  68.     In .login (in case your shell is csh or tcsh), add the following lines:
  69.  
  70.     if ( ! $?QTDIR ) then
  71.         setenv QTDIR /usr/local/qt
  72.     endif
  73.     if ( $?PATH ) then
  74.         setenv PATH $QTDIR/bin:$PATH
  75.     else
  76.         setenv PATH $QTDIR/bin
  77.     endif
  78.     if ( $?MANPATH ) then
  79.         setenv MANPATH $QTDIR/man:$MANPATH
  80.     else
  81.         setenv MANPATH $QTDIR/man
  82.     endif
  83.     if ( $?LD_LIBRARY_PATH ) then
  84.         setenv LD_LIBRARY_PATH $QTDIR/lib:$LD_LIBRARY_PATH
  85.     else
  86.         setenv LD_LIBRARY_PATH $QTDIR/lib
  87.     endif
  88.     if ( ! $?LIBRARY_PATH ) then
  89.         setenv LIBRARY_PATH $LD_LIBRARY_PATH
  90.     endif
  91.     if ( $?CPLUS_INCLUDE_PATH ) then
  92.         setenv CPLUS_INCLUDE_PATH $QTDIR/include:$CPLUS_INCLUDE_PATH
  93.     else
  94.         setenv CPLUS_INCLUDE_PATH $QTDIR/include
  95.     endif
  96.  
  97.     
  98.     After you have done this, you will need to login again, or
  99.     re-source the profile before continuing, so that at least $QTDIR
  100.     is set.  The installation will give an error message and not
  101.     proceed otherwise.
  102.  
  103.  
  104. 3.  Compile the Qt library, the example programs and the tutorial.
  105.  
  106.     The qt directory contains a Makefile which compiles everything
  107.     (including the examples and the tutorial) for all platforms.
  108.  
  109.     Type:
  110.  
  111.     ./configure
  112.  
  113.     This will configure the Qt library for your machine. Note that
  114.     GIF support is turned off by default. Run ./configure -help
  115.     to get a list of configuration options. Read PLATFORMS for a
  116.     list of supported platforms.
  117.  
  118.     To create the library and compile all examples and the tutorial:
  119.  
  120.     make
  121.  
  122.     If your platform or compiler is not supported, read PORTING.  If it
  123.     is supported but you have problems, see http://www.troll.no/platforms/
  124.  
  125.  
  126. 4.  In very few cases you may need to run /sbin/ldconfig or something
  127.     similar at this point if you are using shared libraries.
  128.  
  129.     If you have problems running the example programs, e.g. messages like
  130.  
  131.      can't load library 'libqt.so.1'
  132.  
  133.     you probably need to put a reference to the qt library in a
  134.     configuration file and run /sbin/ldconfig as root on your system.
  135.     And don't forget to set LD_LIBRARY_PATH as explained in 2) above.
  136.  
  137.  
  138. 5.  The online HTML documentation is installed in /usr/local/qt/doc/
  139.     The main page is /usr/local/qt/doc/index.html
  140.     The man pages are installed in /usr/local/qt/man/
  141.  
  142.  
  143. That's all.  Qt is now installed.
  144.