source: trunk/README.OS2@ 789

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

configure.cmd: Do not require to install the CUPS WPI, suggest ZIP instead.

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