Difference between revisions of "Viewer 2 Microsoft Windows Builds"
m (→Build the viewer with autobuild: oops, this one doesn't work with Windows) |
(Reorganize, add →Run Autobuild: section) |
||
Line 66: | Line 66: | ||
* Do <code>hg clone viewer-development VWR-nnnnn</code> (where <code>nnnnn</code> is the jira number, or clone to a name of your choosing if there is not jira number) | * Do <code>hg clone viewer-development VWR-nnnnn</code> (where <code>nnnnn</code> is the jira number, or clone to a name of your choosing if there is not jira number) | ||
== | == Run Autobuild == | ||
First, install [[Autobuild]] into Python, | First, install [[Autobuild]] into Python, by running '''one''' of the following at the command line: | ||
* <code>[http://pypi.python.org/pypi/setuptools easy_install] autobuild</code> | * <code>[http://pypi.python.org/pypi/setuptools easy_install] autobuild</code> | ||
* <code>[http://pypi.python.org/pypi/pip pip] install autobuild</code> | * <code>[http://pypi.python.org/pypi/pip pip] install autobuild</code> | ||
Then at the command line in the | Then decide whether you want to build at the command line, or generate a Visual Studio solution. (For details on either, see [[Building the Viewer with Autobuild]].) | ||
=== Build the viewer with autobuild === | |||
At the command line in the source tree's root directory (e.g. <code>C:\linden\viewer-development\</code>), run: | |||
autobuild build -c [CONFIGURATION] | autobuild build -c [CONFIGURATION] | ||
...where <code>[CONFIGURATION]</code> is one of those listed at [[Building the Viewer with Autobuild#Build a desired configuration]] (Debug, RelWithDebInfo, Release, etc.) | |||
=== Compile using the IDE === | |||
At the command line in the source tree's root directory (e.g. <code>C:\linden\viewer-development\</code>), run: | |||
== Compile using the IDE == | autobuild configure | ||
This will create the ''build-vc100'' directory at the root of the source tree, in which contains the ''SecondLife.sln'' solution file. The solution is fully configured and ready to be built - open it and compile. | |||
== Iteratively fix things until the compile succeeds == | == Iteratively fix things until the compile succeeds == |
Revision as of 08:20, 11 April 2011
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.
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.
- Obtain Visual Studio 2010 (Express is OK)
- Install Microsoft Platform & DirectX SDKs
- Run Microsoft Update, and keep running it until no updates are needed. This may take 6~8 iterations on older versions of windows.
- Install other development tools
- Unicode NSIS (Nullsoft Scriptable Install System)
- This is the package installer used to build Setup.exe.
- CMake
- This should be version 2.8.4 (or above). Ensure that any older versions aren't in your PATH environment variables.
- 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. Do not install Cygwin Python or Mercurial. You won't need to use the Cygwin shell for anything; just have the binaries accessible to the regular command line via your PATH.
- Python (either Python.org Standard Python or ActivePython)
- Note: build scripts support Python 2.6, not 2.7 yet.
- Mercurial (either TortoiseHg or Mercurial Hg)
- (optional) Notepad++
- You need to use an editor that conforms to the Coding Standard. In particular, you must not check in files with DOS line endings except in very limited circumstances; see How to avoid DOS line endings in Windows tools.
- Unicode NSIS (Nullsoft Scriptable Install System)
Note: If the installer for a particular package does not update your PATH environment setting you will have to do this manually. |
Important: The native Cygwin python and hg do not work very well and should be avoided. |
If necessary, 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
(wherennnnn
is the jira number, or clone to a name of your choosing if there is not jira number)
Run Autobuild
First, install Autobuild into Python, by running one of the following at the command line:
easy_install autobuild
pip install autobuild
Then decide whether you want to build at the command line, or generate a Visual Studio solution. (For details on either, see Building the Viewer with Autobuild.)
Build the viewer with autobuild
At the command line in the source tree's root directory (e.g. C:\linden\viewer-development\
), run:
autobuild build -c [CONFIGURATION]
...where [CONFIGURATION]
is one of those listed at Building the Viewer with Autobuild#Build a desired configuration (Debug, RelWithDebInfo, Release, etc.)
Compile using the IDE
At the command line in the source tree's root directory (e.g. C:\linden\viewer-development\
), run:
autobuild configure
This will create the build-vc100 directory at the root of the source tree, in which contains the SecondLife.sln solution file. The solution is fully configured and ready to be built - open it and compile.
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?))
- report your experiences, if useful, on the talk page, Talk:Viewer 2 Microsoft Windows Builds
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
- Tip of the hat to Nicky_Perian for User:Nicky_Perian/Visual_Studio_10_Autobuild