Knowledge Base‎ > ‎

Building from Source on Windows

Steps in this color are only relevant if you plan to actively work on the viewer source


Install the prerequisite libraries:
CMake (Win32 Installer) (Select to Add To Path)
Python 2.7 (Enable the feature "Add python.exe to Path")
Mercurial (for installing autobuild)
Visual Studio 2019 (Community) (not preview) Select the Desktop Development with C++ workload
NSIS 3StdUtils (zip) (Only if you plan to package for distribution)
Extract StdUtils and move the Include directory into your NSIS install and
move Plugins\Unicode\StdUtils.dll to plugins\x86-unicode\ in your NSIS install
You can lower subsequent build times by using Stashed, it caches the work your compiler does.

Open a command prompt (start->run, cmd), run
pip install "hg+"
git clone git:// singularity

Generating the project

Open a command prompt (start->run, cmd) and run the following:
Use -DPACKAGE:BOOL=OFF for speed without packaging, to build 32-bit use -A32
cd %USERPROFILE%\singularity
autobuild configure -cRelease -A64 -- -DPACKAGE:BOOL=ON

Open the project in VS2019 by running the following (Use build-vc160-32 for 32-bit)

In the second bar from the top where it says Debug, select Release instead.
Build->Build Solution to begin the compile process.

Once it finishes building, the installer and application exes may be found by navigating to the following location from a file explorer (My Computer):


(Be sure to also keep your libraries up to date, return to the NSIS and StdUtils links every so often to check for updates.)
The following is done in a command prompt (start->run, cmd) and assumes you've run
cd %USERPROFILE%\singularity
You can check if we have updated the code by running
git fetch
this will give output if there are changes, if so update your local files by running
git pull
Finally, compile again to update your build.