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.