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
Visual Studio 2022 Community Edition
- Download Visual Studio 2022 Community Edition from https://visualstudio.microsoft.com/vs/.
- When you install, select ".Net Desktop Development" and "Desktop Development with C++" so you get C#, C++, and dotNet developer tools.
- You may be asked to reboot, or Visual Studio 2022 may be launched. If you do reboot, you will need to launch Visual Studio 2022 yourself to continue.
- On first launch VS2022 will ask you to sign in - It is not necessary to sign in. You can just choose "maybe later" or similar when asked to sign in.
- Check the "Apply customizations from previous version" box if you're upgrading. Choose the "Visual C#" option.
- You'll need the current .Net developer pack at https://dotnet.microsoft.com/en-us/download/dotnet-framework/thank-you/net481-web-installer, or VS2022 may prompt you for it when you first try to build Skyline.
We highly recommended this set of Visual Studio extensions and develop Skyline to be warning-free under its static analysis. Students with a .edu email address can get a free license.
- Download and install Resharper from this link https://www.jetbrains.com/resharper/download/
- Install ReSharper, dotTrace, dotMemory, dotCover and anything else available that interests you.
- Most Skyline developers choose the IntelliJ keyboard setup.
- In VS 2022:
- Extensions > Customize Menu - Uncheck ReSharper and click Save and Restart
- ReSharper > Options - select Products and Features - uncheck Dynamic Program Analysis and click Save - restart VS 2022 [bug]
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 (e.g. under I:\proj)
- Right-click in the folder and select Git Clone (if that's not there, you skipped TortoiseGit install)
- For "URL:" enter firstname.lastname@example.org: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".
- Once the project is checked out, if you do not see TortoiseGit overlay icons in the Windows File Explorer, consult this helpful tip.
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.3 %*
- 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.
- Regrettably, there are a handful of "errors" flagged in this initial build step which are alarming but don't actually matter for our purposes. But if your build doesn't seem to be working out, have a look in the file build64.log for clues.
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 updated 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. (Since VS 2022, Debug x64 is a better choice for debugging work.)
- Make sure your test settings match your build configuration:
Test > Configure Run Settings > Select Solution Wide runsettings 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 in 'Shadow-copy assemblies being tested' choose 'None'.
- Select Test Frameworks > MSTest, choose 'Use specific test settings file', and enter the path to TestSettings_x64.runsettings as above.
- 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.