astronautlevel2 / StarUpdater

Updater for Luma3DS by AuroraWright
MIT License
30 stars 5 forks source link

Get stables from Luma3DS releases page #33

Closed Pikm closed 7 years ago

Pikm commented 8 years ago

Downloading the latest Luma3DS update using StarUpdater causes my o3DS to boot to a black screen. Another user with this problem is found here

exegg commented 8 years ago

I did a MD5 check of the downloaded file. The arm9loaderhax.bin isn't the same from the Luma3DS 6.1.1 release. Lumaupdater gets the correct file. With Starupdater it gets corrupted somehow or the source is different.

EDIT: Yes. StarUpdater gets the latest release from here https://astronautlevel2.github.io/Luma3DS/ not from the official source. Can this be fixed? Latest hourlies are fine to download from there, but latest stable releases should be the ones from AuroraWright's Github page.

astronautlevel2 commented 8 years ago

Yeah, my server was using an outdated version of ctrulib which caused a build issue. This affected StarUpdater as well. It's now resolved.

@exegg, Although I agree that getting the latest official release from AW's github page is a good idea, that's easier said than done and I don't have enough time or motivation to work on it right now.

If anyone else would like to implement it and open a PR, I'll be happy to merge it.

gnmmarechal commented 8 years ago

Huh. Dealing with GitHub's API is a pain iirc. It probably would be better to make an auto running PHP script to fetch the latest release to your server, but even then... GitHub doesn't have such a thing as a latest release link.

astronautlevel2 commented 8 years ago

Actually, it does: https://api.github.com/repos/aurorawright/luma3ds/releases/latest

If you can figure out how to parse the JSON using lpp-3ds, it shouldn't be terribly difficult, but I don't believe there's a way to parse JSON using lpp-3ds.

Ryuzaki-MrL commented 8 years ago

Yes, there is.

gnmmarechal commented 8 years ago

Huh, didn't know that.

gnmmarechal commented 8 years ago

Then the best way would be to handle it server-side? I guess?

gnmmarechal commented 8 years ago

Hum. This doesn't seem like a very good idea now that I take a look at it.

The script would have to parse the JSON, but I have no idea how it'd identify the 7z files (dev and non dev) properly.

Or maybe I'm just too dumb for this.

Ryuzaki-MrL commented 8 years ago

There are two objects on the assets array of the JSON object. Each one having a "browser_download_url" pointing to "Luma3DSv6.1.2-dev.7z" and "Luma3DSv6.1.2.7z", respectively. It should be enough.

astronautlevel2 commented 8 years ago

Indeed, all you'd need to do is check if the name of the download contains "dev" in it or not and get the respective URLs.

gnmmarechal commented 8 years ago

This would only work if I trusted the files will ALWAYS be named like that.

Ryuzaki-MrL commented 8 years ago

That's why you should be fetching the "browser_download_url", this way it would only depend on the order of the packages (which is ALWAYS the same in each release)

astronautlevel2 commented 7 years ago

Unfortunately there's not an easy way to extract 7zip files from Lua, so this can't work.