| [1085] | 1 | This is Qt version 4.7.3 for OS/2 and eCS. | 
|---|
| [144] | 2 |  | 
|---|
| [397] | 3 | This document contains a brief information on the OS/2 version of the Qt | 
|---|
| [524] | 4 | library. Please read it carefully before starting your work. You may also | 
|---|
|  | 5 | visit the project page at | 
|---|
| [144] | 6 |  | 
|---|
|  | 7 | http://svn.netlabs.org/qt4/wiki | 
|---|
|  | 8 |  | 
|---|
| [188] | 9 | to get more information and the latest news and also to report bugs. | 
|---|
| [144] | 10 |  | 
|---|
| [397] | 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. | 
|---|
| [144] | 13 |  | 
|---|
| [1121] | 14 | IMPORTANT NOTE: | 
|---|
| [188] | 15 |  | 
|---|
| [1121] | 16 | Please consider reading section called "USING OFFICIAL BINARY QT ARCHIVES" | 
|---|
|  | 17 | below before getting into details of the manual compilation of the | 
|---|
|  | 18 | Qt toolkit -- to learn the easiest way of getting it work. | 
|---|
| [397] | 19 |  | 
|---|
| [1121] | 20 |  | 
|---|
|  | 21 |  | 
|---|
| [144] | 22 | REQUIREMENTS | 
|---|
|  | 23 |  | 
|---|
| [397] | 24 | In order to compile the Qt library and Qt-based applications, you will need | 
|---|
|  | 25 | the following tools: | 
|---|
| [144] | 26 |  | 
|---|
|  | 27 | - One of the OS/2 Warp 4, OS/2 Warp 4.5 or eComStation operating systems. | 
|---|
|  | 28 |  | 
|---|
| [1121] | 29 | - GCC compiler version 4.4.5 for OS/2 or above, patched OpenWatcom linker and | 
|---|
| [740] | 30 | GNU Make 3.81beta1 or above. The GCC compiler must be set up to use the | 
|---|
|  | 31 | OpenWatcom linker for linking. | 
|---|
| [144] | 32 |  | 
|---|
| [740] | 33 | If you do not have a working GCC environment with the above requirements, it | 
|---|
| [1121] | 34 | is recommended to download a ready-to-use GCC 4.4.5 distribution from here: | 
|---|
| [524] | 35 |  | 
|---|
| [1121] | 36 | ftp://ftp.netlabs.org/pub/qt4/gcc-4_4_5-complete-20110303.zip | 
|---|
| [524] | 37 |  | 
|---|
| [740] | 38 | This distribution includes all tools necessary to compile and build the Qt | 
|---|
|  | 39 | library from the source code. Just follow the installation instructions | 
|---|
|  | 40 | contained in the README file inside this ZIP archive to set up the GCC | 
|---|
|  | 41 | environment. | 
|---|
| [524] | 42 |  | 
|---|
| [740] | 43 | Please note that starting from Qt 4.6.2, support for GCC 3.3.5 and earlier | 
|---|
|  | 44 | versions of the compiler has been dropped and the Qt library will most | 
|---|
|  | 45 | likely not build if you use one of these compilers. Later versions prior to | 
|---|
|  | 46 | GCC 4.4.2 may work but they are not tested and not supported. | 
|---|
| [950] | 47 |  | 
|---|
| [894] | 48 | - IBM RC (Resource Compiler) Version 5.00.007 (comes with OS/2 Toolkit 4.5) | 
|---|
|  | 49 | or Version 4.00.011 (comes with eCS 2.0). Other versions may not work | 
|---|
|  | 50 | correctly. | 
|---|
| [524] | 51 |  | 
|---|
| [740] | 52 | There is also a set of optional tools which are necessary to enable the selected | 
|---|
|  | 53 | features of the Qt library. If these tools are missing, the Qt configuration | 
|---|
|  | 54 | script (discussed in section "COMPILING QT" below) will automatically disable | 
|---|
|  | 55 | the corresponding feature: | 
|---|
| [144] | 56 |  | 
|---|
| [983] | 57 | - Perl 5.8.2 or above. This is required if you want to perform a shadow build | 
|---|
|  | 58 | of the Qt library (which is a recommended way to go). Please refer to | 
|---|
|  | 59 | section "COMPILING QT" for more information about shadow builds. Recent | 
|---|
|  | 60 | builds of Perl for OS/2 are available here: | 
|---|
|  | 61 |  | 
|---|
|  | 62 | http://os2ports.smedley.info/index.php?page=perl | 
|---|
|  | 63 |  | 
|---|
| [954] | 64 | - MAPSYM 4.00.000 (Oct 4 2001) to enable generation of symbol (.SYM) files for | 
|---|
|  | 65 | DLLs and executables. This tool comes with OS/2 Toolkit 4.5. Note that other | 
|---|
|  | 66 | versions of this tool may not work correctly. | 
|---|
| [144] | 67 |  | 
|---|
| [954] | 68 | - LxLite 1.3.3 or above (not tested) to enable the compression of DLLs and | 
|---|
|  | 69 | executables (which saves hard disk space and application startup time). If | 
|---|
|  | 70 | you use a recent version of eComStation (e.g. 2.0 rc6) you will already have | 
|---|
|  | 71 | LxLite installed. Otherwise, you may take it from here: | 
|---|
|  | 72 |  | 
|---|
| [740] | 73 | http://www.os2site.com/sw/util/archiver/lxlt133.zip | 
|---|
| [144] | 74 |  | 
|---|
| [1058] | 75 | - CUPS 1.4.8 or later to support printing in Qt. The CUPS libraries are | 
|---|
| [789] | 76 | available at: | 
|---|
| [576] | 77 |  | 
|---|
| [1058] | 78 | http://sourceforge.net/projects/ecsports/files/CUPS/cups-1.4.8-os2-20110831.zip/download | 
|---|
|  | 79 | http://svn.netlabs.org/ecups/wiki/CupsPort | 
|---|
| [576] | 80 |  | 
|---|
| [788] | 81 | - OpenSSL 0.9.8o or later to support OpenSSL in Qt. The OpenSSL libraries are | 
|---|
|  | 82 | available at: | 
|---|
| [314] | 83 |  | 
|---|
| [789] | 84 | http://bauxite.sakura.ne.jp/tmp/os2/openssl-1.0.0a-os2knix-20100706-runtime.zip | 
|---|
| [788] | 85 | http://bauxite.sakura.ne.jp/tmp/os2/openssl-1.0.0a-os2knix-20100706-dev.zip | 
|---|
|  | 86 |  | 
|---|
| [792] | 87 | - MySQL 5.1 or later for the MySQL Qt plugin. The MySQL libraries are | 
|---|
|  | 88 | available at: | 
|---|
| [788] | 89 |  | 
|---|
| [792] | 90 | http://download.smedley.info/mysql-5.1.51-os2-20101001.zip | 
|---|
| [788] | 91 |  | 
|---|
| [1058] | 92 | Linking against this MySQL build also requires pthread.lib: | 
|---|
| [788] | 93 |  | 
|---|
| [1058] | 94 | http://web.os2power.com/download/lib/pthread-20100217-os2.zip | 
|---|
|  | 95 |  | 
|---|
|  | 96 | Note that you will also need the above OpenSSL libraries to be able to use | 
|---|
|  | 97 | this MySQL build. The MySQL Qt plugin itself will require OpenSSL DLLs in | 
|---|
|  | 98 | your LIBPATH at runtime. | 
|---|
|  | 99 |  | 
|---|
| [803] | 100 | - PostgersSQL 9.0.1 or later to support the PostgresSQL Qt plugin. The | 
|---|
|  | 101 | PostgresSQL libraries are available at: | 
|---|
| [792] | 102 |  | 
|---|
| [817] | 103 | http://download.smedley.info/postgresql-9.0.1-os2-20101108.zip | 
|---|
| [792] | 104 |  | 
|---|
| [817] | 105 | Note that you will also need libc064x.dll for this PostgresSQL build: | 
|---|
| [803] | 106 |  | 
|---|
|  | 107 | http://download.smedley.info/libc064x.zip | 
|---|
|  | 108 |  | 
|---|
| [824] | 109 | Note that you will also need the above OpenSSL libraries and pthread.lib to | 
|---|
|  | 110 | be able to use this PostgresSQL build. The PostgresSQL Qt plugin itself will | 
|---|
|  | 111 | require OpenSSL DLLs in your LIBPATH at runtime. | 
|---|
| [803] | 112 |  | 
|---|
|  | 113 |  | 
|---|
| [824] | 114 |  | 
|---|
| [740] | 115 | SETTING UP THE ENVIRONMENT | 
|---|
| [397] | 116 |  | 
|---|
| [740] | 117 | First of all, make sure that your GCC environment is set up and meets the | 
|---|
|  | 118 | specified requirements. To perform a quick check, you may run the following | 
|---|
|  | 119 | command: | 
|---|
| [397] | 120 |  | 
|---|
| [740] | 121 | gcc --version && make --version && wl /version | 
|---|
| [397] | 122 |  | 
|---|
| [740] | 123 | If the setup is done properly, it will print the versions of the key tools | 
|---|
|  | 124 | to the console. | 
|---|
| [144] | 125 |  | 
|---|
| [740] | 126 | The next step is to set up the Qt environment. If you installed the Qt | 
|---|
|  | 127 | development libraries from the WPI archive (refer to section "USING OFFICIAL | 
|---|
|  | 128 | BINARY QT ARCHIVES" below for more details about existing WPI archives), you | 
|---|
|  | 129 | will only need to run the supplied "QtEnv.cmd" script which will do all the | 
|---|
|  | 130 | setup job for you. The script is located in the directory where you installed | 
|---|
|  | 131 | the developmnent libraries (or in the WPS folder created by the WPI installer). | 
|---|
| [760] | 132 | Execute this script in a command line session to make it ready for building | 
|---|
|  | 133 | Qt 4 applications (for example, using the "qmake" command follwed by "make" | 
|---|
|  | 134 | for applications based on qmake project files which most of them are). If you | 
|---|
|  | 135 | go that way, you may skip the rest of this section and proceed directly to | 
|---|
| [788] | 136 | section "USING OFFICIAL BINARY QT ARCHIVES" below. | 
|---|
| [524] | 137 |  | 
|---|
| [740] | 138 | If you use the full source code ZIP distribution of the Qt library or work | 
|---|
|  | 139 | directly with the Qt SVN tree, you will need to set up the environment yourself | 
|---|
|  | 140 | by performing the following steps: | 
|---|
| [259] | 141 |  | 
|---|
| [740] | 142 | - Add the "bin" subdirectory of the directory where you unpacked the Qt4 | 
|---|
|  | 143 | source tree to PATH and BEGINLIBPATH, like this: | 
|---|
| [144] | 144 |  | 
|---|
| [740] | 145 | set PATH=D:\Coding\Qt4\bin;%PATH% | 
|---|
|  | 146 | set BEGINLIBPATH=D:\Coding\Qt4\bin;%BEGINLIBPATH% | 
|---|
|  | 147 |  | 
|---|
|  | 148 | - Add the system DLLs to the GCC library path with the following command: | 
|---|
|  | 149 |  | 
|---|
|  | 150 | set LIBRARY_PATH=C:\OS2\DLL;C:\MPTN\DLL;%LIBRARY_PATH% | 
|---|
|  | 151 |  | 
|---|
|  | 152 | where C: is your boot drive. | 
|---|
|  | 153 |  | 
|---|
| [152] | 154 | - Make sure CMD.EXE is your command line processor (the generated makefiles | 
|---|
| [258] | 155 | will rely on its 'copy', 'if' and other commands). If you have a Unix shell | 
|---|
|  | 156 | (SH.EXE) in your environment, you may need to force GNU make to use CMD.EXE | 
|---|
| [740] | 157 | by executing the followingn command: | 
|---|
| [152] | 158 |  | 
|---|
| [740] | 159 | set MAKESHELL=C:\OS2\CMD.EXE | 
|---|
| [144] | 160 |  | 
|---|
| [740] | 161 | where C: is your boot drive. | 
|---|
| [258] | 162 |  | 
|---|
| [740] | 163 | Note that the QTDIR environment variable used in previous Qt versions is not | 
|---|
|  | 164 | used in Qt4 anymore. Therefore, there is no need to set this variable | 
|---|
|  | 165 | explicitly. | 
|---|
| [524] | 166 |  | 
|---|
| [740] | 167 | There is also no need to set the QMAKESPEC variable explicitly. If it is absent, | 
|---|
|  | 168 | qmake will use the specification stored in the <Qt4_Home>/mkspecs/default | 
|---|
|  | 169 | directory, which on OS/2 always refers to the "os2-g++" specification, the only | 
|---|
|  | 170 | one supported at the present time. | 
|---|
| [524] | 171 |  | 
|---|
| [740] | 172 | NOTE: | 
|---|
|  | 173 |  | 
|---|
|  | 174 | It is especially important to make sure that there are no traces of any | 
|---|
|  | 175 | other Watcom or OpenWatcom installation in the environment where you build | 
|---|
|  | 176 | Qt as it will interfere with the patched OpenWatcom linker we use. This | 
|---|
|  | 177 | basically means removing all environment variables containing "WATCOM" in | 
|---|
|  | 178 | their names and also removing references to all those Watcom installations | 
|---|
|  | 179 | from PATH. | 
|---|
|  | 180 |  | 
|---|
|  | 181 |  | 
|---|
|  | 182 |  | 
|---|
|  | 183 | SETTING UP OPTIONAL TOOLS | 
|---|
|  | 184 |  | 
|---|
|  | 185 | The following list describes the steps necessary to set up the optional tools | 
|---|
|  | 186 | that the Qt library depends on: | 
|---|
|  | 187 |  | 
|---|
| [789] | 188 | - Unzip the CUPS libraries to some directory and set the following environment | 
|---|
|  | 189 | variables to tell the Qt configure script its location: | 
|---|
| [576] | 190 |  | 
|---|
| [792] | 191 | set CUPS_INCLUDEPATH=<path_to_CUPS>\include | 
|---|
| [1058] | 192 | set CUPS_LIBS= | 
|---|
| [576] | 193 |  | 
|---|
| [1058] | 194 | Note that you will also need to add the location of cups.dll to BEGINLIBPATH | 
|---|
|  | 195 | (if it is not already in your LIBPATH) so that Qt applications can find it | 
|---|
|  | 196 | at runtime: | 
|---|
|  | 197 |  | 
|---|
|  | 198 | set BEGINLIBPATH=<path_to_CUPS>\sbin;%BEGINLIBPATH% | 
|---|
|  | 199 |  | 
|---|
| [788] | 200 | - Unzip the OpenSSL libraries to some directory and set the following | 
|---|
|  | 201 | environment variables to tell the Qt configure script its location: | 
|---|
| [144] | 202 |  | 
|---|
| [792] | 203 | set OPENSSL_INCLUDEPATH=<path_to_OpenSSL>\include | 
|---|
| [788] | 204 | set OPENSSL_LIBS= | 
|---|
| [144] | 205 |  | 
|---|
| [1058] | 206 | Note that you will also need to add the location of OpenSSL DLLs to | 
|---|
|  | 207 | BEGINLIBPATH (if they are not already in your LIBPATH) so that Qt | 
|---|
|  | 208 | applications can find them at runtime: | 
|---|
| [788] | 209 |  | 
|---|
| [792] | 210 | set BEGINLIBPATH=<path_to_OpenSSL>\dll;%BEGINLIBPATH% | 
|---|
| [788] | 211 |  | 
|---|
| [792] | 212 | - Unzip the MySQL archive to some directory and set the following environment | 
|---|
|  | 213 | variables to tell the Qt configure script the library location: | 
|---|
| [788] | 214 |  | 
|---|
| [792] | 215 | set MYSQL_INCLUDEPATH=<path_to_MySQL>\include' | 
|---|
|  | 216 | set MYSQL_LIBS=-L<path_to_MySQL>\lib -lmysqlclient_r -L<path_to_OpenSSL>\lib -llibssl -llibcrypto -L<path_to_pthread> -lpthread | 
|---|
| [788] | 217 |  | 
|---|
| [824] | 218 | Note that you will also need to place OpenSSL DLLs to BEGINLIBPATH (as | 
|---|
|  | 219 | described above) because the MySQL plugin links statically to them and Qt | 
|---|
|  | 220 | will not be able to load it otherwise. | 
|---|
|  | 221 |  | 
|---|
| [803] | 222 | - Unzip the PostgresSQL archive to some directory and set the following | 
|---|
|  | 223 | environment variables to tell the Qt configure script the library location: | 
|---|
| [792] | 224 |  | 
|---|
| [803] | 225 | set PSQL_INCLUDEPATH=<path_to_PostgresSQL>\include' | 
|---|
|  | 226 | set PSQL_LIBS=-L<path_to_PostgresSQL>\lib -llibpq -L<path_to_OpenSSL>\lib -llibssl -llibcrypto -L<path_to_pthread> -lpthread | 
|---|
|  | 227 |  | 
|---|
| [824] | 228 | Note that you will also need to place OpenSSL DLLs to BEGINLIBPATH (as | 
|---|
|  | 229 | described above) because the PostgresSQL plugin links statically to them and | 
|---|
|  | 230 | Qt will not be able to load it otherwise. | 
|---|
| [803] | 231 |  | 
|---|
| [824] | 232 | Note that you need to make sure that OpenSSL DLLs are in BEGINLIBPATH or in | 
|---|
|  | 233 | LIBPATH before Qt attempts to load the SQL plugins for the first time. If it | 
|---|
|  | 234 | fails to load them, it will cache a failure and will not retry even if the | 
|---|
|  | 235 | plugins can be loaded later. To fix that, you need to delete the file | 
|---|
|  | 236 | %HOME%\.config\Trolltech.ini where this cache is stored. | 
|---|
| [803] | 237 |  | 
|---|
| [824] | 238 |  | 
|---|
|  | 239 |  | 
|---|
| [397] | 240 | COMPILING QT | 
|---|
|  | 241 |  | 
|---|
| [983] | 242 | When the environment is set up as described above, you may build the Qt library. | 
|---|
|  | 243 | There are two distinct ways of doing this: in the source tree or in a separate | 
|---|
|  | 244 | directory of your choice. In the first case, all results of the build process | 
|---|
|  | 245 | (intermediate object files as well as final executables and DLLs) will be placed | 
|---|
|  | 246 | right in the source tree. In the second case, they will be placed in the | 
|---|
|  | 247 | separate directory -- this is called a shadow build. | 
|---|
| [144] | 248 |  | 
|---|
| [983] | 249 | Shadow builds are the recommended way to go because they keep the source | 
|---|
|  | 250 | directories clean and also allow to use the same source tree for creating any | 
|---|
|  | 251 | number of builds, each with its own build options. | 
|---|
| [144] | 252 |  | 
|---|
| [983] | 253 | To perform a shadow build, do the following steps: | 
|---|
| [144] | 254 |  | 
|---|
| [983] | 255 | 1. Create a directory outside the Qt4 source tree. | 
|---|
| [144] | 256 |  | 
|---|
| [983] | 257 | 2. Go to that directory. | 
|---|
| [144] | 258 |  | 
|---|
| [983] | 259 | 3. Type: | 
|---|
| [144] | 260 |  | 
|---|
| [983] | 261 | <source_tree>\configure.cmd | 
|---|
| [243] | 262 |  | 
|---|
| [983] | 263 | where <source_tree> is the directory containing the Qt4 source tree. This | 
|---|
|  | 264 | will create all necessary configuration files, headers, Makefiles and will | 
|---|
|  | 265 | also build the qmake tool which is necessary to control the rest of the | 
|---|
|  | 266 | build process (note that building qmake will take some time). | 
|---|
|  | 267 |  | 
|---|
|  | 268 | 4. Once the configure process is finished, type: | 
|---|
|  | 269 |  | 
|---|
|  | 270 | make | 
|---|
|  | 271 |  | 
|---|
|  | 272 | Note that by the default the shadow build will produce the release version of | 
|---|
|  | 273 | the Qt library. This may be changed by passing command line options to | 
|---|
| [990] | 274 | configure.cmd at step 3. For example, the debug build can be requested using | 
|---|
|  | 275 | the '-debug' option. For a full list of options supported by configure.cmd, | 
|---|
|  | 276 | type: | 
|---|
| [983] | 277 |  | 
|---|
| [990] | 278 | configure.cmd -h | 
|---|
|  | 279 |  | 
|---|
| [983] | 280 | To perform a normal build, you execute 'configure.cmd' followed by 'make' right | 
|---|
|  | 281 | in the directory containing the Qt4 source tree. The default in this case is to | 
|---|
|  | 282 | build both the debug and release versions of the Qt library. | 
|---|
|  | 283 |  | 
|---|
|  | 284 | Please keep in mind that in case of the dual debug and release build (where both | 
|---|
|  | 285 | flavors are stored in the same build directory), only DLL and LIB files will be | 
|---|
|  | 286 | separated (because the debug versions of them will have the 'd' suffix in the | 
|---|
|  | 287 | file name). Executable files are normally taken from the release build but, | 
|---|
|  | 288 | since the file names are identical, sometimes they may be overwritten by the | 
|---|
|  | 289 | debug versions (e.g. when you rebuild parts of the library later). For this | 
|---|
|  | 290 | reason, performing dual builds is not recommended. | 
|---|
|  | 291 |  | 
|---|
|  | 292 | The Qt library is huge so the build process will take several hours (or even | 
|---|
|  | 293 | several dozen of hours) depending on your hardware and configure options. | 
|---|
|  | 294 |  | 
|---|
| [740] | 295 | Once the library is successfully built, you may try to compile the demos and | 
|---|
|  | 296 | examples by visiting the individual example subdirectories in the source tree | 
|---|
| [983] | 297 | and typing 'qmake' followed by 'make'. | 
|---|
| [144] | 298 |  | 
|---|
| [402] | 299 | NOTE: | 
|---|
| [144] | 300 |  | 
|---|
| [402] | 301 | This version of Qt for OS/2 includes the Extended system tray plugin for | 
|---|
| [314] | 302 | XCenter/eCenter which is necessary to enable Qt support for the special | 
|---|
|  | 303 | notification area on the XCenter/eCenter panel (called the "system tray") | 
|---|
|  | 304 | which is used by many long-running applications to display their status. | 
|---|
|  | 305 | In order to activate this support, you need to install this plugin to your | 
|---|
| [1040] | 306 | XCenter or eCenter. The plugin is split in two DLLs, the plugin DLL and | 
|---|
|  | 307 | the API DLL. Both are built as part of the normal build process and can be | 
|---|
|  | 308 | found in the "src\3rdparty\os2\xsystray\tmp\dist" subdirectory of the Qt | 
|---|
|  | 309 | build tree. In order to install them, do the following: | 
|---|
| [188] | 310 |  | 
|---|
| [1040] | 311 | a. Copy "plugin\xsystray.dll" to "<XWorkplace_install>\plugins\xcenter\" | 
|---|
|  | 312 | (on eComStation, this will be "C:\ecs\system\ewps\plugins\xcenter\" | 
|---|
|  | 313 | where C: is your boot drive). | 
|---|
| [188] | 314 |  | 
|---|
| [1040] | 315 | b. Copy "apilib\xsystray.dll" to a directory listed in LIBPATH. | 
|---|
|  | 316 |  | 
|---|
| [314] | 317 | b. Restart WPS. | 
|---|
|  | 318 |  | 
|---|
|  | 319 | c. Add the "Extended system tray" widget to the XCenter/eCenter panel using | 
|---|
|  | 320 | the XCenter context menu ('Create new widget'). | 
|---|
|  | 321 |  | 
|---|
|  | 322 | Note that if you upgrade from the previous version of the plugin then | 
|---|
|  | 323 | please unlock xsystray.dll in the target folder using the UNLOCK.EXE | 
|---|
|  | 324 | utility (which you can find in the LxLite package, for example) before | 
|---|
|  | 325 | performing step a., otherwise the copy operation will fail. | 
|---|
|  | 326 |  | 
|---|
| [397] | 327 | IMPORTANT NOTE: | 
|---|
| [314] | 328 |  | 
|---|
| [397] | 329 | Please take into account that the Qt library you build on your own as | 
|---|
|  | 330 | described above is NOT intended for wide distribution with Qt applications | 
|---|
|  | 331 | you port or create. Such private Qt builds help you develop Qt applications | 
|---|
|  | 332 | (because you can easily debug your program and parts of the Qt framework at | 
|---|
|  | 333 | the source level) but being widely distributed they will create a so-called | 
|---|
|  | 334 | DLL hell when a program running on a user computer crashes because it picks | 
|---|
|  | 335 | up a wrong build of the Qt library. This will happen because even a single | 
|---|
|  | 336 | change to Qt configuration options may make your build binary incompatible | 
|---|
|  | 337 | with another build. And even if you convince the user to isolate different | 
|---|
| [740] | 338 | DLLs (using LIBPATHSTRICT and BEGINLIBPATH) it will create another major | 
|---|
|  | 339 | problem: two different Qt applications will load two different copies of Qt | 
|---|
|  | 340 | into memory which will create an unnecessary overhead by doubling the | 
|---|
|  | 341 | amount of used system resources. | 
|---|
| [314] | 342 |  | 
|---|
| [397] | 343 | In order to nicely solve this problem, netlabs.org provides the official | 
|---|
| [1085] | 344 | binary builds of the Qt library distributed as RPM packages which are | 
|---|
| [397] | 345 | described in the next section. | 
|---|
|  | 346 |  | 
|---|
|  | 347 |  | 
|---|
|  | 348 |  | 
|---|
| [740] | 349 | USING OFFICIAL BINARY QT ARCHIVES | 
|---|
| [397] | 350 |  | 
|---|
| [1085] | 351 | For your convenience, netlabs.org provides all components of the Qt toolkit in | 
|---|
|  | 352 | the form of RPM packages. You may install latest versions of these packages | 
|---|
|  | 353 | from the netlabs.org RPM repositories using the YUM tool. For example, this | 
|---|
|  | 354 | command: | 
|---|
| [397] | 355 |  | 
|---|
| [1085] | 356 | yum install qt4-devel-kit | 
|---|
| [397] | 357 |  | 
|---|
| [1085] | 358 | will install the complete Qt development environment, including headers, | 
|---|
|  | 359 | libraries, tools, examples and the Qt API documentaiton. | 
|---|
| [397] | 360 |  | 
|---|
| [1085] | 361 | This environment is also a proper way to build Qt applications you want to | 
|---|
|  | 362 | distribute because it guarantees that a proper version of the Qt runtime will | 
|---|
|  | 363 | be used by your applications when they are installed on the end user's machine. | 
|---|
| [397] | 364 |  | 
|---|
| [1085] | 365 | Buiding applications using this development environment is similar to using | 
|---|
|  | 366 | your own build of Qt but it is simpler in many ways because you don't need to | 
|---|
|  | 367 | set up paths to Qt tools and libraries and so on -- the RPM installation | 
|---|
|  | 368 | procedure will do this for you. | 
|---|
| [397] | 369 |  | 
|---|
| [1085] | 370 | If you don't have YUM or RPM installed, please visit the following page to | 
|---|
|  | 371 | learn how to do that: | 
|---|
| [524] | 372 |  | 
|---|
| [1085] | 373 | http://svn.netlabs.org/rpm | 
|---|
| [397] | 374 |  | 
|---|
|  | 375 |  | 
|---|
| [408] | 376 |  | 
|---|
| [397] | 377 |  | 
|---|
| [541] | 378 | QMAKE CONFIG OPTIONS | 
|---|
|  | 379 |  | 
|---|
| [740] | 380 | The following CONFIG options of the qmake tool have a special meaning in OS/2: | 
|---|
| [541] | 381 |  | 
|---|
|  | 382 | windows           Turns on generation of PM (WINDOWAPI) executables. By | 
|---|
|  | 383 | default, this option is set for release builds that link | 
|---|
|  | 384 | to the Qt GUI library. | 
|---|
|  | 385 |  | 
|---|
|  | 386 | console           Turns on generation of text mode (WINDOWCOMPAT) executables. | 
|---|
|  | 387 | By default, this option is set when setting the "windows" | 
|---|
|  | 388 | option is not appropriate (see above). | 
|---|
|  | 389 |  | 
|---|
|  | 390 | In addition, qmake recognizes the following OS/2-specific CONFIG options: | 
|---|
|  | 391 |  | 
|---|
|  | 392 | map               Turns on generation of the .map files for executables and | 
|---|
| [957] | 393 | DLLs. Note that this option is not set by default. | 
|---|
| [541] | 394 |  | 
|---|
| [954] | 395 | sym               Turns on generation of the .sym files for executables and | 
|---|
|  | 396 | DLLs. The option is turned on by default if configure.cmd | 
|---|
|  | 397 | is able to find the MAPSYM tool in PATH. | 
|---|
|  | 398 |  | 
|---|
| [541] | 399 | exepack           Turns on compression for executables and DLLs. The option is | 
|---|
|  | 400 | turned on by default for release builds if configure.cmd | 
|---|
| [954] | 401 | is able to find a compression tool (LxLite) in PATH. | 
|---|
| [541] | 402 |  | 
|---|
|  | 403 | highmem           Turns on high memory usage for dynamically allocated memory | 
|---|
|  | 404 | in DLLs and executables. When this option is set, a special | 
|---|
|  | 405 | compiler flag (-Zhigh-mem for GCC) is used to enable high | 
|---|
|  | 406 | memory support in the C library (LIBC). This option is set | 
|---|
|  | 407 | by default so that all Qt DLLs and Qt applications built | 
|---|
|  | 408 | with qmake are enabled for high memory. Note that high | 
|---|
|  | 409 | memory support must be enabled for all LIBC-based DLLs | 
|---|
|  | 410 | linked to the executable as well as for the executable | 
|---|
|  | 411 | itself: high memory usage will be disabled if one of them | 
|---|
|  | 412 | votes against it. | 
|---|
|  | 413 |  | 
|---|
| [740] | 414 | export_all        Cause the linker to export all public symbols in a generated | 
|---|
|  | 415 | DLL. By default (when this option is absent), only the | 
|---|
|  | 416 | symbols marked with the __declspec(dllexport) compiler | 
|---|
|  | 417 | directive in the source files. | 
|---|
| [541] | 418 |  | 
|---|
|  | 419 |  | 
|---|
| [740] | 420 |  | 
|---|
|  | 421 | PRINTING SUPPORT | 
|---|
|  | 422 |  | 
|---|
|  | 423 | Starting with version 4.6.2, Qt for OS/2 supports printing through the CUPS | 
|---|
|  | 424 | framework (provided that this support is enabled when building Qt, see the | 
|---|
|  | 425 | respective sections in the beginning of this document). The OS/2 implementation | 
|---|
|  | 426 | of the CUPS framework is provided by the eCUPS package available at | 
|---|
|  | 427 | http://svn.netlabs.org/ecups/. | 
|---|
|  | 428 |  | 
|---|
|  | 429 | The Qt Runtime detects the presence of eCUPS in the system on the fly and talks | 
|---|
|  | 430 | to the CUPS daemon directly, bypassing the standard OS/2 printing subsystem. | 
|---|
|  | 431 | This means that in order to print from Qt applications, you don't need to create | 
|---|
|  | 432 | and configure printer objects using the standard OS/2 system printer setup | 
|---|
|  | 433 | procedure -- you only need to install eCUPS and configure your printers in | 
|---|
|  | 434 | there. Please refer to the eCUPS user manual to obtain the detailed instructions | 
|---|
|  | 435 | on how to configure CUPS printers. | 
|---|
|  | 436 |  | 
|---|
|  | 437 |  | 
|---|
|  | 438 |  | 
|---|
| [870] | 439 | FILE WATCHING FUNCTION | 
|---|
|  | 440 |  | 
|---|
|  | 441 | Qt supports a mechanism of notifying Qt applications about changes to the file | 
|---|
|  | 442 | system, such as creating files or directories, changing their attributes or | 
|---|
|  | 443 | deleting them, even if these changes are performed outside Qt applications. In | 
|---|
|  | 444 | particular, this is used in standard Qt open file dialogs where you can | 
|---|
|  | 445 | instantly observe changes made to the directory contents by third-party | 
|---|
|  | 446 | applications running in the background. | 
|---|
|  | 447 |  | 
|---|
|  | 448 | In order to support this functionality on OS/2, Qt relies on the file watching | 
|---|
|  | 449 | mechanism provided by the Presentation Manager. This mechanism is a global | 
|---|
|  | 450 | system resource so that only one process may use it at a time. In a standard | 
|---|
|  | 451 | installation of OS/2 or eComStation this resource is exclusively used by the | 
|---|
|  | 452 | Workplace Shell and is not available to other applications. In order to overcome | 
|---|
|  | 453 | this limitation, a respective function was included to xWorkplace, the famous | 
|---|
|  | 454 | WPS extension (which lives inside the WPS process), starting with version 1.0.8. | 
|---|
|  | 455 | This function allows any number of other processes to receive notifications | 
|---|
|  | 456 | about file system changes and it gets utilized by Qt as well. | 
|---|
|  | 457 |  | 
|---|
|  | 458 | If an earlier version of xWorkplace is installed on the user system, or if no | 
|---|
|  | 459 | xWorkplace extension is present at all, Qt uses its own method of detecting | 
|---|
|  | 460 | file system changes which is based on polling the directory contents in regular | 
|---|
|  | 461 | intervals. While this method works well for a small number of watched | 
|---|
|  | 462 | directories with just few files in them, it may significantly slow down the | 
|---|
|  | 463 | system if you work with a directory containing thousands of files. | 
|---|
|  | 464 |  | 
|---|
|  | 465 | Therefore, is strongly recommended to install or upgrade to xWorkplace version | 
|---|
|  | 466 | 1.0.8 or above to make sure that you will not suffer from the described problem. | 
|---|
|  | 467 | You will also need to make sure that the "Enable folder auto-refresh" check box | 
|---|
|  | 468 | located on the "Folder Views" page in the Workplace Shell settings notebook is | 
|---|
|  | 469 | turned on in order to enable the notification mechanism (note that you may need | 
|---|
|  | 470 | to reboot after changing its state). | 
|---|
|  | 471 |  | 
|---|
|  | 472 |  | 
|---|
|  | 473 |  | 
|---|
| [429] | 474 | ENVIRONMENT VARIABLES | 
|---|
|  | 475 |  | 
|---|
|  | 476 | The Qt library recognizes a number of OS/2-specific environment variables that | 
|---|
|  | 477 | affect its functionality at runtime. The table below lists these variables and | 
|---|
|  | 478 | their meaning: | 
|---|
|  | 479 |  | 
|---|
| [740] | 480 | QT_PM_NO_DIVE             If set, Qt will not use DIVE (direct interface video | 
|---|
|  | 481 | extensions) for painting widgets even if DIVE (which | 
|---|
|  | 482 | provides a much faster painting speed than the | 
|---|
|  | 483 | regular GPI approach) is available. Currently, this | 
|---|
|  | 484 | is the default setting if the Panorama video driver | 
|---|
|  | 485 | is detected because its DIVE implementation contains | 
|---|
|  | 486 | a number of bugs. | 
|---|
|  | 487 |  | 
|---|
|  | 488 | QT_PM_DIVE=<mode>         Enables using DIVE for painting widgets. <mode> is | 
|---|
|  | 489 | one of: | 
|---|
|  | 490 |  | 
|---|
|  | 491 | - FB (direct framebuffer access, which is the | 
|---|
|  | 492 | fastest mode but causes the curruption of the | 
|---|
|  | 493 | screen under the software mouse pointer due to | 
|---|
|  | 494 | the limitation of DIVE). If this mode is not | 
|---|
|  | 495 | available, BLIT will be used (see below). | 
|---|
|  | 496 |  | 
|---|
|  | 497 | - FBSWM (the same FB but hides the mouse pointer | 
|---|
|  | 498 | before painting which introduces mouse flicker | 
|---|
|  | 499 | and may be a bit slower than the raw FB). | 
|---|
|  | 500 |  | 
|---|
|  | 501 | - BLIT (slower than both FB and FBSWM but prevents | 
|---|
|  | 502 | screen corruption under the mouse pointer and | 
|---|
| [807] | 503 | does not produce the mouse pointer flicker | 
|---|
| [740] | 504 | effect). | 
|---|
|  | 505 |  | 
|---|
|  | 506 | This variable is ignored if QT_PM_NO_DIVE is set. If | 
|---|
|  | 507 | neither this nor the QT_PM_NO_DIVE variable is set, | 
|---|
|  | 508 | the FBSWM mode is used by default (unless the | 
|---|
|  | 509 | current video driver is Panorama, see above). | 
|---|
|  | 510 |  | 
|---|
| [429] | 511 | QT_PM_NO_SOUND_SHARE      If set, Qt will open the audio device in exclusive | 
|---|
|  | 512 | only one sound may be played on the computer at a | 
|---|
| [950] | 513 | time. This mode is necessary for some sound cards | 
|---|
| [429] | 514 | when using the Uniaud audio driver as it is known to | 
|---|
| [950] | 515 | have problems with simultaneous playback. | 
|---|
|  | 516 | Qt builds, | 
|---|
| [429] | 517 |  | 
|---|
|  | 518 | QT_PM_SOUND_SHARE         The opposite to the above. If set, Qt will open the | 
|---|
| [950] | 519 | audio device in shared mode. This is the default | 
|---|
|  | 520 | behavior if neither this nor the | 
|---|
|  | 521 | QT_PM_NO_SOUND_SHARE variable is set. This variable | 
|---|
|  | 522 | is ignored if QT_PM_NO_SOUND_SHARE is set. | 
|---|
| [429] | 523 |  | 
|---|
|  | 524 | QT_PM_NO_REGISTRY         If set, Qt will not use the Open32 registry to store | 
|---|
|  | 525 | application settings with QSettings. Instead, plain | 
|---|
|  | 526 | text INI files will be used for both NativeFormat | 
|---|
|  | 527 | and IniFormat. Due to a number of problems in the | 
|---|
|  | 528 | Open32 registry implementation (that may easily lead | 
|---|
|  | 529 | to registry corruption), this is the default | 
|---|
|  | 530 | behavior if neither this nor the QT_PM_REGISTRY | 
|---|
|  | 531 | variable is set. | 
|---|
|  | 532 |  | 
|---|
|  | 533 | QT_PM_REGISTRY            The opposite to the above. If set, Qt will use the | 
|---|
| [624] | 534 | Open32 registry to store application settings. This | 
|---|
|  | 535 | variable is ignored if QT_PM_NO_REGISTRY is set. | 
|---|
| [429] | 536 |  | 
|---|
| [624] | 537 | QT_PM_NO_SYSTEM_LOCALE    If set, Qt will ignore the regional settings from | 
|---|
|  | 538 | the system locale object found in the Country | 
|---|
|  | 539 | Palette located in the System Setup folder and will | 
|---|
|  | 540 | take them from the internal Qt locale database | 
|---|
|  | 541 | according to the current country and language | 
|---|
|  | 542 | settings. Due to the fact that this internal Qt | 
|---|
|  | 543 | database usually has a better representation of the | 
|---|
|  | 544 | regional settings, this is the default behavior if | 
|---|
|  | 545 | neither this nor the QT_PM_SYSTEM_LOCALE variable is | 
|---|
|  | 546 | set. | 
|---|
| [429] | 547 |  | 
|---|
| [624] | 548 | QT_PM_SYSTEM_LOCALE       The opposite to the above. If set, Qt will use the | 
|---|
|  | 549 | regional settings as found in the default locale | 
|---|
|  | 550 | object set the Country Palette.  This variable is | 
|---|
|  | 551 | ignored if QT_PM_NO_SYSTEM_LOCALE is set. | 
|---|
| [429] | 552 |  | 
|---|
| [624] | 553 | LANG                      This variable can be used to override the default | 
|---|
|  | 554 | country and language used in the Qt application both | 
|---|
|  | 555 | for regional settings and for translations. The | 
|---|
|  | 556 | format of the value is "ll_CC" where <ll> is the | 
|---|
|  | 557 | two-letter ISO language code and <CC> is the two- | 
|---|
|  | 558 | letter ISO country code. Note that if this variable | 
|---|
|  | 559 | is not set, Qt will derive the language and country | 
|---|
|  | 560 | from the system country code specified in the | 
|---|
|  | 561 | COUNTRY statement of CONFIG.SYS. | 
|---|
|  | 562 |  | 
|---|
|  | 563 |  | 
|---|
|  | 564 |  | 
|---|
| [740] | 565 | COMMAND LINE OPTIONS | 
|---|
| [576] | 566 |  | 
|---|
| [740] | 567 | Any Qt executable recognizes a number of command line options that may change | 
|---|
|  | 568 | the behavior of the Qt application. Here are the most interesting ones: | 
|---|
| [576] | 569 |  | 
|---|
| [740] | 570 | -style <name>             Changes the default Qt widget style (theme) to a | 
|---|
|  | 571 | style with the given name. The buiil-in styles which | 
|---|
|  | 572 | are always available in the official build include: | 
|---|
|  | 573 | "windows" (currently, the default on OS/2), "motif", | 
|---|
|  | 574 | "cde", "plastique" and "cleanlooks". Other styles | 
|---|
|  | 575 | may be also provided by the style plugins. | 
|---|
| [576] | 576 |  | 
|---|
| [740] | 577 | -graphicssystem <name>    Changes the graphics system used to paint widgets. | 
|---|
|  | 578 | On OS/2, only two values are supported: "native" | 
|---|
|  | 579 | (the default one) and "raster". The "native" system | 
|---|
|  | 580 | uses DIVE (direct interface video extensions) when | 
|---|
|  | 581 | it is available. If DIVE is not available or if it | 
|---|
|  | 582 | is disabled (see the QT_PM_NO_DIVE environment | 
|---|
|  | 583 | variable description for details), the "raster" | 
|---|
|  | 584 | system will be automatically selected as a fallback. | 
|---|
| [576] | 585 |  | 
|---|
|  | 586 |  | 
|---|
| [740] | 587 |  | 
|---|
| [144] | 588 | CURRENT LIMITATIONS | 
|---|
|  | 589 |  | 
|---|
| [1034] | 590 | 1. configure.cmd does not understand all command line options understood by | 
|---|
| [830] | 591 | configure scripts on other platforms. If you want to customize your build | 
|---|
|  | 592 | of the Qt library (which is normally not recommended and not supported), | 
|---|
|  | 593 | you may try to modify configure.cmd itself. | 
|---|
| [524] | 594 |  | 
|---|
| [1034] | 595 | 2. OS/2 bitmap fonts are not supported. Use TTF or Type1 (PFB) fonts with Qt. | 
|---|
| [144] | 596 |  | 
|---|
| [1034] | 597 | 3. No support for widget masks and trapsparency in top-level widgets and in | 
|---|
|  | 598 | child widgets with native window IDs (Presentation Manager limitation). | 
|---|
|  | 599 |  | 
|---|
| [740] | 600 | 4. No native PM style, but Qt will use fonts and colors from the current | 
|---|
| [320] | 601 | OS/2 theme. Hint: if your default OS/2 font is "WarpSans", install the | 
|---|
|  | 602 | "Workplace Sans" TTF font from Alex Taylor to get more native look & feel. | 
|---|
| [740] | 603 | It is recommended to install version 0.7 of the Normal face and version 0.3 | 
|---|
| [320] | 604 | of the Bold face which you can find here: | 
|---|
| [144] | 605 |  | 
|---|
| [320] | 606 | http://users.socis.ca/~ataylo00/creative/fonts/workplace/ | 
|---|
| [287] | 607 |  | 
|---|
| [740] | 608 | 5. QProcess: when starting PM applications from text-mode applications, the | 
|---|
| [524] | 609 | returned PID is a PID of the intermediate cmd.exe process, not the target | 
|---|
|  | 610 | application. | 
|---|
| [145] | 611 |  | 
|---|
| [740] | 612 | 6. The following classes are not available due to their rare usage or low | 
|---|
| [524] | 613 | importance on the OS/2 platform: QSharedMemory, QSystemSemaphore, | 
|---|
| [740] | 614 | QInputContext. On the source level, a number of macros is defined to | 
|---|
|  | 615 | reflect this, respectively: QT_NO_SYSTEMSEMAPHORE, QT_NO_SHAREDMEMORY, | 
|---|
|  | 616 | QT_NO_IM. Normally, Qt applications use these macros in the form of | 
|---|
|  | 617 | "#fndef QT_NO_SOMEFEATURE" to isolate the relevant parts of the code that | 
|---|
|  | 618 | uses these classes so that the application still builds when the | 
|---|
|  | 619 | corresponding feature is missing. | 
|---|
| [243] | 620 |  | 
|---|
| [740] | 621 | 7. No qt3support module. This functionality is rarely necessary in mature | 
|---|
|  | 622 | real life Qt applications and has low priority. In the code, it is | 
|---|
|  | 623 | reflected by the absense of the QT3_SUPPORT macro. | 
|---|
| [145] | 624 |  | 
|---|
| [740] | 625 | 8. The following features are missing (either because of the lack of the | 
|---|
|  | 626 | required support from the system side or because of the rare usage): | 
|---|
|  | 627 |  | 
|---|
|  | 628 | - IPV6 support in the network module (QT_NO_IPV6 is defined). | 
|---|
|  | 629 | - phonon module (QT_NO_PHONON is defined). | 
|---|
|  | 630 | - multimedia module (QT_NO_MULTIMEDIA is defined). | 
|---|
|  | 631 | - OpenGL module (QT_NO_OPENGL is defined). | 
|---|
|  | 632 | - tablet support (QT_NO_TABLET is defined). | 
|---|
|  | 633 |  | 
|---|
| [524] | 634 | See the project roadmap for more information on the current progress and | 
|---|
|  | 635 | future plans: | 
|---|
| [144] | 636 |  | 
|---|
| [524] | 637 | http://svn.netlabs.org/qt4/roadmap | 
|---|
| [144] | 638 |  | 
|---|
| [524] | 639 | Feel free to request new features and report bugs using the project bug | 
|---|
|  | 640 | tracker abaialble at: | 
|---|
| [188] | 641 |  | 
|---|
| [524] | 642 | http://svn.netlabs.org/qt4/report | 
|---|
|  | 643 |  | 
|---|
|  | 644 |  | 
|---|
|  | 645 |  | 
|---|
| [144] | 646 | CREDITS | 
|---|
|  | 647 |  | 
|---|
| [1040] | 648 | Dmitriy Kuminov (development) | 
|---|
| [144] | 649 | Silvan Scherrer (management) | 
|---|
|  | 650 |  | 
|---|
|  | 651 | netlabs.org (hosting & support) | 
|---|
|  | 652 |  | 
|---|
|  | 653 | Nokia Corporation (original Qt library) | 
|---|
|  | 654 |  | 
|---|
|  | 655 | We also want to THANK all individuals and organizations who made the donations | 
|---|
|  | 656 | to this project and helped to make it happen. Please visit | 
|---|
|  | 657 |  | 
|---|
|  | 658 | http://qt.netlabs.org/en/site/index.xml | 
|---|
|  | 659 |  | 
|---|
|  | 660 | to get the full list of sponsors and to find information on how you can support | 
|---|
|  | 661 | the project. | 
|---|
|  | 662 |  | 
|---|
|  | 663 |  | 
|---|
|  | 664 | Qt is a trademark of Nokia Corporation and/or its subsidiary(-ies). | 
|---|
|  | 665 | OS/2 and OS/2 Warp are trademarks of the IBM Corporation and/or its subsidiary(-ies). | 
|---|
|  | 666 | eComStation is a trademark of Serenity Systems International and/or its subsidiary(-ies). | 
|---|
|  | 667 | Etc. | 
|---|