home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 February / CMCD0205.ISO / Linux / gimp-2.2.0.tar.gz / gimp-2.2.0.tar / gimp-2.2.0 / HACKING < prev    next >
Text File  |  2004-12-17  |  6KB  |  155 lines

  1. Requirements
  2. ------------
  3. If you want to hack on the GIMP project, it will make your life easier
  4. to have the following packages (or newer versions) installed:
  5.  
  6.     * GNU autoconf 2.54
  7.         - ftp://ftp.gnu.org/gnu/autoconf/
  8.     * GNU automake 1.7  (1.9, 1.8 and 1.6 will also work)
  9.         - ftp://ftp.gnu.org/gnu/automake/
  10.     * GNU libtool 1.4  (1.5 if you are compiling on Win32)
  11.         - ftp://ftp.gnu.org/gnu/libtool/
  12.  
  13. Fine GNU mirrors are listed at http://www.gnu.org/prep/ftp.html
  14. Beta software can be found at alpha.gnu.org.
  15.  
  16.     * pkg-config 0.7.0 (or preferably a newer version)
  17.         - http://www.freedesktop.org/software/pkgconfig/
  18.  
  19.     * intltoolize 0.31.1 (or preferably a newer version)
  20.         - ftp://ftp.gnome.org/pub/gnome/sources/intltool/
  21.  
  22.     * gtkdocize
  23.         - http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/
  24.  
  25.     * xsltproc
  26.         - ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1/
  27.  
  28. These are only the additional requirements if you want to compile from
  29. CVS. The file INSTALL lists the various libraries we depend on.
  30.  
  31.  
  32. Compilation
  33. -----------
  34. If you are accessing gimp via CVS, then you will need to take several
  35. steps to get it to compile.  You can do all these steps at once
  36. by running:
  37.  
  38.     cvsroot/gimp$ ./autogen.sh
  39.  
  40. Basically this does the following for you:
  41.  
  42.     cvsroot/gimp$ aclocal-1.7; libtoolize; automake-1.7 -a;
  43.     cvsroot/gimp$ autoconf; glib-gettextize; intltoolize
  44.  
  45. The above commands create the "configure" script.  Now you can run the
  46. configure script in cvsroot/gimp to create all the Makefiles.
  47.  
  48. Before running autogen.sh or configure, make sure you have libtool in
  49. your path. Also make sure glib-2.0.m4 glib-gettext.m4, gtk-2.0.m4,
  50. pkg.m4 and intltool.m4 are either installed in the same
  51. $prefix/share/aclocal relative to your automake/aclocal installation
  52. or call autogen.sh as follows:
  53.  
  54.     $ ACLOCAL_FLAGS="-I $prefix/share/aclocal" ./autogen.sh
  55.  
  56. Note that autogen.sh runs configure for you.  If you wish to pass
  57. options like --prefix=/usr to configure you can give those options to
  58. autogen.sh and they will be passed on to configure.
  59.  
  60. If AUTOGEN_CONFIGURE_ARGS is set, these options will also be passed to
  61. the configure script. If for example you want to enable the build of
  62. the GIMP API reference manuals, you can set AUTOGEN_CONFIGURE_ARGS to
  63. "--enable-gtk-doc". Please note that you will then need a recent
  64. version of gtk-doc as well as a working setup for handling DocBook/XML.
  65.  
  66.  
  67. CVS
  68. ---
  69. GIMP is available from GNOME CVS. You can also grab glib, pango, atk,
  70. gtk+, libart, gtkhtml2 as well as intltool and gtk-doc from the same
  71. CVS server. You can use the following commands to get them from the
  72. anonymous CVS server:
  73.  
  74.     $ export CVSROOT=':pserver:anonymous@anoncvs.gimp.org:/cvs/gnome'
  75.     $ cvs login
  76.          (there is no password, just hit return)
  77.     $ cvs -z3 checkout [-r <branch>] <module>
  78.  
  79. The interesting modules and the suggested stable branches to use are:
  80.  
  81.     * gimp
  82.     * glib        (glib-2-4)
  83.     * atk         (gnome-2-6)
  84.     * pango       (pango-1-4)
  85.     * gtk+        (gtk-2-4)
  86.     * libart_lgpl
  87.     * gtkhtml2
  88.     * intltool
  89.     * gtk-doc
  90.  
  91.  
  92. Patches
  93. -------
  94. Please submit patches to the gimp-developer@lists.xcf.berkeley.edu
  95. mailing list. It's also a good idea to file a bug-report at
  96. http://bugzilla.gnome.org/ and attach your patch to it.  All kinds 
  97. of contributions are appreciated. 
  98.  
  99.  
  100. Autogenerated Files
  101. -------------------
  102. Please notice that some files in the source are generated from other
  103. sources. All those files have a short notice about being autogenerated
  104. somewhere at the top. Among them are the files ending in _pdb.[ch] in
  105. the libgimp directory and the files ending in _cmds.c in the app/pdb
  106. subdirectory. Those are generated from the respective .pdb files in
  107. tools/pdbgen/pdb. The list of contributors is used in several files
  108. which are for that reason generated from the file contributors in
  109. tools/authorsgen.
  110.  
  111.  
  112. Hackordnung
  113. -----------
  114. We encourage you to follow the GIMP coding style throughout the GIMP
  115. project.  For the core components (application and libs) this coding
  116. style is enforced.  The GIMP coding style is defined as follows:
  117.  
  118.     * There's a single space between the function name and the opening
  119.       bracket.
  120.  
  121.     * Function names are lowercase, words separated by underscores.
  122.  
  123.     * Macros and enums are all uppercase, words seperated by
  124.       underscores.
  125.  
  126.     * Types are all words capitalized, no separators between words.
  127.  
  128.     * All functions in header files need to be prototyped.
  129.  
  130.     * Indentation rules are GNU coding style, in particular:
  131.         - 2 characters indentation level
  132.         - Do not use tabs (of course your editor can use tabs, but it 
  133.           should write them to file as 8 spaces each).
  134.         - Opening brackets are on a new line and indented one level.
  135.         - Function header have the return type on one line, the name
  136.           starting in the first column of the following line. All
  137.           parameters are prototyped and there's a new line for each.
  138.  
  139. Try to make use of GLib's object system as much as possible. Do not
  140. create wrappers around functions of parent classes. If you end up
  141. duplicating code, try to create a common parent class and implement
  142. the common methods there.
  143.  
  144. Don't include headers in headers except where unavoidable (e.g. for
  145. deriving objects). Opaque typedefs go to app/base/base-types.h,
  146. app/core/core-types.h etc. See devel-docs/includes.txt for a
  147. detailed description of the include policy.
  148.  
  149. Don't use the GTK wrappers around the GLib object and signal system.
  150.  
  151. One goal of GIMP development is to make the GIMP code more readable
  152. and understandable. Please help us to achieve this goal by cleaning up
  153. the present code and make sure that all new code follows the coding
  154. guidelines.
  155.