]> git.saurik.com Git - wxWidgets.git/blame - install/gtk/INSTALL
wxFrame::CreateToolBar() stuff
[wxWidgets.git] / install / gtk / INSTALL
CommitLineData
c801d85f
KB
1* General
2----------
3
4wxGTK uses GNU configure. If you have problems with your make use GNU
5make instead.
6
46dc76ba
RR
7* Additional libraries
8-----------------------
9
10wxGTK requires the GTK (The Gimp Toolkit) to be installed,
11which probably makes sense.
12
13There will be a few more features of wxGTK, which will
14require further libraries (on some platforms). These
15features will be optional. I hope to teach configure
16to check that out automatically.
17
18Thread support:
19
20 Requires pthreads under Linux with glibc 2. pthreads are
21 always present on such systems, so just compile.
22
23 Requires pcthreads under Linux with libc 5. If you
24 haven't installed pcthreads, there will be no thread
25 support in wxGTK, but the library will compile.
26
27Python scripting language support:
28
29 Requires Python. Soon to come.
30
31* Other things to do
32-----------------------------
33
34Copy the two files from ~/wxGTK/misc/imlib to your
35home directory. You may also edit imrc by hand as
36you like. The palette file is required when using
37wxGTK in 256-colour mode.
38
39If you want to use wxGTK's ODBC support, you'll have
40to create a .odbc.ini file. The readme file in
41~/wxGTK/src/iodbc tells you what to do.
42
43
c801d85f
KB
44* Create your configuration
45-----------------------------
46dc76ba
RR
46
47This must be done in ~/wxGTK/install/gtk
48
c801d85f
KB
49Usage:
50 ./configure options
51
52If you want to use system's C and C++ compiler,
53set environment variables CC and CCC as
54
55 % setenv CC cc
56 % setenv CCC CC
57 % ./configure options
58
59to see all the options please use:
60
61 ./configure --help
62
63The basic philosophy is that if you want to use different
64configurations, like a debug and a release version,
65or use the same source tree on different systems,
66you have only to change the environment variable OSTYPE.
67(Sadly this variable is not set by default on some systems
68in some shells - on SGI's for example). So you will have to
69set it there. This variable HAS to be set before starting
70configure, so that it knows which system it tries to
71configure for.
72
73Configure will complain if the system variable OSTYPE has
74not been defined. And Make in some circumstances as well...
75
76* General options
77-------------------
78
79The following options handle the kind of library you want to build.
80
81 --with-shared Create shared libraries.
82
83 --without-optimise Do not optimise the code.
84
85 --with-profile Add profiling info to the
86 object files. Currently
87 broken.
88
89 --with-mem_tracing Add built-in memory tracing.
c801d85f 90
46dc76ba 91 --with-debug_info Add debug info to object
c801d85f
KB
92 files.
93
46dc76ba
RR
94 --with-debug_flag Define __DEBUG__ and __WXDEBUG__ when
95 compiling.
96
c801d85f
KB
97* Feature Options
98-------------------
99
100When using the Windows version of wxWindows, it is possible
101to edit the file /include/wx/msw/setup.h in order to enable
102or disable some features of wxWindows so that the resulting
103binaries get smaller.
104
105As I don't yet care for binary size and target mainly at
106producing a shared library, wxGTK's configure system auto-
107matically enables all features, as long as they are already
108implemented.
109
c801d85f
KB
110* Compiling
111-------------
112
46dc76ba
RR
113This must be done in ~/wxGTK
114
c801d85f
KB
115First you have to create all makefiles in all subdirectories:
116
117 make makefiles
118
119Dependencies are generated automatically using
120
121 make depend
122
123Now the makefiles are created you can compile everything is as simple
124as typing:
125
126 make
127
128make yourself some coffee, as it will try to compile
129ALL the files in this distribution.
130
131if you want to be more selective:
132
133 make src will build only the base libraries
134 make utils will build the utils
135 make samples will build the samples
136 make other will build the other samples
137 make user will build the files in the directory other
138
139Depending on the configuration of some files, the libraries
140and binaries will be placed in different directories.
141The "global" binaries and libraries will be placed in:
142
143 bin/$(OSTYPE) and
144 lib/$(OSTYPE) respectively
145
146"local" binaries and libraries will be placed in:
147
148 (basedir of that application)/$(OSTYPE).
149
150This is also the place where all the object-files will go.
151
152If you want to conserve disk space by removing unnecessary
153object-files:
154
155 make clean_obj
156
157will do the work for you.
158
159* Creating a new Project
160--------------------------
161
162I propose to put all contributed programs in the directory
46dc76ba 163"~/wcGTK/user", with a directory of its own.
c801d85f
KB
164
165This directory then should include the following files:
166
167Makefile (You can copy this one from any application in samples
168 probably you will not need to edit this one. There is
169 only one case where you might be interested in changing
170 this file, but about that see later.)
171Makefile.in (This is the base application-Makefile template, from
172 which the actual Makefile for each system is created.
173 More about this later)
174
175put ALL your source code along with all the other stuff you need for
176your application in this directory (subdirectories are welcome).
177
178** Something about Makefiles
179------------------------------
180
181On general principle it should only contain ONE line, which is as follows:
182
183 include ../../src/gtk/setup/general/makeapp
184
185this will include all the necessary definitions for creating the applications
186
187the only case where you might want to add another line is the following:
188this version of configure also supports creation of source archives of the
189application for easy distribution and updates to newer version of wxxt.
190 For this purpose all files in the application-directory will be put into
191a gziped tar-file in the full notation user/<your application>/*
192if you want to include some other files that you want "more visible", like
193a README.<yourApp> or a shell script for easy
194compilation/installation/distribution, then you have to add a variable
195
196 DISTRIBUTE_ADDITIONAL=<your files>
197
198to the Makefile.
199So it would look like this:
200
201 DISTRIBUTE_ADDITIONAL=README.TheApp
202 include ../../src/gtk/setup/general/makeapp
203
204As we have already talked about distribution the command to create a
205distribution is:
206
207 make distrib
208
209NOTE: If you are in the base directory of wxxt it will create
210distribution packages for wxxt as well as for all packages in the
211user directory.
212 So if you want to create only packages for the files in user,
213then go to the directory other and type:
214
215 make distrib
216
217or if you only want one application to be created then
218enter the specific directory and type there:
219make distrib
220
221All the distribution files will be put in the directory
222distrib at the base of the wxxt-tree (where also configure
223and template.mak can be found).
224
225** Something about Makefile.in
226--------------------------------
227
228As you have already seen with Makefile, configure makes a lot of use
229if the include statement in make to keep the Makefiles as simple as
230possible.
231
232So basically there are only variables to define and then a include command.
233Exception to this rule is if you have special rules for some stuff...
234These rules should go AFTER the include statement!!!
235
236so the general header looks like this:
237
238 # wxGTK base directory
239 WXBASEDIR=@WXBASEDIR@
240 # set the OS type for compilation
241 OS=@OS@
242 # compile a library only
243 RULE=bin
244
245and the general footer will look like this:
246
247 # include the definitions now
248 include ../../../template.mak
249
250the key variable is RULE, which defines what make should create
251in this directory.
252
253here are some examples:
254
255 RULE description
256 ===========================================================================
257 bin creates a local binary (for a global binary prefix bin with g)
258 additional variables needed:
259 BIN_TARGET this gives the name of your application
260 BIN_OBJ this gives the object files needed to
261 link the application
262 optional variables are:
263 BIN_SRC this gives the list of c/c++ files for
264 which dependencies will be checked.
265 (This can be achieved with: make depend)
266 BIN_LINK this gives commands for additional
267 libraries needed to link the application
268 ---------------------------------------------------------------------------
269 bin2 creates two local binaries (for global binaries prefix bin2 with g)
270 in addition to the variables specified above you MUST also
271 provide the same variables with BIN2_ instead of BIN_
272 ---------------------------------------------------------------------------
273 lib creates a local library (for a global binary prefix bin with g)
274 additional variables needed:
275 LIB_TARGET this gives the name of your library
276 LIB_OBJ this gives the object files needed for
277 the library to be build.
278 optional variables are:
279 LIB_SRC this gives the list of c/c++ files for
280 which dependencies will be checked.
281 libbin and libgbin are also possible and will need in addition
282 the variables from bin
283 ---------------------------------------------------------------------------
284 gslib is similar to lib, but it creates a shared library if the system
285 supports it.
286 additional variables needed:
287 LIB_MAJOR major number of the shared library
288 LIB_MINOR minor number of the shared library
289 ---------------------------------------------------------------------------
290 other additional variables:
291
292 ADD_COMPILE define additional includes/defines that
293 are needed to compile the object files
294 (if you need to reference some directory
295 utils - like wxGrid -, then please
296 reference them with the variables defined
297 in template.mak - e.g.: $(SRCDIR),$(UTILS),
298 $(SAMPLES),$(OTHERS))
299
300 NEEDED_DEFINES lists all the defines that HAVE to be set in
301 /include/wx/setup.h to compile correctly.
302
303 SRC_DIR lists all directories that are needed to
304 compile. (i.e: lists all the directories,
305 where there are source-files.) But it is
306 also needed to clean an object and for
307 machines, for which make does not support
308 VPATH
309
310currently there are the following compiling rules provided:
311object files are created for the following file extensions:
312.c .cc .cpp
313
314Please have a closer look at the Makefiles in this distribution.
315
316* Platforms configure is working with
317---------------------------------------
318
319Please report build succes on any machine. Especially non-
320Linux operating systems (which I don't have).
321
322Original author of the autoconf system for wxxt-1.66 and for this INSTALL
323file:
324
325 Martin Sperl sperl@dsn.ast.univie.ac.at
326
327Ported to wxGTK 0.1:
328
329 Wolfram Gloger wmglo@dent.med.uni-muenchen.de
330
331Thanks alot to both of them.
332
333In the hope that it will be useful,
334
335 Robert Roebling roebling@sun2.ruf.uni-freiburg.de
336
82052aff 337