| 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 | 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 | - 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 |  | 
|---|
| 101 | SETTING UP THE ENVIRONMENT | 
|---|
| 102 |  | 
|---|
| 103 | First of all, make sure that your GCC environment is set up and meets the | 
|---|
| 104 | specified requirements. To perform a quick check, you may run the following | 
|---|
| 105 | command: | 
|---|
| 106 |  | 
|---|
| 107 | gcc --version && make --version && wl /version | 
|---|
| 108 |  | 
|---|
| 109 | If the setup is done properly, it will print the versions of the key tools | 
|---|
| 110 | to the console. | 
|---|
| 111 |  | 
|---|
| 112 | The next step is to set up the Qt environment. If you installed the Qt | 
|---|
| 113 | development libraries from the WPI archive (refer to section "USING OFFICIAL | 
|---|
| 114 | BINARY QT ARCHIVES" below for more details about existing WPI archives), you | 
|---|
| 115 | will only need to run the supplied "QtEnv.cmd" script which will do all the | 
|---|
| 116 | setup job for you. The script is located in the directory where you installed | 
|---|
| 117 | the developmnent libraries (or in the WPS folder created by the WPI installer). | 
|---|
| 118 | Execute this script in a command line session to make it ready for building | 
|---|
| 119 | Qt 4 applications (for example, using the "qmake" command follwed by "make" | 
|---|
| 120 | for applications based on qmake project files which most of them are). If you | 
|---|
| 121 | go that way, you may skip the rest of this section and proceed directly to | 
|---|
| 122 | section "USING OFFICIAL BINARY QT ARCHIVES" below. | 
|---|
| 123 |  | 
|---|
| 124 | If you use the full source code ZIP distribution of the Qt library or work | 
|---|
| 125 | directly with the Qt SVN tree, you will need to set up the environment yourself | 
|---|
| 126 | by 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 |  | 
|---|
| 149 | Note that the QTDIR environment variable used in previous Qt versions is not | 
|---|
| 150 | used in Qt4 anymore. Therefore, there is no need to set this variable | 
|---|
| 151 | explicitly. | 
|---|
| 152 |  | 
|---|
| 153 | There is also no need to set the QMAKESPEC variable explicitly. If it is absent, | 
|---|
| 154 | qmake will use the specification stored in the <Qt4_Home>/mkspecs/default | 
|---|
| 155 | directory, which on OS/2 always refers to the "os2-g++" specification, the only | 
|---|
| 156 | one supported at the present time. | 
|---|
| 157 |  | 
|---|
| 158 | NOTE: | 
|---|
| 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 |  | 
|---|
| 169 | SETTING UP OPTIONAL TOOLS | 
|---|
| 170 |  | 
|---|
| 171 | The following list describes the steps necessary to set up the optional tools | 
|---|
| 172 | that 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 |  | 
|---|
| 212 | Note that you need to make sure that OpenSSL DLLs are in BEGINLIBPATH or in | 
|---|
| 213 | LIBPATH before Qt attempts to load the SQL plugins for the first time. If it | 
|---|
| 214 | fails to load them, it will cache a failure and will not retry even if the | 
|---|
| 215 | plugins 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 |  | 
|---|
| 220 | COMPILING QT | 
|---|
| 221 |  | 
|---|
| 222 | You should skip this section if you installed the Qt development libraries using | 
|---|
| 223 | the WPI archive (that already contains compiled release versions of the | 
|---|
| 224 | libraries) and proceed directly to the next section. | 
|---|
| 225 |  | 
|---|
| 226 | When the environment is set up, go to the directory where you unpacked the | 
|---|
| 227 | Qt4 source tree and type: | 
|---|
| 228 |  | 
|---|
| 229 | configure.cmd | 
|---|
| 230 |  | 
|---|
| 231 | This will set up the Qt library (by creating necessary configuration and include | 
|---|
| 232 | files and a bunch of Makefiles for variuos components) and build the qmake tool. | 
|---|
| 233 |  | 
|---|
| 234 | The next step is to type: | 
|---|
| 235 |  | 
|---|
| 236 | make | 
|---|
| 237 |  | 
|---|
| 238 | This will compile and link the Qt library. Note that by default both the release | 
|---|
| 239 | and the debug version of the library are built (please be patient, it may take | 
|---|
| 240 | quite some time depending on your hardware). The release and debug libraries can | 
|---|
| 241 | co-exist in the same source tree and may be used in parallel: all the debug DLLs | 
|---|
| 242 | get a 'd' letter in their name preceeding the Qt major version number and use | 
|---|
| 243 | separate directories for object files. | 
|---|
| 244 |  | 
|---|
| 245 | To save time, you may build the release and the debug versions of the Qt library | 
|---|
| 246 | separately by typing 'make release' or 'make debug' accordingly instead of just | 
|---|
| 247 | 'make'. | 
|---|
| 248 |  | 
|---|
| 249 | Once the library is successfully built, you may try to compile the demos and | 
|---|
| 250 | examples by visiting the individual example subdirectories in the source tree | 
|---|
| 251 | and typing 'qmake' followed by one of 'make', 'make release' or 'make debug' | 
|---|
| 252 | in that subdirectory. | 
|---|
| 253 |  | 
|---|
| 254 | NOTE: | 
|---|
| 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 | 
|---|
| 262 | and can be found in the file \plugins\xcenter\xsystray.dll in the Qt source | 
|---|
| 263 | tree. In order to install the plugin, do the following: | 
|---|
| 264 |  | 
|---|
| 265 | a. Copy xsystray.dll to <XWorkplace installation folder>\plugins\xcenter\ | 
|---|
| 266 | (on eComStation, this will be C:\ecs\system\ewps\plugins\xcenter\ where | 
|---|
| 267 | C: is your boot drive). | 
|---|
| 268 |  | 
|---|
| 269 | b. Restart WPS. | 
|---|
| 270 |  | 
|---|
| 271 | c. Add the "Extended system tray" widget to the XCenter/eCenter panel using | 
|---|
| 272 | the XCenter context menu ('Create new widget'). | 
|---|
| 273 |  | 
|---|
| 274 | Note that if you upgrade from the previous version of the plugin then | 
|---|
| 275 | please unlock xsystray.dll in the target folder using the UNLOCK.EXE | 
|---|
| 276 | utility (which you can find in the LxLite package, for example) before | 
|---|
| 277 | performing step a., otherwise the copy operation will fail. | 
|---|
| 278 |  | 
|---|
| 279 | IMPORTANT NOTE: | 
|---|
| 280 |  | 
|---|
| 281 | Please take into account that the Qt library you build on your own as | 
|---|
| 282 | described above is NOT intended for wide distribution with Qt applications | 
|---|
| 283 | you port or create. Such private Qt builds help you develop Qt applications | 
|---|
| 284 | (because you can easily debug your program and parts of the Qt framework at | 
|---|
| 285 | the source level) but being widely distributed they will create a so-called | 
|---|
| 286 | DLL hell when a program running on a user computer crashes because it picks | 
|---|
| 287 | up a wrong build of the Qt library. This will happen because even a single | 
|---|
| 288 | change to Qt configuration options may make your build binary incompatible | 
|---|
| 289 | with another build. And even if you convince the user to isolate different | 
|---|
| 290 | DLLs (using LIBPATHSTRICT and BEGINLIBPATH) it will create another major | 
|---|
| 291 | problem: two different Qt applications will load two different copies of Qt | 
|---|
| 292 | into memory which will create an unnecessary overhead by doubling the | 
|---|
| 293 | amount of used system resources. | 
|---|
| 294 |  | 
|---|
| 295 | In order to nicely solve this problem, netlabs.org provides the official | 
|---|
| 296 | binary builds of the Qt library distributed as WPI archives which are | 
|---|
| 297 | described in the next section. | 
|---|
| 298 |  | 
|---|
| 299 |  | 
|---|
| 300 |  | 
|---|
| 301 | USING OFFICIAL BINARY QT ARCHIVES | 
|---|
| 302 |  | 
|---|
| 303 | For your convenience, netlabs.org provides the following binary distributions | 
|---|
| 304 | of the Qt library (where X_Y_Z is the Qt version number) distributed as WPI | 
|---|
| 305 | archives: | 
|---|
| 306 |  | 
|---|
| 307 | qt-lib-X_Y_Z.wpi   - Runtime DLLs and binaries ("lib" archive) | 
|---|
| 308 | qt-dev-X_Y_Z.wpi   - Development libraries, tools and headers ("dev" archive) | 
|---|
| 309 |  | 
|---|
| 310 | These archives are called the official binary archives of the Qt library for | 
|---|
| 311 | OS/2. An official binary archive contains the most complete Qt build that | 
|---|
| 312 | enables all features of the Qt library and includes all standard Qt plugins | 
|---|
| 313 | implemented for the OS/2 platform at the time of the release. | 
|---|
| 314 |  | 
|---|
| 315 | The "lib" archive contains the release versions of DLLs (and may contain a few | 
|---|
| 316 | helper binaries) necessary to run applications created using the Qt framework. | 
|---|
| 317 | This package is usually installed by end users together with Qt applications | 
|---|
| 318 | they want to use. | 
|---|
| 319 |  | 
|---|
| 320 | The "dev" archive contains pre-built release versions of import libraries and | 
|---|
| 321 | a complete set of C++ include headers of the Qt framework. This package is used | 
|---|
| 322 | by developers and porters of Qt applications to build release versions of the | 
|---|
| 323 | applications that are binary compatibie with the Qt runtime provided by the | 
|---|
| 324 | official "lib" archive described above. Using the "dev" package requires the | 
|---|
| 325 | same environment as described in section "SETTING UP THE ENVIRONMET" above. | 
|---|
| 326 |  | 
|---|
| 327 | Please note again that the "dev" archive is intended to make a final release | 
|---|
| 328 | build of the Qt application which you do when you decide to ship a new version | 
|---|
| 329 | to the end users -- makes sure that the deployed application will share the same | 
|---|
| 330 | Qt runtime with other Qt applications. However, for daily work it is highly | 
|---|
| 331 | recommended that you build the debug version of the Qt library yourself (using | 
|---|
| 332 | the full source code ZIP archive or directly from SVN) as described in section | 
|---|
| 333 | "COMPILING QT"). | 
|---|
| 334 |  | 
|---|
| 335 | Besides the "lib" and the "dev" archives, the following official archives exist | 
|---|
| 336 | that you may also find useful: | 
|---|
| 337 |  | 
|---|
| 338 | qt-examples-X_Y_Z.wpi  - Demo and example sources ("examples") | 
|---|
| 339 |  | 
|---|
| 340 | The "examples" archive contains the source code and compiled binaries of the | 
|---|
| 341 | demo and example applications shipped with Qt. They serve as a good | 
|---|
| 342 | demonstration of the Qt library features and it is recommended to look at them. | 
|---|
| 343 | The binaries are compiled using the official "lib" archive. Please note that | 
|---|
| 344 | some demos and examples may miss from the arcvhice since not all features have | 
|---|
| 345 | been implemented in the OS/2 version of Qt yet. | 
|---|
| 346 |  | 
|---|
| 347 | NOTE: | 
|---|
| 348 |  | 
|---|
| 349 | All .DLL and .EXE files of the official binary build contain a DESCRIPTION | 
|---|
| 350 | string with the vendor field set to "netlabs.org" (by contrast, all custom | 
|---|
| 351 | Qt builds will set the vendor field to what the USER environment variable | 
|---|
| 352 | contains or to "anonymous" if USER is not set). Please note that you must | 
|---|
| 353 | NOT set vendor to "netlabs.org" when creating your own builds of the Qt | 
|---|
| 354 | library because it will make it difficult to identify various distributions | 
|---|
| 355 | and track possible problems with the builds. | 
|---|
| 356 |  | 
|---|
| 357 |  | 
|---|
| 358 |  | 
|---|
| 359 | QMAKE CONFIG OPTIONS | 
|---|
| 360 |  | 
|---|
| 361 | The following CONFIG options of the qmake tool have a special meaning in OS/2: | 
|---|
| 362 |  | 
|---|
| 363 | windows           Turns on generation of PM (WINDOWAPI) executables. By | 
|---|
| 364 | default, this option is set for release builds that link | 
|---|
| 365 | to the Qt GUI library. | 
|---|
| 366 |  | 
|---|
| 367 | console           Turns on generation of text mode (WINDOWCOMPAT) executables. | 
|---|
| 368 | By default, this option is set when setting the "windows" | 
|---|
| 369 | option is not appropriate (see above). | 
|---|
| 370 |  | 
|---|
| 371 | In addition, qmake recognizes the following OS/2-specific CONFIG options: | 
|---|
| 372 |  | 
|---|
| 373 | map               Turns on generation of the .map files for executables and | 
|---|
| 374 | DLLs. This option is set by default. | 
|---|
| 375 |  | 
|---|
| 376 | exepack           Turns on compression for executables and DLLs. The option is | 
|---|
| 377 | turned on by default for release builds if configure.cmd | 
|---|
| 378 | finds a compression tool (LxLite) in PATH. | 
|---|
| 379 |  | 
|---|
| 380 | highmem           Turns on high memory usage for dynamically allocated memory | 
|---|
| 381 | in DLLs and executables. When this option is set, a special | 
|---|
| 382 | compiler flag (-Zhigh-mem for GCC) is used to enable high | 
|---|
| 383 | memory support in the C library (LIBC). This option is set | 
|---|
| 384 | by default so that all Qt DLLs and Qt applications built | 
|---|
| 385 | with qmake are enabled for high memory. Note that high | 
|---|
| 386 | memory support must be enabled for all LIBC-based DLLs | 
|---|
| 387 | linked to the executable as well as for the executable | 
|---|
| 388 | itself: high memory usage will be disabled if one of them | 
|---|
| 389 | votes against it. | 
|---|
| 390 |  | 
|---|
| 391 | export_all        Cause the linker to export all public symbols in a generated | 
|---|
| 392 | DLL. By default (when this option is absent), only the | 
|---|
| 393 | symbols marked with the __declspec(dllexport) compiler | 
|---|
| 394 | directive in the source files. | 
|---|
| 395 |  | 
|---|
| 396 |  | 
|---|
| 397 |  | 
|---|
| 398 | PRINTING SUPPORT | 
|---|
| 399 |  | 
|---|
| 400 | Starting with version 4.6.2, Qt for OS/2 supports printing through the CUPS | 
|---|
| 401 | framework (provided that this support is enabled when building Qt, see the | 
|---|
| 402 | respective sections in the beginning of this document). The OS/2 implementation | 
|---|
| 403 | of the CUPS framework is provided by the eCUPS package available at | 
|---|
| 404 | http://svn.netlabs.org/ecups/. | 
|---|
| 405 |  | 
|---|
| 406 | The Qt Runtime detects the presence of eCUPS in the system on the fly and talks | 
|---|
| 407 | to the CUPS daemon directly, bypassing the standard OS/2 printing subsystem. | 
|---|
| 408 | This means that in order to print from Qt applications, you don't need to create | 
|---|
| 409 | and configure printer objects using the standard OS/2 system printer setup | 
|---|
| 410 | procedure -- you only need to install eCUPS and configure your printers in | 
|---|
| 411 | there. Please refer to the eCUPS user manual to obtain the detailed instructions | 
|---|
| 412 | on how to configure CUPS printers. | 
|---|
| 413 |  | 
|---|
| 414 |  | 
|---|
| 415 |  | 
|---|
| 416 | FILE WATCHING FUNCTION | 
|---|
| 417 |  | 
|---|
| 418 | Qt supports a mechanism of notifying Qt applications about changes to the file | 
|---|
| 419 | system, such as creating files or directories, changing their attributes or | 
|---|
| 420 | deleting them, even if these changes are performed outside Qt applications. In | 
|---|
| 421 | particular, this is used in standard Qt open file dialogs where you can | 
|---|
| 422 | instantly observe changes made to the directory contents by third-party | 
|---|
| 423 | applications running in the background. | 
|---|
| 424 |  | 
|---|
| 425 | In order to support this functionality on OS/2, Qt relies on the file watching | 
|---|
| 426 | mechanism provided by the Presentation Manager. This mechanism is a global | 
|---|
| 427 | system resource so that only one process may use it at a time. In a standard | 
|---|
| 428 | installation of OS/2 or eComStation this resource is exclusively used by the | 
|---|
| 429 | Workplace Shell and is not available to other applications. In order to overcome | 
|---|
| 430 | this limitation, a respective function was included to xWorkplace, the famous | 
|---|
| 431 | WPS extension (which lives inside the WPS process), starting with version 1.0.8. | 
|---|
| 432 | This function allows any number of other processes to receive notifications | 
|---|
| 433 | about file system changes and it gets utilized by Qt as well. | 
|---|
| 434 |  | 
|---|
| 435 | If an earlier version of xWorkplace is installed on the user system, or if no | 
|---|
| 436 | xWorkplace extension is present at all, Qt uses its own method of detecting | 
|---|
| 437 | file system changes which is based on polling the directory contents in regular | 
|---|
| 438 | intervals. While this method works well for a small number of watched | 
|---|
| 439 | directories with just few files in them, it may significantly slow down the | 
|---|
| 440 | system if you work with a directory containing thousands of files. | 
|---|
| 441 |  | 
|---|
| 442 | Therefore, is strongly recommended to install or upgrade to xWorkplace version | 
|---|
| 443 | 1.0.8 or above to make sure that you will not suffer from the described problem. | 
|---|
| 444 | You will also need to make sure that the "Enable folder auto-refresh" check box | 
|---|
| 445 | located on the "Folder Views" page in the Workplace Shell settings notebook is | 
|---|
| 446 | turned on in order to enable the notification mechanism (note that you may need | 
|---|
| 447 | to reboot after changing its state). | 
|---|
| 448 |  | 
|---|
| 449 |  | 
|---|
| 450 |  | 
|---|
| 451 | ENVIRONMENT VARIABLES | 
|---|
| 452 |  | 
|---|
| 453 | The Qt library recognizes a number of OS/2-specific environment variables that | 
|---|
| 454 | affect its functionality at runtime. The table below lists these variables and | 
|---|
| 455 | their meaning: | 
|---|
| 456 |  | 
|---|
| 457 | QT_PM_NO_DIVE             If set, Qt will not use DIVE (direct interface video | 
|---|
| 458 | extensions) for painting widgets even if DIVE (which | 
|---|
| 459 | provides a much faster painting speed than the | 
|---|
| 460 | regular GPI approach) is available. Currently, this | 
|---|
| 461 | is the default setting if the Panorama video driver | 
|---|
| 462 | is detected because its DIVE implementation contains | 
|---|
| 463 | a number of bugs. | 
|---|
| 464 |  | 
|---|
| 465 | QT_PM_DIVE=<mode>         Enables using DIVE for painting widgets. <mode> is | 
|---|
| 466 | one of: | 
|---|
| 467 |  | 
|---|
| 468 | - FB (direct framebuffer access, which is the | 
|---|
| 469 | fastest mode but causes the curruption of the | 
|---|
| 470 | screen under the software mouse pointer due to | 
|---|
| 471 | the limitation of DIVE). If this mode is not | 
|---|
| 472 | available, BLIT will be used (see below). | 
|---|
| 473 |  | 
|---|
| 474 | - FBSWM (the same FB but hides the mouse pointer | 
|---|
| 475 | before painting which introduces mouse flicker | 
|---|
| 476 | and may be a bit slower than the raw FB). | 
|---|
| 477 |  | 
|---|
| 478 | - BLIT (slower than both FB and FBSWM but prevents | 
|---|
| 479 | screen corruption under the mouse pointer and | 
|---|
| 480 | does not produce the mouse pointer flicker | 
|---|
| 481 | effect). | 
|---|
| 482 |  | 
|---|
| 483 | This variable is ignored if QT_PM_NO_DIVE is set. If | 
|---|
| 484 | neither this nor the QT_PM_NO_DIVE variable is set, | 
|---|
| 485 | the FBSWM mode is used by default (unless the | 
|---|
| 486 | current video driver is Panorama, see above). | 
|---|
| 487 |  | 
|---|
| 488 | QT_PM_NO_SOUND_SHARE      If set, Qt will open the audio device in exclusive | 
|---|
| 489 | only one sound may be played on the computer at a | 
|---|
| 490 | time. This mode is recommended for some sound cards | 
|---|
| 491 | when using the Uniaud audio driver as it is known to | 
|---|
| 492 | have problems with simultaneous playback. In current | 
|---|
| 493 | Qt builds, this is the default behavior if neither | 
|---|
| 494 | this nor the QT_PM_SOUND_SHARE variable is set. | 
|---|
| 495 |  | 
|---|
| 496 | QT_PM_SOUND_SHARE         The opposite to the above. If set, Qt will open the | 
|---|
| 497 | audio device in shared mode. This variable is | 
|---|
| 498 | ignored if QT_PM_NO_SOUND_SHARE is set. | 
|---|
| 499 |  | 
|---|
| 500 | QT_PM_NO_REGISTRY         If set, Qt will not use the Open32 registry to store | 
|---|
| 501 | application settings with QSettings. Instead, plain | 
|---|
| 502 | text INI files will be used for both NativeFormat | 
|---|
| 503 | and IniFormat. Due to a number of problems in the | 
|---|
| 504 | Open32 registry implementation (that may easily lead | 
|---|
| 505 | to registry corruption), this is the default | 
|---|
| 506 | behavior if neither this nor the QT_PM_REGISTRY | 
|---|
| 507 | variable is set. | 
|---|
| 508 |  | 
|---|
| 509 | QT_PM_REGISTRY            The opposite to the above. If set, Qt will use the | 
|---|
| 510 | Open32 registry to store application settings. This | 
|---|
| 511 | variable is ignored if QT_PM_NO_REGISTRY is set. | 
|---|
| 512 |  | 
|---|
| 513 | QT_PM_NO_SYSTEM_LOCALE    If set, Qt will ignore the regional settings from | 
|---|
| 514 | the system locale object found in the Country | 
|---|
| 515 | Palette located in the System Setup folder and will | 
|---|
| 516 | take them from the internal Qt locale database | 
|---|
| 517 | according to the current country and language | 
|---|
| 518 | settings. Due to the fact that this internal Qt | 
|---|
| 519 | database usually has a better representation of the | 
|---|
| 520 | regional settings, this is the default behavior if | 
|---|
| 521 | neither this nor the QT_PM_SYSTEM_LOCALE variable is | 
|---|
| 522 | set. | 
|---|
| 523 |  | 
|---|
| 524 | QT_PM_SYSTEM_LOCALE       The opposite to the above. If set, Qt will use the | 
|---|
| 525 | regional settings as found in the default locale | 
|---|
| 526 | object set the Country Palette.  This variable is | 
|---|
| 527 | ignored if QT_PM_NO_SYSTEM_LOCALE is set. | 
|---|
| 528 |  | 
|---|
| 529 | LANG                      This variable can be used to override the default | 
|---|
| 530 | country and language used in the Qt application both | 
|---|
| 531 | for regional settings and for translations. The | 
|---|
| 532 | format of the value is "ll_CC" where <ll> is the | 
|---|
| 533 | two-letter ISO language code and <CC> is the two- | 
|---|
| 534 | letter ISO country code. Note that if this variable | 
|---|
| 535 | is not set, Qt will derive the language and country | 
|---|
| 536 | from the system country code specified in the | 
|---|
| 537 | COUNTRY statement of CONFIG.SYS. | 
|---|
| 538 |  | 
|---|
| 539 |  | 
|---|
| 540 |  | 
|---|
| 541 | COMMAND LINE OPTIONS | 
|---|
| 542 |  | 
|---|
| 543 | Any Qt executable recognizes a number of command line options that may change | 
|---|
| 544 | the behavior of the Qt application. Here are the most interesting ones: | 
|---|
| 545 |  | 
|---|
| 546 | -style <name>             Changes the default Qt widget style (theme) to a | 
|---|
| 547 | style with the given name. The buiil-in styles which | 
|---|
| 548 | are always available in the official build include: | 
|---|
| 549 | "windows" (currently, the default on OS/2), "motif", | 
|---|
| 550 | "cde", "plastique" and "cleanlooks". Other styles | 
|---|
| 551 | may be also provided by the style plugins. | 
|---|
| 552 |  | 
|---|
| 553 | -graphicssystem <name>    Changes the graphics system used to paint widgets. | 
|---|
| 554 | On OS/2, only two values are supported: "native" | 
|---|
| 555 | (the default one) and "raster". The "native" system | 
|---|
| 556 | uses DIVE (direct interface video extensions) when | 
|---|
| 557 | it is available. If DIVE is not available or if it | 
|---|
| 558 | is disabled (see the QT_PM_NO_DIVE environment | 
|---|
| 559 | variable description for details), the "raster" | 
|---|
| 560 | system will be automatically selected as a fallback. | 
|---|
| 561 |  | 
|---|
| 562 |  | 
|---|
| 563 |  | 
|---|
| 564 | CURRENT LIMITATIONS | 
|---|
| 565 |  | 
|---|
| 566 | 1. configure.cmd is does not build demos and examples by default (to save | 
|---|
| 567 | time). They may be built by hand, as described above. | 
|---|
| 568 |  | 
|---|
| 569 | 2. configure.cmd does not understand all command line options understood by | 
|---|
| 570 | configure scripts on other platforms. If you want to customize your build | 
|---|
| 571 | of the Qt library (which is normally not recommended and not supported), | 
|---|
| 572 | you may try to modify configure.cmd itself. | 
|---|
| 573 |  | 
|---|
| 574 | 3. OS/2 bitmap fonts are not supported. Use TTF or Type1 (PFB) fonts with Qt. | 
|---|
| 575 |  | 
|---|
| 576 | 4. No native PM style, but Qt will use fonts and colors from the current | 
|---|
| 577 | OS/2 theme. Hint: if your default OS/2 font is "WarpSans", install the | 
|---|
| 578 | "Workplace Sans" TTF font from Alex Taylor to get more native look & feel. | 
|---|
| 579 | It is recommended to install version 0.7 of the Normal face and version 0.3 | 
|---|
| 580 | of the Bold face which you can find here: | 
|---|
| 581 |  | 
|---|
| 582 | http://users.socis.ca/~ataylo00/creative/fonts/workplace/ | 
|---|
| 583 |  | 
|---|
| 584 | 5. QProcess: when starting PM applications from text-mode applications, the | 
|---|
| 585 | returned PID is a PID of the intermediate cmd.exe process, not the target | 
|---|
| 586 | application. | 
|---|
| 587 |  | 
|---|
| 588 | 6. The following classes are not available due to their rare usage or low | 
|---|
| 589 | importance on the OS/2 platform: QSharedMemory, QSystemSemaphore, | 
|---|
| 590 | QInputContext. On the source level, a number of macros is defined to | 
|---|
| 591 | reflect this, respectively: QT_NO_SYSTEMSEMAPHORE, QT_NO_SHAREDMEMORY, | 
|---|
| 592 | QT_NO_IM. Normally, Qt applications use these macros in the form of | 
|---|
| 593 | "#fndef QT_NO_SOMEFEATURE" to isolate the relevant parts of the code that | 
|---|
| 594 | uses these classes so that the application still builds when the | 
|---|
| 595 | corresponding feature is missing. | 
|---|
| 596 |  | 
|---|
| 597 | 7. No qt3support module. This functionality is rarely necessary in mature | 
|---|
| 598 | real life Qt applications and has low priority. In the code, it is | 
|---|
| 599 | reflected by the absense of the QT3_SUPPORT macro. | 
|---|
| 600 |  | 
|---|
| 601 | 8. The following features are missing (either because of the lack of the | 
|---|
| 602 | required support from the system side or because of the rare usage): | 
|---|
| 603 |  | 
|---|
| 604 | - IPV6 support in the network module (QT_NO_IPV6 is defined). | 
|---|
| 605 | - phonon module (QT_NO_PHONON is defined). | 
|---|
| 606 | - multimedia module (QT_NO_MULTIMEDIA is defined). | 
|---|
| 607 | - OpenGL module (QT_NO_OPENGL is defined). | 
|---|
| 608 | - declarative module (QT_NO_DECLARATIVE is defined). | 
|---|
| 609 | - tablet support (QT_NO_TABLET is defined). | 
|---|
| 610 |  | 
|---|
| 611 | See the project roadmap for more information on the current progress and | 
|---|
| 612 | future plans: | 
|---|
| 613 |  | 
|---|
| 614 | http://svn.netlabs.org/qt4/roadmap | 
|---|
| 615 |  | 
|---|
| 616 | Feel free to request new features and report bugs using the project bug | 
|---|
| 617 | tracker abaialble at: | 
|---|
| 618 |  | 
|---|
| 619 | http://svn.netlabs.org/qt4/report | 
|---|
| 620 |  | 
|---|
| 621 |  | 
|---|
| 622 |  | 
|---|
| 623 | CREDITS | 
|---|
| 624 |  | 
|---|
| 625 | Dmitry A. Kuminov (development) | 
|---|
| 626 | Silvan Scherrer (management) | 
|---|
| 627 |  | 
|---|
| 628 | netlabs.org (hosting & support) | 
|---|
| 629 |  | 
|---|
| 630 | Nokia Corporation (original Qt library) | 
|---|
| 631 |  | 
|---|
| 632 | We also want to THANK all individuals and organizations who made the donations | 
|---|
| 633 | to this project and helped to make it happen. Please visit | 
|---|
| 634 |  | 
|---|
| 635 | http://qt.netlabs.org/en/site/index.xml | 
|---|
| 636 |  | 
|---|
| 637 | to get the full list of sponsors and to find information on how you can support | 
|---|
| 638 | the project. | 
|---|
| 639 |  | 
|---|
| 640 |  | 
|---|
| 641 | Qt is a trademark of Nokia Corporation and/or its subsidiary(-ies). | 
|---|
| 642 | OS/2 and OS/2 Warp are trademarks of the IBM Corporation and/or its subsidiary(-ies). | 
|---|
| 643 | eComStation is a trademark of Serenity Systems International and/or its subsidiary(-ies). | 
|---|
| 644 | Etc. | 
|---|