source: trunk/README.OS2@ 876

Last change on this file since 876 was 870, checked in by Dmitry A. Kuminov, 15 years ago

README.OS2: Added some info about file watching and xWorkplace.

File size: 30.4 KB
Line 
1This is Qt version 4.6.3 for OS/2 and eCS.
2
3This document contains a brief information on the OS/2 version of the Qt
4library. Please read it carefully before starting your work. You may also
5visit the project page at
6
7 http://svn.netlabs.org/qt4/wiki
8
9to get more information and the latest news and also to report bugs.
10
11To get a brief list of OS/2-specific changes from release to release
12please see the CHANGES.OS2 file included in this distribution.
13
14Please note that this version is binary incompatible with previous versions of
15Qt 4 for OS/2! This is not a behavior of the original Qt library (where versions
16with the same major number are usually binary compatible), but it is due to the
17fact that we continue to add missing features to the OS/2 version ot Qt and this
18cannot be done witout breaking the binary compatibility. On practice, this means
19that you need to recompile your applications with the new version of the Qt
20library in order to make them work with it.
21
22
23
24REQUIREMENTS
25
26In order to compile the Qt library and Qt-based applications, you will need
27the following tools:
28
29 - One of the OS/2 Warp 4, OS/2 Warp 4.5 or eComStation operating systems.
30
31 - GCC compiler version 4.4.2 for OS/2, patched OpenWatcom linker and
32 GNU Make 3.81beta1 or above. The GCC compiler must be set up to use the
33 OpenWatcom linker for linking.
34
35 If you do not have a working GCC environment with the above requirements, it
36 is recommended to download a ready-to-use GCC 4.2.2 distribution from here:
37
38 ftp://ftp.netlabs.org/pub/qt4/gcc-4_4_2-complete-20091205.zip
39
40 This distribution includes all tools necessary to compile and build the Qt
41 library from the source code. Just follow the installation instructions
42 contained in the README file inside this ZIP archive to set up the GCC
43 environment.
44
45 Please note that starting from Qt 4.6.2, support for GCC 3.3.5 and earlier
46 versions of the compiler has been dropped and the Qt library will most
47 likely not build if you use one of these compilers. Later versions prior to
48 GCC 4.4.2 may work but they are not tested and not supported.
49
50There is also a set of optional tools which are necessary to enable the selected
51features of the Qt library. If these tools are missing, the Qt configuration
52script (discussed in section "COMPILING QT" below) will automatically disable
53the corresponding feature:
54
55 - LxLite 1.3.3 or above (not tested) to enable the compression of Qt DLLs and
56 application executables (which saves hard disk space and application startup
57 time). If you use a recent version of eComStation (e.g. 2.0 rc6) you will
58 already have LxLite installed. Otherwise, you may take it from here:
59
60 http://www.os2site.com/sw/util/archiver/lxlt133.zip
61
62 - CUPS 1.3.11 or later to support printing in Qt. The CUPS libraries are
63 available at:
64
65 http://download.smedley.info/cups-1.3.11-os2-20090807.zip
66
67 Linking against eCUPS also requires pthread.lib:
68
69 http://web.os2power.com/download/lib/pthread-20100217-os2.zip
70
71 - OpenSSL 0.9.8o or later to support OpenSSL in Qt. The OpenSSL libraries are
72 available at:
73
74 http://bauxite.sakura.ne.jp/tmp/os2/openssl-1.0.0a-os2knix-20100706-runtime.zip
75 http://bauxite.sakura.ne.jp/tmp/os2/openssl-1.0.0a-os2knix-20100706-dev.zip
76
77 - MySQL 5.1 or later for the MySQL Qt plugin. The MySQL libraries are
78 available at:
79
80 http://download.smedley.info/mysql-5.1.51-os2-20101001.zip
81
82 Note that you will also need the above OpenSSL libraries and pthread.lib to
83 be able to use this MySQL build. The MySQL Qt plugin itself will require
84 OpenSSL DLLs in your LIBPATH at runtime.
85
86 - PostgersSQL 9.0.1 or later to support the PostgresSQL Qt plugin. The
87 PostgresSQL libraries are available at:
88
89 http://download.smedley.info/postgresql-9.0.1-os2-20101108.zip
90
91 Note that you will also need libc064x.dll for this PostgresSQL build:
92
93 http://download.smedley.info/libc064x.zip
94
95 Note that you will also need the above OpenSSL libraries and pthread.lib to
96 be able to use this PostgresSQL build. The PostgresSQL Qt plugin itself will
97 require OpenSSL DLLs in your LIBPATH at runtime.
98
99
100
101SETTING UP THE ENVIRONMENT
102
103First of all, make sure that your GCC environment is set up and meets the
104specified requirements. To perform a quick check, you may run the following
105command:
106
107 gcc --version && make --version && wl /version
108
109If the setup is done properly, it will print the versions of the key tools
110to the console.
111
112The next step is to set up the Qt environment. If you installed the Qt
113development libraries from the WPI archive (refer to section "USING OFFICIAL
114BINARY QT ARCHIVES" below for more details about existing WPI archives), you
115will only need to run the supplied "QtEnv.cmd" script which will do all the
116setup job for you. The script is located in the directory where you installed
117the developmnent libraries (or in the WPS folder created by the WPI installer).
118Execute this script in a command line session to make it ready for building
119Qt 4 applications (for example, using the "qmake" command follwed by "make"
120for applications based on qmake project files which most of them are). If you
121go that way, you may skip the rest of this section and proceed directly to
122section "USING OFFICIAL BINARY QT ARCHIVES" below.
123
124If you use the full source code ZIP distribution of the Qt library or work
125directly with the Qt SVN tree, you will need to set up the environment yourself
126by performing the following steps:
127
128 - Add the "bin" subdirectory of the directory where you unpacked the Qt4
129 source tree to PATH and BEGINLIBPATH, like this:
130
131 set PATH=D:\Coding\Qt4\bin;%PATH%
132 set BEGINLIBPATH=D:\Coding\Qt4\bin;%BEGINLIBPATH%
133
134 - Add the system DLLs to the GCC library path with the following command:
135
136 set LIBRARY_PATH=C:\OS2\DLL;C:\MPTN\DLL;%LIBRARY_PATH%
137
138 where C: is your boot drive.
139
140 - Make sure CMD.EXE is your command line processor (the generated makefiles
141 will rely on its 'copy', 'if' and other commands). If you have a Unix shell
142 (SH.EXE) in your environment, you may need to force GNU make to use CMD.EXE
143 by executing the followingn command:
144
145 set MAKESHELL=C:\OS2\CMD.EXE
146
147 where C: is your boot drive.
148
149Note that the QTDIR environment variable used in previous Qt versions is not
150used in Qt4 anymore. Therefore, there is no need to set this variable
151explicitly.
152
153There is also no need to set the QMAKESPEC variable explicitly. If it is absent,
154qmake will use the specification stored in the <Qt4_Home>/mkspecs/default
155directory, which on OS/2 always refers to the "os2-g++" specification, the only
156one supported at the present time.
157
158NOTE:
159
160 It is especially important to make sure that there are no traces of any
161 other Watcom or OpenWatcom installation in the environment where you build
162 Qt as it will interfere with the patched OpenWatcom linker we use. This
163 basically means removing all environment variables containing "WATCOM" in
164 their names and also removing references to all those Watcom installations
165 from PATH.
166
167
168
169SETTING UP OPTIONAL TOOLS
170
171The following list describes the steps necessary to set up the optional tools
172that the Qt library depends on:
173
174 - Unzip the CUPS libraries to some directory and set the following environment
175 variables to tell the Qt configure script its location:
176
177 set CUPS_INCLUDEPATH=<path_to_CUPS>\include
178 set CUPS_LIBS=-L<path_to_CUPS>\lib -llibcups.a -L<path_to_pthread> -lpthread.lib
179
180 - Unzip the OpenSSL libraries to some directory and set the following
181 environment variables to tell the Qt configure script its location:
182
183 set OPENSSL_INCLUDEPATH=<path_to_OpenSSL>\include
184 set OPENSSL_LIBS=
185
186 Note that you will also need to place OpenSSL DLLs to BEGINLIBPATH (if they
187 are not already in your LIBPATH) so that Qt applications can find them at
188 runtime:
189
190 set BEGINLIBPATH=<path_to_OpenSSL>\dll;%BEGINLIBPATH%
191
192 - Unzip the MySQL archive to some directory and set the following environment
193 variables to tell the Qt configure script the library location:
194
195 set MYSQL_INCLUDEPATH=<path_to_MySQL>\include'
196 set MYSQL_LIBS=-L<path_to_MySQL>\lib -lmysqlclient_r -L<path_to_OpenSSL>\lib -llibssl -llibcrypto -L<path_to_pthread> -lpthread
197
198 Note that you will also need to place OpenSSL DLLs to BEGINLIBPATH (as
199 described above) because the MySQL plugin links statically to them and Qt
200 will not be able to load it otherwise.
201
202 - Unzip the PostgresSQL archive to some directory and set the following
203 environment variables to tell the Qt configure script the library location:
204
205 set PSQL_INCLUDEPATH=<path_to_PostgresSQL>\include'
206 set PSQL_LIBS=-L<path_to_PostgresSQL>\lib -llibpq -L<path_to_OpenSSL>\lib -llibssl -llibcrypto -L<path_to_pthread> -lpthread
207
208 Note that you will also need to place OpenSSL DLLs to BEGINLIBPATH (as
209 described above) because the PostgresSQL plugin links statically to them and
210 Qt will not be able to load it otherwise.
211
212Note that you need to make sure that OpenSSL DLLs are in BEGINLIBPATH or in
213LIBPATH before Qt attempts to load the SQL plugins for the first time. If it
214fails to load them, it will cache a failure and will not retry even if the
215plugins can be loaded later. To fix that, you need to delete the file
216%HOME%\.config\Trolltech.ini where this cache is stored.
217
218
219
220COMPILING QT
221
222You should skip this section if you installed the Qt development libraries using
223the WPI archive (that already contains compiled release versions of the
224libraries) and proceed directly to the next section.
225
226When the environment is set up, go to the directory where you unpacked the
227Qt4 source tree and type:
228
229 configure.cmd
230
231This will set up the Qt library (by creating necessary configuration and include
232files and a bunch of Makefiles for variuos components) and build the qmake tool.
233
234The next step is to type:
235
236 make
237
238This will compile and link the Qt library. Note that by default both the release
239and the debug version of the library are built (please be patient, it may take
240quite some time depending on your hardware). The release and debug libraries can
241co-exist in the same source tree and may be used in parallel: all the debug DLLs
242get a 'd' letter in their name preceeding the Qt major version number and use
243separate directories for object files.
244
245To save time, you may build the release and the debug versions of the Qt library
246separately by typing 'make release' or 'make debug' accordingly instead of just
247'make'.
248
249Once the library is successfully built, you may try to compile the demos and
250examples by visiting the individual example subdirectories in the source tree
251and typing 'qmake' followed by one of 'make', 'make release' or 'make debug'
252in that subdirectory.
253
254NOTE:
255
256 This version of Qt for OS/2 includes the Extended system tray plugin for
257 XCenter/eCenter which is necessary to enable Qt support for the special
258 notification area on the XCenter/eCenter panel (called the "system tray")
259 which is used by many long-running applications to display their status.
260 In order to activate this support, you need to install this plugin to your
261 XCenter or eCenter. The plugin is built during the normal Qt build process