Difference between revisions of "Development"

From GnuCash
Jump to: navigation, search
(Preliminaries: - fix broken links)
(Use templates; replace obsolete MASTER by more recent stable)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
[[Category:Development]]
 
= Overview =
 
= Overview =
GnuCash is written principally in [http://en.wikipedia.org/wiki/C_(programming_language) C]. A [http://www.gnu.org/software/guile/ Guile] interpreter is built in and parts of Gnucash--principally reports, but also parts of the user configuration, file import, and other small parts--are in Scheme.
+
GnuCash is written principally in [{{URL:wp}}C_(programming_language) C]. A [{{URL:guile}} Guile] interpreter is built in and parts of Gnucash--principally reports, but also parts of the user configuration, file import, and other small parts--are in Scheme.
The C API is wrapped for Guile access with [http://www.swig.org/ SWIG]; Python wrappers can be created with a configure option.  
+
The C API is wrapped for Guile access with [{{URL:swig}} SWIG]; Python wrappers can be created with a configure option.  
  
The GUI is built with [http://www.gtk.org GTK+] version 2.24.
+
The GUI is built with [{{URL:GTK}} GTK+] version {{GTK_Version}}.
  
We're supporting two build systems [http://en.wikipedia.org/wiki/GNU_build_system GNU autotools] and [https://cmake.org CMake]. Understanding this complex system isn't generally necessary for fixing simple bugs, but more complex work will. Here's an [http://www.sourceware.org/autobook/autobook/autobook_toc.html excellent autotools tutorial] and a [https://cmake.org/cmake-tutorial/ short CMake one].
+
We're supporting the [{{URL:cmake}} CMake] build system. Understanding this complex system isn't generally necessary for fixing simple bugs, but more complex work will. Here's a [{{URL:cmake}}getting-started/ Getting Started with CMake] and a [{{URL:cmake-wiki}} wiki].
  
We use [http://www.stack.nl/~dimitri/doxygen Doxygen] to document the sources, including the C API. Details about our use are on the [[Doxygen]] wiki page. The ''Help Manual'' and ''Concepts Guide'' are formatted using [http://www.docbook.org/ DocBook], an SGML markup language which enables us to publish them in several formats. Note that these documents have a separate [https://github.com/Gnucash/gnucash-docs repository].
+
;Documentation:
 +
:;For Developers: We use [{{URL:wp}}Doxygen Doxygen] to document the sources, including the C API. Details about our use are on the [[Doxygen]] wiki page.
 +
:;For Users: The ''GnuCash Manual'' and ''Tutorial and Concepts Guide'' are formatted using [{{URL:wp}}DocBook DocBook], a semantic markup language which enables us to publish them in several formats. Note that these documents have a separate [{{URL:git}}gnucash-docs repository]. The processing is explained in [[Documentation Improvement]].
  
 
== Object Orientation ==
 
== Object Orientation ==
Most of the code is written in an object-oriented style. Some of it uses [http://en.wikipedia.org/wiki/GObject GObject], some uses a home-grown GObject-like system called QofObject, and some just does what GObject does in straight C. Understanding how to use that is an important skill to developing for GnuCash.
+
Most of the code is written in an object-oriented style. Some of it uses [{{URL:wp}}GObject GObject], some uses a home-grown GObject-like system called QofObject, and some just does what GObject does in straight C. Understanding how to use that is an important skill to developing for GnuCash.
The next development cycle will include migrating those parts of Gnucash other than the GUI to [http://isocpp.org/ C++]; see our [[C++]] page for details and resources. We are deferring updating the GUI either to Gtk+-3 or some other framework for at least another development cycle.
+
 
 +
The next development cycle will include migrating those parts of Gnucash other than the GUI to [{{URL:C++}} C++]; see our [[C++]] page for details and resources. We have updated the GUI to Gtk+-3 in the 2.7 series.
  
 
= What We Need Help On =
 
= What We Need Help On =
Line 19: Line 23:
 
Please subscribe to the [[Mailing Lists]] and introduce yourself to the development team. Some of the team also hang out on [[IRC]] so you can interact more directly.
 
Please subscribe to the [[Mailing Lists]] and introduce yourself to the development team. Some of the team also hang out on [[IRC]] so you can interact more directly.
  
Read the two files [https://github.com/Gnucash/gnucash/blob/master/HACKING HACKING] and [https://github.com/Gnucash/gnucash/blob/master/README.git README.git]
+
Read the two files [{{URL:git}}blob/stable/HACKING HACKING] and [{{URL:git}}blob/stable/README.git README.git]
  
Look through the [https://wiki.gnucash.org/docs/MASTER/ API documentation].
+
Look through the [{{URL:docs:API}} API documentation].
  
 
= Getting Sources and Building =
 
= Getting Sources and Building =
Line 29: Line 33:
  
 
= Coding Guidelines =
 
= Coding Guidelines =
* Please try to develop according to [http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] principles, following our [[Testing]] guidelines.
+
* Please try to develop according to [{{URL:wp}}Test-driven_development Test Driven Development] principles, following our [[Testing]] guidelines.
 
* Please follow our [[CodingStandard| coding style]].
 
* Please follow our [[CodingStandard| coding style]].
 
* If your code will contain '''textual output for the user''', have a look at [[Translation#Tips_for_Developers | Translation: Tips for Developers]] and configuration [[Settings Wording]].
 
* If your code will contain '''textual output for the user''', have a look at [[Translation#Tips_for_Developers | Translation: Tips for Developers]] and configuration [[Settings Wording]].
Line 39: Line 43:
 
* Make sure that global (i.e. not static) functions are documented with [[Doxygen]]-formatted comments.  
 
* Make sure that global (i.e. not static) functions are documented with [[Doxygen]]-formatted comments.  
 
* Try to keep the ''README files'' and that in ''src/doc'' up to date.
 
* Try to keep the ''README files'' and that in ''src/doc'' up to date.
* [[Documentation Update Instructions|Update]] the relevant sections in ''Help Manual'' and the [[Concept Guide]].
+
* [[Documentation Improvement|Update]] the relevant sections in the ''Manual'' and the [[Concept Guide]].
  
 
= Submitting Patches =
 
= Submitting Patches =
Line 59: Line 63:
 
* Most developers seem to have used [[Emacs]] as IDE.
 
* Most developers seem to have used [[Emacs]] as IDE.
 
* Additionally there are some experiences with [[Eclipse]].
 
* Additionally there are some experiences with [[Eclipse]].
* Some are using [http://qt-project.org/wiki/Category:Tools::QtCreator QtCreator].
+
* Still to be documented: [[KDevelop]].
 +
* Some are using [{{URL:wp}}QtCreator QtCreator].
  
 
For the GTK GUI:
 
For the GTK GUI:
* [https://glade.gnome.org/ glade]
+
* [{{URL:Gnome|glade}} Glade]
  
Some may be interested in our experiments with [[CMake]] and [http://qt-project.org/ Qt]: [[Cutecash]].
+
Some may be interested in our experiments with [[CMake]] and [{{URL:wp}}Qt_(software) Qt]: [[Cutecash]].
  
 
= See also =
 
= See also =
  
An [https://lists.gnucash.org/pipermail/gnucash-devel/2004-June/011547.html informative mail] from the archives.
+
An [{{URL:mail archive|devel}}2004-June/011547.html informative mail] from the archives.
  
;GnuCash design and developer's reference: [http://svn.gnucash.org/docs/MAINT/ current bugfix] and [http://svn.gnucash.org/docs/MASTER/ future features] branch.
+
;GnuCash design and developer's reference: [{{URL:docs:API}} current bugfix] and
 +
: —after creation— [{{URL:docs:API|FUTURE}} future features] branch.
  
[http://www.gnu.org/software/guile/manual/html_node/Programming-in-Scheme.html Scheme programming manual]
+
[{{URL:guile-manual}}Programming-in-Scheme.html Scheme programming manual]
  
 
[[C API]]
 
[[C API]]
 
 
[[Category:Development]]
 

Latest revision as of 10:36, 26 May 2025

Overview

GnuCash is written principally in C. A Guile interpreter is built in and parts of Gnucash--principally reports, but also parts of the user configuration, file import, and other small parts--are in Scheme. The C API is wrapped for Guile access with SWIG; Python wrappers can be created with a configure option.

The GUI is built with GTK+ version 3.22.30.

We're supporting the CMake build system. Understanding this complex system isn't generally necessary for fixing simple bugs, but more complex work will. Here's a Getting Started with CMake and a wiki.

Documentation
For Developers
We use Doxygen to document the sources, including the C API. Details about our use are on the Doxygen wiki page.
For Users
The GnuCash Manual and Tutorial and Concepts Guide are formatted using DocBook, a semantic markup language which enables us to publish them in several formats. Note that these documents have a separate repository. The processing is explained in Documentation Improvement.

Object Orientation

Most of the code is written in an object-oriented style. Some of it uses GObject, some uses a home-grown GObject-like system called QofObject, and some just does what GObject does in straight C. Understanding how to use that is an important skill to developing for GnuCash.

The next development cycle will include migrating those parts of Gnucash other than the GUI to C++; see our C++ page for details and resources. We have updated the GUI to Gtk+-3 in the 2.7 series.

What We Need Help On

  • Patches to fix bugs are always a appreciated. It's an excellent way to get familiar with the code base and to introduce yourself to the team.
  • If you prefer to dive in at the deep end, have a look at the development team's long-term plans.

Preliminaries

Please subscribe to the Mailing Lists and introduce yourself to the development team. Some of the team also hang out on IRC so you can interact more directly.

Read the two files HACKING and README.git

Look through the API documentation.

Getting Sources and Building

You can follow the git instructions for cloning the repository and preparing patches.

Build instructions for various platforms are described or linked at Building.

Coding Guidelines

Documentation

If your code adds or changes some functionality, do not forget the documentation.

  • Make sure that global (i.e. not static) functions are documented with Doxygen-formatted comments.
  • Try to keep the README files and that in src/doc up to date.
  • Update the relevant sections in the Manual and the Concept Guide.

Submitting Patches

Once you have your changes written and well tested—make check will run a bunch of tests—you'll want to submit it so that someone with commit privilege can add it to the official sources. There are two ways we accept code:

  1. Github pull requests: This is the preferred method if the change is non-trivial.
    • If there is already a bug report on the matter be sure to include a link to the bug in the pull request and comment on the bug with a link to the pull request.
  2. Attach a patch to a bug report:
  • Make a patch.
  • If there's already a bug about it in Bugzilla, just attach the patch to the bug. Be sure to check the "patch" checkbox on the attachment form.
  • If there isn't a bug already (be sure to search!), you'll need to create a new one to attach your patch to:
    • Describe the problem or improvement that your patch addresses in the initial comment.
    • Open the bug before you commit your changes so that you can include the bug number in the commit message.

Tools

Text editors / IDE:

  • Most developers seem to have used Emacs as IDE.
  • Additionally there are some experiences with Eclipse.
  • Still to be documented: KDevelop.
  • Some are using QtCreator.

For the GTK GUI:

Some may be interested in our experiments with CMake and Qt: Cutecash.

See also

An informative mail from the archives.

GnuCash design and developer's reference
current bugfix and
—after creation— future features branch.

Scheme programming manual

C API