Luau:
Automatically Update Programs And Libraries.
Power And Flexibility Through Decentralized Control
 
 

Luau: Developer's Overview

(This is copied verbatim from the Luau Whitepaper. Go there for more information)

1. How Luau Works

The heart of Luau's updating system lies within the "updates" file. This is a file hosted somewhere public by the project maintainers which in essence describes all currently available updates and messages. As a developer, the only thing you have to do to support Luau is to host this file and keep it updated. Then you simply add a command to the installation script for your project (more on this later) in order to register the location of the updates file with the Luau database stored on your client's computer, and you're done. If you want more flexibility, you can also interface with the libuau library and take direct control over the Luau facilities (see the Programmer's Guide for details), but for most purposes, simply registering your program and then letting the Luau application suite deal with the rest should be enough.

2. Understanding the Luau updates File

The style of the updates file is in XML format. Since there are three separate types of updates — software updates, messages, and Luau configuration updates (see section 2.1) — it should make sense that there is a different set of keywords available to each type. However, there's also a set of keywords common to all types.

Here's an example updates file to mull over (this is in fact a copy of the updates.example.xml file distributed under docs/ with Luau):

<?xml version="1.0" ?>

<updates>
  <update type="software">
    <id>101</id>
    <keyword>UNSTABLE</keyword>
    <short>Upgrade to myproject version 1.1.1</short>
    
    <long>
Version 1.1.1 supports CoolStuff extensions and drops legacy support for pre-1.0 versions.
Many bug fixes have also been made, including:
  o Preventing myproject from crashing when user inputs curse words
  o No more gamma radiation problems (hopefully)
!!! NOTE !!!
INSTALLING version 1.1.1 WILL DROP COMPATIBILITY WITH BINARIES COMPILED WITH PRE-1.0 versions!
If this is a problem, please stick with the 1.0 branch
    </long>
    
    <package type="RPM" size="1200144" md5="29168bed9cc7e04652e82bc09b3c7b98">
      ftp://ftp.myserver.com/pub/myproject-1.1.1/binaries/myproject-1.1.1.rpm
    </package>
    <package type="DEB" size="1432534" md5="98336d9f8cb04bc909a9a2a13a9e893c">
      ftp://ftp.myserver.com/pub/myproject-1.1.1/binaries/myproject-1.1.1.deb
    </package>
    <package type="SRC" size="6323511" md5="717ab9d5dfcb8900ca14182dc0a0dbb2">
      ftp://ftp.myserver.com/pub/myproject-1.1.1/src/myproject-1.1.1.tar.gz
    </package>
    
    <valid type="date" from="02/05/2003" to="05/15/2003" />
    <set date="05/15/2003" version="1.1.1"/>
  </update>
  
  <update type="message">
    <id>201</id>
    <short>Artists needed!</short>
    <date>04/14/2003</date>
    <long>
  myproject is looking for some talented artists to help with the newly planned action 
  simulation adventure game, "MyProject: The GAME."  If you're interested, please contact 
  jimbo@myserver.com
    </long>
  </update>
  
  <update type="libupdate">
    <id>301</id>
    <keyword>IMPORTANT</keyword>
    <date>04/14/2003</date>
    <short>New server</short>
    <long>
  We've got our own ftp server now, so we're trying to get everyone to switch over to using
  the myserver.com database.  Please accept this update, since the old ftp server will be
  unavailable in a month or so, and trying to autoupdate from it after that will fail.  Thanks. :)
    </long>
    <set url="ftp://ftp.myserver.com/pub/myproject/updates" />
  </update>
</updates>
	

Most of these keywords should be mostly self-explanatory. However, for a full description of all the keywords, along with some other tidbits (like how to use 'luau_register', and understanding the "release date compatibility scheme"), see the Luau Whitepaper

Sidebar

Hosting by:

SourceForge.net Logo