Firestorm Windows Builds
This page describes all necessary steps to build the Firestorm viewer for Windows, using the updated build infrastructure introduced with Linden Lab's project Alex Ivy.
NOTE: This description is NOT valid for building versions of the viewer prior to the Alex Ivy merge (revision 54609)!
Please note that we do not give support for compiling the viewer on your own. However, there is a self-compilers group in Second Life that can be joined to ask questions related to compiling the viewer:
Firestorm Self Compilers
This is needed for compiling any viewer based on the Linden Lab open source code and only needs to be done once.
All installations are done with default settings (unless told explicitly) - if you change that, you're on your own!
Windows
Microsoft Visual Studio 2013 Professional
DirectX SDK
Run the installer as Administrator (right click, “Run as administrator”)
At the Installation Options screen, set everything except the DirectX Headers and Libs to “This feature will not be installed”
Tortoise Hg
CMake
Run the installer as Administrator (right click, “Run as administrator”)
At the “Install options” screen, select “Add CMake to the system PATH for all users”
For everything else, use the default options (path, etc.)
Make sure that the following directory was added to your path:
C:\Program Files (x86)\CMake\bin
Cygwin
Run the installer as Administrator (right click, “Run as administrator”)
Use default options (path, components etc.) *until* you get to the “Select Packages” screen
Add additional packages:
Use default options for everything else
Make sure that the following directory was added to your path.:
C:\Cygwin64\bin
Python
Linden Lab advises to use the 32bit version as the VMP requires it. However, Firestorm currently doesn't use VMP, so the 64bit version might work (use at own risk!)
Note: No option available to install as Administrator
Use default options (path, components etc.) until you get to the “Customize Python” screen
Change “Add python.exe to Path” to “Will be installed on local hard drive”
Add the Python installation dir to the system path:
C:\Python27
Confirm things are installed properly so far by opening a Cygwin terminal and enter:
cmake --version
hg --version
python --version
If they all report sensible values and not “Command not found” errors, then you are in good shape.
The Cygwin terminal is only needed for testing. All commands for actually building the viewer will be run from the Windows command shell.
Set up Autobuild and Python
Check Autobuild version to be 1.1.7 or higher:
autobuild --version
NSIS
If you want to package the viewer built on a revision prior to
57033, you must install the Unicode version of NSIS
from here - the installer from the NSIS website
WILL NOT work!
Setup viewer build variables
In order to make it easier to build collections of related packages (such as the viewer and all the library packages that it imports) with the same compilation options, Autobuild expects a file of variable definitions. This can be set using the environmenat variable AUTOBUILD_VARIABLES_FILE.
Clone the build variables repository:
hg clone https://hg.phoenixviewer.com/fs-build-variables <path-to-your-variables-file>
Set the environment variable AUTOBUILD_VARIABLES_FILE to
<path-to-your-variables-file>\variables
Set up your source code tree
Plan your directory structure ahead of time. If you are going to be producing changes or patches you will be cloning a copy of an unaltered source code tree for every change or patch you make, so you might want to have all this work stored in its own directory. If you are a casual compiler and won't be producing any changes, you can use one directory. For this document, it is assumed that you created a folder c:\firestorm.
c:
cd \firestorm
hg clone https://hg.phoenixviewer.com/phoenix-firestorm-lgpl
This can take a bit, it's a rather large download.
Prepare third party libraries
Most third party libraries needed to build the viewer will be automatically downloaded for you and installed into the build directory within your source tree during compilation. Some need to be manually prepared and are not normally required when using an open source configuration (ReleaseFS_open).
If you are manually building the third party libraries, you will have to build the correct version (32bit libraries for a 32bit viewer, 64bit versions for a 64bit viewer)!
FMOD Studio using Autobuild
If you want to use FMOD Studio to play sounds within the viewer, you will have to download your own copy. FMOD Studio can be downloaded here (requires creating an account to access the download section).
Make sure to download the FMOD Studio
API and not the FMOD Studio Tool!
c:
cd \firestorm
hg clone https://bitbucket.org/Ansariel/3p-fmodstudio
After you have cloned the repository, copy the downloaded FMOD Studio installer file to C:\Firestorm
If you downloaded a different version of FMOD Studio that is currently used in the viewer, you will have to modify the file build-cmd.sh in the root of the repository. Right at the top, you find the version number of FMOD Studio you want to package (one short version without separator and one long version). Change these values to the version you downloaded:
FMOD_VERSION="11005"
FMOD_VERSION_PRETTY="1.10.05"
Continue on the Windows command line:
c:
cd \firestorm\3p-fmodstudio
autobuild build --all
autobuild package
While running the Autobuild build command, Windows might ask if you want to allow making changes to the computer. This is because of the FMOD Studio installer being executed. Allow these changes to be made.
Near the end of the output you will see the package name written and the md5 hash below it:
wrote C:\firestorm\3p-fmodstudio\fmodstudio-{version#}-windows-{build_id}.tar.bz2
md5 c3f696412ef74f1559c6d023efe3a087
where {version#} is the version of FMOD Studio (like 1.10.02) and {build_id} is an internal build id of the package.
cd \firestorm\phoenix-firestorm-lgpl
cp autobuild.xml my_autobuild.xml
set AUTOBUILD_CONFIG_FILE=my_autobuild.xml
Copy the FMOD Studio path and md5 value from the package process into this command:
autobuild installables edit fmodstudio platform=windows hash=<md5 value> url=file:///<fmodstudio path>
For example:
autobuild installables edit fmodstudio platform=windows hash=c3f696412ef74f1559c6d023efe3a087 url=file:///C:\firestorm\3p-fmodstudio\fmodstudio-1.10.02-windows-180191431.tar.bz2
Note: Having to copy autobuild.xml and modify the copy from within a cloned repository is a lot of work for every repository you make, but this is the only way to guarantee you pick up upstream changes to autobuild.xml and do not send up a modified autobuild.xml when you do an hg push.
Configuring the viewer
Open the Windows command prompt.
If you are building with FMOD Studio and have followed the previous FMOD Studio setup instructions AND you are now using a new terminal you will need to reset the environment variable first by entering
set AUTOBUILD_CONFIG_FILE=my_autobuild.xml
Then enter:
c:
cd \firestorm\phoenix-firestorm-lgpl
autobuild configure -c ReleaseFS_open
This will configure Firestorm to be built with all defaults and without third party libraries.
Note: Configuring the viewer for the first time will take some time to download all the required third-party libraries. As of Autobuild 1.1, the download progress is hidden by default. If you want to watch the download progress, you can use the verbose option to display a more detailed output:
autobuild configure -v -c ReleaseFS_open
Configuration switches
There are a number of switches you can use to modify the configuration process. The name of each switch is followed by its type and then by the value you want to set.
-A <architecture> sets the target architecture, that is if you want to build a 32bit or 64bit viewer (32bit is default if omitted).
–fmodstudio controls if the FMOD Studio package is incorporated into the viewer. You must have performed the FMOD Studio installation steps in
FMOD Studio using Autobuild for this to work.
–package makes sure all files are copied into viewers output directory. You won't be able to start your compiled viewer if you don't enable package or do 'compile' it in VS.
–chan <channel name> lets you define a custom channel name for the viewer
-
LL_TESTS:BOOL=<bool> controls if the tests are compiled and run. There are quite a lot of them so excluding them is recommended unless you have some reason to need one or
more of them.
TIP: OFF and NO are the same as FALSE; anything else is considered to be TRUE
Examples:
To build a 32bit viewer with FMOD Studio and to create an installer package, run this command in the Windows command window:
autobuild configure -c ReleaseFS_open -- --fmodstudio --package --chan MyViewer -DLL_TESTS:BOOL=FALSE
To build a 64bit viewer without FMOD Studio and without installer package, run this command:
autobuild configure -A 64 -c ReleaseFS_open -- --chan MyViewer -DLL_TESTS:BOOL=FALSE
Building the viewer
There are two ways to build the viewer: Via Windows command line or from within Visual Studio.
Building from the Windows command line
If you are building with FMOD Studio and have followed the previous FMOD Studio setup instructions AND you are now using a new terminal you will need to reset the environment variable with
set AUTOBUILD_CONFIG_FILE=my_autobuild.xml
Then run the Autobuild build command. Make sure you include the same architecture parameter you used while configuring the viewer:
autobuild build -A 64 -c ReleaseFS_open --no-configure
Now, sit back, read War and Peace, calculate PI to 50 places, tour the country, whatever you desire. Compiling will take quite a bit of time.
Building from within Visual Studio
Inside the Firestorm source folder, you will find a folder named build-vc120-<architecture>, with <architecture> either being 32 or 64, depending on what you chose during the configuration step. Inside the folder is the Visual Studio solution file for Firestorm, called Firestorm.sln.
Double-click Firestorm.sln to open the Firestorm solution in Visual Studio.
From the menu, choose Build → Build Solution
Wait until the build is finished
Parallel building of pre Alex Ivy viewers
Older versions of the viewer before the merge of Linden Lab's project Alex Ivy use Autobuild 1.0 that is incompatible with the build process as it is now. By default it is not possible to install two different versions of Autobuild on the same computer at the same time. Making use of virtualenv will overcome this problem, allowing simultaneous installations of Autobuild 1.0 and Autobuild 1.1 in two distinct “virtual” Python environments.
Install virtualenv
Install virtualenv by opening a Windows command prompt and enter:
pip install virtualenv
This requires the Boostrip pip already installed. After virtualenv has been installed, you can create virtual Python environments using the command
virtualenv <virtual-environment-name>
This will create the directory <virtual-environment-name> within the Python installation folder and add some required folders and files. Among these files is a batch file called activate.bat in the folder Scripts. To switch to the newly created virtual environment execute the activate.bat batch file. After switching to the virtual environment, your command prompt will be prepended by the name of the virtual environment.
In this example we will create a virtual environment called “Autobuild11”:
virtualenv Autobuild11
c:\Python27\Autobuild11\Scripts\Activate.bat
Your command prompt should look like this now:
(Autobuild11) C:\
After you switched to a particular virtual environment, you can now install as described in Set up Autobuild and Python.
Complete example:
virtualenv Autobuild11
c:\Python27\Autobuild11\Scripts\Activate.bat
pip install hg+https://bitbucket.org/lindenlab/autobuild-1.1#egg=autobuild
Configuring and building the viewer
Configuring and building the viewer from the Windows command line is basically identical as described in Building from the Windows command line with the difference that you now have to call the activate script first:
c:
\Python27\Autobuild11\Scripts\Activate.bat
cd \firestorm\phoenix-firestorm-lgpl
autobuild configure -c ReleaseFS_open -- --fmodstudio --package --chan MyViewer -DLL_TESTS:BOOL=FALSE
autobuild build -A 64 -c ReleaseFS_open --no-configure
If you plan to build the viewer from within Visual Studio, you will have to configure the viewer the same way as if you were to build from the Windows command line:
c:
\Python27\Autobuild11\Scripts\Activate.bat
cd \firestorm\phoenix-firestorm-lgpl
autobuild configure -c ReleaseFS_open -- --fmodstudio --package --chan MyViewer -DLL_TESTS:BOOL=FALSE
To be able to build from Visual Studio, you will have to set a Windows environment variable called VIRTUAL_ENV pointing at the virtual Python environment to use, in our example “C:\Python27\Autobuild11”. Now open the Firestorm Visual Studio solution to start Visual Studio and build the viewer.
NOTE: Setting the VIRTUAL_ENV environment variable only has an effect if building a version greater or equal than 53671! If you plan to build older versions of Firestorm, it is advised to install Autobuild 1.0 as the default Autobuild version and create a virtual environment for Autobuild 1.1! Troubleshooting
SystemRootsystem32: unbound variable
When trying to execute the Autobuild build command, you might encounter an error similar to
../build.cmd.sh line 200: SystemRootsystem32: unbound variable
This error is caused by the order of the items in the Windows “path” environment variable. Autobuild exports all paths set in the “path” environment variable into Cygpath names and variables. Since these Windows “paths” can also contain variables like %SystemRoot% and they can also depend on each other, it is important to keep the dependency order intact. Example:
%SystemRoot%
%SystemRoot%\system32
%SystemRoot%\System32\Wbem
The following screenshot shows the correctly ordered paths containing variables and depending on each other.
![]()