How to Build Skyline
Follow these steps to configure your PC to build Skyline:
The Skyline source code is part of the ProteoWizard project, and is hosted at GitHub.
- You will need a GitHub account
- You will need to configure it to use two factor authentication.
Don't go down any rabbit holes about SSH keys yet. See the next step for that.
- You will also need to set up an SSH key and add it to your GitHub account.
You can ignore the stuff about GitLab, it's GitHub we're interested in.
In the step where you create the .ssh directory, you may have to use the windows command line "mkdir" rather than Windows Explorer (some systems don't like a folder name that starts with ".").
You can use this or any Git client you like, as long as it provides C:\Program Files\Git\cmd\git.exe - the Skyline team uses TortoiseGit and Git For Windows.
Download from https://tortoisegit.org/download
Just accept the defaults during the installation.
If you don't already have a git.exe, let TortoiseGit help you download and install Git For Windows.
If you're installing Git For Windows, just accept the defaults. If it asks you for your GitHub login, provide that if you have one, or tell it you'll do that later.
It's recommended to edit your settings so that some commonly used operations are promoted to the main right click menu:
Create Branch, Log, Diff, Check for modifications, Add, and Switch/checkout
It's also recommended that you run this git command to set your CRLF defaults: "git config --global core.autocrlf true". This gives you Windows-style line endings in your editor, but saves the standard Unix line endings on GitHub.
If you're planning on making commits to the codebase, a ProteoWizard owner can grant access to the organization here
Skyline requires Microsoft Visual Studio 2017 or 2019. The free Community Edition is sufficient, but ideally you would use Enterprise edition, as does the Skyline team. You can have multiple versions of Visual Studio on your computer, but the only officially supported versions are Visual Studio 2017 and 2019. When you install, select the options to enable both C++ and C#.
If you are using VS2017 you probably will need to download and install the .NET 4.7.2 SDK as well.
You will need to exclude the ProteoWizard source code tree from antivirus inspection. If you don't, Skyline's "AaantivirusTestExclusion" test will fail, and other tests will run inefficiently. How this is done depends on your choice of antivirus software.
- Go to http://www.matrixscience.com/msparser_download.html to register with Matrix Science
- They'll send you an email, follow the instructions to download the latest for 64 bit windows.
- Run (as administrator) the 64 bit self-extractor, extracting to "C:\Program Files\Matrix Science\Mascot Parser\"
Checking out the ProteoWizard source code with TortoiseGit
- Create a ‘Proteowizard’ folder somewhere (i.e. under I:\proj)
- Right-click in the folder and select Git Clone (if that's not there, you skipped TortoiseGit install)
- For "URL:" enter email@example.com:ProteoWizard/pwiz.git
- Check the "Load Putty Key" box, and enter the path to the .ppk file that you created earlier (it's in your .ssh directory).
- Click OK.
- The first time you do this, you'll get a message from the Pageant progrem (part of Putty) asking for the keyphrase you gave when you created your .ppk file. You'll also get a security alert about an uncached key, respond "Yes".
To Build Skyline and ProteoWizard
This step builds the ProteoWizard core library used by Skyline to read mass spec data, as well as Skyline itself, and runs tests on both. Once you've done this, as a Skyline developer you'll mostly work in the Visual Studio IDE. If you need to work on the ProteoWizard core, it's back to the bjam-based build system (though you can follow the debugger from Skyline into the pwiz core, if pwiz is built with the "debug" option).
In these instructions, <root> refers to that umbrella directory you set up earlier as an antivirus exclusion.
- In a command prompt window, change directory to the root of the project that you cloned from github
Create a batch file named "b64.bat" in this directory by creating a new file text file with a single line like this:
pwiz_tools\build-apps.bat 64 --i-agree-to-the-vendor-licenses toolset=msvc-14.1 %*
- If you are using Visual Studio 2019 rather than Visual Studion 2017, the toolset argument should be "msvc-14.2" instead of "msvc-14.1"
- Type b64.bat in the command-line.
- Skyline will build, along with ProteoWizard tools like msconvert and SeeMS. You'll see lots of Skyline windows flashing by as the tests are run.
For the quickest possible build (quick because it skips tests), create a batch file bs64.bat containing the line "call b64.bat pwiz_tools\Skyline//Skyline.exe" and use that instead.
Test and Begin Skyline Development
Note that the first time you open Skyline.sln, you are likely to be asked to download and install an update dotNet package - do that.
- In Windows Explorer navigate to <root>\proj\Proteowizard\pwiz\pwiz_tools\Skyline
- Double-click Skyline.sln
- Be sure that your build configuration (RELEASE x64) is set correctly.
- Make sure your test settings match your build configuration:
Test > Test Settings > Select Test Settings File
and browser for either TestSettings_x64.runsettings in the Skyline folder
- On the Tools menu, click Options, select Debugging, select General, and uncheck the 'Enable Just My Code (Managed only)' option.
- On the ReSharper menu, if you have one, click Options, under Tools, select Unit Testing, select Test Runner, and switch the the 'Shadow-copy assemblies being tested' option to 'None'.
- In the Test menu, choose Run and click All Tests in Solution
- Once all of the tests have passed, you are ready to explore the code and implement new features.