Compiling the viewer (MSVS2005)

From Second Life Wiki
Revision as of 13:45, 9 January 2007 by Fox Diller (Talk | contribs)

Jump to: navigation, search

Introduction

By no means do I consider myself an expert. These are just the steps and fixes from myself, and the team in the irc.efnet.org channel #opensl.

Prerequisites

Basics

  • Visual Studio 2005 (May work with MC++ 2005 Express)
    • Microsoft Platform SDK
    • NEED NEWER DIRECTX DirectX 9.0 SDK Update (Summer 2003)
      • Note: If you have previously installed an older version of the DirectX 9.0 SDK, remove it first (from Control Panel -> Add or Remove Programs) before installing this version. Installing the new SDK "on top" of an older version may cause problems.
    • Set up the project globals:
      • Start Microsoft Visual Studio 2005
      • Go to Tools/Options/Projects/VC++ Directories
      • Make sure that the includes and libraries paths have the Platform SDK paths first, then the DirectX SDK paths, and then the Visual C++ paths.
      • If the DirectX SDK paths aren't present, add them to both includes and libraries.
  • ActivePython 2.3x
  • ActivePerl
  • Cygwin
    • When you run the cygwin setup utility make sure you have selected to install patchutil, flex, and bison (all located under "devel") which are not part of the default install.

Fmod

  • Download & extract fmod 3.75 api for win32.
  • Copy "fmodapi375win\api\inc\fmod.h" to "libraries\include"
  • Copy "fmodapi375win\api\inc\fmod_errors.h" to "libraries\include"
  • Copy "fmodapi375win\api\lib\fmodvc.lib" to "libraries\i686-win32\lib_release"
  • Copy "fmodapi375win\api\lib\fmodvc.lib" to "libraries\i686-win32\lib_debug"
  • Copy "fmodapi375win\api\fmod.dll" to "indra\newview"

gl

Quicktime

  • Download & install the Quicktime SDK for Windows
  • Copy "QuicktimeSDK\Libraries\QTMLClient.lib" to "\libraries\i686-win32\lib_release".
  • Copy "QuicktimeSDK\Libraries\QTMLClient.lib" to "\libraries\i686-win32\lib_debug".
  • Copy the contents of "QuicktimeSDK\CIncludes" into "\libraries\i686-win32\include\quicktime".

First Steps

Enviroment Setup

  • Open the \indra\indra_complete\indra_complete.sln solution in Visual Studio.
  • Set newview to be the startup project.
  • Right click on each project in the solution, with the exception of lscript_compile_fb, and follow these steps for each:
    • 1. (screen shot) Under Configuration Properties, C/C++, General, change Treat Warnings As Errors to "No"
    • 2. (SCREEN SHOT) Under Configuration Properties, C/C++, PreProcessor, insert the line ";_CRT_SECURE_NO_DEPRECATE"
    • 3. (SCREEN SHOT) Under Configuration Properties, C/C++, Language, change Treat wchar_t as Built-in Type to "No (/Zc:wchar_t-)"

Code Editing

  • Build either ReleaseNoOpt (for debugging) or ReleaseForDownload (for production).
  • newview.exe will be built in \indra\newview\ReleaseNoOpt or \indra\newview\ReleaseForDownload
  • create a shortcut to newview, and change the start location to \indra\newview\ (all the .dll will be found there.)