Compile instructions (Ubuntu 9.10) - SVN trunk
This page is deprecated and kept for reference. The current development of MuseScore is done on Git and the SVN repo is abandoned. You can find instructions to build the most up to date version in the developer handbook
The following steps explains how to build and install MuseScore trunk on Ubuntu 9.10 Karmic Koala.
These instructions have been tested on a clean Ubuntu server distrib.
Qt 4.7 PPA: deb http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu lucid main
Setup build environment
- Update your repository sources.
sudo apt-get update
- Install Subversion
sudo apt-get install subversion
- Get MuseScore last source code
mkdir musescore
cd musescore
svn co https://mscore.svn.sourceforge.net/svnroot/mscore/trunk .
cd .. - Get Qt 4.6. This is only necessary if you are running Ubuntu Karmic without any mscore PPA. Otherwise, skip the next (four) steps until "Install MuseScore dependencies" below.
If you are running a 32-bit OSwget http://get.qt.nokia.com/qtsdk/qt-sdk-linux-x86-opensource-2010.05.1.bin
chmod a+x qt-sdk-linux-x86-opensource-2010.05.1.bin
If you are running a 64-bit OSwget http://get.qt.nokia.com/qtsdk/qt-sdk-linux-x86_64-opensource-2010.05.1.bin
chmod a+x qt-sdk-linux-x86_64-opensource-2010.05.1.bin - Install Qt4.6. User home is fine. Install everything
If you are running a 32-bit OS./qt-sdk-linux-x86-opensource-2010.05.1.bin
If you are running a 64-bit OS./qt-sdk-linux-x86_64-opensource-2010.05.1.bin
- Put qmake in the $PATH
Append the following to ~/.bashrcif [ -d ~/qtsdk-2010.05/qt/bin ] ; then
PATH=~/qtsdk-2010.05/qt/bin:"${PATH}"
fi
Then runsource .bashrc
- As written at the end of Qt installation process, install Qt dependencies
sudo apt-get install libglib2.0-dev libSM-dev libxrender-dev libfontconfig1-dev libxext-dev
Install MuseScore dependencies
sudo apt-get build-dep musescore
If this magic command doesn't work, try to install the following dependencies manually:
- ALSA
sudo apt-get install alsa
sudo apt-get install libasound2-dev - Libsndfile for flac, ogg, wav export
sudo apt-get install libsndfile1
sudo apt-get install libsndfile1-dev - Portaudio (optional)
sudo apt-get install portaudio19-dev
Build
Type the following to compile and install MuseScore. It will take quite some time to compile. On a 1.7Ghz CPU, it takes more than an hour.cd musescore
make revision
make release
sudo make install
Further upgrades
Are easier... Use the update subcommand of svn and don't forget make revision
to have the right revision number in the about box.
If the build environment didn't change (Qt version etc...), type the following
svn update
make revision
sudo make install
If you want to build from scratch : cd musescore
svn update
make clean
make revision
make release
sudo make install
Debug with Eclipse CDT
- Download Eclipse CDT bundle or install the CDT on a previous eclipse install.
- Check out MuseScore code from SVN in Eclipse into a directory named "musescore". You'll need a source tree linked to SVN in your workspace to get updates.
- Edit mscore/CMakeLists.txt and change Project name to something different than "mscore" (if not, eclipse will not find the mscore binary to run)
- Create a musescore_build directory in the workspace and run Cmake to generate Eclipse project
mkdir musescore_build
cd musescore_build
cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ../musescore - Open Eclipse.
- Import project using Menu File->Import
- Select General->Existing projects into workspace
- Browse where your build tree is and select the root build tree directory. Keep "Copy projects into workspace" unchecked.
- You get a fully functional eclipse project. Be patient, Eclipse will index all cpp files and build the project.
- To debug, right click on the project and choose Debug as -> Local C/C++ Application
- Go to debugger tab, share libraries tab and uncheck Load shared library symbols automatically and Stop on shared library events
- You should be able to debug.
- If you lack sound, in Preferences->I/O, you can try to check PortAudio, APi: Alsa, Device: Pulse
More information: http://www.cmake.org/Wiki/Eclipse_CDT4_Generator
Qt Creator IDE
- open mscore/CMakeLists.txt as your project file.
- when QT Creator asks for command line options for cmake, use
-G"Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ../mscore