]> git.saurik.com Git - wxWidgets.git/blame - docs/wine/install.txt
update the toolbar docs for radio buttons
[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
9b61f868 31If you compile wxWindows on Linux for the first time and don't like to read
f53561f1
RR
32install instructions just do (in the base dir):
33
9b61f868
RR
34> ./configure --with-wine
35> make
36> su <type root password>
37> make install
38> ldconfig
39> exit
40
41On all variants of Unix except Linux (and maybe except *BSD), shared libraries
42are not supportet out of the box due to the utter stupidity of libtool, so you'll
43have to do this to get shared library support:
44
45> ./configure --with-wine --disable-static --enable-shared
46
47Then you'll have to edit the wrongly created libtool script. There are two
48important entries with respect to shared library creation, which are
49
50 archive_cmds="\$LD -shared ....
51 archive_expsym_cmds="\$LD -shared ....
52
53which should be something like
54
55 archive_cmds="\$CC -shared ....
56 archive_expsym_cmds="\$CC -shared ....
57
58Afterwards you can continue with
59
60> make
61> su <type root password>
62> make install
63> ldconfig
64> exit
f53561f1
RR
65
66If you want to remove wxWindows on Unix you can do this:
67
9b61f868
RR
68> su <type root password>
69> make uninstall
70> ldconfig
71> exit
f53561f1
RR
72
73* The expert case
74-----------------
75
76If you want to do some more serious cross-platform programming with wxWindows,
77such as for GTK and Motif, you can now build two complete libraries and use
78them concurretly. For this end, you have to create a directory for each build
79of wxWindows - you may also want to create different versions of wxWindows
80and test them concurrently. Most typically, this would be a version configured
81with --enable-debug_flag and one without. Note, that only one build can currently
82be installed, so you'd have to use local version of the library for that purpose.
83For building three versions (one GTK, one WINE and a debug version of the WINE
84source) you'd do this:
85
86md buildmotif
87cd buildmotif
88../configure --with-motif
89make
90cd ..
91
92md buildwine
93cd buildwine
94../configure --with-wine
95make
96cd ..
97
98md buildwined
99cd buildwined
100../configure --with-wine --enable-debug_flag
101make
102cd ..
103
104* The most simple errors
105------------------------
106
107wxWINE doesn't work yet as WINE isn't really up to the task yet.
108
109You get errors during compilation: The reason is that you probably have a broken
110compiler, which includes almost everything that is called gcc. If you use gcc 2.8
111you have to disable optimsation as the compiler will give up with an internal
112compiler error.
113
114If there is just any way for you to use egcs, use egcs. We cannot fix gcc.
115
116You get immediate segfault when starting any sample or application: This is either
117due to having compiled the library with different flags or options than your program -
118typically you might have the __WXDEBUG__ option set for the library but not for your
119program - or due to using a broken compiler (and its optimisation) such as GCC 2.8.
120
121* The most simple program
122-------------------------
123
124Now create your super-application myfoo.app and compile anywhere with
125
126g++ myfoo.cpp `wx-config --libs --cflags` -o myfoo
127
128* General
129-----------------------
130
131The Unix variants of wxWindows use GNU configure. If you have problems with your
132make use GNU make instead.
133
134If you have general problems with installation, read my homepage at
135
136 http://wesley.informatik.uni-freiburg.de/~wxxt
137
138for newest information. If you still don't have any success, please send a bug
139report to one of our mailing lists (see my homepage) INCLUDING A DESCRIPTION OF
140YOUR SYSTEM AND YOUR PROBLEM, SUCH AS YOUR VERSION OF WINE, WXWINE, WHAT DISTRIBUTION
141YOU USE AND WHAT ERROR WAS REPORTED. I know this has no effect, but I tried...
142
143* GUI libraries
144-----------------------
145
146wxWindows/WINE requires the WINE library to be installed on your system.
147
148You 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
155Usage:
156 ./configure options
157
158If you want to use system's C and C++ compiler,
159set environment variables CC and CCC as
160
161 % setenv CC cc
162 % setenv CCC CC
163 % ./configure options
164
165to see all the options please use:
166
167 ./configure --help
168
169The basic philosophy is that if you want to use different
170configurations, like a debug and a release version,
171or use the same source tree on different systems,
172you have only to change the environment variable OSTYPE.
173(Sadly this variable is not set by default on some systems
174in some shells - on SGI's for example). So you will have to
175set it there. This variable HAS to be set before starting
176configure, so that it knows which system it tries to
177configure for.
178
179Configure will complain if the system variable OSTYPE has
180not been defined. And Make in some circumstances as well...
181
182
183* General options
184-------------------
185
186Given below are the commands to change the default behaviour,
187i.e. if it says "--disable-threads" it means that threads
188are enabled by default.
189
190Many of the confiugre options have been thoroughly tested
191in wxWindows snapshot 6, but not yet all (ODBC not).
192
193You must do this by running configure with either of:
194
195 --with-wine Use the WINE library
196
197The 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
f7bdcdd7
RR
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
bea74fbb 219 --enable-no_exceptions Enable compilation without creation of
f7bdcdd7
RR
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
f53561f1
RR
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
245Many of the confiugre options have been thoroughly tested
246in wxWindows snapshot 6, but not yet all (ODBC not).
247
248When producing an executable that is linked statically with wxGTK
249you'll be surprised at its immense size. This can sometimes be
250drastically reduced by removing features from wxWindows that
251are not used in your program. The most relevant such features
252are
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
286Apart from disabling certain features you can very often "strip"
287the program of its debugging information resulting in a significant
288reduction in size.
289
290* Compiling
291-------------
292
293The following must be done in the base directory (e.g. ~/wxGTK
294or ~/wxWin or whatever)
295
296Now the makefiles are created (by configure) and you can compile
297the library by typing:
298
299 make
300
301make yourself some coffee, as it will take some time. On an old
302386SX possibly two weeks. During compilation, you'll get a few
303warning messages depending in your compiler.
304
305If you want to be more selective, you can change into a specific
306directiry and type "make" there.
307
308Then you may install the library and it's header files under
309/usr/local/include/wx and /usr/local/lib respectively. You
310have to log in as root (i.e. run "su" and enter the root
311password) and type
312
313 make install
314
315You can remove any traces of wxWindows by typing
316
317 make uninstall
318
319If you want to save disk space by removing unnecessary
320object-files:
321
322 make clean
323
324in the various directories will do the work for you.
325
326* Creating a new Project
327--------------------------
328
3291) The first way uses the installed libraries and header files
330automatically using wx-config
331
332g++ myfoo.cpp `wx-config --libs` `wx-config --cflags` -o myfoo
333
334Using this way, a make file for the minimal sample would look
335like this
336
337CC = g++
338
339minimal: minimal.o
340 $(CC) -o minimal minimal.o `wx-config --libs`
341
342minimal.o: minimal.cpp mondrian.xpm
343 $(CC) `wx-config --cflags` -c minimal.cpp -o minimal.o
344
345clean:
346 rm -f *.o minimal
347
348This is certain to become the standard way unless we decide
349to sitch to tmake.
350
3512) The other way creates a project within the source code
352directories of wxWindows. For this endeavour, you'll need
353the usual number of GNU tools, at least
354
355GNU automake version 1.4
356GNU autoheader version 2.14
357GNU autoconf version 2.14
358GNU libtool version 1.3
359
360and quite possibly
361
362GNU make
363GNU C++
364
365and if you have all this then you probably know enough to
366go ahead yourself :-)
367
368----------------------
369
370In the hope that it will be useful,
371
372 Robert Roebling <roebling@sun2.ruf.uni-freiburg.de>
373
374