Difference between revisions of "An exercise for new contributors"
Petitlapin (talk | contribs) |
Petitlapin (talk | contribs) (→Exercise) |
||
(One intermediate revision by the same user not shown) | |||
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 latest stable version of [https://www.qt.io/download-open-source/#section-2 Qt] (version 5. | + | * Download and Install the latest stable version of [https://www.qt.io/download-open-source/#section-2 Qt] (version 5.15.0 recommended, 5.12 is the minimal one, GCompris does not support yet Qt6) |
− | * Install [https://cmake.org/download/ CMake] (version 3. | + | * Install [https://cmake.org/download/ CMake] (version 3.7 minimum) |
− | * Get the GCompris code from the | + | * Get the GCompris code from the KDE Git version control system (or see below the GitHub option). |
** git clone https://github.com/gcompris/GCompris-qt | ** git clone https://github.com/gcompris/GCompris-qt | ||
** cd GCompris-qt | ** cd GCompris-qt | ||
Line 21: | Line 21: | ||
* Create a new activity using the supplied ''createit.sh'' script. For example, use your nick name as the activity name. | * Create a new activity using the supplied ''createit.sh'' script. For example, use your nick name as the activity name. | ||
** cd src/activities | ** cd src/activities | ||
− | ** ./createit.sh 'my_new_activity' | + | ** ./createit.sh 'my_new_activity' "Your Name" xx@yy.org |
− | |||
* Compile GCompris again in Qt Creator, check you new activity is present | * Compile GCompris again in Qt Creator, check you new activity is present | ||
* Modify the activity to display an image, a rectangle and a text. | * Modify the activity to display an image, a rectangle and a text. | ||
Line 43: | Line 42: | ||
* Send a pull request on github or create a task in the "Need review" section at https://phabricator.kde.org/project/view/142/ with the description and link to your diff at https://phabricator.kde.org/differential/diff/create/ | * Send a pull request on github or create a task in the "Need review" section at https://phabricator.kde.org/project/view/142/ with the description and link to your diff at https://phabricator.kde.org/differential/diff/create/ | ||
− | You can visit [http://gcompris.net/wiki/Qt_Quick_development_process Qt Quick development process] for more details. | + | Note that the official development is done in the KDE gitlab instance: https://invent.kde.org/education/gcompris.git. GitHub is **just** a mirror of the official repository. It is used in this exercise as developers usually have one account in it, official contributions must be done in invent.kde.org. |
+ | |||
+ | You can visit [http://gcompris.net/wiki/Qt_Quick_development_process Qt Quick development process] for more details. Some easy activities to read are ballcatch, clickgame, leftright. | ||
[[Category:English]] | [[Category:English]] |
Latest revision as of 10:58, 14 August 2023
Exercise
In order to help you practice in the GCompris framework, we 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 latest stable version of Qt (version 5.15.0 recommended, 5.12 is the minimal one, GCompris does not support yet Qt6)
- Install CMake (version 3.7 minimum)
- Get the GCompris code from the KDE Git version control system (or see below the GitHub option).
- git clone https://github.com/gcompris/GCompris-qt
- cd GCompris-qt
- git submodule init && git submodule update (to retrieve box2d)
- Configure you Git username and email
- git config --global user.email "your_email@example.com"
- git config --global user.name "FirstName LastName"
- Create a branch for your development
- git checkout -b exercise
- Start QtCreator and open the project file CMakeLists.txt 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' "Your Name" xx@yy.org
- Compile GCompris again in Qt Creator, check you new activity is present
- Modify the activity to display an image, a rectangle and a text.
- (Warning, if you add resources in you activity's resource directory you must run cmake again).
- You can search for code examples in other activities and check the Qml getting started.
- 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 -m "commitMessage"
Publish your patch on GitHub
- Create an account on github
- Fork GCompris
- Look at these instructions
- Code your activity
- Commit the code
- Push it
- git push
- Send a pull request on github or create a task in the "Need review" section at https://phabricator.kde.org/project/view/142/ with the description and link to your diff at https://phabricator.kde.org/differential/diff/create/
Note that the official development is done in the KDE gitlab instance: https://invent.kde.org/education/gcompris.git. GitHub is **just** a mirror of the official repository. It is used in this exercise as developers usually have one account in it, official contributions must be done in invent.kde.org.
You can visit Qt Quick development process for more details. Some easy activities to read are ballcatch, clickgame, leftright.