Viewer Name & Login Page

November 24, 2010

Before I get stuck into the meat of this post, I just want to explain about some of the third party libraries required to build the Second Life viewer.

In my previous post, I gave details about installing the FMOD library. Although just configuring this one library allowed me to compile the viewer, I have compiled viewers before, so I already had most of the things I needed installed on my system.

The Second life wiki explains in great detail what needs to be installed and where to get it from, so rather than repeating all that information here, I’ll give a link where you can go and follow the instructions and get yourself set up. I will only be building the viewer for MS Windows, so click the link below for instructions on configuring a Windows environment.

OK, on with the show …

The first 2 things I wanted to do to the viewer was change its name from ‘Second Life’ and change the login screen page to point to one I have created. Sound simple? Well it took me about 30 minutes to track down these two small pieces of data in the huge viewer source code, but once I found what to change, yes it is simple.

The first thing I tackled was changing the name of the application. In previous versions of the SL Viewer, the application name was hard coded into a CPP (C++ source code file), this is no longer the case. All text in the viewer is now stored in one place, it is all in the viewer skin XML files.

After loading the viewer solution into Visual Studio 2005, the only one of the many projects we need is secondlife-bin. So expand that project and then expand the XUI Files directory. You should see lots of XML files.

Double click the file called strings.xml in solution explorer, and you will find the application name configuration values beginning on line 9. Change the following entries to a name of your choice. SECOND_LIFE, APP_NAME, CAPITALIZED_APP_NAME.

Save the changes, build and run the viewer and you will see its name has now changed to what you entered. Point 1 completed.

The next thing to do is change the page displayed on the login screen of the viewer.
The standard URL for this extremely familiar page in the SL Viewer is …

When you know what you’re looking for, its easy to find things like the URL we need using Visual Studio’s search features. Press CTRL SHIFT F, to bring up the ‘Find in Files’ dialog, copy and paste the above URL into the ‘find’ field, make sure ‘Entire Solution’ is selected and hit ‘Find All’.

The search will tell you that web address is present in 2 files panel_login.xml and llviewernetwork.cpp. In this case, the XML file is a red herring, changing the URL in there does nothing.

In the search results, double click the llviewernetwork.cpp line, and you will see the default URL in all its glory. Change this to any working URL you like, recompile and execute the viewer.

The login screen now shows the web page you pointed it at. Point 2 completed.

Stay tuned for the next Voodoo Viewer installment coming soon.


Voodoo Viewer Begins …

November 22, 2010

Welcome to the Voodoo Viewer project.

The first thing I wanted to do was get the very latest version of the Viewer 2 source code. Looking on the Second Life wiki, there is instructions to a  Linden Labs subversion repository, but this only contains old versions and Snowglobe source code. There is an edit in the wiki pointing to a BitBucket repository which seems to be the one being updated by LL now, the ‘viewer-development’ branch is the one to go for, because it’s the latest and easiest to set up.

After downloading that, unpacking it and moving it to a directory on the root of my hard drive, the next thing to do is get the third party libraries required to be able to create the build and compile the viewer. This has now been simplified as a lot of previously required configuration is now done automatically.

First up is FMOD. I downloaded the FMOD library from …

After unpacking that, you need to copy some of the API files over into the viewer source code directories.

  • from fmodapi375win\api\inc\ copy fmod.h and fmod_errors.h
  • to c:\VoodooViewer\linden\libraries\include
  • from fmodapi375win\api\lib copy fmodvc.lib renaming it to fmod.lib
  • to c:\VoodooViewer\linden\libraries\i686-win32\lib\release
  • and 

  • from fmodapi375win\api copy fmod.dll
  • to c:\VoodooViewer\linden\libraries\i686-win32\lib\release
  • and 

There are other libraries we need, but the viewer will build now, so I wanted to give it a whirl.
I already have Python installed and configured on my machine, so I won’t go over those steps.

I open a command window on my Vista machine as an Administrator, CD to c:\VoodooViewer\linden\indra and execute the command ‘python -G VC80’. Then it’s time to go off and make coffee because the Python script is creating the files for the Visual Studio solution and will take probably about 20 minutes.
When I get back everything has finished successfully, and I have a new directory in my indra directory called build-VC80.
I have Microsoft Visual Studio 2005 Professional installed, but the free express version will work fine. My advice is to stick to the 2005 version over later ones because there can be problems with builds. There is nothing in later versions of Visual Studio that will make creating a viewer easier for you.
Next, I navigate to my new build-VC80 folder and double click SecondLife.sln to open the solution in Visual Studio 2005. After clicking the ‘build’ button it is time to go off and make more coffee because building the entire SL client from scratch can take some time. When it has been built once, subsequent builds will be incremental and much faster to compile.
I get back after wasting some time and the build is successful, so I fire it up and login to Second Life.
I will keep posting here as I make progress with the new viewer and attempt to implement features. If you are the techy type, you may want to follow the instructions alongside this project and make your own viewer.
Due to my extremely busy Second Life, I won’t be able to answer questions about this project in world, but please feel free to post your comments, and I will try to answer everything here if I can.
Good luck and above all, have fun !