Build Instructions: Windows 10
Repository (PDF with images available in Downloads)
This document describes how the SceneGate viewer may be built on any Windows 10 operating system. The build system is domed by Autobuild, a framework for building packages and for managing the dependencies of a package on other packages created by SecondLife. Autobuild uses CMake to build the source code of the underlying packages and extracts prebuild dependencies from SecondLife (internet) sources.
The steps in this document have been tested on a Windows 10 Pro system with the following architecture:
- Processor: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
- RAM: 32GB
- System type: 64-bit OS
In order to pass the configure step you will need to install a number of packages and applications. These are described below.
1. Visual Studio 2017, version 15.0. You will need to create a Microsoft account if you don’t already have one. The installer can be found under the 2017 section from https://visualstudio.microsoft.com/vs/older-downloads/
Once you have installed the installer .EXE, run it. When the Visual Studio Installer is installed (you do this by going through the steps from the previously downloaded installed), you can select different workloads and it’s individual components. The only required workload that needs to be installed to build the viewer is ‘Desktop development with C++’. The 'by default' selected components should be fine.
2. CMake, preferably the most recent version which can be downloaded from https://github.com/Kitware/CMake/releases/download/v3.15.1/cmake-3.15.1-win64-x64.msi (copy the link in your browser if it doesn’t work here). According to unconfirmed documentation any version higher or equal to 2.8.x should suffice.
When the installer is downloaded, run it. The steps should be self explanatory. When you reach the Install Options step, make sure you select either the option ‘Add CMake to the system PATH for all users’ or ‘Add CMake to the system PATH for the current user’. The default destination folder ‘C:\Program Files\CMake\’ is fine.
3. Python 2.7.16, which can be downloaded from https://www.python.org/downloads/
Use the x86-64 MSI installer (https://www.python.org/ftp/python/2.7.16/python-2.7.16.amd64.msi) for a 64-bit Windows OS and the X-86 for a 32-bit Windows OS (https://www.python.org/ftp/python/2.7.16/python-2.7.16.msi)
The default installation path ‘C:\Python27\’ is fine.
Once Python27 is installed you will have to verify if the executable folder and the Scripts folder are added to your system path.
- Open the file explorer (windows key + E), and the system tab (right mouse click on This PC and click on properties).
- Now you click on ‘Advanced System Settings’ in the left menu, and finally on ‘Environment Variables’.
- Move to the ‘Path’ variable under System variables and click on ‘Edit’.
- Look for the ‘C:\Python27\’ and ‘C:\Python27\Scripts’ variables. If you chose a user-only installation these variables may be located under ‘User variables for user’. Otherwise add the variables to the system path if they don’t exist yet.
- If you chose different installation directory modify the environment variables accordingly.
4. Mercurial (tested with TortoiseHg), which can be downloaded from https://tortoisehg.bitbucket.io/download/index.html
Choose the appropriate installer based on your OS-version.
5. Cygwin, which can be downloaded from http://www.cygwin.com/
When you run the Cygwin setup utility, make sure that you have selected to install unzip (under Archives), bison, flex, patchutils (all located under devel), and curl (under web), which are not part of the default installation.
Add the cygwin\bin or cygwin64\bin directory (depending on the chosen installation) to the very end of your Windows path (see the python step for an explanation of how the Windows path may be accessed and modified).
6. Unicode NSIS (Nullsoft Scriptable Install System), this package is only required to build the Windows setup executable. Pick the most recent version preferably (3.04 at the time of writing), from https://nsis.sourceforge.io/Download
You will need the NSIS StdUtils plugin. Download the stdutils plugin from here https://github.com/lordmulder/stdutils/releases/tag/1.14
Add the Include\StdUtils.nsh to your NSIS installation\Include folder, and the StdUtils.dll’s (look for the corresponding one in the subfolders) to the NSIS\plugins\Tiny & NSIS\plugins\x86-ansi & NSIS\plugins\x86-unicode folders.
7. Autobuild. This is a tricky prerequisite since there are a lot of (forked) versions available of this tool. We use the forked version of Alchemy (located in the autobuild-alchemy viewer repository) at commit 90e2855. It can be found here:
To install this version, start by opening a Cygwin terminal. To access your system drive, use the command
Now you can choose a directory that will serve as the place from where Autobuild will be installed. A suggested directory is ‘Users/User/SceneGate-Autobuild’ (again using the cd command as above), but this directory is completely optional. Having installed Mercurial you can clone the forked auto-build repository at the specific commit running the command:
hg clone https://bitbucket.org/alchemyviewer/autobuild-alchemy -r 90e2855
We then enter the cloned repository using again the cd command:
Now we install the autobuild by running the command:
python setup.py install
8. FMOD Studio API. You might need to create an account to be able to access the download page: https://www.fmod.com/download
Be sure to install the studio API version.
9. DoxyGen, may be downloaded from http://www.doxygen.nl/download.html
Before we can start building we will have to verify if all prerequisites mentioned in the previous step were installed correctly. Open a Cygwin terminal and run the following commands:
Using the same versions recommended above, you should get a similar output:
In the case of commands that are not found, you probably missed a step in the previous section or didn’t setup your PATH settings correctly. Check the step of the missing commando in the previous section and make sure no error’s are given. If the prerequisites are installed in their default paths, your PATH settings should report at least the following environment variables:
C:\Python27\Scripts\ – C:\Python27 – C:\Program Files\CMake\bin – C:\Program Files\TortoiseHg\ – C:\cygwin64\bin
After getting the prerequisites you may build the SceneGate viewer. To do so you have to do the following:
Copy the clone command for the SceneGate branch, navigating to https://bitbucket.org/imadevelopmentteam/scenegate-viewer/src/SceneGate/ and click on the ‘Clone’ button in the top-right corner. Then, open a Cygwin terminal and run the copied command in a directory of your choosing.
The configure step will create the build packages, retrieve the necessary packages from external sources and check for the installed packages. For Windows it will create the Visual Studio project solution files. Run the following command the Cygwin terminal you opened in the previous step:
autobuild configure -c ReleaseOS -p windows64 -- -DFMODSTUDIO=ON
After the successful execution of the configure command you should have a new folder created in the SceneGate repository, with the name: ‘build-vs141-x86_64’. Navigate in this folder and find the file ‘SceneGate.sln’. Open this file using Visual Studio (right mouse click).
With the solution being loaded in Visual Studio you may now start the building process. Make sure the solution configuration says ‘Release’ , x64 version and all packages are selected. Build with ctrl+shift+b.
If the build went successful, the build-vs<version>\newview\Release should show at least two executables. One to run the viewer from Visual Studio (named something like SceneGateViewer.exe), and one setup executable that is distributive for multiple Windows systems (named something like SceneGate_Setup.exe).
The chosen build prerequisite versions and commands are the ones tested. This does not mean that they are the only or even the best options you can choose to build the viewer. Below follow some possible alternatives that you may want to look into.
Autobuild. Autobuild provides besides the ReleaseOS configuration also the RelWithDebInfo configuration. Feel free to change the configuration to your needs, there is also a ‘DebugOS’ configuration option which may or may not work.
If you want to create a 32-bit build you may use the command:
autobuild configure -c ReleaseOS then in Visual studio build the 32 bits version. It has not been tested.
To get a complete overview of Autobuild’s options, run the
autobuild -h command in a Cygwin terminal.
Autobuild version. We chose a specific commit of Alchemy’s forked version of LindenLab’s Autobuild. The reason for this is the recommendation from Rye about the building process of the Alchemy viewer on which SceneGate is based.
A number of issues can be encountered when building the viewer. This section will describe the known ones and their solutions (if they exist).
'NOTWIN}' is not recognized as an internal or external command, operable program or batch file. ERROR: default configuration returned 255 - Generally occurs when you have installed another autobuild version than the one described in the Prerequisites above.
FMOD - could not be found/located during the configure step. Try running the following command instead:
autobuild configure -c ReleaseOS -p windows64 -- -DFMODSTUDIO=ON
cannot open file 'libboost coroutine-mt-gd.lib’ - occurs when you have conflicting configurations between the configure and build steps. When adding -c ReleaseOS in the configure step, you have to select the Release build in Visual Studio or errors such as this one will prompt. Similarly, when adding -c RelWithDebInfoOS in the configure step you have to select the RelWithDebInfo build in Visual Studio.
Unable to find vcvarsall.bat - occurs when a conflicting version of Visual Studio is installed. Look at this post https://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsallbat/27033824#27033824 where a number of solutions are suggested for the error.
Could not find Visual Studio version x – may occur when multiple Visual Studio versions are installed or when a standard Visual Studio version isn’t found. You can set your specific VS version by setting the environment variable AUTOBUILD_VSVER to either 140 (VS 2015) 150 (VS 2017). The command in the Cygwin terminal is:
export AUTOBUILD_VSVER=<VERSION>, where <VERSION> is either 140 or 150.