Skip to content

Install dependencies

Peter Jonas edited this page Sep 19, 2023 · 4 revisions

Summary

You must have followed the required steps in Set up Developer Environment, Install Qt and Qt Creator and Get MuseScore's source code.

At this point you could proceed straight to Compile on the command line. If the build fails (which it will) then you can use the error messages to determine which dependencies you need to install. Simply paste the error message into your preferred search engine and see what comes up.

However, to save you time, we have listed the dependencies below. You can also check our CI build scripts for ideas.

Linux

See build/ci/linux/setup.sh for clues.

Debian-based distros

Includes Debian, Ubuntu, and all their derivatives that use the apt package manager and DEB packaging format.

See build/ci/linux/setup.sh for the full list of dependencies required on minimal environments like Docker.

dependencies=(
    # Alphabetical order please!
    g++
    libasound2-dev
    libfreetype6
    libfreetype6-dev
    libsndfile1-dev
    libssl-dev
    libportmidi-dev
    libpulse-dev
    portaudio19-dev
)

sudo apt install "${dependencies[@]}"

macOS

See build/ci/macos/setup.sh for clues.

dependencies=(
    # Alphabetical order please!
    lame
    libogg
    libsndfile
    libvorbis
    pkg-config
)

brew install "${dependencies[@]}"

Windows

See build/ci/windows/setup.bat for clues.

Dependencies archive

We provide 7-zip archives containing the MSVC and MinGW versions of various libraries.

Install 7-zip from the website or by using one of these commands:

choco install 7zip # requires sudo or Administrator prompt
scoop install 7zip

Download one of these files as appropriate for your machine:

Use 7-zip to extract the file into MuseScore's source code folder on your machine. You should end up with a new folder called "dependencies" inside the source code folder. Make sure the "dependencies" folder doesn't have another folder inside it called "dependencies"; it should only be one layer deep.

MuseScore\dependencies               # Good!
MuseScore\dependencies\dependencies  # Bad!

MSVC build tools

Follow these steps if you selected MSVC as the prebuilt component when you installed Qt.

Download Visual Studio Installer

MSVC's build tools are installed via a program called Visual Studio Installer, which surprise, surprise, is also used to install Microsoft's IDE, Visual Studio. However, you don't actually need Visual Studio in order to compile MuseScore. In fact, we recommend using Qt Creator instead.

To get the build tools without Visual Studio:

  1. Visit https://visualstudio.microsoft.com/downloads/
  2. Scroll down to All downloads.
  3. Expand Tools for Visual Studio.
  4. Locate Build Tools for Visual Studio 2022 and click the Download button next to it.

If you do want Visual Studio, you can use the link at the top of the downloads page to get the free Community edition, but bear in mind that Visual Studio is a very large program (15GB+) so only download it if you actually plan to use it.

Run Visual Studio Installer

When you run the installer (either for the first time, or later on to modify components) you will eventually get to the Workloads tab.

Make sure the Desktop development with C++ option is selected. None of the other workloads are required for MuseScore.

Switch to the Individual components tab and make sure the following components are selected:

  • Compilers, build tools, and runtimes
    • MSVC v[version] - VS [year] - C++ x64/86 build tools (latest year and version, see note below)
  • SDKs, libraries, and frameworks
    • Windows 10 or 11 SDK (latest version)

Note: You must pick a VS [year] that is the same as or newer than the MSVC [year] of the prebuilt component that you installed with Qt. See MSVC ABI-compatibility.

Click Next (or Modify) to complete the installation.

Testing

Translation

Compilation

  1. Set up developer environment
  2. Install Qt and Qt Creator
  3. Get MuseScore's source code
  4. Install dependencies
  5. Compile on the command line
  6. Compile in Qt Creator

Beyond compiling

  1. Find your way around the code
  2. Submit a Pull Request
  3. Fix the CI checks

Misc. development

Architecture general

Audio

Engraving

Extensions

Google Summer of Code

References

Clone this wiki locally