1 | This is Qt version 4.6.2 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 | There is also a set of optional tools which are necessary to enable the selected
|
---|
51 | features of the Qt library. If these tools are missing, the Qt configuration
|
---|
52 | script (discussed in section "COMPILING QT" below) will automatically disable
|
---|
53 | the 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 |
|
---|
74 | SETTING UP THE ENVIRONMENT
|
---|
75 |
|
---|
76 | First of all, make sure that your GCC environment is set up and meets the
|
---|
77 | specified requirements. To perform a quick check, you may run the following
|
---|
78 | command:
|
---|
79 |
|
---|
80 | gcc --version && make --version && wl /version
|
---|
81 |
|
---|
82 | If the setup is done properly, it will print the versions of the key tools
|
---|
83 | to the console.
|
---|
84 |
|
---|
85 | The next step is to set up the Qt environment. If you installed the Qt
|
---|
86 | development libraries from the WPI archive (refer to section "USING OFFICIAL
|
---|
87 | BINARY QT ARCHIVES" below for more details about existing WPI archives), you
|
---|
88 | will only need to run the supplied "QtEnv.cmd" script which will do all the
|
---|
89 | setup job for you. The script is located in the directory where you installed
|
---|
90 | the developmnent libraries (or in the WPS folder created by the WPI installer).
|
---|
91 | Execute this script in a command line session to make it ready for building
|
---|
92 | Qt 4 applications (for example, using the "qmake" command follwed by "make"
|
---|
93 | for applications based on qmake project files which most of them are). If you
|
---|
94 | go that way, you may skip the rest of this section and proceed directly to
|
---|
95 | section called "USING OFFICIAL BINARY QT ARCHIVES" or further.
|
---|
96 |
|
---|
97 | If you use the full source code ZIP distribution of the Qt library or work
|
---|
98 | directly with the Qt SVN tree, you will need to set up the environment yourself
|
---|
99 | by 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 |
|
---|
122 | Note that the QTDIR environment variable used in previous Qt versions is not
|
---|
123 | used in Qt4 anymore. Therefore, there is no need to set this variable
|
---|
124 | explicitly.
|
---|
125 |
|
---|
126 | There is also no need to set the QMAKESPEC variable explicitly. If it is absent,
|
---|
127 | qmake will use the specification stored in the <Qt4_Home>/mkspecs/default
|
---|
128 | directory, which on OS/2 always refers to the "os2-g++" specification, the only
|
---|
129 | one supported at the present time.
|
---|
130 |
|
---|
131 | NOTE:
|
---|
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 |
|
---|
142 | SETTING UP OPTIONAL TOOLS
|
---|
143 |
|
---|
144 | The following list describes the steps necessary to set up the optional tools
|
---|
145 | that 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 |
|
---|
161 | COMPILING QT
|
---|
162 |
|
---|
163 | You should skip this section if you installed the Qt development libraries using
|
---|
164 | the WPI archive (that already contains compiled release versions of the
|
---|
165 | libraries) and proceed directly to the next section.
|
---|
166 |
|
---|
167 | When the environment is set up, go to the directory where you unpacked the
|
---|
168 | Qt4 source tree and type:
|
---|
169 |
|
---|
170 | configure.cmd
|
---|
171 |
|
---|
172 | This will set up the Qt library (by creating necessary configuration and include
|
---|
173 | files and a bunch of Makefiles for variuos components) and build the qmake tool.
|
---|
174 |
|
---|
175 | The next step is to type:
|
---|
176 |
|
---|
177 | make
|
---|
178 |
|
---|
179 | This will compile and link the Qt library. Note that by default both the release
|
---|
180 | and the debug version of the library are built (please be patient, it may take
|
---|
181 | quite some time depending on your hardware). The release and debug libraries can
|
---|
182 | co-exist in the same source tree and may be used in parallel: all the debug DLLs
|
---|
183 | get a 'd' letter in their name preceeding the Qt major version number and use
|
---|
184 | separate directories for object files.
|
---|
185 |
|
---|
186 | To save time, you may build the release and the debug versions of the Qt library
|
---|
187 | separately by typing 'make release' or 'make debug' accordingly instead of just
|
---|
188 | 'make'.
|
---|
189 |
|
---|
190 | Once the library is successfully built, you may try to compile the demos and
|
---|
191 | examples by visiting the individual example subdirectories in the source tree
|
---|
192 | and typing 'qmake' followed by one of 'make', 'make release' or 'make debug'
|
---|
193 | in that subdirectory.
|
---|
194 |
|
---|
195 | NOTE:
|
---|
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 |
|
---|
220 | IMPORTANT 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 |
|
---|
242 | USING OFFICIAL BINARY QT ARCHIVES
|
---|
243 |
|
---|
244 | For your convenience, netlabs.org provides the following binary distributions
|
---|
245 | of the Qt library (where X_Y_Z is the Qt version number) distributed as WPI
|
---|
246 | archives:
|
---|
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 |
|
---|
251 | These archives are called the official binary archives of the Qt library for
|
---|
|
---|