Although I'll not be releasing the launcher till some time after the Freespace mod launch, I'd like to inform you about another new feature ahead of time, so you can incorporate the appropriate support into your mods, if you wish to do so:
(bear with me, this is a rather long post, but I really wanted to give more detailled explanations so you fully understand what to expect of it)
Mod-Update FeatureThe launcher will be able to detect outdated versions of your mods and direct the player to a website of your choice, so he can quickly find the correct download.
What's required to make this work for your mod:- create an XML-file with all the information required by the update feature and place it somewhere on a web server (details see below)
- add a new element to the modinfo.xml you're deploying with your mod, so the launcher is able to find your XML file
Here is an example of a modinfo.xml with the new
<updateInfo>-tag:
<?xml version="1.0" encoding="utf-8"?>
<mod xmlns="http://arparso.de/nexus">
<name>Freespace: Evolution</name>
<version>1.0</version>
<author>Arparso</author>
<web>http://www.moddb.com/mods/freespace-evolution</web>
<rss>http://rss.moddb.com/mods/freespace-evolution/news/feed/rss.xml</rss>
<intro>movies\intro.wmv</intro>
<updateInfo>http://arparso.de/nexus/freespace/updateInfo.xml</updateInfo>
</mod>
What needs to be put into the new XML-file:Let's start off with a complete example:
<?xml version="1.0" encoding="utf-8"?>
<updateInfo xmlns="http://arparso.de/nexus">
<name>Freespace: Evolution</name>
<legacyName>Freespace Mod</legacyName>
<mostRecentVersion>1.5</mostRecentVersion>
<overrideWeb>http://arparso.de/nexus/freespace</overrideWeb>
<overrideRss>http://arparso.de/nexus/freespace/news.rss</overrideRss>
<update from="*" link="http://arparso.de/nexus/freespace/fse_setup15.exe"/>
<update from="1.0" to="1.2" link="http://arparso.de/nexus/freespace/fse_update10to12.exe"/>
<update from="0.8 | 0.9" to="1.0" link="http://arparso.de/nexus/freespace/fse_update0xto10.exe"/>
</updateInfo>
There are a lot of optional elements shown here, which can be omitted in many cases. The minimum required update info consists of the
<name> and
<mostRecentVersion> elements, like so:
<?xml version="1.0" encoding="utf-8"?>
<updateInfo xmlns="http://arparso.de/nexus">
<name>Freespace: Evolution</name>
<mostRecentVersion>1.5</mostRecentVersion>
</updateInfo>
Now for a element-by-element description:
name: (required)- the mod's name; MUST match the name specified in the modinfo.xml or else the update feature will be disabled (for exceptions see <legacyName>)
legacyName:- if you mod was named differently in the past, you can add the older names with
<legacyName> elements
- you can have multiple
<legacyName> elements, if you've went through a couple of name changes
- this way different versions of your mod with different names can all use the same updater XML file
mostRecentVersion: (required)- the version name of the most recent version of your mod
- relates to the
<version> element of the modinfo.xml
- can be any number or text string or whatever... no specific versioning format is enforced
- if the
<version> element of the installed mod differs from
<mostRecentVersion>, then the launcher assumes the need to update
The last fact is important: no versioning format is enforced, nor is it analyzed - if
<version> and
<mostRecentVersion> differ, an update notification WILL be displayed. If
<version> is "1.0" and
<mostRecentVersion> is "0.9" (e.g. because you forgot to update your XML), the launcher will still notify the player of an update, although the version numbers seem to imply otherwise.
The benefit here is, that you can use any kind of versioning format: incremental build numbers, release dates or fancy names like "Aurora release" or whatever.
Also note, that you can have side-by-side installations of different versions of the same mod without the launcher annoyingly telling you to update: as long as you have the most recent version already installed, it won't display update notifications for the mod's older versions.
update:This element has no content, but three attributes, and can be included multiple times for different downloads:
link- contains the actual information about where to find the download
- "link" should contain a valid URL to either a webpage or the actual download
- the launcher will offer to open "link" in the default web browser
-
optional: if no "link" is given, the contents of the
<web> element in modinfo.xml will be used instead
from- if this update should only be applied to a specific group of versions, then specify these versions in the from-attribute
- can contain a single version matching the
<version> element of the modinfo.xml
- can also contain a whole group of versions, seperated by a vertical line:
| (bitwise OR-operator in most programming languages)
- can also contain an asterisk, *, meaning that this download is meant for ALL versions (except for those, that already have their own
<update> element)
-
optional: if no "from" attribute is specified, it is assumed to contain an asterisk as default value
to- if you're offering incremental updates, that don't immediately update to the most recent version, you can specify this with the "to" attribute
- can contain a single version matching the
<version> that this download updates the mod to
-
optional: if no "to" attribute is specified, it is assumed to contain the
<mostRecentVersion> as default value
If you don't include ANY <update> element, the player will be instructed to go to the <web> address in his mod's modinfo.xml to get the new version (equivalent to a default <update> element with no from, to or link attributes specified).Additionally, the launcher will probably also try to find an upgrade path to the most recent version, if you're using incremental updates. E.g. if there is no update from 1.0 to 1.2, but you have an update from 1.0 to 1.1 and from 1.1 to 1.2, then the launcher should be able to detect this upgrade path to 1.2 and display both download links.
overrideWeb, overrideRss:- normally, if you've moved your mod's homepage to a different address, you'd need to update the already deployed modinfo.xml for all your players, because the
<web> and
<rss> addresses might have become invalid
- using
<overrideWeb> and
<overrideRss>, however, lets you override the elements in modinfo.xml and specify the new URLs
-
optional: you can specify the versions you want this override to apply to in an optional "for" attribute, just like with the "from" attribute in the
<update> element
- you can have multiple
<overrideWeb> or
<overrideRss> elements for different versions
-------------------------------------
THIS IS NOT CURRENTLY IMPLEMENTED IN THE LAST BETA, so don't expect this to work with it. I'm releasing this feature description, so you can plan ahead and prepare your mod to utilize this feature.
If you don't have your own webspace to park your XML file containing the update info, I may be able to host it for you. Just send me a message and we'll work something out.