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