Compiling the viewer (MSVS2005)

From Second Life Wiki
Jump to navigation Jump to 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(screen shot) and libraries(screen shot) 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 2005.
  • 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

  • In linden\indra\llcommon\llstringtable.h @ line 103
--103: typedef std::hash_multimap<U32, LLStringTableEntry *> string_hash_t;
++103: typedef stdext::hash_multimap<U32, LLStringTableEntry *> string_hash_t;
  • In linden\indra\llcommon\llerror.h @ line 38, and linden\indra\win_updater\updater.cpp @ line 40
++#if LL_WINDOWS
++# if (_MSC_VER >= 1400)
++#  pragma warning(disable : 4996)
++# endif
++#endif


  • 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.)