File: install-x11.html

package info (click to toggle)
qt4-x11 4%3A4.8.2%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 701,696 kB
  • sloc: cpp: 2,686,179; ansic: 375,485; python: 25,859; sh: 19,349; xml: 17,091; perl: 14,765; yacc: 5,383; asm: 5,038; makefile: 1,259; lex: 555; ruby: 526; objc: 347; cs: 112; pascal: 112; php: 54; sed: 34
file content (122 lines) | stat: -rw-r--r-- 7,261 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- installation.qdoc -->
  <title>Qt 4.8: Installing Qt for X11 Platforms</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li>Installing Qt for X11 Platforms</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
  <link rel="prev" href="installation.html" />
<p class="naviNextPrevious headerNavi">
<a class="prevPage" href="installation.html">Installation</a>
</p><p/>
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#step-1-installing-the-license-file-commercial-editions-only">Step 1: Installing the License File (commercial editions only)</a></li>
<li class="level1"><a href="#step-2-unpacking-the-archive">Step 2: Unpacking the Archive</a></li>
<li class="level1"><a href="#step-3-building-the-library">Step 3: Building the Library</a></li>
<li class="level1"><a href="#step-4-set-the-environment-variables">Step 4: Set the Environment Variables</a></li>
<li class="level1"><a href="#qt-demos-and-examples">Qt Demos and Examples</a></li>
</ul>
</div>
<h1 class="title">Installing Qt for X11 Platforms</h1>
<span class="subtitle"></span>
<!-- $$$install-x11.html-description -->
<div class="descr"> <a name="details"></a>
<p>Qt for X11 has some requirements that are given in more detail in the <a href="requirements-x11.html">Qt for X11 Requirements</a> document.</p>
<a name="step-1-installing-the-license-file-commercial-editions-only"></a>
<h2>Step 1: Installing the License File (commercial editions only)</h2>
<p>If you have the commercial edition of Qt, install your license file as <tt>$HOME/.qt-license</tt>.</p>
<p>For the open source version you do not need a license file.</p>
<a name="step-2-unpacking-the-archive"></a>
<h2>Step 2: Unpacking the Archive</h2>
<p>Unpack the archive if you have not done so already. For example, if you have the <tt>qt-everywhere-opensource-src-4.8&#x2e;2&#x2e;tar.gz</tt> package, type the following commands at a command line prompt:</p>
<pre class="cpp"> cd /tmp
 gunzip qt-everywhere-opensource-src-4.8.2.tar.gz        # uncompress the archive
 tar xvf qt-everywhere-opensource-src-4.8.2.tar          # unpack it</pre>
<p>This creates the directory <tt>/tmp/qt-everywhere-opensource-src-4.8&#x2e;2</tt> containing the files from the archive. We only support the GNU version of the tar archiving utility. Note that on some systems it is called gtar.</p>
<a name="step-3-building-the-library"></a>
<h2>Step 3: Building the Library</h2>
<p>To configure the Qt library for your machine type, run the <tt>./configure</tt> script in the package directory.</p>
<p>By default, Qt is configured for installation in the <tt>/usr/local/Trolltech/Qt-4.8&#x2e;2</tt> directory, but this can be changed by using the <tt>-prefix</tt> option.</p>
<pre class="cpp"> cd /tmp/qt-everywhere-opensource-src-4.8.2
 ./configure</pre>
<p>Type <tt>./configure -help</tt> to get a list of all available options. The <a href="configure-options.html">Configuration Options for Qt</a> page gives a brief overview of these.</p>
<p>To create the library and compile all the demos, examples, tools, and tutorials, type:</p>
<pre class="cpp"> make</pre>
<p>If <tt>-prefix</tt> is outside the build directory, you need to install the library, demos, examples, tools, and tutorials in the appropriate place. To do this (as root if necessary), type:</p>
<pre class="cpp"> make install</pre>
<p>Note that on some systems the make utility is named differently, e.g&#x2e; gmake. The configure script tells you which make utility to use.</p>
<p><b>Note:</b> If you later need to reconfigure and rebuild Qt from the same location, ensure that all traces of the previous configuration are removed by entering the build directory and typing <tt>make confclean</tt> before running <tt>configure</tt> again.</p>
<a name="step-4-set-the-environment-variables"></a>
<h2>Step 4: Set the Environment Variables</h2>
<p>In order to use Qt, some environment variables needs to be extended.</p>
<pre class="cpp"> PATH               - to locate qmake, moc and other Qt tools</pre>
<p>This is done like this:</p>
<p>In <tt>.profile</tt> (if your shell is bash, ksh, zsh or sh), add the following lines:</p>
<pre class="cpp"> PATH=/usr/local/Trolltech/Qt-4.8.2/bin:$PATH
 export PATH</pre>
<p>In <tt>.login</tt> (in case your shell is csh or tcsh), add the following line:</p>
<pre class="cpp"> setenv PATH /usr/local/Trolltech/Qt-4.8.2/bin:$PATH</pre>
<p>If you use a different shell, please modify your environment variables accordingly.</p>
<p>For compilers that do not support rpath you must also extended the <tt>LD_LIBRARY_PATH</tt> environment variable to include <tt>/usr/local/Trolltech/Qt-4.8&#x2e;2/lib</tt>. On Linux with GCC this step is not needed.</p>
<p><b>That's all. Qt is now installed.</b></p>
<a name="qt-demos-and-examples"></a>
<h2>Qt Demos and Examples</h2>
<p>If you are new to Qt, we suggest that you take a look at the demos and examples to see Qt in action. Run the Qt Examples and Demos either by typing <tt>qtdemo</tt> on the command line or through the desktop's Main menu.</p>
<p>You might also want to try the following links:</p>
<ul>
<li><a href="qtconfig.html">Configuring Qt</a></li>
<li><a href="how-to-learn-qt.html">How to Learn Qt</a></li>
<li><a href="tutorials.html">Tutorials</a></li>
<li><a href="http://qt.nokia.com/developer">Developer Zone</a></li>
<li><a href="deployment.html">Deploying Qt Applications</a></li>
</ul>
<p>We hope you will enjoy using Qt. Good luck!</p>
</div>
<!-- @@@install-x11.html -->
<p class="naviNextPrevious footerNavi">
<a class="prevPage" href="installation.html">Installation</a>
</p>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2012 Nokia Corporation and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>