This is an old revision of the document!


Using the Eclipse IDE to work on Rosegarden

Get Rosegarden Source From SVN

To get started we'll need the source code for Rosegarden. We can get a copy of it from sourceforge using subversion (svn). Since we are going to use the source with Eclipse, we'll need to make sure that we set up the directories in a way that will make Eclipse happy.

Eclipse likes to have a directory for its “workspace” and a directory within the workspace for the “project”. So I usually create a workspace directory like this:

$ mkdir rosegarden-workspace

Then I get the source into a directory within the workspace dir:

$ cd rosegarden-workspace
$ svn checkout https://rosegarden.svn.sourceforge.net/svnroot/rosegarden/trunk/rosegarden rosegarden-svn

Get Dependencies

In order to successfully build Rosegarden, there are a number of libraries you'll need. If you are using a distro with apt (Ubuntu, Debian…), you can try getting the build-dep's for Rosegarden. This should get you very close to being able to build.

$ sudo apt-get build-dep rosegarden

Configure and Build

Now its time to try configuring the Rosegarden source. First we need to get everything set up to run configure:

$ make distclean
$ sh ./bootstrap.sh

Now we should be able to run configure. Here's how I run it with Ubuntu. I need the “–with-qtlibdir” option because Ubuntu puts the Qt libraries in an architecture-specific location:

$ ./configure --enable-debug --with-qtlibdir=/usr/lib/i386-linux-gnu

There may be errors when you run configure due to missing libraries. You'll need to track those down and re-run configure. Once configure has run successfully to completion, you can build Rosegarden with make:

$ make

Install Eclipse

The Eclipse IDE can be downloaded here: http://www.eclipse.org/

I usually download the Linux C/C++ version which is usually called something like “Eclipse IDE for C/C++ Linux Developers”. It's just a tarball you can expand and then look for the “eclipse” directory with the “eclipse” binary. That's pretty much it.

Set Up Rosegarden Source Under Eclipse

Since we set up the directory structure in a way that Eclipse likes, getting Eclipse to find the source and work with it is easy. Launch Eclipse. It will first ask for the location of your workspace. Give it the rosegarden-workspace directory that we created earlier. Since this is a new workspace, you'll get the Eclipse welcome screen. On the far right is a button for the “Workbench”. Click it.

Go to File > New > Makefile Project with Existing Code. In the “Project Name” field type rosegarden-svn. In the Toolchain list, select “Linux GCC”. Click Finish. And that's it.

You should be able to build with Project > Build Project. (Build All doesn't work for me.) You should also be able to run with Run > Run (Ctrl+F11). And you should be able to debug with F11 or Run > Debug. Be sure to pick “gdb/mi” if you are asked.

Include Files

To make sure Eclipse is aware of the various Qt include files, we need to tell Eclipse where the Qt includes are located. Select the “rosegarden-svn” project in the Project Explorer and go to File > Properties. In the “type filter text” box, type “paths” and hit enter. This should get you quickly to Paths and Symbols. Click on the “Includes” tab and then the “GNU C++” language. In the “Include directories” box, add the following:

/usr/include/qt4
/usr/include/qt4/QtCore
 
 
dev/eclipse.1326727887.txt.gz · Last modified: 2022/05/06 16:07 (external edit)
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki