Ludeon Forums

Ludeon Forums

  • February 25, 2020, 08:37:05 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [API] Update Check Framework  (Read 1082 times)

Neurotoxin

  • Colonist
  • ***
  • Posts: 255
  • Raider
    • View Profile
[API] Update Check Framework
« on: August 07, 2014, 05:06:02 AM »

Started work today on a simple update checker.





All that's needed to plug in is an xml file.


<Your Mod>/Update/Data.xml
Path and file name are required.


Data.xml Example
Code: [Select]

<Data>
   <CurrentVersion>1.1.0</CurrentVersion>
   <UpdateURL>http://pastebin.com/raw.php?i=TTicD5DE</UpdateURL>
</Data>


Currently only working on HTTP protocol (not https)


I am posting now for people who may want to plug in, what would you like to see? Currently, as proof of concept, it compares version strings rather than values. I can easily add support for Major.Minor.Revision.Build for version checking thus only notifying of update if one of the values is greater than the current. Is there any other versioning system you want supported?


I intend for this to be a very simple way for mod makers to add an update checking functionality to their mods.


Are there any security concerns with parsing a version String that people are worried about? This mod sends no data besides obviously an IP to whatever server it's connecting to (in my example pastebin) relative to the user. It's no worse than browsing to the page yourself.


Does anyone want to help getting HTTPS to work? Let me know here or via PM. I'll get it eventually.


TODO before release:
Implement HTTPS (Specifically for github but also for any other necessary reason)
Implement actual version checking rather than if(!string1.Equals(String2)) - PoC method
Maintain Use simplicity.   
Gather all updated mods on thread close rather than logging to present all at once via GUI window (Might need help with GUI, I suck at those).

Source will be released with the mod itself.




Sorry for my broken train of thought here, kinda fried after a long day... think of this a my bullet points, in no specific order.


Anyway, I'll straighten this thread out tomorrow. Any thoughts, comments, suggestions?
« Last Edit: August 07, 2014, 05:10:38 AM by Neurotoxin »
Logged

RawCode

  • Super Tester
  • Planetologist
  • ***
  • Posts: 1573
  • Refugee
    • View Profile
Re: [API] Update Check Framework
« Reply #1 on: August 07, 2014, 06:11:05 AM »

Valid implementation of this feature require some work from @Tynan - to be precise - each mod must be loaded with separate appdomain (classloader) this will allow to hotplug mod assemblies, load and unload them at runtime.
Logged

Neurotoxin

  • Colonist
  • ***
  • Posts: 255
  • Raider
    • View Profile
Re: [API] Update Check Framework
« Reply #2 on: August 07, 2014, 06:56:58 AM »

I don't intend to auto-update mods. I intend to alert users to available updates. I personally dislike automatic updating, specifically because I'm on limited bandwidth satellite internet but reading a version string doesn't require more than at most a couple KB. I Just want to draw a screen at the main menu (popup) to inform users there's an update available for x,y,z mod(s). If they have the mod they know where to get the update, same place they got it in the first place.