Building from Source on Windows
{ Steps wrapped in brackets are only relevant if you plan to actively work on the viewer source }
Preparation
Install the prerequisite libraries: CMake (Win32 Installer) (Select to Add to the system PATH) git-scm Select "Git from the command line" option when prompted Python 2.7 (Windows x86-64 MSI installer) (Enable the feature "Add python.exe to Path") Visual Studio 2019 (Community) (not preview) Select the Desktop Development with C++ workload { NSIS 3 + StdUtils (zip) + 7z Plugin (top download) + INetC (top DL) (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 Extract the 7z Plugin and move the Plugins directory into your NSIS install directory Extract the INetC Plugin and move the Plugins directory into your NSIS Install directory 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 "git+https://git.alchemyviewer.org/alchemy/autobuild"
git clone git://github.com/singularity-viewer/SingularityViewer.git singularity
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. To use FMOD for audio, follow Building the FMOD Studio Package and add -DUSE_FMODSTUDIO=ON
. { Use -DPACKAGE=ON
for packaging. }
- Building with Ninja:
mkdir build-ninja; cd build-ninja
cmake ..\indra -GNinja -DCMAKE_BUILD_TYPE=Release -DFULL_DEBUG_SYMS=ON
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 --
Open the project by running the following
cd build-vc
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 .
Updating
{ 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.