2001-01-29 20:50:19 +08:00
|
|
|
Requirements
|
|
|
|
------------
|
2001-08-28 22:59:42 +08:00
|
|
|
If you want to hack on the GIMP project, it will make your life easier
|
|
|
|
to have the following packages (or newer versions) installed:
|
1998-02-26 19:55:07 +08:00
|
|
|
|
2004-03-20 03:35:49 +08:00
|
|
|
* GNU autoconf 2.54
|
2003-09-03 02:57:01 +08:00
|
|
|
- ftp://ftp.gnu.org/gnu/autoconf/
|
2007-11-21 17:30:21 +08:00
|
|
|
* GNU automake 1.9 (automake 1.10 should also work)
|
2003-09-03 02:57:01 +08:00
|
|
|
- ftp://ftp.gnu.org/gnu/automake/
|
2007-11-21 17:30:21 +08:00
|
|
|
* GNU libtool 1.5
|
2003-09-03 02:57:01 +08:00
|
|
|
- ftp://ftp.gnu.org/gnu/libtool/
|
1999-01-21 12:49:18 +08:00
|
|
|
|
2003-09-03 02:57:01 +08:00
|
|
|
Fine GNU mirrors are listed at http://www.gnu.org/prep/ftp.html
|
|
|
|
Beta software can be found at alpha.gnu.org.
|
1998-02-26 19:55:07 +08:00
|
|
|
|
2007-11-21 17:30:21 +08:00
|
|
|
* pkg-config 0.16.0 (or preferably a newer version)
|
2003-09-03 02:57:01 +08:00
|
|
|
- http://www.freedesktop.org/software/pkgconfig/
|
2002-02-23 01:35:07 +08:00
|
|
|
|
2004-12-14 06:51:55 +08:00
|
|
|
* gtkdocize
|
|
|
|
- http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/
|
|
|
|
|
2004-05-02 06:43:15 +08:00
|
|
|
* xsltproc
|
|
|
|
- ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1/
|
|
|
|
|
2002-06-08 07:00:46 +08:00
|
|
|
These are only the additional requirements if you want to compile from
|
2007-01-20 15:18:09 +08:00
|
|
|
the Subversion repository. The file INSTALL lists the various libraries
|
|
|
|
we depend on.
|
2002-03-10 02:21:36 +08:00
|
|
|
|
2001-01-29 20:50:19 +08:00
|
|
|
|
|
|
|
Compilation
|
|
|
|
-----------
|
2007-01-20 15:18:09 +08:00
|
|
|
If you are accessing gimp via Subversion, then you will need to take
|
|
|
|
several steps to get it to compile. You can do all these steps at once
|
1998-03-14 13:15:01 +08:00
|
|
|
by running:
|
1998-02-26 19:55:07 +08:00
|
|
|
|
2007-01-20 15:18:09 +08:00
|
|
|
gimp/trunk$ ./autogen.sh
|
1998-02-26 19:55:07 +08:00
|
|
|
|
1998-03-14 13:15:01 +08:00
|
|
|
Basically this does the following for you:
|
1998-02-26 19:55:07 +08:00
|
|
|
|
2007-01-20 15:18:09 +08:00
|
|
|
gimp/trunk$ aclocal-1.9; libtoolize; automake-1.9 -a;
|
2008-08-12 00:15:25 +08:00
|
|
|
gimp/trunk$ autoconf; intltoolize --automake
|
1998-03-14 13:15:01 +08:00
|
|
|
|
2003-09-03 02:57:01 +08:00
|
|
|
The above commands create the "configure" script. Now you can run the
|
2007-01-20 15:18:09 +08:00
|
|
|
configure script in gimp/trunk to create all the Makefiles.
|
1998-03-14 13:15:01 +08:00
|
|
|
|
2001-07-25 10:22:05 +08:00
|
|
|
Before running autogen.sh or configure, make sure you have libtool in
|
2002-02-23 01:35:07 +08:00
|
|
|
your path. Also make sure glib-2.0.m4 glib-gettext.m4, gtk-2.0.m4,
|
2002-03-03 02:04:05 +08:00
|
|
|
pkg.m4 and intltool.m4 are either installed in the same
|
|
|
|
$prefix/share/aclocal relative to your automake/aclocal installation
|
2003-09-03 02:57:01 +08:00
|
|
|
or call autogen.sh as follows:
|
2002-02-23 01:35:07 +08:00
|
|
|
|
2003-09-03 02:57:01 +08:00
|
|
|
$ ACLOCAL_FLAGS="-I $prefix/share/aclocal" ./autogen.sh
|
1998-03-14 13:15:01 +08:00
|
|
|
|
|
|
|
Note that autogen.sh runs configure for you. If you wish to pass
|
2001-07-25 10:22:05 +08:00
|
|
|
options like --prefix=/usr to configure you can give those options to
|
|
|
|
autogen.sh and they will be passed on to configure.
|
1998-03-14 13:15:01 +08:00
|
|
|
|
2004-03-04 22:47:37 +08:00
|
|
|
If AUTOGEN_CONFIGURE_ARGS is set, these options will also be passed to
|
|
|
|
the configure script. If for example you want to enable the build of
|
|
|
|
the GIMP API reference manuals, you can set AUTOGEN_CONFIGURE_ARGS to
|
|
|
|
"--enable-gtk-doc". Please note that you will then need a recent
|
|
|
|
version of gtk-doc as well as a working setup for handling DocBook/XML.
|
2003-02-08 18:52:19 +08:00
|
|
|
|
2005-01-21 02:21:41 +08:00
|
|
|
If you do not have a recent version of gtk-doc, you can pass the
|
|
|
|
option "--disable-gtk-doc" to autogen.sh. This will completely
|
|
|
|
disable the support for gtk-doc so you will not be able to generate
|
|
|
|
the API documentation.
|
|
|
|
|
2001-01-29 20:50:19 +08:00
|
|
|
|
2007-01-20 15:18:09 +08:00
|
|
|
Subversion
|
|
|
|
----------
|
2008-03-24 07:21:51 +08:00
|
|
|
GIMP is available from GNOME Subversion. You can use the following
|
|
|
|
commands to get them from the anonymous Subversion server:
|
2007-01-20 15:18:09 +08:00
|
|
|
|
2008-03-24 07:21:51 +08:00
|
|
|
For getting GIMP trunk, use:
|
2007-01-20 15:18:09 +08:00
|
|
|
|
2008-03-24 07:21:51 +08:00
|
|
|
$ svn co http://svn.gnome.org/svn/gimp/trunk gimp
|
2007-01-20 15:18:09 +08:00
|
|
|
|
2008-03-24 07:21:51 +08:00
|
|
|
For getting a GIMP branch, use:
|
2007-01-20 15:18:09 +08:00
|
|
|
|
2008-03-24 07:21:51 +08:00
|
|
|
$ svn co http://svn.gnome.org/svn/gimp/branches/<branch> gimp-<branch>
|
2001-09-26 20:52:12 +08:00
|
|
|
|
2007-01-20 15:18:09 +08:00
|
|
|
You can read more on using GNOME's Subversion service at these URLs:
|
|
|
|
|
|
|
|
http://developer.gnome.org/tools/svn.html
|
|
|
|
http://svnbook.red-bean.com/
|
|
|
|
|
2001-01-29 20:50:19 +08:00
|
|
|
|
2008-03-24 07:21:51 +08:00
|
|
|
You will also need relatively new stable releases of glib, pango, atk,
|
2008-05-09 15:21:48 +08:00
|
|
|
gtk+, cairo, gtkhtml2, etc. for building GIMP, which you can get as a
|
2008-03-24 07:21:51 +08:00
|
|
|
part of recent Linux distribution releases.
|
|
|
|
|
|
|
|
|
2001-01-29 20:50:19 +08:00
|
|
|
Patches
|
|
|
|
-------
|
2006-08-07 23:15:27 +08:00
|
|
|
|
2006-07-28 04:39:34 +08:00
|
|
|
The best way to submit patches is to file a bug report at
|
2006-08-07 23:15:27 +08:00
|
|
|
http://bugzilla.gnome.org/ and attach your patch to it as a plain text
|
|
|
|
file, not compressed. If your patch is reasonably small you can submit
|
|
|
|
it to the gimp-developer@lists.xcf.berkeley.edu mailing list. If the
|
|
|
|
patch needs to be discussed, you should also consider using the
|
|
|
|
mailing list instead of Bugzilla because bug reports tend to be hard
|
|
|
|
to read if they contain too many comments. For the code, please try to
|
|
|
|
follow the guidelines given in Hackordnung, below. You can create the
|
2007-01-20 15:18:09 +08:00
|
|
|
patch file with "svn diff", preferably in an annotated patch format.
|
|
|
|
This can be achieved with ~/.subversion/config containing a custom
|
|
|
|
diff command in the [helpers] section:
|
|
|
|
|
|
|
|
[helpers]
|
|
|
|
diff-cmd = /usr/local/bin/_svndiff
|
|
|
|
|
|
|
|
And create an executable script in /usr/local/bin/_svndiff with the
|
|
|
|
following contents:
|
|
|
|
|
|
|
|
#!/bin/sh
|
|
|
|
/usr/bin/diff -up --label "${3}" ${6} --label "${5}" ${7}
|
2002-03-10 02:21:36 +08:00
|
|
|
|
2001-01-29 20:50:19 +08:00
|
|
|
|
2007-01-09 18:52:47 +08:00
|
|
|
Auto-generated Files
|
|
|
|
--------------------
|
2002-03-03 02:04:05 +08:00
|
|
|
Please notice that some files in the source are generated from other
|
2007-01-09 18:52:47 +08:00
|
|
|
sources. All those files have a short notice about being generated
|
2008-04-04 19:20:15 +08:00
|
|
|
somewhere at the top. Among them are the files ending in pdb.[ch] in
|
|
|
|
the libgimp directory and the files ending in cmds.c in the app/pdb
|
2002-03-03 02:04:05 +08:00
|
|
|
subdirectory. Those are generated from the respective .pdb files in
|
2007-01-21 01:50:44 +08:00
|
|
|
tools/pdbgen/pdb.
|
2001-01-29 20:50:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
Hackordnung
|
|
|
|
-----------
|
2002-03-03 02:04:05 +08:00
|
|
|
We encourage you to follow the GIMP coding style throughout the GIMP
|
|
|
|
project. For the core components (application and libs) this coding
|
|
|
|
style is enforced. The GIMP coding style is defined as follows:
|
2001-01-29 20:50:19 +08:00
|
|
|
|
2004-03-20 03:35:49 +08:00
|
|
|
* There's a single space between the function name and the opening
|
2006-04-28 17:18:51 +08:00
|
|
|
paren.
|
2004-03-20 03:35:49 +08:00
|
|
|
|
2003-09-03 02:57:01 +08:00
|
|
|
* Function names are lowercase, words separated by underscores.
|
|
|
|
|
|
|
|
* Macros and enums are all uppercase, words seperated by
|
|
|
|
underscores.
|
|
|
|
|
|
|
|
* Types are all words capitalized, no separators between words.
|
2001-01-29 20:50:19 +08:00
|
|
|
|
2003-09-03 02:57:01 +08:00
|
|
|
* All functions in header files need to be prototyped.
|
2001-01-29 20:50:19 +08:00
|
|
|
|
2003-09-03 02:57:01 +08:00
|
|
|
* Indentation rules are GNU coding style, in particular:
|
|
|
|
- 2 characters indentation level
|
2006-04-28 17:18:51 +08:00
|
|
|
- Do not use tabs (of course your editor can accept the TAB key
|
|
|
|
as a command, typically to indent the current line properly
|
|
|
|
or to add spaces at the cursor until the next multiple of 8
|
|
|
|
columns, but it should not put TAB characters in the file).
|
|
|
|
- When editing files that still have TABs in them, make sure your
|
|
|
|
editor interprets the TABs correctly, that is, has tab stops
|
|
|
|
at 8 column intervals.
|
|
|
|
- Opening braces are on a new line and indented one level.
|
2003-09-03 02:57:01 +08:00
|
|
|
- Function header have the return type on one line, the name
|
|
|
|
starting in the first column of the following line. All
|
|
|
|
parameters are prototyped and there's a new line for each.
|
2001-01-29 20:50:19 +08:00
|
|
|
|
2002-03-03 02:04:05 +08:00
|
|
|
Try to make use of GLib's object system as much as possible. Do not
|
|
|
|
create wrappers around functions of parent classes. If you end up
|
|
|
|
duplicating code, try to create a common parent class and implement
|
|
|
|
the common methods there.
|
2001-01-29 20:50:19 +08:00
|
|
|
|
2001-02-14 22:57:14 +08:00
|
|
|
Don't include headers in headers except where unavoidable (e.g. for
|
2001-11-13 09:46:10 +08:00
|
|
|
deriving objects). Opaque typedefs go to app/base/base-types.h,
|
2002-05-03 20:45:22 +08:00
|
|
|
app/core/core-types.h etc. See devel-docs/includes.txt for a
|
|
|
|
detailed description of the include policy.
|
2001-02-14 22:57:14 +08:00
|
|
|
|
2001-07-25 10:22:05 +08:00
|
|
|
Don't use the GTK wrappers around the GLib object and signal system.
|
|
|
|
|
2004-03-20 03:35:49 +08:00
|
|
|
One goal of GIMP development is to make the GIMP code more readable
|
|
|
|
and understandable. Please help us to achieve this goal by cleaning up
|
|
|
|
the present code and make sure that all new code follows the coding
|
|
|
|
guidelines.
|