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)
git-scm Select "Git from the command line" option when prompted
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
Refer to Building the FMOD Studio Package to create the FMOD package the viewer requires for audio.

Generating the project

Open a Developer Command Prompt for VS (start, type in VS) and run the following:
cd %USERPROFILE%\singularity

The steps here change depending on if you want to use Ninja or not. Use -DPACKAGE:BOOL=OFF for faster builds without packaging.
Building with Ninja:
mkdir build-ninja; cd build-ninja
Ninja building can be interrupted at any time using Ctrl-C

Building without Ninja:
To build 32-bit use -A32
autobuild configure -cRelease -A64 -- -DPACKAGE:BOOL=ON
Open the project by running the following
cd build-*
start Singularity.sln

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 launching a file explorer like so from any kind of command prompt (cmd):
cd %USERPROFILE%\singularity\build-*\newview\Release
start .


(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.