Compile instructions (MU4 macOS with QtCreator) - Git

Updated 3 years ago

    Use these instructions to compile MuseScore master branch with QtCreator and Qt 5.15 (the minimum supported Qt version) on macOS 10.13+.
    See the Versions Reference page for which macOS versions are supported by Qt 5.15.

    Setting up the development environment

    1. Install Xcode developer tools

      • If you have XCode: Preferences -> Download and install the Command line Tools.
      • else run in the terminal: xcode-select --install
    2. Download and install Qt for open source with Qt online installer
      Select at least two modules: macOS and QtWebEngine
      installQt.png

    3. Install the dependencies. If you are new to macOS development or do not have a preference, we suggest Homebrew,

      $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
      $ brew install libogg libsndfile libvorbis pkg-config portaudio jack lame cmake git
       

      If you prefer MacPorts, choose the DMG of your OS and install MacPorts.
      Open a terminal and enter the following (in your home):
      $ sudo port install git libsndfile pkgconfig lame portaudio jack cmake

    Setting up the project

    1. Clone the project from GitHub
      git clone <your_fork_url>

    2. Open the QtCreator and select File -> Open File or Project then choose file CMakeLists.txt

    3. Configure project

      • create the directories in project: build.debug for debug, build.release for release etc
      • choose appropriate paths in the settings configureProject.png
    4. switch to Projects mode and change CMake configuration:

      • uncheck option BUILD_PCH
      • check option BUILD_UI_MU4
      • create directory install in the current build folder ( for the debug: build.debug/install )
      • choose created directory in the option: CMAKE_INSTALL_PREFIX
      • Push the button Apply Configuration Changes CMakeSettings.png
    5. Run CMake

    6. Build the project