PDA

View Full Version : Extension Update Checker



Gkjsdll
May 9th, 2018, 00:09
I've been kicking around this idea for a few days, and I'd like to guage interest and get design input from other extension developers before I break ground on this project.

Wouldn't it be nice if there was an extension that notified you when there were updates available for any of your installed extensions? I've got an idea of how to go about this, but each extension would need to be supported by their developer(s).

The basic idea is that the Extension Update Checker would record the current version of every extension running in the current campaign into each campains' db.xml. A companion program, run separately from FG, would then parse the contents of each db.xml and check a public github repository for newer versions of any of the installed extensions, and write the list of all/current/5 most recent versions to a new extension_update_checker.xml file, in this extension's folder. (This would probably require installing the extension as a folder rather than an ext)

Back in FG, when you open a campaign (either host, or all, not sure which makes more sense. configurable?) the Extension Update Checker extension could read the contents of extension_update_checker.xml and report any new versions of extensions to the chat box. With the addition of URL links in chat, the extension could even link users to the download page for the new version. There's probably a good way to give users an "Don't notify me again of this version" option.

The public github repository would have a main branch housing the companion program's code, and a separate branch for each extension developer who would support this extension. I'm not sure what format would make the most sense for this data, but I could run a script from my PC that would automatically merge pull requests from each dev to their own branch.

That's the first thing that each developer would have to do to support this tool, update their extension's version information in GitHub when they put a new version up on the forums. Users could also opt in and out of beta versions if we had a beta flag available.

The way that this extension would record current versions of supported extensions would be the second thing each developer would have to do to support this extension. This extension would expose a function called registerExtenstion that other extensions would call during onInit(), and those extensions should set their loadorder tag higher than 1 and call registerExtension with a table in the following format:

{
name=[extension_name],
version=[extension_version],
branch=[developer's_github_branch]
}


I'm pretty sure I could get the whole thing coded myself, but I would want to see enough interest from other extension developers before I start sinking my teeth into it. Thoughts?

Andraax
May 9th, 2018, 00:52
I just subscribe to the forum threads, and get notified via email when they're updated...

Gkjsdll
May 9th, 2018, 01:08
When you subscribe to a thread, you get notified of every update do it, correct?

Part of why I was thinking this would be nice would be to get just the info you need. For instance, the link could be a direct download link from inside FG, and it could print out all of the version log between your current and the new version.

Niles
May 11th, 2018, 21:06
I am not an extension developer but I have a few custom extensions that no longer work because of updates. So from a extension user's perspective, this would be a great feature so that they continued to work when there is an update. Do you know if there's anyone here willing to look at an extension of mine to get it to work again? Thank you for any info you can provide.

Andraax
May 11th, 2018, 21:09
How does software that checks whether or not an extension has been updated force an extension developer to update his / her code? They won't "continue to work" unless someone updates them...

Gkjsdll
May 11th, 2018, 21:30
I am not an extension developer but I have a few custom extensions that no longer work because of updates. So from a extension user's perspective, this would be a great feature so that they continued to work when there is an update. Do you know if there's anyone here willing to look at an extension of mine to get it to work again? Thank you for any info you can provide.

I could take a look at them if you either sent me the links or the files.


How does software that checks whether or not an extension has been updated force an extension developer to update his / her code?

The idea was that extensions would opt-in to being checked for updates, and that control of the update checking for any extension would remain with the original developer. It could work just as well to just have this extension checker get the names and versions of every extension running, and I/we could put together a database of extensions with the following information for each:

Extension Name
Current Version
Forum Thread
Direct Download Link

Andraax
May 11th, 2018, 22:08
Yeah, but if the extension developer isn't updating his extension now, how will something that tracks changes make him update it?

Gkjsdll
May 11th, 2018, 22:30
It won't, that wouldn't be the goal of this project. It would be an entirely different task to try to accomplish that.

Extensions don't only get updated when a new version of FG comes out, they also get updated when bugs get fixed or new features get added. The benefit of this extension would be that you would be notified in-game when there are updates available and provided with links to both the forum thread & a direct download link.

Andraax
May 11th, 2018, 22:35
I understand that. I was responding to the statement "So from a extension user's perspective, this would be a great feature so that they continued to work when there is an update."

It does no such thing. It doesn't do much more than subscribing to the forum post does - notify you when an update has been made...

Gkjsdll
May 11th, 2018, 22:48
You wouldn't get notified every time someone responded to the thread & automatic updates could be added. Other than that, the only other benefit would be that it would all happen within FG & the helper program.

Niles
May 11th, 2018, 23:14
I understand that. I was responding to the statement "So from a extension user's perspective, this would be a great feature so that they continued to work when there is an update."

It does no such thing. It doesn't do much more than subscribing to the forum post does - notify you when an update has been made...

My bad. I misunderstood the intent of the extension.

Gkjsdll
May 11th, 2018, 23:17
No problem. It would take significantly more work to attempt programmatically editing other extensions' contents to maintain compatibility.

As I said before, I'd be happy to take a look at fixing any extensions for you if you PM me.

Niles
May 11th, 2018, 23:25
PM'd you the details.

damned
May 12th, 2018, 02:22
Dulux_Oz was looking at something similar.
I think there is benefit to it even though it wont get universal support from all extension authors.

Niles
May 12th, 2018, 02:33
replied to wrong person, sorry.

Gkjsdll
May 12th, 2018, 08:03
Dulux_Oz was looking at something similar.
I think there is benefit to it even though it wont get universal support from all extension authors.

I'll ping him about it and maybe he and I could work together on getting it started. It wouldn't need support from a developer if we either A) let anyone update the GitHub repo when new extension versions are released or B) allow people who are not the extension developer to sign up to maintain specific extensions' version info.

mac40k
May 12th, 2018, 15:49
I think as a user what would be more useful to me is a check to see what extensions I have that have not been updated or verified as working with the latest FG update.

Trenloe
May 12th, 2018, 17:29
I think in general this is a good idea. The main issues I see are the developers buying in - and keeping their extension info updated, what versions it supports, etc.. And the general process of keeping the extensions database this would use updated. These are big tasks that require many hours of monitoring and work every time FG is updated, and every time an extension is updated. I know - I've attempted to do this with the extension summary threads, but I no longer have the time (or inclination, if truth be told), to do this in any detail.

And, if it does go ahead, extension developers should be encouraged to opt-in, but it should not be insisted upon. (It's easy to be a little too insistent sometimes with things we're passionate about). We love extension developers and getting new functionality, but these developers should be allowed to provide the results of their hard work in whatever way they wish. Some people won't like the extra work that opting in to such an extension checking process will bring. We don't want to discourage extension developers in any way.

Gkjsdll
May 12th, 2018, 17:49
And, if it does go ahead, extension developers should be encouraged to opt-in, but it should not be insisted upon. (It's easy to be a little too insistent sometimes with things we're passionate about).

A very fair caution against over-eagerness Trenloe.


The public github repository would have a main branch housing the companion program's code, and a separate branch for each extension developer who would support this extension. I'm not sure what format would make the most sense for this data, but I could run a script from my PC that would automatically merge pull requests from each dev to their own branch.

I was thinking that this could be changed to a separate branch for each extension, and each branch could be set up with restrictions for only specific people to be able to push changes to each extension. Each extension would need its infomation maintained by either its original developer, or a volunteer maintainer (which would be distinguished in-game somewhere). It might not be a perfectly smooth approach, but it stops the update work from relying on a few specific individuals.

It would clearly be the least amount of work overall for any developer who would know exactly when one of their extensions is updated, but I know that there are some people who are really active on the forums and might be interested in maintaining a certain list of extensions for others.

Trenloe
May 12th, 2018, 17:50
Oh, yeah - and I forgot to say it will also require the GMs to load the checker and run the external extension checker application. I know this is, in theory, not too much extra work - but it still requires the GM to do some steps to keep the data being checked up-to-date etc..

I'm not sure who the end user being targeted is? The everyday GM, or people who do tinkering/development themselves? If it was the everyday GM, I'm wondering how many of them would follow the process closely and get good results. We see multiple times of these forums users not reading stuff, not following directions/guides, using things that are very out of date and not updating properly. If this process still requires the latest companion application to be installed, and running this to get the latest information - and running it pretty regularly, as the GITHUB repository could be updated at any point, then I'm thinking it would be more helpful as a debugging tool, rather than an automatic way for everyone to regularly check their extensions - that is, a user has a problem and they're pointed towards checking their extensions with this tool.

@Gkjsdll - I don't want to come across too negative about this. I love the ambition and the thought process. Similar things to this have been discussed before and, essentially, without it being a pretty seamless process for all involved (developers and especially users), and people willing to do the hard work of keeping things regularly updated way into the future, this is going to be pretty much a nice-to-have niche project.

If the people involved with this are passionate about it and willing to put in the hard work, then I hope I'm wrong and I wish you the best in getting it off the ground and running successfully long into the future. :)

Gkjsdll
May 12th, 2018, 18:01
I'm a huge advocate of playing the devil's advocate Trenloe

I can see the companion app also being able to notify of its own updates, though it probably wouldn't need to be updated just to maintain its current feature set.

As for GM work, it would be possible to have the companion app set itself to run at start up (with user's permission) and automatically update installed extensions, creating backups in a new folder (e.g. FG_Data>extension_updater>backups>[extensionname_timestamp]) It would probably make sense to backup the db.xml to extenstion_updater>campaigns>[campaign_name]>db_timestamp.xml.

At this point it would just notify the GM of extensions which were updated.

Trenloe
May 12th, 2018, 18:14
I'm a huge advocate of playing the devil's advocate Trenloe
Haha - sure, that's cool.

I'm one to point out the issues that can occur and what has been discussed before - so anyone involved can get involved with their eyes open. If people believe what I say, of course! ;-) It will be a lot of work that never ends and requires buy in from a diverse community (both the developers who want to be involved and the volunteers who cover those you don't). Most things like this require one person to do the lion's share of the work to get it off the ground - and then keep it going. But, don't let me put you off - just don't be too disappointed if it doesn't get the traction needed to progress to the heights that you envision! :)

LordEntrails
May 13th, 2018, 02:03
What about security? Would this have any way to bypass anti-virus? Not that people on the forums can validate that an extension only does what it says, but does this idea open or increase any security concerns?

Gkjsdll
May 13th, 2018, 02:29
What about security? Would this have any way to bypass anti-virus? Not that people on the forums can validate that an extension only does what it says, but does this idea open or increase any security concerns?

I can certainly see there being security concerns relating to the companion program. I don't know enough to speak to the question of anti-virus, but I have an idea for addressing security concerns.

There's a project/framework called Electron (https://electronjs.org/) that allows you to develop cross-platform desktop apps by basically programming a website. It's used by some pretty notable teams. (https://electronjs.org/apps)

If the companion app was built with electron (for example), you would be able to modify the HTML, CSS, and JavaScript that the app would be coded in. I know that most people wouldn't end up doing that, but I personally feel better about running code that I can see that other people have signed off on.

This would take just a little more work for the user than if we bundled up all of the code ahead of time, but do you feel it might help address security concerns?

Ken L
May 13th, 2018, 02:41
The only version of this I support is a centralized 'steam-workshop' opt-in like approach from Smiteworks themselves. Perhaps in FGU we'll get that. Until that point the definition of what conforming to a 'community standard' is; is a bit too amorphous as not everyone will buy in. Mind you that not many people make extensions for FG and a smaller subset of those share them given FG's updates tending to break things given the integration required. Heck, only the newer developers use git hub links as the traditional way is uploading the .ext like pre-packaged salads. FG gives much power of morphing the application to how you want it to feel like at the expense of their 'ruleset layering' approach which causes these cascading breakages. Perhaps a future version would be more handler based but I don't see that coming as it would fly in the face of the customizable nature.

In short, I think it's best to see what FGU comes up with and then react on it, until that point, any global system of extension management can quickly become obsolete which berates the effort in forging the opt-in standard.

dulux-oz
May 13th, 2018, 09:00
If everyone remains patient for the next 2-3 days (and saves themselves some wasted effort/angst) then I think that you all will be pleasantly surprised - more Soon(TM) :p

paladiusdarkhelm
June 1st, 2018, 23:26
Was there a big surprise and if so is there a link?

:)

LordEntrails
June 2nd, 2018, 02:22
Was there a big surprise and if so is there a link?

:)
Yes, https://www.fantasygrounds.com/forums/showthread.php?43984-DOE-REMU-(Ruleset-Extension-amp-Module-Updater)-Extension