Difference between revisions of "An exercise for new contributors"

From GCompris
Jump to: navigation, search
(Exercise)
Line 33: Line 33:
 
** then email me the patch
 
** then email me the patch
  
=== Optionally, publish your patch on GitHub ===
+
=== Publish your patch on GitHub ===
  
 
* Create an account on [https://github.com github]
 
* Create an account on [https://github.com github]
Line 44: Line 44:
 
* Push it
 
* Push it
 
** git push
 
** git push
 +
* On github send me a pull request

Revision as of 11:47, 20 October 2013

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
    • (You can append '-D' to this line to enable the debug traces).
  • 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

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
  • On github send me a pull request