Poll

Should I add increased BLID gathering abilities to Support_Updater and make a public, searchable list of BLIDs and names?

Yes
34 (81%)
No
8 (19%)

Total Members Voted: 42

Author Topic: Support_Updater  (Read 54486 times)

It would be cool if there was a site or some kind of program the community makes that can setup repositories for you for the people that struggle or are confused on how to make them.

It would be cool if there was a site or some kind of program the community makes that can setup repositories for you for the people that struggle or are confused on how to make them.
This will be a default feature of Blockland Glass as soon as the new JSON format is all set up and working.

Edit: Didn't Port make a JSON interpreter a while back? If you were planning to make it all from scratch, it would probably be a lot smoother if you just brought that in instead.
« Last Edit: June 14, 2015, 07:05:09 PM by Scout31 »

Edit: Didn't Port make a JSON interpreter a while back? If you were planning to make it all from scratch, it would probably be a lot smoother if you just brought that in instead.
Yeah, that's what I'm doing.

So that you can start working, here's a version.txt file for a JSON repository:
Code: [Select]
version 1.0.0
channel release
repository http://mods.greek2me.us/test-repo.json
format JSON

and here's a preliminary JSON repository:
Code: [Select]
{
"name":"GreekMods",
"add-ons":
[
{
"name":"Support_Updater",
"description":"Write about it.",
"channels":
[
{
"name":"release",
"version":"3.8.1",
"restartRequired":"3.8-rc-1",
"file":"http://example.com/something.zip",
"changelog":"http://example.com/changelog.txt"
},
{
"name":"beta",
"version":"4.0-beta-3",
"restartRequired":"3.8-rc-1",
"file":"..."
}
]
},
{
"name":"Some_AddOn",
"channels":
[
{
"name":"release",
"version":"1",
"file":"..."
}
]
}
]
}

Then would I just add it to a mod that does NOT have this stuff in it? (I.E my Vortex?) I wanted to add this in 2.5 before it came out so it would be easier, but making repositories for anything like bitbucket and zip files to add to it are too complex and confusing to me. I understand what Greek2Me's tutorial says on making stuff compatible for this updater, but making something with this mod just feels too "Advanced" for me. It would be nice if some kind of application or some one could set it up for me.

Then would I just add it to a mod that does NOT have this stuff in it? (I.E my Vortex?) I wanted to add this in 2.5 before it came out so it would be easier, but making repositories for anything like bitbucket and zip files to add to it are too complex and confusing to me. I understand what Greek2Me's tutorial says on making stuff compatible for this updater, but making something with this mod just feels too "Advanced" for me. It would be nice if some kind of application or some one could set it up for me.

That's what Scout31 is working on - essentially an RTB replacement that uses this as the updater. It would manage all the repository stuff for you automatically.

That's what Scout31 is working on - essentially an RTB replacement that uses this as the updater. It would manage all the repository stuff for you automatically.
Can't wait then! :D

How does the Updater knows that 3.8.1 would be a newer version than 3.8-rc-1? Is there a particular version naming convention I need to enforce?

Edit: okay, I realized in hindsight that was a stupid question. Although I will indeed need to implement that standardized versioning system.
« Last Edit: June 14, 2015, 08:23:04 PM by Scout31 »

It's fully compliant with the Semantic Versioning standard: http://semver.org/
That's what you should enforce.

edit: I have a test version ready for you: http://mods.greek2me.us/storage/beta/Support_Updater.zip
« Last Edit: June 14, 2015, 08:54:11 PM by Greek2me »

PHP's inbuilt JSON encoder seems to like to escape all slashes

Code: [Select]
            "channel": [
                {
                    "name": "release",
                    "version": "",
                    "restartRequired": "",
                    "file": "http:\/\/localhost\/support_updater\/download.php?id=13",
                    "changelog": "http:\/\/localhost\/support_updater\/changelog.php?id=13"
                }
            ]

None of the possible 'escape level' masks seem to have an effect, so I'm assuming it's a JSON specification?
« Last Edit: June 14, 2015, 10:51:26 PM by Scout31 »

It's not a JSON specification AFAIK. Try this: http://stackoverflow.com/questions/10210338/json-encode-escaping-forward-slashes

edit: Also, it's "channels"
« Last Edit: June 14, 2015, 11:14:11 PM by Greek2me »

Weird. Already tried that mask and nothing. Tried it just now and it worked fine.

Anyway, I realized I was jumping the gun and that I need to work on the preliminary update system on the site side before I can move on to adding this functionality. It'll be soon, though.

Ta-da:

Updater
Theme System
Slayer

I see what you mean about not being able to change your file prefix. I'll take a look at that.

Edit: Also, it's still being displayed in "pretty" mode. Not entirely functional yet since it has <pre> tags.

Is there any JSON support for the change-logs too, or will those follow the old format?

I would recommend placing them all in one repository. Otherwise the client could end up making 100+ connections to your server. I believe that Blockland does have an upper bound on TCP connections.

The request for the repository contains a GET variable called "mods" which contains a dash ("-") delimited list of add-on IDs. To save bandwidth, you can then use PHP to serve only those add-ons in a single repository.
(actually, the version I sent you does not have this yet, but it will)



The change logs currently use an extended version of Torque Markup Language. A list of tags is available here: https://bitbucket.org/Greek2me/support_updater/wiki/Modding%20Documentation#rst-header-formatting

I'm thinking about supporting Markdown for changelogs as well.
« Last Edit: June 15, 2015, 02:10:36 PM by Greek2me »

Having a single large repository may conversely also be a little taxing to generate as there could be a lot of database calls.

How are these mod IDs assigned? Is there any sort of convention to it? Should it be one I generate or should it relate to the add-on name?

edit: Eh?
« Last Edit: June 15, 2015, 03:41:12 PM by Scout31 »