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