[sldev] Checking for updates for third party viewers via HTTP

Dale Glass dale at daleglass.net
Sun Jul 15 18:03:42 PDT 2007


I've been passing my custom viewer around a bit, but a problem with that
was that I have a very active development ATM, and poking everybody to
download a new installer is a pain.

And since the grid doesn't know about my release process, the normal
mechanism won't work.

So I made my own. It works by doing an HTTP request and parsing the
results.

To get a patch for my implementation, diff these files between my
buildfixes-1-18-0 and branding branches:

See this for details on my repository:
https://wiki.secondlife.com/wiki/User:Dale_Glass#Subversion_Repository

indra/llcommon/llversion.h
indra/newview/llstartup.h
indra/newview/llstartup.cpp

The code requests http://daleglass.net/viewer_update_check, with these
arguments: server, major, minor, patch, build, rev, and digest.

Server is the user server and used to determine the viewer needed for
the specific grid.

major, minor, patch and build are components of the SL version number.

revision is my SVN revision number.

digest is the viewer digest and used as insurance in case I distribute
two different binaries under the same version number by mistake.

The result it outputs is the XML form of LLSD:

<?xml version="1.0" encoding="UTF-8"?>
<llsd>
        <map>
                <key>update_available</key>
                <boolean>true</boolean>
                <key>update_required</key>
                <boolean>true</boolean>
                <key>last_version</key>
                <string>1.18.0.6.64</string>
                <key>message</key>
                <string>message to viewer</string>
        </map>
</llsd>

Format should be self-explanatory. If no update is available, the 
update_required, last_version and message fields will be missing.

If anybody wants to play with it, try this as arguments:
major=1&minor=18&patch=0&build=6&rev=64

rev < 64 will result in an "update required" response.

server and digest aren't currently used by the script.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.secondlife.com/pipermail/sldev/attachments/20070716/ee50da32/attachment.pgp


More information about the SLDev mailing list