]> git.saurik.com Git - wxWidgets.git/blame - docs/wine/install.txt
fixed font-matching bug in wxFontList::FindOrCreateFont for wxGTK when
[wxWidgets.git] / docs / wine / install.txt
CommitLineData
f53561f1
RR
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 ecgs) so you have to make a minimal change
11and recompile all of WINE in order to get anywhere.
12
13This change has do be applied to the /include/windef.h file, line 59
14in the section "Calling convention defintions", where the sources
15reads:
16
17#if __i386__
18
19which has to be changed into
20
21#if 0
22
23After this change, you'll have to recompile all of WINE without
24forgetting to install it. The direct consequence of this change
25is that the Win32 binary emulator won't work anymore, as the
26change disables the Windows native calling convention.
27
28* The most simple case
29-----------------------
30
31If you compile wxWindows on Unix for the first time and don't like to read
32install instructions just do (in the base dir):
33
34./configure --with-wine
35make
36su <type root password>
37make install
38ldconfig
39exit
40
41If you want to remove wxWindows on Unix you can do this:
42
43su <type root password>
44make uninstall
45ldconfig
46exit
47
48* The expert case
49-----------------
50
51If you want to do some more serious cross-platform programming with wxWindows,
52such as for GTK and Motif, you can now build two complete libraries and use
53them concurretly. For this end, you have to create a directory for each build
54of wxWindows - you may also want to create different versions of wxWindows
55and test them concurrently. Most typically, this would be a version configured
56with --enable-debug_flag and one without. Note, that only one build can currently
57be installed, so you'd have to use local version of the library for that purpose.
58For building three versions (one GTK, one WINE and a debug version of the WINE
59source) you'd do this:
60
61md buildmotif
62cd buildmotif
63../configure --with-motif
64make
65cd ..
66
67md buildwine
68cd buildwine
69../configure --with-wine
70make
71cd ..
72
73md buildwined
74cd buildwined
75../configure --with-wine --enable-debug_flag
76make
77cd ..
78
79* The most simple errors
80------------------------
81
82wxWINE doesn't work yet as WINE isn't really up to the task yet.
83
84You get errors during compilation: The reason is that you probably have a broken
85compiler, which includes almost everything that is called gcc. If you use gcc 2.8
86you have to disable optimsation as the compiler will give up with an internal
87compiler error.
88
89If there is just any way for you to use egcs, use egcs. We cannot fix gcc.
90
91You get immediate segfault when starting any sample or application: This is either
92due to having compiled the library with different flags or options than your program -
93typically you might have the __WXDEBUG__ option set for the library but not for your
94program - or due to using a broken compiler (and its optimisation) such as GCC 2.8.
95
96* The most simple program
97-------------------------
98
99Now create your super-application myfoo.app and compile anywhere with
100
101g++ myfoo.cpp `wx-config --libs --cflags` -o myfoo
102
103* General
104-----------------------
105
106The Unix variants of wxWindows use GNU configure. If you have problems with your
107make use GNU make instead.
108
109If you have general problems with installation, read my homepage at
110
111 http://wesley.informatik.uni-freiburg.de/~wxxt
112
113for newest information. If you still don't have any success, please send a bug
114report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
115YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF WINE, WXWINE, WHAT DISTRIBUTION
116YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect, but I tried...
117
118* GUI libraries
119-----------------------
120
121wxWindows/WINE requires the WINE library to be installed on your system.
122
123You 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
130Usage:
131 ./configure options
132
133If you want to use system's C and C++ compiler,
134set environment variables CC and CCC as
135
136 % setenv CC cc
137 % setenv CCC CC
138 % ./configure options
139
140to see all the options please use:
141
142 ./configure --help
143
144The basic philosophy is that if you want to use different
145configurations, like a debug and a release version,
146or use the same source tree on different systems,
147you have only to change the environment variable OSTYPE.
148(Sadly this variable is not set by default on some systems
149in some shells - on SGI's for example). So you will have to
150set it there. This variable HAS to be set before starting
151configure, so that it knows which system it tries to
152configure for.
153
154Configure will complain if the system variable OSTYPE has
155not been defined. And Make in some circumstances as well...
156
157
158* General options
159-------------------
160
161Given below are the commands to change the default behaviour,
162i.e. if it says "--disable-threads" it means that threads
163are enabled by default.
164
165Many of the confiugre options have been thoroughly tested
166in wxWindows snapshot 6, but not yet all (ODBC not).
167
168You must do this by running configure with either of:
169
170 --with-wine Use the WINE library
171
172The 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
f7bdcdd7
RR
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
bea74fbb 194 --enable-no_exceptions Enable compilation without creation of
f7bdcdd7
RR
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
f53561f1
RR
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
220Many of the confiugre options have been thoroughly tested
221in wxWindows snapshot 6, but not yet all (ODBC not).
222
223When producing an executable that is linked statically with wxGTK
224you'll be surprised at its immense size. This can sometimes be
225drastically reduced by removing features from wxWindows that
226are not used in your program. The most relevant such features
227are
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
261Apart from disabling certain features you can very often "strip"
262the program of its debugging information resulting in a significant
263reduction in size.
264
265* Compiling
266-------------
267
268The following must be done in the base directory (e.g. ~/wxGTK
269or ~/wxWin or whatever)
270
271Now the makefiles are created (by configure) and you can compile
272the library by typing:
273
274 make
275
276make yourself some coffee, as it will take some time. On an old
277386SX possibly two weeks. During compilation, you'll get a few
278warning messages depending in your compiler.
279
280If you want to be more selective, you can change into a specific
281directiry and type "make" there.
282
283Then you may install the library and it's header files under
284/usr/local/include/wx and /usr/local/lib respectively. You
285have to log in as root (i.e. run "su" and enter the root
286password) and type
287
288 make install
289
290You can remove any traces of wxWindows by typing
291
292 make uninstall
293
294If you want to save disk space by removing unnecessary
295object-files:
296
297 make clean
298
299in the various directories will do the work for you.
300
301* Creating a new Project
302--------------------------
303
3041) The first way uses the installed libraries and header files
305automatically using wx-config
306
307g++ myfoo.cpp `wx-config --libs` `wx-config --cflags` -o myfoo
308
309Using this way, a make file for the minimal sample would look
310like this
311
312CC = g++
313
314minimal: minimal.o
315 $(CC) -o minimal minimal.o `wx-config --libs`
316
317minimal.o: minimal.cpp mondrian.xpm
318 $(CC) `wx-config --cflags` -c minimal.cpp -o minimal.o
319
320clean:
321 rm -f *.o minimal
322
323This is certain to become the standard way unless we decide
324to sitch to tmake.
325
3262) The other way creates a project within the source code
327directories of wxWindows. For this endeavour, you'll need
328the usual number of GNU tools, at least
329
330GNU automake version 1.4
331GNU autoheader version 2.14
332GNU autoconf version 2.14
333GNU libtool version 1.3
334
335and quite possibly
336
337GNU make
338GNU C++
339
340and if you have all this then you probably know enough to
341go ahead yourself :-)
342
343----------------------
344
345In the hope that it will be useful,
346
347 Robert Roebling <roebling@sun2.ruf.uni-freiburg.de>
348
349