Filmorependrgn
November 25th, 2008, 12:35 AM
NOTE: WORK IN PROGRESS
Here's a quick recap of my experiences with getting Moonlight to install from their SVN repository. this is only for Moonlight supporting Silverlight 1.0. For Silverlight 2.0 support, Mono libraries version 2.0 or greater are required, which are included in Jaunty. But since I don't have a computer to use as a development computer at the moment, I'll wait until Jaunty is released to update with Silverlight 2.0 instructions.
1) Download the code for Moonlight
svn co svn://anonsvn.mono-project.com/source/trunk/moon
This code will create a directory called "moon" where the source is stored.
cd moon
2) Get FFMPEG configured.
2a) Download the FFMPEG source
sudo aptitude build-dep ffmpeg
apt-get source ffmpeg
cd ffmpeg-debian*
2b) Configure ffmpeg.
The Moonlight compile directions recommend the following:
./configure --disable-static --enable-shared --disable-ffmpeg --disable-ffserver --disable-ffplay --disable-zlib --disable-network --disable-vhook --disable-debug --disable-muxers --disable-encoders --disable-demuxers --disable-bsfs --disable-protocols
But I used the Ubuntu config flags which can be seen if you type `ffmpeg -v' Which, ironically enough, gives an error about `Unknown option -v' but hey... we got what we needed. For this release of ffmpeg, the config flags are as follows:
./configure --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-altivec --disable-vis --enable-shared --disable-static
2d) Build ffmpeg. This step was a pain in the *** as it took a lot of manual coding on my part to get it to work. I have submitted a bug report (https://bugs.launchpad.net/ubuntu/+source/ffmpeg-debian/+bug/302049). The hot-fix below assumes that you know the basics of coding (sorry for the lack of detail, but I assume this step will be much easier in the future).
Modify libavcodec/h263.h to look more like this
#if defined(ENABLE_H263_DECODER) || \
defined(ENABLE_H263I_DECODER) || \
defined(ENABLE_FLV_DECODER) || \
defined(ENABLE_RV10_DECODER) || \
defined(ENABLE_RV20_DECODER) || \
defined(ENABLE_MPEG4_DECODER) || \
defined(ENABLE_MSMPEG4_DECODER) || \
defined(ENABLE_WMV_DECODER)
#define ENABLE_ANY_H263_DECODER 1
#else
#define ENABLE_ANY_H263_DECODER 0
#endif
#if defined(ENABLE_H263_ENCODER) || \
defined(ENABLE_H263P_ENCODER) || \
defined(ENABLE_FLV_ENCODER) || \
defined(ENABLE_RV10_ENCODER) || \
defined(ENABLE_RV20_ENCODER) || \
defined(ENABLE_MPEG4_ENCODER) || \
defined(ENABLE_MSMPEG4_ENCODER) || \
defined(ENABLE_WMV_ENCODER)
#define ENABLE_ANY_H263_ENCODER 1
#else
#define ENABLE_ANY_H263_ENCODER 0
#endif
Also add all those pesky ENABLE_((SOMETHING))_ENCODER defines anywhere into config.h
For me it was
#define ENABLE_H261_ENCODER 0
#define ENABLE_MPEG4_ENCODER 0
#define ENABLE_MSMPEG4V1_ENCODER 0
#define ENABLE_MSMPEG4V2_ENCODER 0
#define ENABLE_MSMPEG4V3_ENCODER 0
#define ENABLE_MPEG2VIDEO_ENCODER 0
#define ENABLE_H263_ENCODER 0
#define ENABLE_H263P_ENCODER 0
3) Configure Moonlight.
PKG_CONFIG_PATH=$PATH_TO_FFMPEG_SOURCE ./autogen.sh --enable-directfb --enable-ps --enable-pdf --enable-svg --enable-xcb --enable-glitz --enable-user-plugin --with-ffmpeg=yes --with-alsa=yes --with-pulse-audio=no --with-managed=no --with-ff3=yes
Where $PATH_TO_FFMPEG_SOURCE is the *absolute* path to your ffmpeg source from step 2.
3b) If you try to build Moonlight at this point, you'll probably get a lot of errors due to missing components. You'll want to find each component and install the associated "library-dev" package. The only non-obvious one is that, to build a Firefox plugin, you need the xulrunner package.
sudo aptitude install xulrunner-1.9-dev
If you feel lucky, and wanna try the same one's I did, try this code:
sudo aptitude install libxtst-dev libmagick++9-dev libasound2-dev xulrunner-1.9-dev libdbus-glib-1-dev librsvg2-2 librsvg2-dev libpoppler-glib-dev libdirectfb-dev libglitz-glx1-dev libglitz1-dev xcb xcb-proto ggcov libgtk2.0-dev libglibmm-2.4-dev libglibmm-utils-dev libglib2.0-dev
4) Build Moonlight. If you're lucky, it'll compile without any more errors. The final plugin will be located at moon/plugin/install/novell-moonlight.xpi
Here's a quick recap of my experiences with getting Moonlight to install from their SVN repository. this is only for Moonlight supporting Silverlight 1.0. For Silverlight 2.0 support, Mono libraries version 2.0 or greater are required, which are included in Jaunty. But since I don't have a computer to use as a development computer at the moment, I'll wait until Jaunty is released to update with Silverlight 2.0 instructions.
1) Download the code for Moonlight
svn co svn://anonsvn.mono-project.com/source/trunk/moon
This code will create a directory called "moon" where the source is stored.
cd moon
2) Get FFMPEG configured.
2a) Download the FFMPEG source
sudo aptitude build-dep ffmpeg
apt-get source ffmpeg
cd ffmpeg-debian*
2b) Configure ffmpeg.
The Moonlight compile directions recommend the following:
./configure --disable-static --enable-shared --disable-ffmpeg --disable-ffserver --disable-ffplay --disable-zlib --disable-network --disable-vhook --disable-debug --disable-muxers --disable-encoders --disable-demuxers --disable-bsfs --disable-protocols
But I used the Ubuntu config flags which can be seen if you type `ffmpeg -v' Which, ironically enough, gives an error about `Unknown option -v' but hey... we got what we needed. For this release of ffmpeg, the config flags are as follows:
./configure --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-altivec --disable-vis --enable-shared --disable-static
2d) Build ffmpeg. This step was a pain in the *** as it took a lot of manual coding on my part to get it to work. I have submitted a bug report (https://bugs.launchpad.net/ubuntu/+source/ffmpeg-debian/+bug/302049). The hot-fix below assumes that you know the basics of coding (sorry for the lack of detail, but I assume this step will be much easier in the future).
Modify libavcodec/h263.h to look more like this
#if defined(ENABLE_H263_DECODER) || \
defined(ENABLE_H263I_DECODER) || \
defined(ENABLE_FLV_DECODER) || \
defined(ENABLE_RV10_DECODER) || \
defined(ENABLE_RV20_DECODER) || \
defined(ENABLE_MPEG4_DECODER) || \
defined(ENABLE_MSMPEG4_DECODER) || \
defined(ENABLE_WMV_DECODER)
#define ENABLE_ANY_H263_DECODER 1
#else
#define ENABLE_ANY_H263_DECODER 0
#endif
#if defined(ENABLE_H263_ENCODER) || \
defined(ENABLE_H263P_ENCODER) || \
defined(ENABLE_FLV_ENCODER) || \
defined(ENABLE_RV10_ENCODER) || \
defined(ENABLE_RV20_ENCODER) || \
defined(ENABLE_MPEG4_ENCODER) || \
defined(ENABLE_MSMPEG4_ENCODER) || \
defined(ENABLE_WMV_ENCODER)
#define ENABLE_ANY_H263_ENCODER 1
#else
#define ENABLE_ANY_H263_ENCODER 0
#endif
Also add all those pesky ENABLE_((SOMETHING))_ENCODER defines anywhere into config.h
For me it was
#define ENABLE_H261_ENCODER 0
#define ENABLE_MPEG4_ENCODER 0
#define ENABLE_MSMPEG4V1_ENCODER 0
#define ENABLE_MSMPEG4V2_ENCODER 0
#define ENABLE_MSMPEG4V3_ENCODER 0
#define ENABLE_MPEG2VIDEO_ENCODER 0
#define ENABLE_H263_ENCODER 0
#define ENABLE_H263P_ENCODER 0
3) Configure Moonlight.
PKG_CONFIG_PATH=$PATH_TO_FFMPEG_SOURCE ./autogen.sh --enable-directfb --enable-ps --enable-pdf --enable-svg --enable-xcb --enable-glitz --enable-user-plugin --with-ffmpeg=yes --with-alsa=yes --with-pulse-audio=no --with-managed=no --with-ff3=yes
Where $PATH_TO_FFMPEG_SOURCE is the *absolute* path to your ffmpeg source from step 2.
3b) If you try to build Moonlight at this point, you'll probably get a lot of errors due to missing components. You'll want to find each component and install the associated "library-dev" package. The only non-obvious one is that, to build a Firefox plugin, you need the xulrunner package.
sudo aptitude install xulrunner-1.9-dev
If you feel lucky, and wanna try the same one's I did, try this code:
sudo aptitude install libxtst-dev libmagick++9-dev libasound2-dev xulrunner-1.9-dev libdbus-glib-1-dev librsvg2-2 librsvg2-dev libpoppler-glib-dev libdirectfb-dev libglitz-glx1-dev libglitz1-dev xcb xcb-proto ggcov libgtk2.0-dev libglibmm-2.4-dev libglibmm-utils-dev libglib2.0-dev
4) Build Moonlight. If you're lucky, it'll compile without any more errors. The final plugin will be located at moon/plugin/install/novell-moonlight.xpi