Banshee source tree reorganized… building in MonoDevelop

I spent the better part of today finally reorganizing the bulk of the source tree in Banshee. I’ve been blocking on the transition from GNOME CVS to Subversion for this moment, and things are now much more organized and clean.

A lot of the reorganization was motivated by wanting to get all of the Banshee components properly buildable in MonoDevelop, which is finally a reality. The only problem I had initially was getting Banshee to properly run from MonoDevelop. I knew this wouldn’t really be a possibility because running Banshee uninstalled requires a number of environment variables to be set, which overload where plugins and engines are loaded from, and set things like LD_LIBRARY_PATH and MONO_PATH.

Banseee running from MonoDevelop

Luckily, I’ve got some really nice build variables that come together to form all of this information, so it’s possible to simply execute ‘make run’ from src/. I decided to take advantage of this and created a MonoDevelopBootstrap project that simply creates a small Mono program:

using System;
using System.Diagnostics;

public class MonoDevelopBootstrap
    public static void Main()
        Process process = Process.Start("make", "run");

Using the “Run” feature in MonoDevelop causes all projects in the master solution to properly build, and then MonoDevelopBootstrap will run, which in turn runs “make run” in src/. The end result is simply being able to press F5 in MonoDevelop to build and run Banshee. Hopefully this will only attract more contributors to the project, who aren’t used to dealing much with autotools.

There’s currently one drawback to this however – you can’t simply check Banshee out and build/run in MonoDevelop. You must run autogen/configure, as some files for the build are generated, and make needs to be run in ext/ and libbanshee/. ext/ has external dependencies that are bundled, and libbanshee is, well, a C library.

9 Replies to “Banshee source tree reorganized… building in MonoDevelop”

  1. I have always thought that this kind of things are *REALLY* the ones that attract most contributors. Thanks for the effort!

    Just two questions:
    1) Are you using MD 0.12 or MD from SVN? I ask this because I am using MD from SVN and right now I am affected by a bug and cannot compile Banshee because of it? Can you repro this?:

    2) Have you had a look at the AutoTools MonoDevelop AddIn? Perhaps the developers of the addin have already thought about the issues you describe on this post and they can easily solved with it? I can’t assert it though, I am one of these developers you describe as not being familiar with auto-tools ;)

  2. I’m actually using 0.12 right now, but I usually do use from SVN. I cannot reproduce that bug though.

    As for the autotools AddIn, the Banshee build is far to complex for it to handle, and I actually prefer Autotools. I’m comfortable with it, and it’s the expected standard. I’d never want to make MD a requirement for Building – but I certainly want it to be an option.

    I think this AddIn is great for new projects just entering into the open source area, where they want to push releases in a common way, but really don’t have the time, knowhow, or energy to wrestle with autotools for the first time.


  3. Why do you expect autotools as a standard? IMHO it’s a very complex tool and is not cross-platform unless you use cygwin AFAIK, that’s why, for example, KDE guys switched recently to use CMake instead of autotools.

  4. Banshee is essentially a GNOME application, and autotools still rules there. I’ve got no real issues with autotools. They’re beastly and quite hard to become very fluent with, but as Banshee’s build is rather complex, I have no interest in switching the underlying build system right now. I’ve put a lot of work into it, and am very happy with it.

    The cross platform rule does not apply right now, as Banshee is not yet cross platform. When we get there, I’m sure it will be time to re-evaluate the build system.

  5. I know this is a bit OFT but believe I am having troubles with the environment variables in my Banshee install. Do you have a list of what they are somewhere? If you can supply this list I might be able to fix the bug ( I reported last week. Anyhow building it in MonoDevelop is nice and I might just try that to see if I can get it to work.

  6. I know that Banshee is not (yet, hopefully) crossplatform, but I was just talking about autotools in general, not only applied to Banshee. There are other “gnomish” apps that are cross-platform right now (for example MonoDevelop itself) and they still rely on autotools unfortunately :(

  7. Autotools is sort of a defacto standard for getting included into distributions it seems. It is ugly but it works and handles immensely complex builds. The whole point of the MD addin was to prevent anyone else from *ever* having to learn it. Again. :)

    As for Windows, once MD runs there, they can just build the app with that. There is no real distribution issues there. Except for MSI installers or whatever. That would be a cool MD addin by the way: “Deploy as Windows Installer”

  8. Well, it is so silly to ask in this blog, but i am hungry for information. I have a doubt regarding Mono Develop and i am very much confident that you guys will clear it in one go.
    I would like to use Mono in conjunction with the Apache 2.0 Web server in order to use ASP.NET in Web pages.

    I am a new developer in mono.

    We want to develop an application which runs on Suse Linux,

    I am in doubt about the development environment. As far i know Apache(Linux) with mod_mono will be the best method for us.

    To summarize what will be the development environment of application with mono?

    You have worked with MONODEVELOP. Can you suggest me what is the best method and how can monodevelop help us in windows enviornment.

    I have been trying monodevelop since last day but somehow I am not getting monodevelop properly installed.

    Please help me out of this.

    I look forward to hearing from you.

    Thanks in advance
    Ravi Thapliyal

  9. Hi,

    Im actually an software developer working on business applications under Microsoft .NET. February this year I began using Ubuntu Feisty Fawn on my home pc. Since then, I never used Windows on my home computer again and now use Gutsy Gibbon. Im actually looking for a project to contribute to and think the banshee project fits most to me as it is written in C# and I have some ideas to improve it.

    Today I started with having a look at the Sample Plugin. Now I want to set up the solution in Mono Develop so I can work more efficiently on it. I found your blog and Im now trying to get banshee running inside MD (got banshee from svn) but I get an compile error. I would really appreciate if u gave me a hint what to do to get it working…

    MD says:
    not open assembly /home/burgdorf/misc/programmierungen/banshee/banshee/src/MonoDevelopBootstrap.exe.

    Hope someone here can help me to get it working…


Comments are closed.