Tomorrow I will implement a feature to create a "repository file" (xml) to help users to test the feature and releasing the first "1.5 alpha" version of OvGME (yes, i jumped to the 1.5 due to many changes in code structure + new network features).
This is how that work for now:
Server side (Repository Manager)The repository manager (either a moder or anyone who can host some file in a website) must make available a "repository file" (ovgme.xml file) on a web server. Adress and port does not matter, as long as this is an HTTP server.
the ovgme.xml file must have this structure:
<mods>
<mod name="Dummy - Mod A" version="1.1" url="http://www.toto.org/ovgme/Dummy - Mod A.zip"/>
<mod name="Dummy - Mod B" version="1.2.2" url="http://www.youpla.net/ovgme/Dummy - Mod B.zip"/>
</mods>
In fact, you can name tags (nodes) as you want, since the XML parsing routine does not check node's name. It only take the root node (here <mods/>) and its children (here <mod/>). So, technicaly, you can replace "mods" by "cacaprout" and "mod" by "yahehaehhah", this still working. However, attributes names within the children MUST be named exactly like in the example "name", "url" and "version" (the order doesn't matter).
The version string must be only numbers separated by dots, up to three version number max, one for Major, one for Minor, and one for Revision... examples of valid version string:
2
1.5.0
1.2
Limitation: OvGME does not eat "Transfert-Encoded: chunked" HTTP response (this thing is hell to handle correctly), however, theorically, this HTTP transfert mode only occure when you ask for some complicated page like PHP or ASP... an HTTP server will never (as far as i know) provide a simple xml file in "Transfert-Encoded: chunked"...
Client Side (user)
A Mods can be checked for update if and only if:
- It is a Zipped Mod-Archive (Directory-Mod version check and update not supported yet)
- It has a "version.txt" in the root of the archive (like the description) with the version string, and ONLY the version string.
The version string must be in the same form as in the xml file... (however, the original mod-achive can have a version "1.2" string, if the repository provide any "1.2.1" version, OvGME recognize it as an update, equaly, for "1.2.1" becoming "1.3" or even "2"... )
The client must enter one or several repository adress in the repository manager.
Since i coded an URL parser, the provided repository adresse and port can be almost what you want. Examples of valid adress:
http://www.prout.com"]www.prout.comhttp://klathu.net/folder1/folder2/http://224.24.65.128:8080/toto/tatahttp://www.youplaboum.net:8081/repository/Once you have that... you can Check for update... OvGME will interogates repository, comparing mod names and versions, and give you the list of mods who can be updated... Then, you can launch download (individually, or by group, depending what you want to update)...
Rendez-vous tomorrow.