1 | This is Qt version 4.6.3 for OS/2 and eCS.
|
---|
2 |
|
---|
3 | This document contains a brief information on the OS/2 version of the Qt
|
---|
4 | library. Please read it carefully before starting your work. You may also
|
---|
5 | visit the project page at
|
---|
6 |
|
---|
7 | http://svn.netlabs.org/qt4/wiki
|
---|
8 |
|
---|
9 | to get more information and the latest news and also to report bugs.
|
---|
10 |
|
---|
11 | To get a brief list of OS/2-specific changes from release to release
|
---|
12 | please see the CHANGES.OS2 file included in this distribution.
|
---|
13 |
|
---|
14 | Please note that this version is binary incompatible with previous versions of
|
---|
15 | Qt 4 for OS/2! This is not a behavior of the original Qt library (where versions
|
---|
16 | with the same major number are usually binary compatible), but it is due to the
|
---|
17 | fact that we continue to add missing features to the OS/2 version ot Qt and this
|
---|
18 | cannot be done witout breaking the binary compatibility. On practice, this means
|
---|
19 | that you need to recompile your applications with the new version of the Qt
|
---|
20 | library in order to make them work with it.
|
---|
21 |
|
---|
22 |
|
---|
23 |
|
---|
24 | REQUIREMENTS
|
---|
25 |
|
---|
26 | In order to compile the Qt library and Qt-based applications, you will need
|
---|
27 | the 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 |
|
---|
50 | - IBM RC (Resource Compiler) Version 5.00.007 (comes with OS/2 Toolkit 4.5)
|
---|
51 | or Version 4.00.011 (comes with eCS 2.0). Other versions may not work
|
---|
52 | correctly.
|
---|
53 |
|
---|
54 | There is also a set of optional tools which are necessary to enable the selected
|
---|
55 | features of the Qt library. If these tools are missing, the Qt configuration
|
---|
56 | script (discussed in section "COMPILING QT" below) will automatically disable
|
---|
57 | the corresponding feature:
|
---|
58 |
|
---|
59 | - Perl 5.8.2 or above. This is required if you want to perform a shadow build
|
---|
60 | of the Qt library (which is a recommended way to go). Please refer to
|
---|
61 | section "COMPILING QT" for more information about shadow builds. Recent
|
---|
62 | builds of Perl for OS/2 are available here:
|
---|
63 |
|
---|
64 | http://os2ports.smedley.info/index.php?page=perl
|
---|
65 |
|
---|
66 | - MAPSYM 4.00.000 (Oct 4 2001) to enable generation of symbol (.SYM) files for
|
---|
67 | DLLs and executables. This tool comes with OS/2 Toolkit 4.5. Note that other
|
---|
68 | versions of this tool may not work correctly.
|
---|
69 |
|
---|
70 | - LxLite 1.3.3 or above (not tested) to enable the compression of DLLs and
|
---|
71 | executables (which saves hard disk space and application startup time). If
|
---|
72 | you use a recent version of eComStation (e.g. 2.0 rc6) you will already have
|
---|
73 | LxLite installed. Otherwise, you may take it from here:
|
---|
74 |
|
---|
75 | http://www.os2site.com/sw/util/archiver/lxlt133.zip
|
---|
76 |
|
---|
77 | - CUPS 1.3.11 or later to support printing in Qt. The CUPS libraries are
|
---|
78 | available at:
|
---|
79 |
|
---|
80 | http://download.smedley.info/cups-1.3.11-os2-20090807.zip
|
---|
81 |
|
---|
82 | Linking against eCUPS also requires pthread.lib:
|
---|
83 |
|
---|
84 | http://web.os2power.com/download/lib/pthread-20100217-os2.zip
|
---|
85 |
|
---|
86 | - OpenSSL 0.9.8o or later to support OpenSSL in Qt. The OpenSSL libraries are
|
---|
87 | available at:
|
---|
88 |
|
---|
89 | http://bauxite.sakura.ne.jp/tmp/os2/openssl-1.0.0a-os2knix-20100706-runtime.zip
|
---|
90 | http://bauxite.sakura.ne.jp/tmp/os2/openssl-1.0.0a-os2knix-20100706-dev.zip
|
---|
91 |
|
---|
92 | - MySQL 5.1 or later for the MySQL Qt plugin. The MySQL libraries are
|
---|
93 | available at:
|
---|
94 |
|
---|
95 | http://download.smedley.info/mysql-5.1.51-os2-20101001.zip
|
---|
96 |
|
---|
97 | Note that you will also need the above OpenSSL libraries and pthread.lib to
|
---|
98 | be able to use this MySQL build. The MySQL Qt plugin itself will require
|
---|
99 | OpenSSL DLLs in your LIBPATH at runtime.
|
---|
100 |
|
---|
101 | - PostgersSQL 9.0.1 or later to support the PostgresSQL Qt plugin. The
|
---|
102 | PostgresSQL libraries are available at:
|
---|
103 |
|
---|
104 | http://download.smedley.info/postgresql-9.0.1-os2-20101108.zip
|
---|
105 |
|
---|
106 | Note that you will also need libc064x.dll for this PostgresSQL build:
|
---|
107 |
|
---|
108 | http://download.smedley.info/libc064x.zip
|
---|
109 |
|
---|
110 | Note that you will also need the above OpenSSL libraries and pthread.lib to
|
---|
111 | be able to use this PostgresSQL build. The PostgresSQL Qt plugin itself will
|
---|
112 | require OpenSSL DLLs in your LIBPATH at runtime.
|
---|
113 |
|
---|
114 |
|
---|
115 |
|
---|
116 | SETTING UP THE ENVIRONMENT
|
---|
117 |
|
---|
118 | First of all, make sure that your GCC environment is set up and meets the
|
---|
119 | specified requirements. To perform a quick check, you may run the following
|
---|
120 | command:
|
---|
121 |
|
---|
122 | gcc --version && make --version && wl /version
|
---|
123 |
|
---|
124 | If the setup is done properly, it will print the versions of the key tools
|
---|
125 | to the console.
|
---|
126 |
|
---|
127 | The next step is to set up the Qt environment. If you installed the Qt
|
---|
128 | development libraries from the WPI archive (refer to section "USING OFFICIAL
|
---|
129 | BINARY QT ARCHIVES" below for more details about existing WPI archives), you
|
---|
130 | will only need to run the supplied "QtEnv.cmd" script which will do all the
|
---|
131 | setup job for you. The script is located in the directory where you installed
|
---|
132 | the developmnent libraries (or in the WPS folder created by the WPI installer).
|
---|
133 | Execute this script in a command line session to make it ready for building
|
---|
134 | Qt 4 applications (for example, using the "qmake" command follwed by "make"
|
---|
135 | for applications based on qmake project files which most of them are). If you
|
---|
136 | go that way, you may skip the rest of this section and proceed directly to
|
---|
137 | section "USING OFFICIAL BINARY QT ARCHIVES" below.
|
---|
138 |
|
---|
139 | If you use the full source code ZIP distribution of the Qt library or work
|
---|
140 | directly with the Qt SVN tree, you will need to set up the environment yourself
|
---|
141 | by performing the following steps:
|
---|
142 |
|
---|
143 | - Add the "bin" subdirectory of the directory where you unpacked the Qt4
|
---|
144 | source tree to PATH and BEGINLIBPATH, like this:
|
---|
145 |
|
---|
146 | set PATH=D:\Coding\Qt4\bin;%PATH%
|
---|
147 | set BEGINLIBPATH=D:\Coding\Qt4\bin;%BEGINLIBPATH%
|
---|
148 |
|
---|
149 | - Add the system DLLs to the GCC library path with the following command:
|
---|
150 |
|
---|
151 | set LIBRARY_PATH=C:\OS2\DLL;C:\MPTN\DLL;%LIBRARY_PATH%
|
---|
152 |
|
---|
153 | where C: is your boot drive.
|
---|
154 |
|
---|
155 | - Make sure CMD.EXE is your command line processor (the generated makefiles
|
---|
156 | will rely on its 'copy', 'if' and other commands). If you have a Unix shell
|
---|
157 | (SH.EXE) in your environment, you may need to force GNU make to use CMD.EXE
|
---|
158 | by executing the followingn command:
|
---|
159 |
|
---|
160 | set MAKESHELL=C:\OS2\CMD.EXE
|
---|
161 |
|
---|
162 | where C: is your boot drive.
|
---|
163 |
|
---|
164 | Note that the QTDIR environment variable used in previous Qt versions is not
|
---|
165 | used in Qt4 anymore. Therefore, there is no need to set this variable
|
---|
166 | explicitly.
|
---|
167 |
|
---|
168 | There is also no need to set the QMAKESPEC variable explicitly. If it is absent,
|
---|
169 | qmake will use the specification stored in the <Qt4_Home>/mkspecs/default
|
---|
170 | directory, which on OS/2 always refers to the "os2-g++" specification, the only
|
---|
171 | one supported at the present time.
|
---|
172 |
|
---|
173 | NOTE:
|
---|
174 |
|
---|
175 | It is especially important to make sure that there are no traces of any
|
---|
176 | other Watcom or OpenWatcom installation in the environment where you build
|
---|
177 | Qt as it will interfere with the patched OpenWatcom linker we use. This
|
---|
178 | basically means removing all environment variables containing "WATCOM" in
|
---|
179 | their names and also removing references to all those Watcom installations
|
---|
180 | from PATH.
|
---|
181 |
|
---|
182 |
|
---|
183 |
|
---|
184 | SETTING UP OPTIONAL TOOLS
|
---|
185 |
|
---|
186 | The following list describes the steps necessary to set up the optional tools
|
---|
187 | that the Qt library depends on:
|
---|
188 |
|
---|
189 | - Unzip the CUPS libraries to some directory and set the following environment
|
---|
190 | variables to tell the Qt configure script its location:
|
---|
191 |
|
---|
192 | set CUPS_INCLUDEPATH=<path_to_CUPS>\include
|
---|
193 | set CUPS_LIBS=-L<path_to_CUPS>\lib -llibcups.a -L<path_to_pthread> -lpthread.lib
|
---|
194 |
|
---|
195 | - Unzip the OpenSSL libraries to some directory and set the following
|
---|
196 | environment variables to tell the Qt configure script its location:
|
---|
197 |
|
---|
198 | set OPENSSL_INCLUDEPATH=<path_to_OpenSSL>\include
|
---|
199 | set OPENSSL_LIBS=
|
---|
200 |
|
---|
201 | Note that you will also need to place OpenSSL DLLs to BEGINLIBPATH (if they
|
---|
202 | are not already in your LIBPATH) so that Qt applications can find them at
|
---|
203 | runtime:
|
---|
204 |
|
---|
205 | set BEGINLIBPATH=<path_to_OpenSSL>\dll;%BEGINLIBPATH%
|
---|
206 |
|
---|
207 | - Unzip the MySQL archive to some directory and set the following environment
|
---|
208 | variables to tell the Qt configure script the library location:
|
---|
209 |
|
---|
210 | set MYSQL_INCLUDEPATH=<path_to_MySQL>\include'
|
---|
211 | set MYSQL_LIBS=-L<path_to_MySQL>\lib -lmysqlclient_r -L<path_to_OpenSSL>\lib -llibssl -llibcrypto -L<path_to_pthread> -lpthread
|
---|
212 |
|
---|
213 | Note that you will also need to place OpenSSL DLLs to BEGINLIBPATH (as
|
---|
214 | described above) because the MySQL plugin links statically to them and Qt
|
---|
215 | will not be able to load it otherwise.
|
---|
216 |
|
---|
217 | - Unzip the PostgresSQL archive to some directory and set the following
|
---|
218 | environment variables to tell the Qt configure script the library location:
|
---|
219 |
|
---|
220 | set PSQL_INCLUDEPATH=<path_to_PostgresSQL>\include'
|
---|
221 | set PSQL_LIBS=-L<path_to_PostgresSQL>\lib -llibpq -L<path_to_OpenSSL>\lib -llibssl -llibcrypto -L<path_to_pthread> -lpthread
|
---|
222 |
|
---|
223 | Note that you will also need to place OpenSSL DLLs to BEGINLIBPATH (as
|
---|
224 | described above) because the PostgresSQL plugin links statically to them and
|
---|
225 | Qt will not be able to load it otherwise.
|
---|
226 |
|
---|
227 | Note that you need to make sure that OpenSSL DLLs are in BEGINLIBPATH or in
|
---|
228 | LIBPATH before Qt attempts to load the SQL plugins for the first time. If it
|
---|
229 | fails to load them, it will cache a failure and will not retry even if the
|
---|
230 | plugins can be loaded later. To fix that, you need to delete the file
|
---|
231 | %HOME%\.config\Trolltech.ini where this cache is stored.
|
---|
232 |
|
---|
233 |
|
---|
234 |
|
---|
235 | COMPILING QT
|
---|
236 |
|
---|
237 | You should skip this section if you installed the Qt development libraries using
|
---|
238 | the WPI archive (that already contains compiled release versions of the
|
---|
239 | libraries) and proceed directly to the next section.
|
---|
240 |
|
---|
241 | When the environment is set up as described above, you may build the Qt library.
|
---|
242 | There are two distinct ways of doing this: in the source tree or in a separate
|
---|
243 | directory of your choice. In the first case, all results of the build process
|
---|
244 | (intermediate object files as well as final executables and DLLs) will be placed
|
---|
245 | right in the source tree. In the second case, they will be placed in the
|
---|
246 | separate directory -- this is called a shadow build.
|
---|
247 |
|
---|
248 | Shadow builds are the recommended way to go because they keep the source
|
---|
249 | directories clean and also allow to use the same source tree for creating any
|
---|
250 | number of builds, each with its own build options.
|
---|
251 |
|
---|
252 | To perform a shadow build, do the following steps:
|
---|
253 |
|
---|
254 | 1. Create a directory outside the Qt4 source tree.
|
---|
255 |
|
---|
256 | 2. Go to that directory.
|
---|
257 |
|
---|
258 | 3. Type:
|
---|
259 |
|
---|
260 | <source_tree>\configure.cmd
|
---|
261 |
|
---|
262 | where <source_tree> is the directory containing the Qt4 source tree. This
|
---|
263 | will create all necessary configuration files, headers, Makefiles and will
|
---|
264 | also build the qmake tool which is necessary to control the rest of the
|
---|
265 | build process (note that building qmake will take some time).
|
---|
266 |
|
---|
267 | 4. Once the configure process is finished, type:
|
---|
268 |
|
---|
269 | make
|
---|
|
---|