Difference between revisions of "An exercise for new contributors"

From GCompris
Jump to: navigation, search
(Exercise)
(updated the intruction for gcompris-qt)
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.
 +
* Download and Install the lastest stable version of [http://qt-project.org/downloads QtCreator] for Android
 
* Get the GCompris code from the Git version control system (or see bellow the GitHub option).
 
* 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
+
** git clone git@github.com:bdoin/GCompris-qt.git
** cd gcompris
+
** cd GCompris-qt
 
* Create a branch for your development
 
* Create a branch for your development
 
** git checkout -b exercise
 
** git checkout -b exercise
* Compile GCompris.
+
* Start QtCreator and open the project file GCompris.pro at the root of the source code
** sh autogen.sh && make
+
* Compile and run it.
** Check that the python bindings have all they need to be compiled: '''Python plugin = yes''' at the end of the configure.
+
* Create a new activity using the supplied ''createit.sh'' script. For example, use your 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/activities
** cd src
+
** ./createit.sh 'my new activity'
** ./createit.sh exercise
+
* Compile GCompris again in Qt Creator, check you new activity is present
* Compile GCompris again.
+
* Modify the activity to display an image, a rectangle and a text.
** make
+
** You can search for code examples in other activities and check the [http://qt-project.org/doc/qt-5/gettingstartedqml.html Qml getting started].
* 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 [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.
+
* Use git add and git commit to commit your changes locally.
* Use git to commit your changes locally.
+
** git add 'my new activity'
** git add exercise-activity
 
 
** git commit -a
 
** 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 ===
 
=== Publish your patch on GitHub ===
  
 
* Create an account on [https://github.com github]
 
* Create an account on [https://github.com github]
* Fork [https://github.com/bdoin/GCompris GCompris]
+
* Fork [git@github.com:bdoin/GCompris-qt.git GCompris]
 
** Look at these [http://help.github.com/fork-a-repo/ instructions]
 
** Look at these [http://help.github.com/fork-a-repo/ instructions]
 
* Code your activity
 
* Code your activity
 
* Commit the code
 
* Commit the code
** git add exercise-activity
 
** git commit -a
 
 
* Push it
 
* Push it
 
** git push
 
** git push
 
* On github send me a pull request
 
* On github send me a pull request

Revision as of 18:19, 1 March 2014

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.
  • Download and Install the lastest stable version of QtCreator for Android
  • Get the GCompris code from the Git version control system (or see bellow the GitHub option).
    • git clone git@github.com:bdoin/GCompris-qt.git
    • cd GCompris-qt
  • Create a branch for your development
    • git checkout -b exercise
  • Start QtCreator and open the project file GCompris.pro at the root of the source code
  • Compile and run it.
  • Create a new activity using the supplied createit.sh script. For example, use your nick name as the activity name.
    • cd src/activities
    • ./createit.sh 'my new activity'
  • Compile GCompris again in Qt Creator, check you new activity is present
  • Modify the activity to display an image, a rectangle and a text.
  • Add an event to a graphical object so that clicking on it does something visual.
  • Use git add and git commit to commit your changes locally.
    • git add 'my new activity'
    • git commit -a

Publish your patch on GitHub

  • Create an account on github
  • Fork [git@github.com:bdoin/GCompris-qt.git GCompris]
  • Code your activity
  • Commit the code
  • Push it
    • git push
  • On github send me a pull request