Moonlight

Moonlight is an open source implementation of Silverlight (http://silverlight.net), primarily for Linux and other Unix/X11 based operating systems. In September of 2007, Microsoft and Novell announced a technical collaboration that includes access to Microsoft's test suites for Silverlight and the distribution of a Media Pack for Linux users that will contain licensed media codecs for video and audio.

Moonlight 2 was released December 17, 2009

Download

To get Moonlight, visit http://go-mono.com/moonlight (http://www.go-mono.com/moonlight).

Goals

Our goals are:

  • To run Silverlight applications on Linux.
  • To provide a Linux SDK to build Silverlight applications.
  • To reuse the Silverlight engine we have built for desktop applications.

The MoonlightRoadmap includes current Moonlight planning.

Using Moonlight

Getting Started

Up-to-date packages ready to test are available from:

Our supported architectures and operating systems lists the platforms that we currently test the binary packages of Moonlight on.

Once you install Moonlight from the above URL to play video or audio, you will be prompted by Moonlight to install the Microsoft Media Pack for Moonlight available from Microsoft.

Alternatively, you can build Moonlight from source code and link against ffmpeg codecs on your own.

Groups and Mailing List

Discussion on the development of Moonlight happens on the moonlight-list (http://lists.ximian.com/mailman/listinfo/moonlight-list) mailing list, topics on new features of Mono and the .NET framework are discussed in the mono-olive (http://groups.google.com/group/mono-olive) group.

It is also recommended that interested parties subscribe to the mono-devel-list (http://lists.ximian.com/mailman/listinfo/mono-devel-list) (for general issues on Mono development and the mono-svn-patches list (http://groups.google.com/group/mono-svn-patches) that tracks all of the Subversion commits that go into Mono's source code control repository.

We are also using the #moonlight IRC channel on irc.gnome.org. A web interface to the #moonlight IRC channel can be found on the [official Moonlight site (http://www.go-mono.com/moonlight/chat.aspx)]

Reporting Bugs

  • [Query (http://bugzilla.novell.com/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&classification=Mono&product=Moonlight&bug_status=NEW&bug_status=ASSIGNED&bug_status=NEEDINFO&bug_status=REOPENED&cmdtype=doit&version=2.0.0)] [Add (http://bugzilla.novell.com/enter_bug.cgi?&bug_file_loc=http%3A%2F%2F&bug_severity=Normal&bug_status=NEW&cf_foundby=---&comment=Description%20of%20Problem%3A%0D%0A%0D%0A%0D%0ASteps%20to%20reproduce%20the%20problem%3A%0D%0A1.%20%0D%0A2.%20%0D%0A%0D%0A%0D%0AActual%20Results%3A%0D%0A%0D%0A%0D%0AExpected%20Results%3A%0D%0A%0D%0A%0D%0AHow%20often%20does%20this%20happen%3F%20%0D%0A%0D%0A%0D%0AAdditional%20Information%3A%0D%0A%0D%0A%0D%0A&contenttypeselection=text%2Fplain&flag_type-2=X&form_name=enter_bug&op_sys=Other&priority=P5%20-%20None&product=Moonlight%20&version=2.0.0)] Moonlight 2.0

Licensing

Moonlight 1.0 is licensed under the terms of the GNU LGPL, it is a pure C++ engine.

Moonlight 2.0 contains code that is licensed under the terms of the GNU LGPL and the MIT X11 licenses, it includes the graphical C++ engine, the Mono Runtime and the Mono class libraries.

The Microsoft Media Pack is a product distributed by Microsoft that includes a license to the various media codecs for video and audio and is available from Microsoft's web site for Moonlight to consume.

Users of Moonlight interested in using this on embedded systems should contact the Mono at Novell team (http://www.go-mono.com/contact) to obtain a commercial license. See our Licensing page for details.

The Microsoft covenant for Moonlight users is posted here (http://www.microsoft.com/interop/msnovellcollab/moonlight.mspx).

Developing Moonlight

Building Moonlight is definitely not as easy as it could be. We're working on making it easier for both individuals wanting to track our work more closely, and distributions wanting to build packages of their own.

External Dependencies

Moonlight has several external dependencies, such as:

  • Gtk+ 2.0 development package
  • ffmpeg from SVN
    • Use: svn co -r 10885 svn://svn.mplayerhq.hu/ffmpeg/trunk
  • XULRunner development package
    • for example: mozilla-xulrunner190-devel for firefox 3, mozilla-xulrunner181-devel for firefox 2
  • Alsa and/or PulseAudio development packages

If you arent interested in being able to play media, ffmpeg can be skipped, and if you aren't interested in building browser plugins, the mozilla packages can be skipped.

Working from tarball releases

First off, download all 3 tarballs from a given version directory from ftp.novell.com (ftp://ftp.novell.com/pub/mono/sources/moon). These need to be unpacked at the same directory level to one another, as in:

 $ ls
 mono/
 mcs/
 mono-basic/
 moon/

Working from SVN

This is a much easier way to track our progress (which at sometimes is downright frenetic), but it's slightly more complicated. Here again you have two options: stable and unstable.

Tracking the stable branch (moon-2-0) is pretty trivial. You'll want to check out the following (either from mono-cvs.ximian.com or anonsvn.mono-project.com, see SVN): /source/branches/moon/moon-2-0/

That will check out all 4 of the above source directories to the current 2.0 branch state. If you're interested in checking out the 2.0 tag specifically, you can replace the above path with /source/tags/moon/2.0/.

Tracking the unstable tip of moonlight develop requires a bit more work. You'll want trunk moonlight, from the /source/trunk/moon/ and the 2.6 branch versions of mono, mcs, and mono-basic.

So something like this:

 svn co svn://anonsvn.mono-project.com/source/trunk/moon
 svn co -r$REVISION svn://anonsvn.mono-project.com/source/branches/mono-2-6/mono
 svn co -r$REVISION svn://anonsvn.mono-project.com/source/branches/mono-2-6/mcs
 svn co -r$REVISION svn://anonsvn.mono-project.com/source/branches/mono-2-6/mono-basic

where $REVISION can be found in the topic of the moonlight irc channel (http://www.go-mono.com/moonlight/chat.aspx). At the time of this writing, it is 148513.

Compiling Moonlight

By default these instructions will compile mono and moonlight using the standard prefix (usually /usr). If you have installed mono through your package manager, it might already exist in this prefix. If so, this will result in your system mono being overwritten. This can cause instabilities running mono based applications. It can also cause issues if you try to update/remove mono using your package manager. To prevent this from happening, you should compile and install mono to a parallel prefix as described here Parallel Mono Environments

These steps mostly apply to both the tarball and SVN scenarios.

First, build and install mono and mcs. This is handled entirely by compiling in the mono/ directory.

 cd mono/; ./autogen.sh $options;  make && make install

Second, build and install in moonlight.

 cd ../moonlight; ./autogen.sh $options; make && make install

(note, in the tarball case replace "./autogen.sh" above with "./configure")

Moonlight supports many configure options, of which some are listed below. The default case will build you both desktop and browser support (if you have the dependencies installed).

Once you've installed, the desktop case will work without any problem, but one further step is required to get the plugin working. Run "make test-plugin" from the toplevel moon/ directory. This installs our special libmoonloader.so (which mozilla sees as the actual plugin) into your ~/.mozilla/plugins directory.

Creating the XPI is done from the toplevel moon/ directory by running "make user-plugin".


Packaging

Novell has packaged one-click installable plugins for Firefox 3 and Firefox 2 for multiple distributions. The mozilla xpi extension format is used so that we can notify you of updates and perform the updates entirely from within Firefox.

Other distributions are tracking the packaging process of Moonlight here:

  • Debian Mono Group (http://wiki.debian.org/Teams/DebianMonoGroup/Moonlight)
  • Fedora (http://olea.org/paquetes-rpm/repoview/moonlight.html)

Development Notes

Users interested in details about the implementation of Moonlight can read our MoonlightNotes.

Specification details that are not very obvious can be found in MoonlightQuirks