STEP TWO: Build the app
Songbird is meant to be built under multiple environments. Pick the one below that best matches your situation.
- Configure Options
- Win32 MSYS Instructions (VC7.1 and VC8SP1)
- Win32 Cygwin Instructions (VC7.1 and VC8SP1)
- MacOSX gcc Instructions
- Linux gcc Instructions
- XULRunner Instructions
- Optional Environment Variables
If someone would like to help us create a compatible XCode or Eclipse harness, we would love you for it.
In the examples, below, we assume you have already unpacked the trunk into /sbird and your platform dependencies in their proper /sbird/dependencies/<platform> folder. If you put them somewhere else, you should start from your own trunk folder accordingly.
If you have not got them at all, please go get the code and set all that up, first. You also might want to uninstall any old versions you might have currently and delete any old profiles.
Configure Options
There are a handful of customization options that you can pass to the build system.
The preferred way is to set them through the songbird.config file. You can create this file in the root folder of your source code tree ( /sbird ) and add the lines to enable/disable functionality.
You do this by adding the options with the ac_add_options command, one per line, like so:
ac_add_options --enable-debug ac_add_options --disable-installer
Here is a list of all the possible options available (pulled from ./configure --help):
--enable-debug whether or not to compile a debug version (disabled by default)
--enable-jars whether or not to create jar files (enabled by default)
--enable-installer whether or not to create installer (disabled by default)
--enable-official whether or not to create an official build (disabled by default)
--enable-nightly whether or not to create an nightly build (disabled by default)
--enable-tests whether or not to build tests (defaults: debug:enabled rel:disabled)
--enable-update-channel=CHANNEL which update channel to use ("default")
--enable-breakpad whether or not to enable breakpad (disabled by default in non-official builds)
--enable-static experimental single-component static build support (disabled by default)
Win32: MSVC
The MSVC solution and project files have been deprecated. They can no longer be used to build the application. Only the make based builds work. There might still be .vcproj files in the tree, still, but don't expect them to do anything functional if you open them.
The compile and link tools from MSVC are still used by make to compile the app, so it is necessary to have Visual Studio 2k3 (VC7.1) or VS2k5 (VC8) fully installed on your machine to compile Songbird for Windows. NOTE: For safe debugging with VC8, make sure you have Service Pack 1 installed.
In addition, you have to make sure to get the correct vendor-binaries package depending upon whether you intend to compile with VC7.1 or VC8. See the Subversion Instructions for more details.
Win32: MSYS
The currently preferred method for building Songbird for Win32 is through the use of a specialized MSYS build environment provided by Mozilla. It is based on MinGW and contains the correct versions of all support packages required to build a Mozilla application. It is significantly faster than using Cygwin, to boot.
Mozilla's documentation for their use of MSYS can be found here: http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites#MozillaBuild
You should launch MSYS using the start-msvc71.bat or start-msvc8.bat file, depending upon the compiler you are using.
- Required Tools
- Mozilla Build; Download version 1.2
- Visual Studio 2k5(sp1) with C++ compiler installed, or latest platform sdk with standard non-optimizing compiler (use VC8 instructions).
- Extra requirements for VC8/VS2005 users: You will also need to pick up a couple of additional SDKs:
- Windows Media Format SDK
- Vista SDK
- You must be using MozillaBuild? 1.2; 1.1 no longer works with VC8
- Edit the vsvars32.bat file to add %VCINSTALLDIR%\Common7\Tools\bin\winnt; to the path block
PATH=%DevEnvDir%;%MSVCDir%\BIN;%VCINSTALLDIR%\Common7\Tools;%VCINSTALLDIR%\Common7\Tools\bin\prerelease;%VCINSTALLDIR%\Common7\Tools\bin;%VCINSTALLDIR%\Common7\Tools\bin\winnt;%FrameworkSDKDir%\bin;%FrameworkDir%\%FrameworkVersion%;%PATH%;
- Run make -f songbird.mk from your songbird source directory. You can build a debug mode Songbird by adding the keyword "debug" as the last parameter to make.
- Release mode:
%~/sbird: make -f songbird.mk
- Debug mode:
%~/sbird: make -f songbird.mk debug
- Release mode:
- Change directory to compiled/dist/ and launch the application by typing ./Songbird (or just doubleclick the Songbird.exe from Explorer).
%~/sbird: cd compiled/dist %~/sbird/compiled/dist: ./Songbird
If you ever need to rebuild, it's probably wise to call songbird.mk with "clobber" first. Like so:
%~/sbird: make -f songbird.mk clobber %~/sbird: make -f songbird.mk
NOTE: There are also useful Environment Variables that control various options when building.
Win32: Cygwin
Building on Win32 with Cygwin has been deprecated. See the deprecated Cygwin instructions if you're feeling bored and/or masochistic. Bugs filed against builds in a Cygwin-based environment may not receive expedient attention.
MacOSX
These instructions are also probably valid for most *BSD.
- Check for the port command.
- If the port command is not in your path, install the MacPorts client.
- Add /opt/local/bin to your path so port is available.
- Update MacPorts: (sudo port -d selfupdate)
- Check for and install the following required tools:
- Required Tools
- GNU Compiler C and C++ v4.x. (Install XCode)
- GNU make 3.80 or newer. (sudo port install gmake)
- GNU autoconf v2.59 or newer. (sudo port install autoconf)
- GNU coreutils. (sudo port install coreutils)
- libIDL (sudo port install libidl)
- Required Tools
- Now you can finally build the bird.
%~/sbird: make -f songbird.mk
- Change directory to compiled/dist/ and launch the application by typing open ./Songbird (or just doubleclick Songbird.app in Finder).
%~/sbird: cd compiled/dist %~/sbird/compiled/dist: open ./Songbird
If you ever need to rebuild, it's probably wise to call songbird.mk with "clobber" first. Like so:
%~/sbird: make -f songbird.mk clobber %~/sbird: make -f songbird.mk
NOTE: There are also useful Environment Variables that control various options when building.
Linux
- Required Tools (via apt-get, rpm, yum, what-have-you) (note, our configure script doesn't currently check for the version you have installed for these items, that will be fixed with bug 428).
- GNU make 3.80
or newer. - GNU autoconf v2.59 or newer.
- GNU Compiler C and C++ v4.x.
A current install of Ubuntu (Gutsy 7.10) required the following additional packages be installed to compile, as of 1/18/2008.
subversion autoconf g++ g++-4.1 libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libgtk2.0-dev // The following should only be for iPod plugin libdus-1-dev libdbus-glib-1-dev libhal-dev
- In your trunk folder
%~/sbird: make -f songbird.mk
- Go into compiled/dist/ and run Songbird (eg. ./Songbird).
%~/sbird: cd compiled/dist %~/sbird/compiled/dist: ./Songbird
If you ever need to rebuild, it's probably wise to call songbird.mk with "clobber" first. Like so:
%~/sbird: make -f songbird.mk clobber %~/sbird: make -f songbird.mk
If you are making changes in subdirectories you can go into the compiled directory and type "make". If you make changes to app or component you can make from there, the other dirs require a build from the compiled directory.
NOTE: There are also useful Environment Variables that control various options when building.
Additional Dependencies For Known Linux Distros
Every flavor of Linux has its own idiosyncracies. We're not sure exactly what it's going to take to get Songbird going on all the different distributions in the world. If you need to do anything special to get it working on a different distro than we have listed here -- or if the information listed is incorrect -- please make an entry in Bugzilla.
- Required for Building - The GStreamer development packages are required to build Songbird. On Ubuntu, you must install "libgstreamer0.10-dev" and "libgstreamer-plugins-base0.10-dev". Please check your distribution's package manager for its version of these development packages.
- Required for Playback ALL DISTROS - Check out the following pages for information on playback dependencies. In short we use gstreamer on linux and will only play what gstreamer is set up for.
- Please see Setting Up GStreamer for troubleshooting your GStreamer set up.
- Please see How to get Flash sound for configuration tips on how to get Flash audio working.
- 64-bit
- We've resolved the 64bit issues with building so this should work just fine now. The only big difference is to make sure to pull the proper dependencise ( linux-x86_64 instead of linux ).
- Fedora Core 4
- You will need svn as for some reason this distro doesn't include it by default. (as per our general build instructions)
- Fedora Core 5
- svn comes already installed here, so you're golden.
- General Linux Distros
- SELinux -
If you have SELinux enabled you will have to make sure you have the following enabled: Compatibility->Allow the use of shared libraries with Text Relocation. If this is disabled then the app will not startup.Fixed as of Aug 02
- SELinux -
XULRunner
Most of the time building XULRunner won't be neccessary. But for any platform that doesn't work with our dependencies you'll need to start here. The instructions are over on our Build XULRunner for Songbird page. You may also want to do this if you have specific fixes/requirement for XULRunner itself or are trying to debug something that might be a Mozilla bug.
General Build Foo
- Environment Variables (for make builds)
- SB_ENABLE_JARS - this var is only checked in debug builds. It will turn ON jarring of chrome files, which is by default disabled in debug builds.
- SB_DISABLE_JARS - this var is only checked in release builds. It will turn OFF jarring of chrome files, which is by default enabled in release builds.
- SB_ENABLE_INSTALLER - this var is checked regardless of release or debug status. It will turn ON building of the installer for your platform.
