Difference between revisions of "Microsoft Windows Builds"

From Second Life Wiki
Jump to navigation Jump to search
Line 40: Line 40:
** Get the latest version (as of 29 Oct 2008) here: [http://www.microsoft.com/downloads/details.aspx?FamilyID=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en Windows SDK for Windows Server 2008 and .NET Framework 3.5]
** Get the latest version (as of 29 Oct 2008) here: [http://www.microsoft.com/downloads/details.aspx?FamilyID=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en Windows SDK for Windows Server 2008 and .NET Framework 3.5]
* '''DirectX 9.0 SDK'''
* '''DirectX 9.0 SDK'''
** Get the latest version (as of 29 Oct 2008) here: [http://www.microsoft.com/downloads/details.aspx?FamilyID=ea4894b5-e98d-44f6-842d-e32147237638&DisplayLang=en DirectX 9.0 SDK (August 2008)]  '''NOTE''' Installing to the default path may cause errors when develop.py checks for FMOD support.  Instead, install to a direectory with no spaces in the path name.
** Get the latest version (as of 29 Oct 2008) here: [http://www.microsoft.com/downloads/details.aspx?FamilyID=ea4894b5-e98d-44f6-842d-e32147237638&DisplayLang=en DirectX 9.0 SDK (August 2008)]  '''NOTE:''' Installing to the default path may cause errors when develop.py checks for FMOD support.  Instead, install to a direectory with no spaces in the path name.


Verify that Cygwin, CMake, and Python are in the windows "PATH".
Verify that Cygwin, CMake, and Python are in the windows "PATH".

Revision as of 13:50, 30 January 2009


On Windows, there are several options on build (compile) environment of the Second Life.

This page explains how you can compile the viewer on Microsoft Windows.

Currently, only 32 bit binary is tested. There seems to be several trials to produce 64 bit Windows .EXE of the viewer. If you did, please write your experience on the discussion page (regardless it was successful or not!)

Choosing and Preparing a Compiler

Linden-Supported Compilers

Supported compiler: Visual Studio .NET 2005 Professional

You need to setup the compiler and Microsoft Development tools as follows:

Community Experimental Compilers

If you don't have Visual Studio .NET 2005 Professional, you may wish to try one of the following alternatives.

Warning!

Boost support with Visual Studio 2008 is problematic as of this writing. Check VWR-9541 before continuing on this path.


Getting other Development Tools

You will need to install the following tools to compile the viewer:

  • CMake (download CMake)
    • As of this writing, the latest version is 2.6.2. Note: There are many known issues with CMake 2.6.0 and 2.6.1 in conjunction with building the Second Life viewer. CMake 2.4.8 is supported for compiling the 1.21 version of the Second Life viewer, but 2.6.2 is likely to become the new minimum requirement in the near future.
  • Cygwin (download Cygwin)
    • When you run the cygwin setup utility make sure you have selected to install patchutils, flex, and bison (all located under "devel") which are not part of the default install. (If you missed one of these, the easiest thing to do is to re-run the entire installation.)
  • Python (download either Python.org Standard Python or ActivePython
    • If you are using a version of Python newer than v2.5, you may need to change the Python.cmake file. See the CMake discussion for details (this change was necessary as of 1.21-r99587 source branch). )
  • The Windows Platform SDK
  • DirectX 9.0 SDK
    • Get the latest version (as of 29 Oct 2008) here: DirectX 9.0 SDK (August 2008) NOTE: Installing to the default path may cause errors when develop.py checks for FMOD support. Instead, install to a direectory with no spaces in the path name.

Verify that Cygwin, CMake, and Python are in the windows "PATH".

NOTE: DO NOT use the Cygwin version of CMake or Python. The Build will fail. (CMake specifically excludes the Cygwin version of Python, in the 'Python.cmake' file)

Downloading Source Code

You can download the Viewer source code on the source downloads page. You can also use a version control repository. If you're just starting out, it's probably best to get the latest Release version, rather than a Release Candidate, because the Release Candidates get updated quite often. But if you would rather work with the latest code, go for the version control repository "trunk".

If you're downloading from the source downloads page, there are three packages to get: the source package, the artwork package, and the library package. In versions 1.20 and earlier, Linden packaged the library binaries in the Libs package. For 1.21 and beyond, the CMake develop.py script now downloads most of the libraries that were previously in the libs zip file. This saves developers who are tracking trunk from constantly downloading them every update and only downloads updated libraries. As of this writing, there are some pieces packages that still require downloading, so be sure to grab the library and artwork bundles from the source downloads page.

WARNING:

  • If the directory path you keep the SL source in has a space in it, the batch file that copies message_template.msg will fail. So, if you unzip or checkout the source tree into, e.g., "C:\Projects\Dir with space in name\Etc\linden", it won't work!
  • You should also avoid using non-ASCII (national) characters in the paths, although some localized versions of the tool puts some as a default...
  • Unzip or checkout your source tree into a directory that has as short full pathname as possible, since long paths cause some unexpected trouble during the build.

In other words, the easiest way to get this working is to get source, artwork, and libs from the source downloads page and unpack them all into the same directory/folder, which ideally would be a folder in (or near) the root directory with a short name like sl_1_21_6.

Installing Libraries

SL Viewer depends on some third party libraries. Some of them are open source, some others are not.

Open Source Libraries

As of viewer version 1.21, all open source libraries are automatically downloaded as part of the build process, unless you choose to configure a standalone build.

Proprietary Libraries

Linden does not include the following proprietary libraries. You will need to follow the instructions to acquire below and copy them to the source path.

However, it probably is a good idea to build an empty directory tree for the files below and first copy the files there and once completed, copy the whole tree to the actual source folder (like XCOPY OLIB SL_1_16_0_5 /S). The reason is, that these steps are cumbersome and will have to be repeated for each new release (at least if you keep the source for each release in it's own folder). If you do not want to do this, of course you can just copy the files directly into the linden source paths.

rem OLIBS.CMD to build a folder tree for 3rd party libraries and includes
md olibs
md olibs\linden\
md olibs\linden\libraries
md olibs\linden\libraries\include
md olibs\linden\libraries\i686-win32
md olibs\linden\libraries\i686-win32\lib_release
md olibs\linden\libraries\i686-win32\lib_debug
md olibs\linden\libraries\i686-win32\include
md olibs\linden\libraries\i686-win32\include\GL
md olibs\linden\libraries\i686-win32\include\quicktime
md olibs\linden\indra
md olibs\linden\indra\newview


Fmod

  • Download & extract fmod 3.75 api for win32, under section heading FMOD 3 Programmers API (later versions, like FMOD Ex, are incompatible).
  • Copy "fmodapi375win\api\inc\fmod.h" to "linden\libraries\include"
  • Copy "fmodapi375win\api\inc\fmod_errors.h" to "linden\libraries\include"
  • Copy "fmodapi375win\api\lib\fmodvc.lib" to "linden\libraries\i686-win32\lib_release" and to "linden\libraries\i686-win32\lib_debug"

(If using cmake, copy "fmodapi375win\api\lib\fmodvc.lib" to "linden\libraries\i686-win32\lib\release" and to "linden\libraries\i686-win32\lib\debug")

  • Copy "fmodapi375win\api\fmod.dll" to "linden\indra\newview"


Quicktime

Currently - as of version 1.21 - CMake requires Quicktime to be installed.

Note: This download requires a registration at the Apple Quicktime website and take a bit of time. You can avoid using QuickTime if you want, see this for details. Remember that your viewer can't play in-world movies if you do so.

  • Download & install the Quicktime SDK for Windows
  • Copy "QuicktimeSDK\Libraries\QTMLClient.lib" to "linden\libraries\i686-win32\lib_release" and to "linden\libraries\i686-win32\lib_debug".

(If using CMake, copy "QuicktimeSDK\Libraries\QTMLClient.lib" to "linden\libraries\i686-win32\lib\release" and to "linden\libraries\i686-win32\lib\debug" instead)

  • Copy the contents of "QuicktimeSDK\CIncludes" into "linden\libraries\i686-win32\include\quicktime".

Building with CMake

At this point, you should be ready to use CMake. NOTE: CMake is only supported for viewer versions 1.21 and beyond. Before you first run a build, you'll need to configure things. There's a develop.py script that will create a reasonably sane default configuration for you.

From the command line, cd into the indra subdirectory and run one of the following commands (depending on your choice of platform and build environment):

    • VisualStudio 2005: "python develop.py -G VC80"
    • VisualStudio 2008: "python develop.py -G VC90"

NOTE: The above commands will configure a "non-standalone" version of the source code tree. This means that the required third party library packages (as built by Linden Lab) will be downloaded during the CMake process.

Finding your build directory

In the CMake world, we keep source and object files separate. The develop.py script will create and populate a build directory for you. It should be in one of the following locations:

  • VS 2005: 'build-vc80'
  • VS 2008: 'build-vc90'

Compiling

To start a build, do one of the following:

  • Run python develop.py build
  • Load it into your IDE

Where's the built viewer?

On Windows, the built viewer ought to run from VS2005.


Build instructions for 1.20 and earlier

See Compiling older viewers (1.20 and earlier with MSVS) if you'd like to compile a version of the viewer older than 1.20.


What to do if it doesn't work for you

Please also see the (user contributed) instructions at User:Michelle2_Zenovka/cmake