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