source: trunk/README.OS2@ 769

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

Better phrasing in README.OS2.

File size: 25.8 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 - eCUPS 1.3.11 or later to support printing in Qt. The eCUPS WPI is available
63 from:
64
65 ftp://ftp.netlabs.org/incoming/eCUPS003.wpi or
66 ftp://ftp.netlabs.org/pub/ecups/eCUPS003.wpi
67
68 Linking against eCUPS also requires pthread.lib:
69
70 http://web.os2power.com/download/lib/pthread-20100217-os2.zip
71
72
73
74SETTING UP THE ENVIRONMENT
75
76First of all, make sure that your GCC environment is set up and meets the
77specified requirements. To perform a quick check, you may run the following
78command:
79
80 gcc --version && make --version && wl /version
81
82If the setup is done properly, it will print the versions of the key tools
83to the console.
84
85The next step is to set up the Qt environment. If you installed the Qt
86development libraries from the WPI archive (refer to section "USING OFFICIAL
87BINARY QT ARCHIVES" below for more details about existing WPI archives), you
88will only need to run the supplied "QtEnv.cmd" script which will do all the
89setup job for you. The script is located in the directory where you installed
90the developmnent libraries (or in the WPS folder created by the WPI installer).
91Execute this script in a command line session to make it ready for building
92Qt 4 applications (for example, using the "qmake" command follwed by "make"
93for applications based on qmake project files which most of them are). If you
94go that way, you may skip the rest of this section and proceed directly to
95section called "USING OFFICIAL BINARY QT ARCHIVES" or further.
96
97If you use the full source code ZIP distribution of the Qt library or work
98directly with the Qt SVN tree, you will need to set up the environment yourself
99by performing the following steps:
100
101 - Add the "bin" subdirectory of the directory where you unpacked the Qt4
102 source tree to PATH and BEGINLIBPATH, like this:
103
104 set PATH=D:\Coding\Qt4\bin;%PATH%
105 set BEGINLIBPATH=D:\Coding\Qt4\bin;%BEGINLIBPATH%
106
107 - Add the system DLLs to the GCC library path with the following command:
108
109 set LIBRARY_PATH=C:\OS2\DLL;C:\MPTN\DLL;%LIBRARY_PATH%
110
111 where C: is your boot drive.
112
113 - Make sure CMD.EXE is your command line processor (the generated makefiles
114 will rely on its 'copy', 'if' and other commands). If you have a Unix shell
115 (SH.EXE) in your environment, you may need to force GNU make to use CMD.EXE
116 by executing the followingn command:
117
118 set MAKESHELL=C:\OS2\CMD.EXE
119
120 where C: is your boot drive.
121
122Note that the QTDIR environment variable used in previous Qt versions is not
123used in Qt4 anymore. Therefore, there is no need to set this variable
124explicitly.
125
126There is also no need to set the QMAKESPEC variable explicitly. If it is absent,
127qmake will use the specification stored in the <Qt4_Home>/mkspecs/default
128directory, which on OS/2 always refers to the "os2-g++" specification, the only
129one supported at the present time.
130
131NOTE:
132
133 It is especially important to make sure that there are no traces of any
134 other Watcom or OpenWatcom installation in the environment where you build
135 Qt as it will interfere with the patched OpenWatcom linker we use. This
136 basically means removing all environment variables containing "WATCOM" in
137 their names and also removing references to all those Watcom installations
138 from PATH.
139
140
141
142SETTING UP OPTIONAL TOOLS
143
144The following list describes the steps necessary to set up the optional tools
145that the Qt library depends on:
146
147 - Install the eCUPS WPI archive to enable printing support. If this WPI is
148 installed, the Qt build system will pick up all necessary libraries
149 automatically. Otherwise (e.g. if you use a ZIP or build eCUPS yourself),
150 you will need to use the following environment variables to tell it where to
151 look for CUPS:
152
153 set CUPS_INCLUDEPATH=X:\Path\to\CUPS\include
154 set CUPS_LIBS=X:\Path\to\CUPS\lib\libcups.a
155
156 You will also need to make sure that pthread.lib is placed somewhere in your
157 system library path so that the compiler can find it.
158
159
160
161COMPILING QT
162
163You should skip this section if you installed the Qt development libraries using
164the WPI archive (that already contains compiled release versions of the
165libraries) and proceed directly to the next section.
166
167When the environment is set up, go to the directory where you unpacked the
168Qt4 source tree and type:
169
170 configure.cmd
171
172This will set up the Qt library (by creating necessary configuration and include
173files and a bunch of Makefiles for variuos components) and build the qmake tool.
174
175The next step is to type:
176
177 make
178
179This will compile and link the Qt library. Note that by default both the release
180and the debug version of the library are built (please be patient, it may take
181quite some time depending on your hardware). The release and debug libraries can
182co-exist in the same source tree and may be used in parallel: all the debug DLLs
183get a 'd' letter in their name preceeding the Qt major version number and use
184separate directories for object files.
185
186To save time, you may build the release and the debug versions of the Qt library
187separately by typing 'make release' or 'make debug' accordingly instead of just
188'make'.
189
190Once the library is successfully built, you may try to compile the demos and
191examples by visiting the individual example subdirectories in the source tree
192and typing 'qmake' followed by one of 'make', 'make release' or 'make debug'
193in that subdirectory.
194
195NOTE:
196
197 This version of Qt for OS/2 includes the Extended system tray plugin for
198 XCenter/eCenter which is necessary to enable Qt support for the special
199 notification area on the XCenter/eCenter panel (called the "system tray")
200 which is used by many long-running applications to display their status.
201 In order to activate this support, you need to install this plugin to your
202 XCenter or eCenter. The plugin is built during the normal Qt build process
203 and can be found in the file \plugins\xcenter\xsystray.dll in the Qt source
204 tree. In order to install the plugin, do the following:
205
206 a. Copy xsystray.dll to <XWorkplace installation folder>\plugins\xcenter\
207 (on eComStation, this will be C:\ecs\system\ewps\plugins\xcenter\ where
208 C: is your boot drive).
209
210 b. Restart WPS.
211
212 c. Add the "Extended system tray" widget to the XCenter/eCenter panel using
213 the XCenter context menu ('Create new widget').
214
215 Note that if you upgrade from the previous version of the plugin then
216 please unlock xsystray.dll in the target folder using the UNLOCK.EXE
217 utility (which you can find in the LxLite package, for example) before
218 performing step a., otherwise the copy operation will fail.
219
220IMPORTANT NOTE:
221
222 Please take into account that the Qt library you build on your own as
223 described above is NOT intended for wide distribution with Qt applications
224 you port or create. Such private Qt builds help you develop Qt applications
225 (because you can easily debug your program and parts of the Qt framework at
226 the source level) but being widely distributed they will create a so-called
227 DLL hell when a program running on a user computer crashes because it picks
228 up a wrong build of the Qt library. This will happen because even a single
229 change to Qt configuration options may make your build binary incompatible
230 with another build. And even if you convince the user to isolate different
231 DLLs (using LIBPATHSTRICT and BEGINLIBPATH) it will create another major
232 problem: two different Qt applications will load two different copies of Qt
233 into memory which will create an unnecessary overhead by doubling the
234 amount of used system resources.
235
236 In order to nicely solve this problem, netlabs.org provides the official
237 binary builds of the Qt library distributed as WPI archives which are
238 described in the next section.
239
240
241
242USING OFFICIAL BINARY QT ARCHIVES
243
244For your convenience, netlabs.org provides the following binary distributions
245of the Qt library (where X_Y_Z is the Qt version number) distributed as WPI
246archives:
247
248 qt-lib-X_Y_Z.wpi - Runtime DLLs and binaries ("lib" archive)
249 qt-dev-X_Y_Z.wpi - Development libraries, tools and headers ("dev" archive)
250
251These archives are called the official binary archives of the Qt library for