source: trunk/README.OS2@ 815

Last change on this file since 815 was 807, checked in by Dmitry A. Kuminov, 15 years ago
File size: 27.7 KB
Line 
1This is Qt version 4.6.2 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.
84
85 - PostgersSQL 9.0.1 or later to support the PostgresSQL Qt plugin. The
86 PostgresSQL libraries are available at:
87
88 http://download.smedley.info/postgresql-9.0.1-os2-20101012.zip
89
90 Note that you will also need libc064x.dll for this PostgresSQL build and a
91 patched PostgresSQL library that fixes one critical bug (this will not be
92 necessary for the next PostgresSQL build as it will incorporate the fix):
93
94 http://download.smedley.info/libc064x.zip
95 http://download.smedley.info/libpq.zip
96
97 Note that you will also need the above OpenSSL libraries and pthread.lib to
98 be able to use this PostgresSQL build.
99
100
101
102SETTING UP THE ENVIRONMENT
103
104First of all, make sure that your GCC environment is set up and meets the
105specified requirements. To perform a quick check, you may run the following
106command:
107
108 gcc --version && make --version && wl /version
109
110If the setup is done properly, it will print the versions of the key tools
111to the console.
112
113The next step is to set up the Qt environment. If you installed the Qt
114development libraries from the WPI archive (refer to section "USING OFFICIAL
115BINARY QT ARCHIVES" below for more details about existing WPI archives), you
116will only need to run the supplied "QtEnv.cmd" script which will do all the
117setup job for you. The script is located in the directory where you installed
118the developmnent libraries (or in the WPS folder created by the WPI installer).
119Execute this script in a command line session to make it ready for building
120Qt 4 applications (for example, using the "qmake" command follwed by "make"
121for applications based on qmake project files which most of them are). If you
122go that way, you may skip the rest of this section and proceed directly to
123section "USING OFFICIAL BINARY QT ARCHIVES" below.
124
125If you use the full source code ZIP distribution of the Qt library or work
126directly with the Qt SVN tree, you will need to set up the environment yourself
127by performing the following steps:
128
129 - Add the "bin" subdirectory of the directory where you unpacked the Qt4
130 source tree to PATH and BEGINLIBPATH, like this:
131
132 set PATH=D:\Coding\Qt4\bin;%PATH%
133 set BEGINLIBPATH=D:\Coding\Qt4\bin;%BEGINLIBPATH%
134
135 - Add the system DLLs to the GCC library path with the following command:
136
137 set LIBRARY_PATH=C:\OS2\DLL;C:\MPTN\DLL;%LIBRARY_PATH%
138
139 where C: is your boot drive.
140
141 - Make sure CMD.EXE is your command line processor (the generated makefiles
142 will rely on its 'copy', 'if' and other commands). If you have a Unix shell
143 (SH.EXE) in your environment, you may need to force GNU make to use CMD.EXE
144 by executing the followingn command:
145
146 set MAKESHELL=C:\OS2\CMD.EXE
147
148 where C: is your boot drive.
149
150Note that the QTDIR environment variable used in previous Qt versions is not
151used in Qt4 anymore. Therefore, there is no need to set this variable
152explicitly.
153
154There is also no need to set the QMAKESPEC variable explicitly. If it is absent,
155qmake will use the specification stored in the <Qt4_Home>/mkspecs/default
156directory, which on OS/2 always refers to the "os2-g++" specification, the only
157one supported at the present time.
158
159NOTE:
160
161 It is especially important to make sure that there are no traces of any
162 other Watcom or OpenWatcom installation in the environment where you build
163 Qt as it will interfere with the patched OpenWatcom linker we use. This
164 basically means removing all environment variables containing "WATCOM" in
165 their names and also removing references to all those Watcom installations
166 from PATH.
167
168
169
170SETTING UP OPTIONAL TOOLS
171
172The following list describes the steps necessary to set up the optional tools
173that the Qt library depends on:
174
175 - Unzip the CUPS libraries to some directory and set the following environment
176 variables to tell the Qt configure script its location:
177
178 set CUPS_INCLUDEPATH=<path_to_CUPS>\include
179 set CUPS_LIBS=-L<path_to_CUPS>\lib -llibcups.a -L<path_to_pthread> -lpthread.lib
180
181 - Unzip the OpenSSL libraries to some directory and set the following
182 environment variables to tell the Qt configure script its location:
183
184 set OPENSSL_INCLUDEPATH=<path_to_OpenSSL>\include
185 set OPENSSL_LIBS=
186
187 Note that you will also need to place OpenSSL DLLs to BEGINLIBPATH (if they
188 are not already in your LIBPATH) so that Qt applications can find them at
189 runtime:
190
191 set BEGINLIBPATH=<path_to_OpenSSL>\dll;%BEGINLIBPATH%