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.

+

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 might work for you, so try it first:

$ sudo apt-get build-dep rosegarden

$ sudo apt-get build-dep rosegarden

+

+

In Ubuntu I get this error because I am using jack2:

+

+

The following packages have unmet dependencies:

+

libjack-dev : Depends: libjack0 (= 1:0.124.1+20140122git5013bed0-3) but it is not going to be installed

+

E: Build-dependencies for rosegarden could not be satisfied.

+

+

If you get the same, try this:

+

+

$ sudo apt-get install libjack-jackd2-dev

+

$ sudo apt-get build-dep rosegarden

+

+

...and you should be ready to build.

===== Configure and Build =====

===== Configure and Build =====

Line 47:

Line 60:

$ ./rosegarden

$ ./rosegarden

-

If you have a machine with multiple cores (who doesn't these days?) you probably want to add this to the end of your .bashrc file to tell make that it can run multiple jobs simulataneously:

+

If you have a machine with multiple cores (who doesn't these days?) you probably want to add this to the end of your .bashrc file to tell make that it can run multiple jobs simultaneously:

export MAKEFLAGS="-j `nproc`"

export MAKEFLAGS="-j `nproc`"

This will take effect the next time you start a terminal. It should speed up the build significantly.

This will take effect the next time you start a terminal. It should speed up the build significantly.

+

+

If you are doing a lot of development, consider adding this to your .bashrc file:

+

+

export QT_FATAL_WARNINGS=1

+

+

This will make sure any Qt warnings stop the run so you will notice them and fix them. This is really helpful when working with signals and slots since the compiler has no idea whether the names of signals and slots actually exist. Downside: there is a slight chance that this will cause Qt apps (built in debug mode) to crash when run from the command line.

If you just need to build Rosegarden, you can stop here. Otherwise, if you are interested in doing some development with Eclipse, read on....

If you just need to build Rosegarden, you can stop here. Otherwise, if you are interested in doing some development with Eclipse, read on....

Line 63:

Line 82:

===== Set Up Rosegarden Source Under Eclipse =====

===== Set Up Rosegarden Source Under Eclipse =====

-

//Note: These instructions were developed using Eclipse 4.3 (Kepler).//

+

//Note: These instructions were developed using Eclipse 4.4 (Luna).//

-

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.

+

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. In the upper 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. For the "Existing Code Location" provide the path to the rosegarden-svn directory. In the Toolchain list, select "Linux GCC". Click Finish. You should now be able to build with Project > Build All (Ctrl+B).

Go to File > New > Makefile Project with Existing Code. In the "Project Name" field type rosegarden-svn. For the "Existing Code Location" provide the path to the rosegarden-svn directory. In the Toolchain list, select "Linux GCC". Click Finish. You should now be able to build with Project > Build All (Ctrl+B).

-

To run the program, you'll need to set up a Run Configuration. Go to Run > Run Configurations. Select "C/C++ Application" and hit the New button. Verify that the C/C++ Application field says "rosegarden", and the Project field says "rosegarden-svn". Click Run to test. You should now be able to run with Run > Run (Ctrl+F11). You should also be able to debug with F11 or Run > Debug.

+

To run the program, you'll need to set up a Run Configuration. Go to Run > Run Configurations. Select "C/C++ Application" and hit the New button. Verify that the C/C++ Application field says "rosegarden", and the Project field says "rosegarden-svn". In the Environment tab, you'll want to add QT_FATAL_WARNINGS and set it to 1 so that Rosegarden will crash on signal/slot naming errors and other issues that can only be checked at runtime.

+

+

Click Run to test. You should now be able to run with Run > Run (Ctrl+F11). You should also be able to debug with F11 or Run > Debug.

If you get an error about "The selection cannot be launched, and there are no recent launches," you need to go back into the Run Configuration and hit the Run button in there to establish the first run. That will then be used each time F11 or Ctrl-F11 are pressed.

If you get an error about "The selection cannot be launched, and there are no recent launches," you need to go back into the Run Configuration and hit the Run button in there to establish the first run. That will then be used each time F11 or Ctrl-F11 are pressed.

Line 93:

Line 114:

===== Faster Builds =====

===== Faster Builds =====

-

If your machine has multiple cores and/or hyperthreading, you'll want to set up make for multiple jobs (make's -j option). To do that within Eclipse, go to Window > Preferences > C/C++ > Build > Environment, add an environment variable MAKEFLAGS, and set it to "-j 4" (or whatever is best for your hardware, the nprocs command will tell you how many cores you've got). This will tell make that it can run four simultaneous compiles.

+

If your machine has multiple cores and/or hyperthreading, you'll want to set up make for multiple jobs (make's -j option). To do that within Eclipse, go to Window > Preferences > C/C++ > Build > Environment, add an environment variable MAKEFLAGS, and set it to "-j4" (or whatever is best for your hardware, the ''nproc'' command will tell you how many cores you've got). This will tell make that it can run four simultaneous compiles.

===== Scalability Mode =====

===== Scalability Mode =====

Line 100:

Line 121:

===== Auto-Save Before Build =====

===== Auto-Save Before Build =====

By default, Eclipse doesn't automatically save your files when you build. If you would prefer that behavior, go to Window > Preferences > General > Workspace. Set the "Save automatically before build" checkbox. This avoids build errors if you forget to save a file that you've changed.

By default, Eclipse doesn't automatically save your files when you build. If you would prefer that behavior, go to Window > Preferences > General > Workspace. Set the "Save automatically before build" checkbox. This avoids build errors if you forget to save a file that you've changed.

There appear to be two main ways to create an application icon in the Unity dash. The easiest is to create an eclipse.desktop file. The other way involves installing a GUI tool and using it.

-

==== Unity Icon ====

+

==== eclipse.desktop ====

-

It appears that adding an icon to the dash still requires gnome-desktop-item-edit. See the "Unity Icon" section in the "Ubuntu 11.10 Issues" below for details.

+

Applications appear in the Unity dash based on .desktop files found in /usr/share/applications. Here's a sample /usr/share/applications/eclipse.desktop file for Eclipse:

-

===== Ubuntu 11.10 Issues =====

+

[Desktop Entry]

+

Type=Application

+

Name=Eclipse CDT

+

Comment=Eclipse IDE for C/C++

+

Icon=<path-to-eclipse>/icon.xpm

+

Exec=<path-to-eclipse>/eclipse

+

Terminal=false

+

Categories=Development

+

+

You'll need to adjust the "<path-to-eclipse>" to point to where you expanded Eclipse.

+

+

==== GUI ====

+

If you prefer a GUI, you can try the GNOME desktop item editor:

+

+

sudo apt-get install gnome-panel

+

sudo gnome-desktop-item-edit /usr/share/applications --create-new

+

+

Give it the name "Eclipse". Point it to the eclipse binary in the eclipse install directory. And finally, use the icon that is in the eclipse install directory. Click close, and Eclipse will now appear in the dash.

When you hover over an identifier in Eclipse, you'll get a tooltip that provides some helpful information about that identifier. However, with Ubuntu 11.10's Ambiance theme, the tooltip background color is black, and Eclipse doesn't handle this correctly. It tries to display black-on-black text, which is just a little tough to read.

When you hover over an identifier in Eclipse, you'll get a tooltip that provides some helpful information about that identifier. However, with Ubuntu 11.10's Ambiance theme, the tooltip background color is black, and Eclipse doesn't handle this correctly. It tries to display black-on-black text, which is just a little tough to read.

There appear to be two main ways to create a Unity icon for an application. The first uses a GUI, and the second involves creating an eclipse.desktop file. Apparently there is no native "Unity" way to add an icon to Unity.

-

-

=== GUI ===

-

The GUI approach uses the GNOME desktop item editor:

-

-

sudo apt-get install gnome-panel

-

sudo gnome-desktop-item-edit /usr/share/applications --create-new

-

-

Give it the name "Eclipse". Point it to the eclipse binary in the eclipse install directory. And finally, use the icon that is in the eclipse install directory. Click close, and Eclipse will now appear in the dash. You can even drag and drop it onto the launcher if you wish.

-

-

=== eclipse.desktop ===

-

You can also just create an eclipse.desktop file in /usr/share/applications instead of installing all of the above GUI tools. Here's mine:

-

-

[Desktop Entry]

-

Type=Application

-

Name=Eclipse CDT

-

Comment=Eclipse IDE for C/C++

-

Icon=<path-to-eclipse>/icon.xpm

-

Exec=<path-to-eclipse>/eclipse

-

Terminal=false

-

Categories=Development

-

-

You'll need to adjust the "<path-to-eclipse>" to point to where you expanded Eclipse.

-

-

=== More Ways ===

-

There are several other ways to add an application to the dash. See this page for more: