Compile instructions (Ubuntu 12.04) - Git
The following steps explain how to build and install MuseScore trunk on Ubuntu 12.04 Precise Pangolin.
These instructions have been tested on a clean Ubuntu server distrib.
Install GCC 4.7
GCC 4.7 is needed. On Ubuntu 12.10 and higher, it's the default compiler. On Ubuntu 12.04, you will need to install it.
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
Install dependencies
sudo apt-get update
sudo apt-get install git cmake
sudo apt-get install qt-sdk
sudo apt-get install alsa libsndfile1
sudo apt-get install libasound2-dev portaudio19-dev libsndfile1-dev zlib1g-dev libfreetype6-dev
sudo apt-get install lame libmp3lame-dev
Optional
sudo apt-get install libpulse-dev
Get the source code and compile
git clone git://github.com/musescore/MuseScore.git
cd MuseScore
make revision
make
sudo make install
If you plan to contribute to MuseScore, you can setup your own fork on GitHub and clone it instead. See the Git Workflow page.
Keep the source code up to date...
cd MuseScore
git pull
Debug with Eclipse CDT
- Download Eclipse CDT bundle or install the CDT on a previous eclipse install.
- Edit ./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
- Open ./CMakeLists.txt as your project file.
- When QT Creator asks for command line options for cmake, use
-G"Unix Makefiles" -DCMAKE_BUILD_TYPE=DEBUG
More information: http://www.cmake.org/Wiki/Eclipse_CDT4_Generator