Difference between revisions of "Developing in Eclipse on Linux"

From MythTV Official Wiki
Jump to: navigation, search
(Create Eclipse Project)
Line 91: Line 91:
  
 
{{Note box|To be completed...}}
 
{{Note box|To be completed...}}
 +
 +
 +
== Caveats ==
 +
 +
Eclipse doesn't like the empty "config" directory. Comment out "SUBDIRS += config" in myth.pro to solve it.

Revision as of 15:16, 8 October 2009

Introduction

With the release of QT Eclipse integration and the move to QT 4.4, it is now possible to have a working environment in Eclipse on Linux.

(The examples given assume 32-bit Ubuntu 8.10)

Install Software Packages

Eclipse and C Developers Toolkit Plugin

Download and install Eclipse IDE for C/C++ Developers or use Update with your existing Eclipse to install the CDT plugin.

Example:

 cd ~/Dev
 wget http://download.eclipse.org/technology/epp/downloads/release/ganymede/SR2/eclipse-cpp-ganymede-SR2-linux-gtk.tar.gz
 tar xvfz eclipse-cpp-ganymede-SR2-linux-gtk.tar.gz

Eclipse QT Integration

Download Eclipse QT Integration.

Follow the installation instructions

Example:

 cd ~/Dev
 wget http://dist.trolltech.com/developer/download/qt-eclipse-integration-linux.x86-1.5.0.tar.gz
 tar xvfz qt-eclipse-integration-linux.x86-1.5.0.tar.gz
 cd eclipse
 ./eclipse -clean

Configure in Eclipse: - Window | Preferences - select 'Qt' section - Add a new Qt version:

Name: QT 4.4.0
Bin Path: /usr/bin
Include Path: /usr/include/qt4

- Note that if you define more that one QT version, you will have to edit each Project's Properties to indicate which one to use.

Eclipse Perl Integration

Install EPIC

Example:

 In Eclipse, select Help | Software Updates...
 Add site: http://e-p-i-c.sf.net/updates/testing
 Install EPIC 0.6.33

Subversion and Subclipse

Install Subversion (available in distro packages)

Install Subclipse

Example:

 sudo apt-get install subversion libsvn-java   // installs svn 1.5.1
 In Eclipse, select Help | Software Updates...
 Add site: http://subclipse.tigris.org/update_1.4.x
 Install Subclipse node (containing Subclipse, Subversion Client Adaptor, Subversion Native Library Adaptor, and Subversion Revision Graph) 

Create Eclipse Project

Check out sources:

  1. File | New > New Project...
  2. SVN | Checkout Projects from SVN
  3. Create new repository location: http://svn.mythtv.org/svn/ (or select it if you've created it already)
  4. Select the root "trunk" folder of the repository
  5. MAKE SURE you select "Check out as a project in the workspace"
  6. Enter a name for the project eg. "mythtv-trunk-svn"
  7. Accept all the other defaults and click "Finish"
  8. About 150MB of source will now be checked out

NOTE: if you get the error "Unable to load default svn client" while Eclipse is confirming the subversion url, then you need to install the subversion java bindings : apt-get install libsvn-java

Convert project:

  1. File | New > Convert to a C/C++ Make Project
  2. Select your "mythtv-trunk-svn" project
  3. Select "C++" project and click "Finish"

Set up build targets:


Important.png Note: To be completed...


Caveats

Eclipse doesn't like the empty "config" directory. Comment out "SUBDIRS += config" in myth.pro to solve it.