source: trunk/README.OS2@ 788

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

network: Added OpenSSL support (closes #167).

File size: 26.7 KB
Line 
1This is Qt version 4.6.2 for OS/2 and eCS.
2
3This document contains a brief information on the OS/2 version of the Qt
4library. Please read it carefully before starting your work. You may also
5visit the project page at
6
7 http://svn.netlabs.org/qt4/wiki
8
9to get more information and the latest news and also to report bugs.
10
11To get a brief list of OS/2-specific changes from release to release
12please see the CHANGES.OS2 file included in this distribution.
13
14Please note that this version is binary incompatible with previous versions of
15Qt 4 for OS/2! This is not a behavior of the original Qt library (where versions
16with the same major number are usually binary compatible), but it is due to the
17fact that we continue to add missing features to the OS/2 version ot Qt and this
18cannot be done witout breaking the binary compatibility. On practice, this means
19that you need to recompile your applications with the new version of the Qt
20library in order to make them work with it.
21
22
23
24REQUIREMENTS
25
26In order to compile the Qt library and Qt-based applications, you will need
27the following tools:
28
29 - One of the OS/2 Warp 4, OS/2 Warp 4.5 or eComStation operating systems.
30
31 - GCC compiler version 4.4.2 for OS/2, patched OpenWatcom linker and
32 GNU Make 3.81beta1 or above. The GCC compiler must be set up to use the
33 OpenWatcom linker for linking.
34
35 If you do not have a working GCC environment with the above requirements, it
36 is recommended to download a ready-to-use GCC 4.2.2 distribution from here:
37
38 ftp://ftp.netlabs.org/pub/qt4/gcc-4_4_2-complete-20091205.zip
39
40 This distribution includes all tools necessary to compile and build the Qt
41 library from the source code. Just follow the installation instructions
42 contained in the README file inside this ZIP archive to set up the GCC
43 environment.
44
45 Please note that starting from Qt 4.6.2, support for GCC 3.3.5 and earlier
46 versions of the compiler has been dropped and the Qt library will most
47 likely not build if you use one of these compilers. Later versions prior to
48 GCC 4.4.2 may work but they are not tested and not supported.
49
50There is also a set of optional tools which are necessary to enable the selected
51features of the Qt library. If these tools are missing, the Qt configuration
52script (discussed in section "COMPILING QT" below) will automatically disable
53the corresponding feature:
54
55 - LxLite 1.3.3 or above (not tested) to enable the compression of Qt DLLs and
56 application executables (which saves hard disk space and application startup
57 time). If you use a recent version of eComStation (e.g. 2.0 rc6) you will
58 already have LxLite installed. Otherwise, you may take it from here:
59
60 http://www.os2site.com/sw/util/archiver/lxlt133.zip
61
62 - 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 - OpenSSL 0.9.8o or later to support OpenSSL in Qt. The OpenSSL libraries are
73 available at:
74
75 http://rpm.netlabs.org/experimental/00/i386/i386/openssl-devel-1.0.0a-1.i386.rpm
76 http://rpm.netlabs.org/experimental/00/i386/i386/openssl-1.0.0a-1.i386.rpm
77
78 or
79
80 http://bauxite.sakura.ne.jp/tmp/os2/openssl-1.0.0a-os2knix-20100706-dev.zip
81 http://bauxite.sakura.ne.jp/tmp/os2/openssl-1.0.0a-os2knix-20100706-runtime.zip
82
83
84
85
86SETTING UP THE ENVIRONMENT
87
88First of all, make sure that your GCC environment is set up and meets the
89specified requirements. To perform a quick check, you may run the following
90command:
91
92 gcc --version && make --version && wl /version
93
94If the setup is done properly, it will print the versions of the key tools
95to the console.
96
97The next step is to set up the Qt environment. If you installed the Qt
98development libraries from the WPI archive (refer to section "USING OFFICIAL
99BINARY QT ARCHIVES" below for more details about existing WPI archives), you
100will only need to run the supplied "QtEnv.cmd" script which will do all the
101setup job for you. The script is located in the directory where you installed
102the developmnent libraries (or in the WPS folder created by the WPI installer).
103Execute this script in a command line session to make it ready for building
104Qt 4 applications (for example, using the "qmake" command follwed by "make"
105for applications based on qmake project files which most of them are). If you
106go that way, you may skip the rest of this section and proceed directly to
107section "USING OFFICIAL BINARY QT ARCHIVES" below.
108
109If you use the full source code ZIP distribution of the Qt library or work
110directly with the Qt SVN tree, you will need to set up the environment yourself
111by performing the following steps:
112
113 - Add the "bin" subdirectory of the directory where you unpacked the Qt4
114 source tree to PATH and BEGINLIBPATH, like this:
115
116 set PATH=D:\Coding\Qt4\bin;%PATH%
117 set BEGINLIBPATH=D:\Coding\Qt4\bin;%BEGINLIBPATH%
118
119 - Add the system DLLs to the GCC library path with the following command:
120
121 set LIBRARY_PATH=C:\OS2\DLL;C:\MPTN\DLL;%LIBRARY_PATH%
122
123 where C: is your boot drive.
124
125 - Make sure CMD.EXE is your command line processor (the generated makefiles
126 will rely on its 'copy', 'if' and other commands). If you have a Unix shell
127 (SH.EXE) in your environment, you may need to force GNU make to use CMD.EXE
128 by executing the followingn command:
129
130 set MAKESHELL=C:\OS2\CMD.EXE
131
132 where C: is your boot drive.
133
134Note that the QTDIR environment variable used in previous Qt versions is not
135used in Qt4 anymore. Therefore, there is no need to set this variable
136explicitly.
137
138There is also no need to set the QMAKESPEC variable explicitly. If it is absent,
139qmake will use the specification stored in the <Qt4_Home>/mkspecs/default
140directory, which on OS/2 always refers to the "os2-g++" specification, the only
141one supported at the present time.
142
143NOTE:
144
145 It is especially important to make sure that there are no traces of any
146 other Watcom or OpenWatcom installation in the environment where you build
147 Qt as it will interfere with the patched OpenWatcom linker we use. This
148 basically means removing all environment variables containing "WATCOM" in
149 their names and also removing references to all those Watcom installations
150 from PATH.
151
152
153
154SETTING UP OPTIONAL TOOLS
155
156The following list describes the steps necessary to set up the optional tools
157that the Qt library depends on:
158
159 - Install the eCUPS WPI archive to enable printing support. If this WPI is
160 installed, the Qt build system will pick up all necessary libraries
161 automatically. Otherwise (e.g. if you use a ZIP or build eCUPS yourself),
162 you will need to use the following environment variables to tell it where to
163 look for CUPS:
164
165 set CUPS_INCLUDEPATH=X:\Path\to\CUPS\include
166 set CUPS_LIBS=X:\Path\to\CUPS\lib\libcups.a
167
168 You will also need to make sure that pthread.lib is placed somewhere in your
169 system library path so that the compiler can find it.
170
171 - Unzip the OpenSSL libraries to some directory and set the following
172 environment variables to tell the Qt configure script its location:
173
174 set OPENSSL_INCLUDEPATH=X:\<path_to_OpenSSL>\include
175 set OPENSSL_LIBS=
176
177 Note that you will also need to place OpenSSL DLLs to BEGINLIBPATH (if they
178 are not already in your LIBPATH) so that Qt applications can find them at
179 runtime:
180
181 set BEGINLIBPATH=X:\<path_to_OpenSSL>\dll;%BEGINLIBPATH%
182
183
184
185COMPILING QT
186
187You should skip this section if you installed the Qt development libraries using
188the WPI archive (that already contains compiled release versions of the
189libraries) and proceed directly to the next section.
190
191When the environment is set up, go to the directory where you unpacked the
192Qt4 source tree and type:
193
194 configure.cmd
195
196This will set up the Qt library (by creating necessary configuration and include
197files and a bunch of Makefiles for variuos components) and build the qmake tool.
198
199The next step is to type:
200
201 make
202
203This will compile and link the Qt library. Note that by default both the release
204and the debug version of the library are built (please be patient, it may take
205quite some time depending on your hardware). The release and debug libraries can
206co-exist in the same source tree and may be used in parallel: all the debug DLLs
207get a 'd' letter in their name preceeding the Qt major version number and use
208separate directories for object files.
209
210To save time, you may build the release and the debug versions of the Qt library
211separately by typing 'make release' or 'make debug' accordingly instead of just
212'make'.
213
214Once the library is successfully built, you may try to compile the demos and
215examples by visiting the individual example subdirectories in the source tree
216and typing 'qmake' followed by one of 'make', 'make release' or 'make debug'
217in that subdirectory.
218
219NOTE:
220
221 This version of Qt for OS/2 includes the Extended system tray plugin for
222 XCenter/eCenter which is necessary to enable Qt support for the special
223 notification area on the XCenter/eCenter panel (called the "system tray")
224 which is used by many long-running applications to display their status.
225 In order to activate this support, you need to install this plugin to your
226 XCenter or eCenter. The plugin is built during the normal Qt build process
227 and can be found in the file \plugins\xcenter\xsystray.dll in the Qt source
228 tree. In order to install the plugin, do the following:
229
230 a. Copy xsystray.dll to <XWorkplace installation folder>\plugins\xcenter\
231 (on eComStation, this will be C:\ecs\system\ewps\plugins\xcenter\ where
232 C: is your boot drive).
233
234 b. Restart WPS.
235
236 c. Add the "Extended system tray" widget to the XCenter/eCenter panel using
237 the XCenter context menu ('Create new widget').
238
239 Note that if you upgrade from the previous version of the plugin then
240 please unlock xsystray.dll in the target folder using the UNLOCK.EXE
241 utility (which you can find in the LxLite package, for example) before
242 performing step a., otherwise the copy operation will fail.
243
244IMPORTANT NOTE:
245
246 Please take into account that the Qt library you build on your own as
247 described above is NOT intended for wide distribution with Qt applications
248 you port or create. Such private Qt builds help you develop Qt applications
249 (because you can easily debug your program and parts of the Qt framework at
250 the source level) but being widely distributed they will create a so-called
251 DLL hell when a program running on a user computer crashes because it picks
252 up a wrong build of the Qt library. This will happen because even a single
253 change to Qt configuration options may make your build binary incompatible
254 with another build. And even if you convince the user to isolate different
255 DLLs (using LIBPATHSTRICT and BEGINLIBPATH) it will create another major
256 problem: two different Qt applications will load two different copies of Qt
257 into memory which will create an unnecessary overhead by doubling the
258 amount of used system resources.
259
260 In order to nicely solve this problem, netlabs.org provides the official
261 binary builds of the Qt library distributed as WPI archives which are
262 described in the next section.
263
264
265
266USING OFFICIAL BINARY QT ARCHIVES
267
268For your convenience, netlabs.org provides the following binary distributions
269of the Qt library (where X_Y_Z is the Qt version number) distributed as WPI
270archives:
271
272 qt-lib-X_Y_Z.wpi - Runtime DLLs and binaries ("lib" archive)
273 qt-dev-X_Y_Z.wpi - Development libraries, tools and headers ("dev" archive)
274
275These archives are called the official binary archives of the Qt library for
276OS/2. An official binary archive contains the most complete Qt build that
277enables all features of the Qt library and includes all standard Qt plugins
278implemented for the OS/2 platform at the time of the release.
279
280The "lib" archive contains the release versions of DLLs (and may contain a few
281helper binaries) necessary to run applications created using the Qt framework.
282This package is usually installed by end users together with Qt applications
283they want to use.
284
285The "dev" archive contains pre-built release versions of import libraries and
286a complete set of C++ include headers of the Qt framework. This package is used
287by developers and porters of Qt applications to build release versions of the
288applications that are binary compatibie with the Qt runtime provided by the
289official "lib" archive described above. Using the "dev" package requires the
290same environment as described in section "SETTING UP THE ENVIRONMET" above.
291
292Please note again that the "dev" archive is intended to make a final release
293build of the Qt application which you do when you decide to ship a new version
294to the end users -- makes sure that the deployed application will share the same
295Qt runtime with other Qt applications. However, for daily work it is highly
296recommended that you build the debug version of the Qt library yourself (using
297the full source code ZIP archive or directly from SVN) as described in section
298"COMPILING QT").
299
300Besides the "lib" and the "dev" archives, the following official archives exist
301that you may also find useful:
302
303 qt-examples-X_Y_Z.wpi - Demo and example sources ("examples")
304
305The "examples" archive contains the source code and compiled binaries of the
306demo and example applications shipped with Qt. They serve as a good
307demonstration of the Qt library features and it is recommended to look at them.
308The binaries are compiled using the official "lib" archive. Please note that
309some demos and examples may miss from the arcvhice since not all features have
310been implemented in the OS/2 version of Qt yet.
311
312NOTE:
313
314 All .DLL and .EXE files of the official binary build contain a DESCRIPTION
315 string with the vendor field set to "netlabs.org" (by contrast, all custom
316 Qt builds will set the vendor field to what the USER environment variable
317 contains or to "anonymous" if USER is not set). Please note that you must
318 NOT set vendor to "netlabs.org" when creating your own builds of the Qt
319 library because it will make it difficult to identify various distributions
320 and track possible problems with the builds.
321
322
323
324QMAKE CONFIG OPTIONS
325
326The following CONFIG options of the qmake tool have a special meaning in OS/2:
327
328 windows Turns on generation of PM (WINDOWAPI) executables. By
329 default, this option is set for release builds that link
330 to the Qt GUI library.
331
332 console Turns on generation of text mode (WINDOWCOMPAT) executables.
333 By default, this option is set when setting the "windows"
334 option is not appropriate (see above).
335
336In addition, qmake recognizes the following OS/2-specific CONFIG options:
337
338 map Turns on generation of the .map files for executables and
339 DLLs. This option is set by default.
340
341 exepack Turns on compression for executables and DLLs. The option is
342 turned on by default for release builds if configure.cmd
343 finds a compression tool (LxLite) in PATH.
344
345 highmem Turns on high memory usage for dynamically allocated memory
346 in DLLs and executables. When this option is set, a special
347 compiler flag (-Zhigh-mem for GCC) is used to enable high
348 memory support in the C library (LIBC). This option is set
349 by default so that all Qt DLLs and Qt applications built
350 with qmake are enabled for high memory. Note that high
351 memory support must be enabled for all LIBC-based DLLs
352 linked to the executable as well as for the executable
353 itself: high memory usage will be disabled if one of them
354 votes against it.
355
356 export_all Cause the linker to export all public symbols in a generated
357 DLL. By default (when this option is absent), only the
358 symbols marked with the __declspec(dllexport) compiler
359 directive in the source files.
360
361
362
363PRINTING SUPPORT
364
365Starting with version 4.6.2, Qt for OS/2 supports printing through the CUPS
366framework (provided that this support is enabled when building Qt, see the
367respective sections in the beginning of this document). The OS/2 implementation
368of the CUPS framework is provided by the eCUPS package available at
369http://svn.netlabs.org/ecups/.
370
371The Qt Runtime detects the presence of eCUPS in the system on the fly and talks
372to the CUPS daemon directly, bypassing the standard OS/2 printing subsystem.
373This means that in order to print from Qt applications, you don't need to create
374and configure printer objects using the standard OS/2 system printer setup
375procedure -- you only need to install eCUPS and configure your printers in
376there. Please refer to the eCUPS user manual to obtain the detailed instructions
377on how to configure CUPS printers.
378
379
380
381ENVIRONMENT VARIABLES
382
383The Qt library recognizes a number of OS/2-specific environment variables that
384affect its functionality at runtime. The table below lists these variables and
385their meaning:
386
387 QT_PM_NO_DIVE If set, Qt will not use DIVE (direct interface video
388 extensions) for painting widgets even if DIVE (which
389 provides a much faster painting speed than the
390 regular GPI approach) is available. Currently, this
391 is the default setting if the Panorama video driver
392 is detected because its DIVE implementation contains
393 a number of bugs.
394
395 QT_PM_DIVE=<mode> Enables using DIVE for painting widgets. <mode> is
396 one of:
397
398 - FB (direct framebuffer access, which is the
399 fastest mode but causes the curruption of the
400 screen under the software mouse pointer due to
401 the limitation of DIVE). If this mode is not
402 available, BLIT will be used (see below).
403
404 - FBSWM (the same FB but hides the mouse pointer
405 before painting which introduces mouse flicker
406 and may be a bit slower than the raw FB).
407
408 - BLIT (slower than both FB and FBSWM but prevents
409 screen corruption under the mouse pointer and
410 does not produce a mouse pointer flicker
411 effect).
412
413 This variable is ignored if QT_PM_NO_DIVE is set. If
414 neither this nor the QT_PM_NO_DIVE variable is set,
415 the FBSWM mode is used by default (unless the
416 current video driver is Panorama, see above).
417
418 QT_PM_NO_SOUND_SHARE If set, Qt will open the audio device in exclusive
419 only one sound may be played on the computer at a
420 time. This mode is recommended for some sound cards
421 when using the Uniaud audio driver as it is known to
422 have problems with simultaneous playback. In current
423 Qt builds, this is the default behavior if neither
424 this nor the QT_PM_SOUND_SHARE variable is set.
425
426 QT_PM_SOUND_SHARE The opposite to the above. If set, Qt will open the
427 audio device in shared mode. This variable is
428 ignored if QT_PM_NO_SOUND_SHARE is set.
429
430 QT_PM_NO_REGISTRY If set, Qt will not use the Open32 registry to store
431 application settings with QSettings. Instead, plain
432 text INI files will be used for both NativeFormat
433 and IniFormat. Due to a number of problems in the
434 Open32 registry implementation (that may easily lead
435 to registry corruption), this is the default
436 behavior if neither this nor the QT_PM_REGISTRY
437 variable is set.
438
439 QT_PM_REGISTRY The opposite to the above. If set, Qt will use the
440 Open32 registry to store application settings. This
441 variable is ignored if QT_PM_NO_REGISTRY is set.
442
443 QT_PM_NO_SYSTEM_LOCALE If set, Qt will ignore the regional settings from
444 the system locale object found in the Country
445 Palette located in the System Setup folder and will
446 take them from the internal Qt locale database
447 according to the current country and language
448 settings. Due to the fact that this internal Qt
449 database usually has a better representation of the
450 regional settings, this is the default behavior if
451 neither this nor the QT_PM_SYSTEM_LOCALE variable is
452 set.
453
454 QT_PM_SYSTEM_LOCALE The opposite to the above. If set, Qt will use the
455 regional settings as found in the default locale
456 object set the Country Palette. This variable is
457 ignored if QT_PM_NO_SYSTEM_LOCALE is set.
458
459 LANG This variable can be used to override the default
460 country and language used in the Qt application both
461 for regional settings and for translations. The
462 format of the value is "ll_CC" where <ll> is the
463 two-letter ISO language code and <CC> is the two-
464 letter ISO country code. Note that if this variable
465 is not set, Qt will derive the language and country
466 from the system country code specified in the
467 COUNTRY statement of CONFIG.SYS.
468
469
470
471COMMAND LINE OPTIONS
472
473Any Qt executable recognizes a number of command line options that may change
474the behavior of the Qt application. Here are the most interesting ones:
475
476 -style <name> Changes the default Qt widget style (theme) to a
477 style with the given name. The buiil-in styles which
478 are always available in the official build include:
479 "windows" (currently, the default on OS/2), "motif",
480 "cde", "plastique" and "cleanlooks". Other styles
481 may be also provided by the style plugins.
482
483 -graphicssystem <name> Changes the graphics system used to paint widgets.
484 On OS/2, only two values are supported: "native"
485 (the default one) and "raster". The "native" system
486 uses DIVE (direct interface video extensions) when
487 it is available. If DIVE is not available or if it
488 is disabled (see the QT_PM_NO_DIVE environment
489 variable description for details), the "raster"
490 system will be automatically selected as a fallback.
491
492
493
494CURRENT LIMITATIONS
495
496 1. configure.cmd is does not build demos and examples by default (to save
497 time). They may be built by hand, as described above.
498
499 2. configure.cmd does not understand any command line options yet. If you want
500 to customize your build of the Qt library (which is normally not
501 recommended and not supported), you may try to modify configure.cmd itself.
502
503 3. OS/2 bitmap fonts are not supported. Use TTF or Type1 (PFB) fonts with Qt.
504
505 4. No native PM style, but Qt will use fonts and colors from the current
506 OS/2 theme. Hint: if your default OS/2 font is "WarpSans", install the
507 "Workplace Sans" TTF font from Alex Taylor to get more native look & feel.
508 It is recommended to install version 0.7 of the Normal face and version 0.3
509 of the Bold face which you can find here:
510
511 http://users.socis.ca/~ataylo00/creative/fonts/workplace/
512
513 5. QProcess: when starting PM applications from text-mode applications, the
514 returned PID is a PID of the intermediate cmd.exe process, not the target
515 application.
516
517 6. The following classes are not available due to their rare usage or low
518 importance on the OS/2 platform: QSharedMemory, QSystemSemaphore,
519 QInputContext. On the source level, a number of macros is defined to
520 reflect this, respectively: QT_NO_SYSTEMSEMAPHORE, QT_NO_SHAREDMEMORY,
521 QT_NO_IM. Normally, Qt applications use these macros in the form of
522 "#fndef QT_NO_SOMEFEATURE" to isolate the relevant parts of the code that
523 uses these classes so that the application still builds when the
524 corresponding feature is missing.
525
526 7. No qt3support module. This functionality is rarely necessary in mature
527 real life Qt applications and has low priority. In the code, it is
528 reflected by the absense of the QT3_SUPPORT macro.
529
530 8. The following features are missing (either because of the lack of the
531 required support from the system side or because of the rare usage):
532
533 - IPV6 support in the network module (QT_NO_IPV6 is defined).
534 - OpenSSL support in the network module (QT_NO_OPENSSL is defined).
535 - phonon module (QT_NO_PHONON is defined).
536 - multimedia module (QT_NO_MULTIMEDIA is defined).
537 - OpenGL module (QT_NO_OPENGL is defined).
538 - declarative module (QT_NO_DECLARATIVE is defined).
539 - tablet support (QT_NO_TABLET is defined).
540
541 See the project roadmap for more information on the current progress and
542 future plans:
543
544 http://svn.netlabs.org/qt4/roadmap
545
546 Feel free to request new features and report bugs using the project bug
547 tracker abaialble at:
548
549 http://svn.netlabs.org/qt4/report
550
551
552
553CREDITS
554
555Dmitry A. Kuminov (development)
556Silvan Scherrer (management)
557
558netlabs.org (hosting & support)
559
560Nokia Corporation (original Qt library)
561
562We also want to THANK all individuals and organizations who made the donations
563to this project and helped to make it happen. Please visit
564
565 http://qt.netlabs.org/en/site/index.xml
566
567to get the full list of sponsors and to find information on how you can support
568the project.
569
570
571Qt is a trademark of Nokia Corporation and/or its subsidiary(-ies).
572OS/2 and OS/2 Warp are trademarks of the IBM Corporation and/or its subsidiary(-ies).
573eComStation is a trademark of Serenity Systems International and/or its subsidiary(-ies).
574Etc.
Note: See TracBrowser for help on using the repository browser.