You should complete all steps in the Getting Started guide before you try to download and build the source code.
We are currently migrating our private repositories from github.com to gitlab.com.
The Score libraries are hosted on GitLab with some dependencies hosted on Github. Therefore you will need an account on both platforms. See section Git Version Control System in Getting Started for more information.
Download the Source Code¶
Recommended: Clone the Git Repository Using the Terminal (Linux and Mac OSX)¶
(Optional) Open your Terminal and create a new directory (e.g.
~/dev) in your home folder that will contain this project and its dependencies:
cd ~ mkdir dev cd dev
Clone and download the score-c library by running (this will create a new directory called
git clone email@example.com:steinwurf/score-c.git
Recommended: Clone the Git Repository Using TortoiseGit (Windows)¶
Open the directory where you want to clone the project, right-click on empty
space and select
Git Clone... from the context menu. The TortoiseGit clone
dialog will appear, copy this to the URL field:
You can also customize the name of the target directory if you wish.
By default, a new folder called
score-c will be created.
If you decide to clone the repository with the
then use this URL in TortoiseGit:
Building the Score Examples and Unit Tests¶
In the following, we will look at how you can build the Score examples and unit tests using the Waf build system.
Navigate to the directory where you have downloaded the Score source code:
wafto build the Score unit tests and examples:
python waf configure
waf configurecommand ensures that all tools needed by Score are available and prepares to build Score. This step will also download several libraries into a local folder called
waf configurestep might take several minutes depending on the speed of your Internet connection. This would be a good time to grab a coffee or similar while the dependencies are downloaded.
You can use the
--bundle-pathoption to specify the download location for the dependencies (if you want to change the default location).
On Linux and Mac OSX:
python waf configure --bundle-path=~/dev/bundle_dependencies
On Windows, you can also specify the
bundle-pathas an absolute path with a drive letter, for example:
python waf configure --bundle-path=C:\dev\bundle_dependencies
If you have not configured Git-over-SSH to automatically authenticate on gitlab.com, you might see an error when waf tries to resolve the dependencies.
In this case, you can instruct the waf tools to use the
httpsprotocol for downloading the dependencies by adding the
--git-protocol=https://option to the
configurecommand (you will have to type your GitHub username and password):
python waf configure --git-protocol=https://
wafto build the unit tests and examples:
python waf build
Run the unit tests:
python waf --run_tests
You can find the compiled library and executables in the waf build folder, which depends on your operating system:
- Mac OSX:
You can directly run the executables here.