CodeStructure - musescore/MuseScore GitHub Wiki
Code structure
Root
-
.github: Issue templates and github workflows.
-
.tx: Transifex configuration files.
-
.vscode: Configuration JSON files for editing in Visual Studio Code. Unfortunately mostly outdated.
-
build: Tools, scripts, and resource files for building and packaging.
-
demos: A few MuseScore files to demonstrate what can be done.
-
doc: Markdown files containing useful information for making plugins, tick lengths, etc. Unfortunately mostly outdated.
-
fonts: Contains ttf/otf fonts, in some cases including fontforge source (sfd).
-
hooks: Git Hooks, including a script to install/uninstall them.
-
sandbox: Test directory for testing certain parts of the project in isolation.
-
share: Resource files, most of which are installed with the app.
-
src: Source files, see below.
-
test: Even older unit tests.
-
thirdparty: Contains projects which are included for convenience, usually to integrate them into the build system to make them available for all supported platforms.
-
tools: Several tools.
-
vtest: Visual tests: scripts and input files. Used to compare the engraving output of different builds of MuseScore, for example to verify that patches don't introduce regressions.
Source files
All code files are in the src
folder. This folder contains subfolders for each module. The names of these modules are generally self-explaining; a few remarks:
- the
framework
folder, and especially theglobal
module inside it, contain code for general data structures, functions, utilities, UI components etc. that are used by the rest of the code; - the
engraving
module contains code for the data model and layout of actual scores; - the
notation
module contains code for the interaction with the score; - the
project
module contains code for file operations.
Tests
Each module that has tests contains its own tests
folder. Furthermore, we use the Visual Tests from the vtest
folder to detect engraving regressions.
The tests in the folders test
and mtest
are obsolete, but kept because they might be revived in the future.