Difference between revisions of "An exercise for new contributors"

From GCompris
Jump to: navigation, search
(better description. Put github in option.)
m (Optionally, publish your patch on GitHub)
Line 37: Line 37:
 
* Fork [https://github.com/bdoin/GCompris GCompris]
 
* Fork [https://github.com/bdoin/GCompris GCompris]
 
** Look at these [http://help.github.com/fork-a-repo/ instructions]
 
** Look at these [http://help.github.com/fork-a-repo/ instructions]
* Commit the patch
+
* Code your activity
 +
* Commit the code
 
** git add exercise-activity
 
** git add exercise-activity
 
** git commit -a  
 
** git commit -a  
 
* Push it
 
* Push it
 
** git push
 
** git push

Revision as of 02:12, 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
  • Code your activity
  • Commit the code
    • git add exercise-activity
    • git commit -a
  • Push it
    • git push