User Tools

Site Tools


fs_compiling_firestorm_windows
Advertisement

Firestorm Windows Builds

Establish your programming environment

This is needed for compiling any viewer based on the LL open source code and only needs to be done once.

All installations are done with default settings (unless told specific) if you change that your on your own

Install and update Visual Studio and SDKs

Install required development tools

The order of the following installations should not matter.
If the installer for a particular package does not update your PATH environment variable you will have to do this manually.

    • This should be version 2.8.4 (or above in the 2.8.x series).
    • Make sure that the following directory was added to your path:
      C:\Program Files (x86)\CMake 2.8\bin (Windows 64bit) or C:\Program Files\CMake 2.8\bin (Windows 32bit)
  • Python (Standard Python)
    • Version 2.7.1 works with the build scripts.
    • Add the Python installation dir to the system path:
      C:\Python27
  • Mercurial (either TortoiseHg or Mercurial Hg)
  • Cygwin (download Cygwin)
    • When you run the cygwin setup utility make sure you have selected to install unzip (under “Archives”), bison, flex 1), patchutils (all located under “devel”), and curl (under “Web”), which are not part of the default install. Do not install Cygwin Python or Mercurial. You won't need to use the Cygwin shell for anything.
    • Add the following directory to the very end of your path and make sure it stays that way.
      c:\cygwin\bin

Install optional development tools

    • This is the package installer used to build a package
    • You only need this package if you are going to distribute the viewer you compile or if you want to install it locally.
  • In the Configure VS2010 step below you will need to add a line in the Executable Directories section:
    • 64 bit systems use
      %ProgramFiles(x86)%\NSIS\Unicode
    • 32 bit systems use
      %ProgramFiles%\NSIS\Unicode
    • You need to use an editor that conforms to the Coding standards. In particular, you must not check in files with DOS line endings except in very limited circumstances.

Install Autobuild

Autobuild is a Linden Lab resource that does all the hard work.

In a dos command do :

hg clone http://hg.secondlife.com/autobuild/

Modify your path statement after cloning to include the autobuild \bin directory

  • Add an environment variable, so that autobuild doesn't default to using (or trying) older compiler versions:
    • Right-click “My Computer” and select Properties or press the windows logo key and the pause key at the same time.
    • For XP, when the Properties dialog opens, click the Advanced tab followed by the Environmental Variables button. This will open a new window with a list of System and User variables. For Vista and later, when the System Properties window opens, click the Advanced system settings on the left column, then click Environment Variables…
    • In the User section, click New. Set Variable Name to AUTOBUILD_VSVER and set Variable Value to 100.
    • Click the OK/Close buttons to close all the windows.

Configure VC2010

While you may choose to use autobuild for all your compiling you still need to establish certain settings internal to VC2010.

  • Start the IDE
  • Navigate to Tools > Options > Projects and Solutions > Build and Run and set maximum number of parallel projects builds to 1.
  • (VC Express only) Enable Tools > Settings > Expert Settings to get the Build (and other) menus. If you already have a Build menu you do not need to perform this step.

The following steps require an open visual studio project. It does not matter which project you use, as you will only change some global settings used by all projects when they are opened. The open project itself won't be changed.

You need to set a number of paths.

  • Open any existing project you may have or make a New Project.

At the bottom on the Solution Explorer you will see three tabs.

  • Click the one on the right labeled Property Manager. (The name may be somewhat truncated.)
  • On the left side click to expand any project and then click again to expand the Release folder.
  • Right click on Microsoft.Cpp.Win32.user.
  • Pick Properties > VC++ Directories.

This is where the build environment is pulled together into a functional VC2010 build system and also where much hand wringing, hair pulling, and fist pounding frustration takes place.

  • Set Executable Directories to:
$(ExecutablePath)
$(DXSDK_DIR)
$(WindowsSdkDir)\Bin
C:\cygwin\bin
$(SystemRoot)
  • Set Include Directories to:
$(WindowsSdkDir)\Include
$(WindowsSdkDir)\Include\gl
$(DXSDK_DIR)\Include
  • Set Library Directories to:
$(WindowsSdkDir)\Lib
$(DXSDK_DIR)

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, I will assume c:\firestorm.

c:
cd /firestorm
hg clone http://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).

FmodEX using autobuild

Note: This typically needs to only be done once since FmodEX rarely changes.

c:
cd /firestorm
hg clone https://bitbucket.org/NickyD/3p-fmodex
cd 3p-fmodex
autobuild build --all
autobuild package

Near the top of the output you will see the package name written and the md5 hash below it:

wrote C:\firestorm\3p-fmod\fmodex-{version#}-windows-{yyyymmdd}.tar.bz2
md5 c3f696412ef74f1559c6d023efe3a087

where {version#} is the version of FmodEX (like 4.44.18) and {yyyymmdd} is the date you created the package.

cd /firestorm/phoenix-firestorm-lgpl
cp autobuild.xml my_autobuild.xml
set AUTOBUILD_CONFIG_FILE=my_autobuild.xml

Copy the FmodEX path and md5 value from the package process into this command:

autobuild installables edit fmodex platform=windows hash=<md5 value> url=file:///<fmodex path>

For example:

<code>autobuild installables edit fmod platform=windows hash=c3f696412ef74f1559c6d023efe3a087 url=file:///C:\firestorm\3p-fmodex\fmodex-4.44.18-windows-20111212.tar.bz2</code>

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

  • From All Programs Navigate into the Microsoft Visual Studio 2010 program menu
  • Click on Microsoft Visual Studio Command Prompt (2010)

If you are building with Fmod and have followed the previous Fmod 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:

   c:
   cd /firestorm/phoenix-firestorm-lgpl
   autobuild configure -c ReleaseFS_open
   

This will compile with all defaults and without third party libraries.

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.

  • FMOD (bool) controls if the Fmod package is incorporated into the viewer. You must have performed the Fmod installation steps in Fmod_using_autobuild for this to work.
  • LL_TESTS (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.
  • 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.

TIP: OFF and NO are the same as FALSE; anything else is considered to be TRUE

Example:

autobuild configure -c ReleaseFS_open -- -DLL_TESTS:BOOL=FALSE -DFMOD:BOOL=TRUE --package

Compiling the Viewer

If you are building with Fmod and have followed the previous Fmod 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:

autobuild build -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.

NOTE: It is possible to use autobuild to do both the configure step (only needed once) and the build step with one command (autobuild build -c ReleaseFS [– config options] . I find it is clearer if these steps are done separately, but can save a bit of time if done together.

1) Bison and flex are only dependant on versions early than Rev 34229 in the official repository
fs_compiling_firestorm_windows.txt · Last modified: 2016/08/28 04:13 by kadah