===== Building With Eclipse ===== **NOTE: It is now strongly recommended that you use Docker images to build Deviation. Instructions for building can be found [[development:docker | here]]** Thanks to xCometz for these instructions **Note: These instructions are based on building from HG. Deviation is now on github and the instructions need to be updated** I hope this quick eclipse instruction can help. ==== What you need ==== - Running toolchain on Mingw Shell (you can compile without toolchain error) - Phyton - Java Runtime - Eclipse with CDT - Mercurial v2.0 above (mercurial.selenic.com/wiki/Download) - MercurialEclipse (mercurialeclipse.eclipselabs.org.codespo...i/update_site/stable) - Project and environtment setting If you did all PB instruction how to install the build environtment, you have done step 1 and 2. Then just install 3, 4 and 5. After you have installed Elipse then open it and install plugins MercurialEclipse over Help->Install New Software. Project import and environtment setting - Click File->Import, select Clone Exixting Mercurial Repository, then click next and follow until finish (you can clone in other directory name, just change it to your desire name) - Select the project in Project Explorer by clicking it the open File->New->Convert to a C/C++ Projects - Choose makefile project and --Other Toolchain--, then click finish - Click File->Properties then click C/C++ Build - On Builder Settings Tab->Build location add /src before }, example: ${workspace_loc:/deviation/src}, this ist your working directory for this project. - On Behavious Tab -> Workbench Build Behavior, Build (Incremental build) put your desire make argument (ex: TARGET=devo10) and clean argument (ex: TARGET=devo10 clean) - Explode C/C++ Build then click Environtment add: * PATH -> Your compiler bin path, mingw bin path, msys bin path, python path, mercurial path, and JRE path * example: * PATH D:\compiler\arm\bin;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\Program Files\Python27;C:\Program Files\Mercurial;C:/Program Files/Java/jre6/bin/client; * TEMP -> your temporary directory * TMP -> your temporary directory - If you have more than one toolchain you can choose 'Replace native environtment with specified one', it can also accelerate compiling because it search only in specified one folder. - Go to C/C++ Build -> Setting and choose GNU elf parser. - Now you can build project by right clicking your project->Build project To do Mercurial command just right clicking your project and choose Team. What you need next is to configure code style: The style I use is pretty close to 1TBS. I was able to get close in Eclipse, by * making a new style with K&R as the base * changing indentation to 'spaces only' * selecting for braces: function -> next line * selecting for braces: blocks -> next line on wrap