Difference between revisions of "Viewer 2 Microsoft Windows Builds"

From Second Life Wiki
Jump to navigation Jump to search
Line 32: Line 32:
{{KBnote|If the installer for a particular package does not update your PATH environment setting you will have to do this manually.}}
{{KBnote|If the installer for a particular package does not update your PATH environment setting you will have to do this manually.}}


Additionally it is recommended that you make the following changes to your Cygwin installation:
{{KBcaution|The native Cygwin python and hg do not work very well and should be avoided.}}
Use the following shell scripts to update your Cygwin installation to use the Windows native versions of these apps:
*Override cygwin's python:
*Override cygwin's python:
   if [ -f /usr/bin/python.exe ]; then
   if [ -f /usr/bin/python.exe ]; then
Line 43: Line 44:
   fi
   fi
   cp /cygdrive/c/Program\ Files/Mercurial/hg.exe /usr/bin/hg.exe
   cp /cygdrive/c/Program\ Files/Mercurial/hg.exe /usr/bin/hg.exe
The native Cygwin python and hg do not work very well and should be avoided.


== Set up your source code tree ==
== Set up your source code tree ==

Revision as of 09:25, 28 March 2011

KBwarning.png Work in progress These instructions are not yet complete or debugged as of March 22, 2011.

When finished, we hope this page will constitute a complete recipe for compiling viewer 2 from source on a Windows machine.

Philosophy: to keep it brief, this page should only include steps we KNOW ARE NEEDED, not random hints. Extra details or open issues can go on the talk page.

KBnote.png Note: Following this recipe will probably take 6 to 12 hours of wall-clock time, and 2 to 6 hours of your time, if you're starting from a fresh Windows XP/Vista/7 system.

Establish your programming environment

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

  1. Obtain Visual Studio 2010 (Express is OK)
    Click here to download Visual C++ Express - current version is VS2010
  2. Install Microsoft Platform & DirectX SDKs
    Download and install Windows SDK for Windows 7 and .NET Framework 4 (ISO) or Windows SDK for Windows 7 and .NET Framework 4 (Web Install) and
    Download and install DirectX SDK (June 2010)
  3. Run Microsoft update and keep running it until no updates are needed. This may take 6~8 iterations on older versions of windows.
  4. Install other development tools
KBnote.png Note: If the installer for a particular package does not update your PATH environment setting you will have to do this manually.
KBcaution.png Important: The native Cygwin python and hg do not work very well and should be avoided.

Use the following shell scripts to update your Cygwin installation to use the Windows native versions of these apps:

  • Override cygwin's python:
 if [ -f /usr/bin/python.exe ]; then
   mv /usr/bin/python.exe /usr/bin/cygwin-python.exe
 fi
 cp /cygdrive/c/Python26/python.exe /usr/bin/python.exe
  • Override cygwin's mercurial:
 if [ -f /usr/bin/hg.exe ]; then
   mv /usr/bin/hg.exe /usr/bin/cygwin-hg.exe
 fi
 cp /cygdrive/c/Program\ Files/Mercurial/hg.exe /usr/bin/hg.exe

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 it's own directory.

To get a copy of the source code tree:

  • Open up a DOS/Command window
  • Make a directory to contain it (it is strongly suggested to name it viewer-development)
  • Go into that directory
  • Do hg init
  • Do hg pull http://hg.secondlife.com/viewer-development
  • Example: ((specific snapshot example TBD))

Let's say some time has gone by since you have performed the previous steps and now you want to develop a change or work on a jira. You will

  • Go into viewer-development (or whatever you named the master source tree copy)
  • Do hg pull
  • Do hg update
  • Move up one level from viewer-development
  • Do hg clone viewer-development VWR-nnnnn (where nnnnn is the jira number, or clone to a name of your choosing if there is not jira number)
  • Copy your olibs from above into this new source tree.

Build the viewer with autobuild

Configuring and building with autobuild works the same on all platforms. Full instructions may be found at Build_Viewer_With_Autobuild.

Compile using the IDE

Follow the steps for configuring outlined in Build Viewer With Autobuild. This will create the build-vc100 directory at the root of the source tree which contains the SecondLife.sln solution file. The solution is fully configured and ready to be built. For users not familiar with VS2010 additional information may be found at User:Nicky_Perian/Visual_Studio_10_Autobuild.

Iteratively fix things until the compile succeeds

((TBD - add any fixup steps here. e.g. does fmod375.dll need to be moved into RelWithDbgInfo at this step?))

Common Issues/Bugs/Glitches And Solutions

  • Getting help:
    • Subscribe to OpenSource-Dev Mailing List (subscribe) and post your question there.
    • For faster response, find a free IRC client program and join #opensl on freenode, the general open source viewer discussion and development channel. Hopefully a helpful person is online when you ask your question.

References

These instructions are condensed from about a dozen previous pages of info:

((add other references here))