Difference between revisions of "Getting started with Gramps development"
(Editors) |
(svn / eclipse) |
||
Line 15: | Line 15: | ||
=== VirtualBox === | === VirtualBox === | ||
[http://www.virtualbox.org/ VirtualBox] is an opensource virtualisation solution. Install it, run it and you have a virtual PC in your PC. Network connection works out of the box without extra configuration needed. Install your favourite Linux distribution and start hacking GRAMPS in a full separated environment. | [http://www.virtualbox.org/ VirtualBox] is an opensource virtualisation solution. Install it, run it and you have a virtual PC in your PC. Network connection works out of the box without extra configuration needed. Install your favourite Linux distribution and start hacking GRAMPS in a full separated environment. | ||
− | === | + | === Chroot === |
You may also use a chroot to result in a similar separation as virtualbox. If you use a chroot for developping GRAMPS, please add informations here. | You may also use a chroot to result in a similar separation as virtualbox. If you use a chroot for developping GRAMPS, please add informations here. | ||
− | === | + | === Another user === |
You may also simply do you development as another user, so you won't access to your usual ~/.gramps database when testing. | You may also simply do you development as another user, so you won't access to your usual ~/.gramps database when testing. | ||
== Get the source tree == | == Get the source tree == | ||
To get the source tree, you will need SVN. Please have a look at the dedicated tutorial [[Brief introduction to SVN]] | To get the source tree, you will need SVN. Please have a look at the dedicated tutorial [[Brief introduction to SVN]] | ||
+ | |||
+ | You can also use a graphical SVN manager like "kdesvn" or "SVN Workbench". | ||
+ | |||
+ | '''This tutorial now assumes you have downloaded GRAMPS' trunk into "~/gramps/trunk". If not, you have to change this path when it is used below.''' | ||
== Install an Edior == | == Install an Edior == | ||
Line 32: | Line 36: | ||
Eclipse with pydev brings an integrated IDE for Python. To run it, you have to do a few steps configuration. | Eclipse with pydev brings an integrated IDE for Python. To run it, you have to do a few steps configuration. | ||
+ | First, you have to set the path to your python interpreter. Go in the menu "Window"->"Preferences...", then choose "Pydev"->"Interpreter - Python". With "new", you can create a link to "/usr/bin/python2.5". there you are. | ||
+ | |||
+ | Next, you have to set up a pydev project. Go in the menu "File" -> "New" -> "Project", and choose a Pydev projet. Project name could be "GRAMPS trunk", uncheck "Use defaults" and choose "~/gramps/trunk" as the project directory. Project type is "Python 2.5", and then you can press "Finish". You are now ready to start coding ! | ||
Revision as of 16:06, 30 August 2008
Warning : this tutorial is work under progress. Feel free to help and modify it
Introduction
This tutorial aims to help you in your first hacking of GRAMPS. It will help you setting up a development environment and explain where to find the files you need.
This tutorial assumes that you are using GNU/Linux (but it might help under another OS) and that you know the basics of Python programming language.
Set up your environment
Optional : set up a development environment
I highly recommend that you do not use your usual environment for developing GRAMPS. Doing so may result in data loss in your GRAMPS database ! If you run your development version of GRAMPS as you usual user, it will access to your usual GRAMPS database and a bug may result in losing productive data. Here are some options you may choose to prevent this. If you have enough resources, I recommend using VirtualBox.
VirtualBox
VirtualBox is an opensource virtualisation solution. Install it, run it and you have a virtual PC in your PC. Network connection works out of the box without extra configuration needed. Install your favourite Linux distribution and start hacking GRAMPS in a full separated environment.
Chroot
You may also use a chroot to result in a similar separation as virtualbox. If you use a chroot for developping GRAMPS, please add informations here.
Another user
You may also simply do you development as another user, so you won't access to your usual ~/.gramps database when testing.
Get the source tree
To get the source tree, you will need SVN. Please have a look at the dedicated tutorial Brief introduction to SVN
You can also use a graphical SVN manager like "kdesvn" or "SVN Workbench".
This tutorial now assumes you have downloaded GRAMPS' trunk into "~/gramps/trunk". If not, you have to change this path when it is used below.
Install an Edior
Geany
Geany is a nice development Editor. One feature I like is that it will automaticly recognise python code and list Symbols in a side bar, allowing to jump quickly in your code.
Install it and you can start coding !
Eclispe + pydev
Eclipse with pydev brings an integrated IDE for Python. To run it, you have to do a few steps configuration.
First, you have to set the path to your python interpreter. Go in the menu "Window"->"Preferences...", then choose "Pydev"->"Interpreter - Python". With "new", you can create a link to "/usr/bin/python2.5". there you are.
Next, you have to set up a pydev project. Go in the menu "File" -> "New" -> "Project", and choose a Pydev projet. Project name could be "GRAMPS trunk", uncheck "Use defaults" and choose "~/gramps/trunk" as the project directory. Project type is "Python 2.5", and then you can press "Finish". You are now ready to start coding !
Other
Add you favorite Editor + setup here