source: trunk/README.OS2@ 763

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

Better phrasing in README.OS2.

File size: 25.8 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
73
74SETTING UP THE ENVIRONMENT
75
76First of all, make sure that your GCC environment is set up and meets the
77specified requirements. To perform a quick check, you may run the following
78command:
79
80 gcc --version && make --version && wl /version
81
82If the setup is done properly, it will print the versions of the key tools
83to the console.
84
85The next step is to set up the Qt environment. If you installed the Qt
86development libraries from the WPI archive (refer to section "USING OFFICIAL
87BINARY QT ARCHIVES" below for more details about existing WPI archives), you
88will only need to run the supplied "QtEnv.cmd" script which will do all the
89setup job for you. The script is located in the directory where you installed
90the developmnent libraries (or in the WPS folder created by the WPI installer).
91Execute this script in a command line session to make it ready for building
92Qt 4 applications (for example, using the "qmake" command follwed by "make"
93for applications based on qmake project files which most of them are). If you
94go that way, you may skip the rest of this section and proceed directly to
95section called "USING OFFICIAL BINARY QT ARCHIVES" or further.
96
97If you use the full source code ZIP distribution of the Qt library or work
98directly with the Qt SVN tree, you will need to set up the environment yourself
99by performing the following steps:
100
101 - Add the "bin" subdirectory of the directory where you unpacked the Qt4
102 source tree to PATH and BEGINLIBPATH, like this:
103
104 set PATH=D:\Coding\Qt4\bin;%PATH%
105 set BEGINLIBPATH=D:\Coding\Qt4\bin;%BEGINLIBPATH%
106
107 - Add the system DLLs to the GCC library path with the following command:
108
109 set LIBRARY_PATH=C:\OS2\DLL;C:\MPTN\DLL;%LIBRARY_PATH%
110
111 where C: is your boot drive.
112
113 - Make sure CMD.EXE is your command line processor (the generated makefiles
114 will rely on its 'copy', 'if' and other commands). If you have a Unix shell
115 (SH.EXE) in your environment, you may need to force GNU make to use CMD.EXE
116 by executing the followingn command:
117
118 set MAKESHELL=C:\OS2\CMD.EXE
119
120 where C: is your boot drive.
121
122Note that the QTDIR environment variable used in previous Qt versions is not
123used in Qt4 anymore. Therefore, there is no need to set this variable
124explicitly.
125
126There is also no need to set the QMAKESPEC variable explicitly. If it is absent,
127qmake will use the specification stored in the <Qt4_Home>/mkspecs/default
128directory, which on OS/2 always refers to the "os2-g++" specification, the only
129one supported at the present time.
130
131NOTE:
132
133 It is especially important to make sure that there are no traces of any
134 other Watcom or OpenWatcom installation in the environment where you build
135 Qt as it will interfere with the patched OpenWatcom linker we use. This
136 basically means removing all environment variables containing "WATCOM" in
137 their names and also removing references to all those Watcom installations
138 from PATH.
139
140
141
142SETTING UP OPTIONAL TOOLS
143
144The following list describes the steps necessary to set up the optional tools
145that the Qt library depends on:
146
147 - Install the eCUPS WPI archive to enable printing support. If this WPI is
148 installed, the Qt build system will pick up all necessary libraries
149 automatically. Otherwise (e.g. if you use a ZIP or build eCUPS yourself),
150 you will need to use the following environment variables to tell it where to
151 look for CUPS:
152
153 set CUPS_INCLUDEPATH=X:\Path\to\CUPS\include
154 set CUPS_LIBS=X:\Path\to\CUPS\lib\libcups.a
155
156 You will also need to make sure that pthread.lib is placed somewhere in your
157 system library path so that the compiler can find it.
158
159
160
161COMPILING QT
162
163You should skip this section if you installed the Qt development libraries using
164the WPI archive (that already contains compiled release versions of the
165libraries) and proceed directly to the next section.
166
167When the environment is set up, go to the directory where you unpacked the