-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Get MuseScore's source code
- Create a projects folder
- Fork MuseScore's repository
- Clone the repository
- Set the remotes
- Adding required dependencies
You must have Git installed on your computer (see Set up Developer Environment).
Before you download any source code, it's a good idea to create a folder called Projects
, code
or src
that you can use to store code projects on your machine.
Tips for creating the projects folder (click to show/hide)
General advice for all operating systems:
Windows users should create the projects folder at the root of a drive, such as the |
Linux and macOS
You could create the projects folder inside your Home directory:
cd ~ # change (go) to your home directory
mkdir src # create new directory for source projects
Windows
Create the projects folder at the root of an NTFS-formatted drive, such as your C:
drive:
# Change (go) to the C: drive's root directory:
cd C:\ # PowerShell or CMD
cd /c # Git Bash
# Create new directory for source projects:
mkdir src
It's best to keep code projects near the root of the drive to avoid encountering the 260 character limit Windows places on the length of file paths.
A 'fork' is a remote (online) copy of a repository. After the fork has been made, it can be edited freely without affecting the original repository.
You must create a fork if you want to be able to edit MuseScore's code and contribute your changes back to the official repository. However, if you just want to compile the code without editing it then you can skip creating the fork and move on to the next step.
To create a fork:
- Sign-in to GitHub (create a free account if necessary).
- Visit MuseScore's official repository page: https://github.com/musescore/MuseScore
- Click the "Fork" button in the top right to create your personal fork.
Your fork exists at https://github.com/USERNAME/MuseScore
where USERNAME
is your GitHub username (e.g. shoogle's fork is here).
A clone is a local (offline) copy of a repository. It's basically a folder on your computer that contains the code for you to edit and/or compile.
If you made a fork then you should clone that, otherwise clone the official repository. Make the clone inside your projects folder.
# Go to your source code projects folder. For example:
cd ~/src # Linux and macOS
cd C:\src # Windows - PowerShell or CMD
cd /c/src # Windows - Git Bash
# Clone your fork if you have one:
git clone https://github.com/USERNAME/MuseScore # replace USERNAME with your GitHub username
# Otherwise clone the official repo:
git clone https://github.com/musescore/MuseScore
Tip: If you have a fork, consider using its SSH URL [email protected]:USERNAME/MuseScore.git
instead of the HTTPS URL with the git clone
command. This requires additional setup, but it means that you don't have to enter your password every time you push code changes to GitHub.
The git clone
command puts the code in a new folder called "MuseScore". You should change to this directory now:
cd MuseScore
This directory is used as the working directory for all subsequent commands, including on subsequent pages of this guide.
Git is able to push
(upload code to) and pull
(download code from) remote repositories, known as "remotes".
Run these commands to set the remotes for your local repository:
# If you cloned your fork earlier:
git remote add upstream https://github.com/musescore/MuseScore.git
git remote set-url upstream --push disabled # prevent accidental push to official repo (team members only)
# If you cloned the official repo:
git remote set-url origin --push disabled # prevent accidental push to official repo (team members only)
Explanation of the above commands (click to show/hide)
Earlier, when you cloned the repository, a default remote called When The official repository should only ever be used with |
Use this command to show details about all the remote repositories that Git is aware of:
git remote -v
Hint: You can create additional remotes later on with git add remote [name] [url]
. This is useful if you ever need to pull from, or push to, another person's fork instead of your own.
For Windows, download the required dependencies here. After you extract the contents, put it inside the MuseScore
folder, between the other folders such as assets
, share
, src
, etc. If you followed the earlier instructions exactly, it will be located at ~/src/MuseScore
. Additionally, to prevent certain compilation errors, you may need to download and install a recent version of Windows SDK:
- either select it in the Visual Studio Installer by "modifying your installation" (for example, select version 10.0.22621 or newer)
- or download it separately from https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/, but for some people the installer from this website doesn't seem to do anything.
After installing this SDK, you may need to restart your computer before the new one gets picked up by all tools.
You need to install libsndfile
:
brew install libsndfile
You need to install libsndfile
:
# (one of these, as appropriate for your OS)
sudo apt-get install libsndfile1-dev
sudo dnf install libsndfile-devel
sudo pacman -S libsndfile
Ubuntu 22.04 does not include the packaging reference for libssl1.1, download the appropriate version from http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/?C=M;O=D and install it with dpkg
For example:
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.17_amd64.deb
Testing
- Manual testing
- Automatic testing
Translation
Compilation
- Set up developer environment
- Install Qt and Qt Creator
- Get MuseScore's source code
- Install dependencies
- Compile on the command line
- Compile in Qt Creator
Beyond compiling
Misc. development
Architecture general
- Architecture overview
- AppShell
- Modularity
- Interact workflow
- Channels and Notifications
- Settings and Configuration
- Error handling
- Launcher and Interactive
- Keyboard Navigation
Audio
Engraving
- Style settings
- Working with style files
- Style parameter changes for 4.0
- Style parameter changes for 4.1
- Style parameter changes for 4.2
- Style parameter changes for 4.3
- Style parameter changes for 4.4
Extensions
- Extensions overview
- Manifest
- Forms
- Macros
- Api
- Legacy plugin API
Google Summer of Code
References