Difference between revisions of "Eclipse"

From Navit's Wiki
Jump to: navigation, search
m
(update to Cmake)
Line 1: Line 1:
== Non Android and autotools buildsystem instructions ==
+
Eclipse is a widely used and very flexible IDE to make coding more efficient. Of course, it can be used for developing Navit:
Install latest eclipse version with at least cdt-c/c++ support 6.0.1/2
 
  
[http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR2/eclipse-cpp-galileo-SR2-linux-gtk.tar.gz]
+
== Install ==
 +
We will combine the usual CMake environment, which is used to configure the Navit build process and
 +
*Check navit's [[dependencies]] and install necessary native tools and libraries
 +
*Install newest Eclipse with your package manager or manually
 +
*Start Eclipse and install the following extensions (Help -> Install software):
 +
**CDT
 +
**autotools
 +
**Subservice SVN [http://www.eclipse.org/subversive/documentation/gettingStarted/aboutSubversive/install.php read more]
  
After first start choose your workspace
 
----
 
  
And and install the svn-plugin
+
==Setup project==
 
+
*Start a new project, pick import SVN
german howto [http://javathreads.de/2009/07/subversion-unter-eclipse-galileo-konfigurieren/]
+
** svn co https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit
 
+
*Select C/C++ project
english howto [http://www.eclipse.org/subversive/documentation/gettingStarted/aboutSubversive/install.php]
+
*Choose now GNU Autotools(if there is nothing under toolchains install autotools(autoconf,automake/gettext) via your os packagemanager)
 
+
*Open a terminal, switch to your workspace navit folder and invoke "cmake ./"
----
+
**you now have makefile that matches your local setup
 
+
*In Eclipse, pick "build all" and you should get a binary
Add and install the autotools-plugin
+
*Run as application and you your local build should start
 
 
[http://www.eclipse.org/linuxtools/downloads.php]
 
 
 
Since eclipse 3.7(helios) linuxtools and autotools support can be install either from market menu or the software install menu.
 
 
 
----
 
Import existing and new svn co
 
(unfornatly the svn wizard has some problems with the navit repo so we are doing in with file import)
 
 
 
checkout the project via commandline into your workspace folder
 
 
 
svn co https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit
 
 
 
make a new Project with File/New/Project
 
 
 
choose in the wizard c/c++ c-project
 
 
 
choose now GNU Autotools(if there is nothing under toolchains install autotools(autoconf,automake/gettext) via your os packagemanager)
 
for Projektname choose the dir were you checked out the navit source eclipse will give a warning that the projectfolder exist ignore it
 
and hit finish
 
 
 
eclipse will run the autogen.sh script and when its finished
 
it should show Binaries and Archives, where you can run the navit exe
 
  
  

Revision as of 21:57, 1 June 2013

Eclipse is a widely used and very flexible IDE to make coding more efficient. Of course, it can be used for developing Navit:

Install

We will combine the usual CMake environment, which is used to configure the Navit build process and

  • Check navit's dependencies and install necessary native tools and libraries
  • Install newest Eclipse with your package manager or manually
  • Start Eclipse and install the following extensions (Help -> Install software):


Setup project

  • Start a new project, pick import SVN
  • Select C/C++ project
  • Choose now GNU Autotools(if there is nothing under toolchains install autotools(autoconf,automake/gettext) via your os packagemanager)
  • Open a terminal, switch to your workspace navit folder and invoke "cmake ./"
    • you now have makefile that matches your local setup
  • In Eclipse, pick "build all" and you should get a binary
  • Run as application and you your local build should start


Doing Navit/Android development with Eclipse INCOMPLETE

This guide assumes you already have the source downloaded locally, and have already built a package for Android using CMake (see Linux development).

  • Install Eclipse
    • Unzip to directory of your choice
    • Start Eclipse by going into your eclipse folder, and running eclipse
    • Setup a new workspace when prompted
  • Import Navit
    • File -> New -> Project...
    • Android -> Android Project
    • Next
    • Project Name: -> NavitProject
    • Create project from existing source
    • Location: browse to the directory navit/android/ within your cmake build directory.
    • Next
    • Build Target -> check Android 2.2
    • Next
    • Finish
    • Project -> Properties
    • Java Build Path from left hand window
    • Libraries tab
    • Add JARs
    • NavitProject -> libs -> TTS_library_stub.jar. OK
    • Java Compiler from left hand window
    • Apply on message window
    • Compiler compliance level: -> 1.6
    • OK
    • Yes

And then the project should be clean of errors besides the only one stating that android_layout_default.xml is not well-formed. That's sad true. That file is indeed not an xml document but a fragment of one. Do we have some setting to switch this check off? Should we rename that file?