1 (edited by unsigned char* 2015-07-10 17:07:18)

Topic: [TUTORIAL] How use Eclipse IDE for dev on teeworlds repository

+ IDE DOWNLOAD & IMPORT GIT REPOSITORY
1. Go to GitHub, create a user and make a fork of Teeworlds Repository.

2. Download Eclipse IDE.

3. Run Eclipse IDE and open "Git" perspective:
https://dl.dropboxusercontent.com/u/30566237/imgs/tuto01.png

4. Clone your fork and import it in EGit
https://dl.dropboxusercontent.com/u/30566237/imgs/tuto02.png
** Click option to clone and import

https://dl.dropboxusercontent.com/u/30566237/imgs/tuto03.png
** Paste your url github repository

https://dl.dropboxusercontent.com/u/30566237/imgs/tuto04.png
** Clone only the master branch

https://dl.dropboxusercontent.com/u/30566237/imgs/tuto05.png

https://dl.dropboxusercontent.com/u/30566237/imgs/tuto06.png
** Finish and wait for clone process..

5. Import git repository how a eclipse project: Right Click over git repository > Import projects...
https://dl.dropboxusercontent.com/u/30566237/imgs/tuto07.png
https://dl.dropboxusercontent.com/u/30566237/imgs/tuto08.png



+ CREATE WORKING BRANCH
1. Back to C/C++ perspective

2. Open 'Create Branch' dialog: Right click over the project > Team > Switch To.. > New Branch
https://dl.dropboxusercontent.com/u/30566237/imgs/tuto09.png



+ CONFIGURE PROJECT
1. Convert project to C/C++ project. Click in the arrow of this toolbar button and select "Convert to a C/C++ Project".
https://dl.dropboxusercontent.com/u/30566237/imgs/tuto10.png
https://dl.dropboxusercontent.com/u/30566237/imgs/tuto11.png

2. Open project properties, C/C++ build section: Right Click over the project > Properties
2.1 Uncheck "Use default build command" and write the absolute path to "bam"
2.3 Uncheck "Generate Makefiles automatically" and remove  all after last brace
https://dl.dropboxusercontent.com/u/30566237/imgs/tuto12.png
2.4 Go to 'Behavior' tab
2.4.1 Change "Build" and "Clean" parameters:
https://dl.dropboxusercontent.com/u/30566237/imgs/tuto13.png
2.5 Repeat the process and add more configs using the "Manage Configurations..." button for client_release, server_debug and server_release....
2.6 Go to 'C/C++ General' > 'Path and Symbols'
2.6.1 In 'Includes' tab select 'GNU C' and press  "Add..." button
https://dl.dropboxusercontent.com/u/30566237/imgs/tuto15.png
2.6.2 In 'Add directory path' dialog check "Is a workspace path" and click "Workspace..." button
https://dl.dropboxusercontent.com/u/30566237/imgs/tuto16.png
2.6.2.1 Select "teeworlds > src" folder
https://dl.dropboxusercontent.com/u/30566237/imgs/tuto17.png
2.6.3 Repeat the process for GNU C++
2.6.4 Close Properties
2.7 Analyze C/C++ Code:  Right click over the project > Run C/C++ Code Analysis


+ COMMIT AND PUSH
1. Open 'Commit Changes' dialog: Right click over the project > Team > Commit...
1.2 Write a comment and select the files to add. NOTE: be careful and don't add 'internal' eclipse files... perhaps best add it in .gitignore file
1.3 Click on "Commit and Push"
https://dl.dropboxusercontent.com/u/30566237/imgs/tuto14.png



+ PULL REQUEST
1. Go to GitHub Teeworlds Repository and make your pull request selecting your 'working branch'.



---------------------------------------
Any comment to improve the process are welcome smile

2

Re: [TUTORIAL] How use Eclipse IDE for dev on teeworlds repository

Looks pretty good! Does Eclipse have some kind of automatic completion for C++ and does it work if you import it like this?

3

Re: [TUTORIAL] How use Eclipse IDE for dev on teeworlds repository

Thx heinrich5991, and yes.. when you convert it to C/C++ project you "enable" all eclipse features for this language smile