]> git.saurik.com Git - wxWidgets.git/blob - docs/wine/install.txt
Made the RTTI thing an option.
[wxWidgets.git] / docs / wine / install.txt
1
2 !!! When sending bug reports tell us what version of wxWindows you are
3 using (including the beta) and what compiler on what system. One
4 example: wxWINE 2.1 snapshot 6, egcs 1.1.1, Redhat 5.0 !!!
5
6 * Preparing WINE
7 ----------------
8
9 Most C++ compilers cannot compile the WINE sources yet (this includes
10 all versions of g++ and ecgs) so you have to make a minimal change
11 and recompile all of WINE in order to get anywhere.
12
13 This change has do be applied to the /include/windef.h file, line 59
14 in the section "Calling convention defintions", where the sources
15 reads:
16
17 #if __i386__
18
19 which has to be changed into
20
21 #if 0
22
23 After this change, you'll have to recompile all of WINE without
24 forgetting to install it. The direct consequence of this change
25 is that the Win32 binary emulator won't work anymore, as the
26 change disables the Windows native calling convention.
27
28 * The most simple case
29 -----------------------
30
31 If you compile wxWindows on Unix for the first time and don't like to read
32 install instructions just do (in the base dir):
33
34 ./configure --with-wine
35 make
36 su <type root password>
37 make install
38 ldconfig
39 exit
40
41 If you want to remove wxWindows on Unix you can do this:
42
43 su <type root password>
44 make uninstall
45 ldconfig
46 exit
47
48 * The expert case
49 -----------------
50
51 If you want to do some more serious cross-platform programming with wxWindows,
52 such as for GTK and Motif, you can now build two complete libraries and use
53 them concurretly. For this end, you have to create a directory for each build
54 of wxWindows - you may also want to create different versions of wxWindows
55 and test them concurrently. Most typically, this would be a version configured
56 with --enable-debug_flag and one without. Note, that only one build can currently
57 be installed, so you'd have to use local version of the library for that purpose.
58 For building three versions (one GTK, one WINE and a debug version of the WINE
59 source) you'd do this:
60
61 md buildmotif
62 cd buildmotif
63 ../configure --with-motif
64 make
65 cd ..
66
67 md buildwine
68 cd buildwine
69 ../configure --with-wine
70 make
71 cd ..
72
73 md buildwined
74 cd buildwined
75 ../configure --with-wine --enable-debug_flag
76 make
77 cd ..
78
79 * The most simple errors
80 ------------------------
81
82 wxWINE doesn't work yet as WINE isn't really up to the task yet.
83
84 You get errors during compilation: The reason is that you probably have a broken
85 compiler, which includes almost everything that is called gcc. If you use gcc 2.8
86 you have to disable optimsation as the compiler will give up with an internal
87 compiler error.
88
89 If there is just any way for you to use egcs, use egcs. We cannot fix gcc.
90
91 You get immediate segfault when starting any sample or application: This is either
92 due to having compiled the library with different flags or options than your program -
93 typically you might have the __WXDEBUG__ option set for the library but not for your
94 program - or due to using a broken compiler (and its optimisation) such as GCC 2.8.
95
96 * The most simple program
97 -------------------------
98
99 Now create your super-application myfoo.app and compile anywhere with
100
101 g++ myfoo.cpp `wx-config --libs --cflags` -o myfoo
102
103 * General
104 -----------------------
105
106 The Unix variants of wxWindows use GNU configure. If you have problems with your
107 make use GNU make instead.
108
109 If you have general problems with installation, read my homepage at
110
111 http://wesley.informatik.uni-freiburg.de/~wxxt
112
113 for newest information. If you still don't have any success, please send a bug
114 report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
115 YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF WINE, WXWINE, WHAT DISTRIBUTION
116 YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect, but I tried...
117
118 * GUI libraries
119 -----------------------
120
121 wxWindows/WINE requires the WINE library to be installed on your system.
122
123 You can get the newest version of the WINE from the WINE homepage at:
124
125 http://www.winehq.com
126
127 * Create your configuration
128 -----------------------------
129
130 Usage:
131 ./configure options
132
133 If you want to use system's C and C++ compiler,
134 set environment variables CC and CCC as
135
136 % setenv CC cc
137 % setenv CCC CC
138 % ./configure options
139
140 to see all the options please use:
141
142 ./configure --help
143
144 The basic philosophy is that if you want to use different
145 configurations, like a debug and a release version,
146 or use the same source tree on different systems,
147 you have only to change the environment variable OSTYPE.
148 (Sadly this variable is not set by default on some systems
149 in some shells - on SGI's for example). So you will have to
150 set it there. This variable HAS to be set before starting
151 configure, so that it knows which system it tries to
152 configure for.
153
154 Configure will complain if the system variable OSTYPE has
155 not been defined. And Make in some circumstances as well...
156
157
158 * General options
159 -------------------
160
161 Given below are the commands to change the default behaviour,
162 i.e. if it says "--disable-threads" it means that threads
163 are enabled by default.
164
165 Many of the confiugre options have been thoroughly tested
166 in wxWindows snapshot 6, but not yet all (ODBC not).
167
168 You must do this by running configure with either of:
169
170 --with-wine Use the WINE library
171
172 The following options handle the kind of library you want to build.
173
174 --enable-threads Compile without thread support. Threads
175 support is also required for the
176 socket code to work.
177
178 --disable-shared Do not create shared libraries.
179
180 --disable-optimise Do not optimise the code. Can
181 sometimes be useful for debugging
182 and is required on some architectures
183 such as Sun with gcc 2.8.X which
184 would otherwise produce segvs.
185
186 --enable-profile Add profiling info to the object
187 files. Currently broken, I think.
188
189 --enable-no_rtti Enable compilation without creation of
190 C++ RTTI information in object files.
191 This will speed-up compilation and reduce
192 binary size.
193
194 --enable-no_rtti Enable compilation without creation of
195 C++ exception information in object files.
196 This will speed-up compilation and reduce
197 binary size. Also fewer crashes during the
198 actual compilation...
199
200 --enable-mem_tracing Add built-in memory tracing.
201
202 --enable-dmalloc Use the dmalloc memory debugger.
203 Read more at www.letters.com/dmalloc/
204
205 --enable-debug_info Add debug info to object files and
206 executables for use with debuggers
207 such as gdb (or its many frontends).
208
209 --enable-debug_flag Define __DEBUG__ and __WXDEBUG__ when
210 compiling. This enable wxWindows' very
211 useful internal debugging tricks (such
212 as automatically reporting illegal calls)
213 to work. Note that program and library
214 must be compiled with the same debug
215 options.
216
217 * Feature Options
218 -------------------
219
220 Many of the confiugre options have been thoroughly tested
221 in wxWindows snapshot 6, but not yet all (ODBC not).
222
223 When producing an executable that is linked statically with wxGTK
224 you'll be surprised at its immense size. This can sometimes be
225 drastically reduced by removing features from wxWindows that
226 are not used in your program. The most relevant such features
227 are
228
229 --without-libpng Disables PNG image format code.
230
231 --without-libjpeg Disables JPEG image format code.
232
233 { --without-odbc Disables ODBC code. Not yet. }
234
235 --disable-resources Disables the use of *.wxr type
236 resources.
237
238 --disable-threads Disables threads. Will also
239 disable sockets.
240
241 --disable-sockets Disables sockets.
242
243 --disable-dnd Disables Drag'n'Drop.
244
245 --disable-clipboard Disables Clipboard.
246
247 --disable-serial Disables object instance serialiasation.
248
249 --disable-streams Disables the wxStream classes.
250
251 --disable-file Disables the wxFile class.
252
253 --disable-textfile Disables the wxTextFile class.
254
255 --disable-intl Disables the internationalisation.
256
257 --disable-validators Disables validators.
258
259 --disable-accel Disables accel.
260
261 Apart from disabling certain features you can very often "strip"
262 the program of its debugging information resulting in a significant
263 reduction in size.
264
265 * Compiling
266 -------------
267
268 The following must be done in the base directory (e.g. ~/wxGTK
269 or ~/wxWin or whatever)
270
271 Now the makefiles are created (by configure) and you can compile
272 the library by typing:
273
274 make
275
276 make yourself some coffee, as it will take some time. On an old
277 386SX possibly two weeks. During compilation, you'll get a few
278 warning messages depending in your compiler.
279
280 If you want to be more selective, you can change into a specific
281 directiry and type "make" there.
282
283 Then you may install the library and it's header files under
284 /usr/local/include/wx and /usr/local/lib respectively. You
285 have to log in as root (i.e. run "su" and enter the root
286 password) and type
287
288 make install
289
290 You can remove any traces of wxWindows by typing
291
292 make uninstall
293
294 If you want to save disk space by removing unnecessary
295 object-files:
296
297 make clean
298
299 in the various directories will do the work for you.
300
301 * Creating a new Project
302 --------------------------
303
304 1) The first way uses the installed libraries and header files
305 automatically using wx-config
306
307 g++ myfoo.cpp `wx-config --libs` `wx-config --cflags` -o myfoo
308
309 Using this way, a make file for the minimal sample would look
310 like this
311
312 CC = g++
313
314 minimal: minimal.o
315 $(CC) -o minimal minimal.o `wx-config --libs`
316
317 minimal.o: minimal.cpp mondrian.xpm
318 $(CC) `wx-config --cflags` -c minimal.cpp -o minimal.o
319
320 clean:
321 rm -f *.o minimal
322
323 This is certain to become the standard way unless we decide
324 to sitch to tmake.
325
326 2) The other way creates a project within the source code
327 directories of wxWindows. For this endeavour, you'll need
328 the usual number of GNU tools, at least
329
330 GNU automake version 1.4
331 GNU autoheader version 2.14
332 GNU autoconf version 2.14
333 GNU libtool version 1.3
334
335 and quite possibly
336
337 GNU make
338 GNU C++
339
340 and if you have all this then you probably know enough to
341 go ahead yourself :-)
342
343 ----------------------
344
345 In the hope that it will be useful,
346
347 Robert Roebling <roebling@sun2.ruf.uni-freiburg.de>
348
349