Difference between revisions of "An exercise for new contributors"

From GCompris
Jump to: navigation, search
(added a link to github)
(better description. Put github in option.)
Line 6: Line 6:
  
 
* Install GNU/Linux on your computer if you don't already have it.
 
* Install GNU/Linux on your computer if you don't already have it.
* Get the GCompris code from the Git version control system.
+
* Get the GCompris code from the Git version control system (or see bellow the GitHub option).
 +
** git clone --depth=1 git://git.gnome.org/gcompris
 +
** cd gcompris
 +
* Create a branch for your development
 +
** git checkout -b exercise
 
* Compile GCompris.
 
* Compile GCompris.
 +
** sh autogen.sh && make
 +
** Check that the python bindings have all they need to be compiled: '''Python plugin = yes''' at the end of the configure.
 
* Create a new Python activity using the supplied ''createit.sh'' script. For example, use you nick name as the activity name.
 
* Create a new Python activity using the supplied ''createit.sh'' script. For example, use you nick name as the activity name.
 +
** cd src
 +
** ./createit.sh exercise
 
* Compile GCompris again.
 
* Compile GCompris again.
 +
** make
 
* Run your activity with the ''runit.sh'' script (it is just the template for now).
 
* Run your activity with the ''runit.sh'' script (it is just the template for now).
 +
** ./runit.sh exercise-activity
 
* Modify the activity to display an image, an ellipse, a rectangle, a line and a text.
 
* Modify the activity to display an image, an ellipse, a rectangle, a line and a text.
 +
** You can search for code examples in other activities and check the [http://live.gnome.org/GooCanvas goocanvas API].
 
* Add an event to a graphical object so that clicking on it does something visual.
 
* Add an event to a graphical object so that clicking on it does something visual.
 
* Test your activity by running ''runit.sh'' until you are happy with the result.
 
* Test your activity by running ''runit.sh'' until you are happy with the result.
 
* Use git to commit your changes locally.
 
* Use git to commit your changes locally.
* Use git to display the patch
+
** git add exercise-activity
* Publish the patch to [https://github.com github]
+
** git commit -a
 +
* Use git to create the patch
 +
** git format-patch master --stdout > exercise_activity.patch
 +
** then email me the patch
 +
 
 +
=== Optionally, publish your patch on GitHub ===
 +
 
 +
* Create an account on [https://github.com github]
 +
* Fork [https://github.com/bdoin/GCompris GCompris]
 +
** Look at these [http://help.github.com/fork-a-repo/ instructions]
 +
* Commit the patch
 +
** git add exercise-activity
 +
** git commit -a
 +
* Push it
 +
** git push

Revision as of 02:06, 9 April 2012

Exercise

In order to help you practice in the GCompris framework, I propose you to make this little exercise.

Mandatory: GCompris development is done on a GNU/Linux distribution of your choice.

  • Install GNU/Linux on your computer if you don't already have it.
  • Get the GCompris code from the Git version control system (or see bellow the GitHub option).
  • Create a branch for your development
    • git checkout -b exercise
  • Compile GCompris.
    • sh autogen.sh && make
    • Check that the python bindings have all they need to be compiled: Python plugin = yes at the end of the configure.
  • Create a new Python activity using the supplied createit.sh script. For example, use you nick name as the activity name.
    • cd src
    • ./createit.sh exercise
  • Compile GCompris again.
    • make
  • Run your activity with the runit.sh script (it is just the template for now).
    • ./runit.sh exercise-activity
  • Modify the activity to display an image, an ellipse, a rectangle, a line and a text.
    • You can search for code examples in other activities and check the goocanvas API.
  • Add an event to a graphical object so that clicking on it does something visual.
  • Test your activity by running runit.sh until you are happy with the result.
  • Use git to commit your changes locally.
    • git add exercise-activity
    • git commit -a
  • Use git to create the patch
    • git format-patch master --stdout > exercise_activity.patch
    • then email me the patch

Optionally, publish your patch on GitHub

  • Create an account on github
  • Fork GCompris
  • Commit the patch
    • git add exercise-activity
    • git commit -a
  • Push it
    • git push