1 | This is Qt version 4.7.3 for OS/2 and eCS.
|
---|
2 |
|
---|
3 | This document contains a brief information on the OS/2 version of the Qt
|
---|
4 | library. Please read it carefully before starting your work. You may also
|
---|
5 | visit the project page at
|
---|
6 |
|
---|
7 | http://svn.netlabs.org/qt4/wiki
|
---|
8 |
|
---|
9 | to get more information and the latest news and also to report bugs.
|
---|
10 |
|
---|
11 | To get a brief list of OS/2-specific changes from release to release
|
---|
12 | please see the CHANGES.OS2 file included in this distribution.
|
---|
13 |
|
---|
14 | IMPORTANT NOTE:
|
---|
15 |
|
---|
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.
|
---|
19 |
|
---|
20 |
|
---|
21 |
|
---|
22 | REQUIREMENTS
|
---|
23 |
|
---|
24 | In order to compile the Qt library and Qt-based applications, you will need
|
---|
25 | the following tools:
|
---|
26 |
|
---|
27 | - One of the OS/2 Warp 4, OS/2 Warp 4.5 or eComStation operating systems.
|
---|
28 |
|
---|
29 | - GCC compiler version 4.4.5 for OS/2 or above, patched OpenWatcom linker and
|
---|
30 | GNU Make 3.81beta1 or above. The GCC compiler must be set up to use the
|
---|
31 | OpenWatcom linker for linking.
|
---|
32 |
|
---|
33 | If you do not have a working GCC environment with the above requirements, it
|
---|
34 | is recommended to download a ready-to-use GCC 4.4.5 distribution from here:
|
---|
35 |
|
---|
36 | ftp://ftp.netlabs.org/pub/qt4/gcc-4_4_5-complete-20110303.zip
|
---|
37 |
|
---|
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.
|
---|
42 |
|
---|
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.
|
---|
47 |
|
---|
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.
|
---|
51 |
|
---|
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:
|
---|
56 |
|
---|
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 |
|
---|
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.
|
---|
67 |
|
---|
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 |
|
---|
73 | http://www.os2site.com/sw/util/archiver/lxlt133.zip
|
---|
74 |
|
---|
75 | - CUPS 1.4.8 or later to support printing in Qt. The CUPS libraries are
|
---|
76 | available at:
|
---|
77 |
|
---|
78 | http://sourceforge.net/projects/ecsports/files/CUPS/cups-1.4.8-os2-20110831.zip/download
|
---|
79 | http://svn.netlabs.org/ecups/wiki/CupsPort
|
---|
80 |
|
---|
81 | - OpenSSL 0.9.8o or later to support OpenSSL in Qt. The OpenSSL libraries are
|
---|
82 | available at:
|
---|
83 |
|
---|
84 | http://bauxite.sakura.ne.jp/tmp/os2/openssl-1.0.0a-os2knix-20100706-runtime.zip
|
---|
85 | http://bauxite.sakura.ne.jp/tmp/os2/openssl-1.0.0a-os2knix-20100706-dev.zip
|
---|
86 |
|
---|
87 | - MySQL 5.1 or later for the MySQL Qt plugin. The MySQL libraries are
|
---|
88 | available at:
|
---|
89 |
|
---|
90 | http://download.smedley.info/mysql-5.1.51-os2-20101001.zip
|
---|
91 |
|
---|
92 | Linking against this MySQL build also requires pthread.lib:
|
---|
93 |
|
---|
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 |
|
---|
100 | - PostgersSQL 9.0.1 or later to support the PostgresSQL Qt plugin. The
|
---|
101 | PostgresSQL libraries are available at:
|
---|
102 |
|
---|
103 | http://download.smedley.info/postgresql-9.0.1-os2-20101108.zip
|
---|
104 |
|
---|
105 | Note that you will also need libc064x.dll for this PostgresSQL build:
|
---|
106 |
|
---|
107 | http://download.smedley.info/libc064x.zip
|
---|
108 |
|
---|
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.
|
---|
112 |
|
---|
113 |
|
---|
114 |
|
---|
115 | SETTING UP THE ENVIRONMENT
|
---|
116 |
|
---|
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:
|
---|
120 |
|
---|
121 | gcc --version && make --version && wl /version
|
---|
122 |
|
---|
123 | If the setup is done properly, it will print the versions of the key tools
|
---|
124 | to the console.
|
---|
125 |
|
---|
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).
|
---|
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
|
---|
136 | section "USING OFFICIAL BINARY QT ARCHIVES" below.
|
---|
137 |
|
---|
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:
|
---|
141 |
|
---|
142 | - Add the "bin" subdirectory of the directory where you unpacked the Qt4
|
---|
143 | source tree to PATH and BEGINLIBPATH, like this:
|
---|
144 |
|
---|
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 |
|
---|
154 | - Make sure CMD.EXE is your command line processor (the generated makefiles
|
---|
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
|
---|
157 | by executing the followingn command:
|
---|
158 |
|
---|
159 | set MAKESHELL=C:\OS2\CMD.EXE
|
---|
160 |
|
---|
161 | where C: is your boot drive.
|
---|
162 |
|
---|
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.
|
---|
166 |
|
---|
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.
|
---|
171 |
|
---|
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 |
|
---|
|
---|