GithubHelp home page GithubHelp logo

liquidfenrir / multiupdater Goto Github PK

View Code? Open in Web Editor NEW
139.0 139.0 19.0 994 KB

or µpdtr for short, is an updater for 3ds applications/a9lh/b9s payloads rewritten in C++

License: MIT License

Makefile 1.83% C 1.00% C++ 97.18%

multiupdater's People

Contributors

bernardogiordano avatar liquidfenrir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multiupdater's Issues

CTRNAND bug?

after updating luma to latest release on ctrnand (just to test since it was already at latest release), the file in ctrnand:/boot.firm is super weird and isn't the same as before (and it's not at all a FIRM file)

Copying sd:/boot.firm fix the issue

error d8a0a03c for github requests

Hm, the example config file doesn't work anymore, But this is only for github repos. Did github change their API or something? Getting error code d8a0a03c for all github api requests.

ARM11 System crash.

Seem to be getting a crash whenever I attempt to grab from this. It's not just a MultiUpload crash but a full system crash (arm11) to the point it creates a crash dump and shuts down my system.

  "name":"SOS: Trio NTR Cheats",
  "url":"https://github.com/KunoichiZ/3OT-NTR-Plugin",
  "inrelease":"plugin.zip",
  "inzip":"000400000019F500/Story_of_Seasons_Trio_of_Towns.plg",
  "path":"/plugin/000400000019F500/Story_of_Seasons_Trio_of_Towns.plg"

but doing downloading this

  "name":"Themely (latest release)",
  "url":"https://github.com/ErmanSayin/Themely",
  "inrelease":"Themely.cia",
  "path":"/Homebr3w/CIAs/Themely.cia"

doesn't seem to produce a crash

link to the dump -- http://www.mediafire.com/view/vohizjl1g2lnb5x

this is my whole config.json

Feature?

Have MultiUpdater delete a CIA from the path after it's installed? Possibly as an option in the config..

Software doesn't create missing directories on CTRNAND

I added an entry for CTRNAND GodMode9 (as a luma payload) because this is a thing you can do with Luma, that people don't seem to know about.

Here is the entry.

		{
			"name": "CTRNAND GodMode9 (latest release)",
		 	"url": "https://github.com/d0k3/GodMode9",
			"inrelease": "GodMode9.*\\.zip",
			"inarchive": "GodMode9\\.firm",
			"path": "ctrnand:/rw/luma/payloads/GodMode9.firm"
		},

The problem lies in the path for the ctrnand location of GodMode9.
If the "payloads" folder doesn't already exist, it won't create it, resulting in "extraction failed!" error.

The solution of course, is to create the missing dirs should there end up being any in the path to the target location. I.E. add checks or whatever.

I don't know if this problem happens on the SD card too I haven't bothered to check. Regardless, this should be implemented to prevent such errors should a user be using this software to install a software for the first time.

Error d8a0a028 on downloading some files.

Sometimes, on certain files, MultiUpdater will fail to download and return the error code d8a0a028. For me, this occurs at odd intervals only: the first try it'll fail and return d8a0a028, the second time it'll work, fail the third, succeed the fourth, etc. This has been a long-standing issue, and has managed to persist even after overhauling the way MultiUpdater handles downloading files. This is a basic description of the error:

Module: HTTP (40) | Description: 40 | Summary: Invalid state (5) | Level: Permanent (27)

Here's a list of some common payload update URLs to emphasize the strangeness of this error:

As we can see, files of the exact same type, similar size, similar path, similar URL length, and on the exact same server are not consistently affected by this error. This strikes me as extremely strange; any help with this would be appreciated, as I'm not sure what's going wrong, or why.

Have a question about the latest release on github

Hello @LiquidFenrir , l have a question about the latest release on github. For example, l want to update Luma3DS(the latest release on github), however, the zip's name is not the same such as Luma3DSv8.0.7z and Luma3DSv7.1.7z. So how could l write the config.json? The same as LumaLocaleSwitch and D9 G9 H9(lateset releases on github) and if l need two things in the zip or 7z, how could l write the code.

MultiUpdater self-update installs cia instead of updating .3dsx

I'm running MultiUpdater through HBL - running the MultiUpdater option in MultiUpdater installs the cia version and does not update the .3dsx version. Maybe have MultiUpdater check if it's installed as a cia. If it's installed, install the new cia, if it isn't, update the .3dsx. Other easy option is to split the MultiUpdater option in the menu into the cia and .3dsx version.

boot9strap download question

The four current versions of boot9strap 1.2 have names that don't seem to be compatible with the * filtering method since the version name differences happen right before the .zip and after the version number. Is there a proper way to put it into the config file, or do I just need to manually download it for now?

If there isn't a way, maybe a new filter to skip everything until it reaches the file extension would work?

Pattern matching in "inarchive"

The mGBA emulator's folder layout changes based on the build date and release number.

As such, the ability to do this:

	{
		"name": "mGBA",
		"url": "https://github.com/mgba-emu/mgba",
		"inrelease": "mgba-*-3ds.7z",
		"inarchive": "mGBA-*-*-*-*-3ds/mgba.3dsx",
		"path": "/3ds/ftpd/ftpd.3dsx"
	}

Would be amazing. (if this is already implemented, feel free to close.)

Seemingly random failures?

The app just doesn't work sometimes for no apparent reason. I've painstakingly double and triple checked config.json, but each line is identically formatted. In my specific case, decrypt9WIP and EmuNAND9 and GodMode9 download correctly, but otphelper and hourglass9 and safemode9 all fail. d9 and emu9 are the first two entries, but godmode is the 5th, and the others are before and after it.

Download Failed!

For some reason on these I am getting "download failed!" errors

Full error is

Error: Http status code is not 200 OK.
Status code: 404
download failed!
Error: 0xffffffff

These are what I am trying to download

    {
      "name":"PKM SM NTR Cheats (Moon)",
      "url":"https://github.com/AnalogMan151/sumoCheatMenu",
      "inrelease":"SUMO-old3DS.zip",
      "inarchive":"0004000000175E00/Moon.plg",
      "path":"/plugin/0004000000175E00/PKM_Moon.plg"
    },
    {
      "name":"PKM SM NTR Cheats (Sun)",
      "url":"https://github.com/AnalogMan151/sumoCheatMenu",
      "inrelease":"SUMO-old3DS.zip",
      "inarchive":"0004000000164800/Sun.plg",
      "path":"/plugin/0004000000164800/PKM_Sun.plg"
    }

Either one of them ends up throwing the error. also trying

    {
      "name":"Ever Oasis NTR Cheats",
      "url":"https://github.com/Slattz/Ever_Oasis-NTR-Cheat",
      "inrelease":"E-Oasis-NTR-Cheats-v*zip",
      "inarchive":"plugin/00040000001A4800/E-Oasis_USA.plg",
      "path":"/plugin/00040000001A4800/Ever_Oasis.plg"
    }

seems to end up throwing the same error..

Better error checking

Right now, if the config is not properly structured, the app will say that no config was found.

Booting issues after Running MultiUpdater - Resolved

Hi,
After changing to the new cfw and installing MultiUpdater, and then updating the CIA and cfw (through MultiUpdater) I am unable to start up my 3DS.

Whenever I press the power button the blue light flashes once for half a second and the screen stays black.

Was wondering if anyone else had this problem and was able to resolve the issue?

Another bug I ran into

So this time I'll put the code of the .json file that I'm updating and what it comes out as. As I said in my other issue, I keep my things organized. I have a main page and when I go to payloads, it works fine
Payload code: (Spacing is there it's not showing up on Github for some reason. If you need me to I'll send my config.json. I'm still using some of the old format because it still works.)
{
"entries": [
{
"name": "Page 1",
"url": "https://drive.google.com/uc?export=download&id=0BwV38SIw48pSUTMycm5DNVpkN3M",
"inarchive": "Default.json",
"path": "/3ds/MultiUpdater/config.json"
},
{
"name": "SafeB9SInstaller",
"url": "http://d0k3.secretalgorithm.com/SafeB9SInstaller/latest.zip",
"inarchive": "SafeB9SInstaller.firm",
"path": "/luma/payloads/Updater.firm"
},
{
"name": "GodMode9 (latest commit)",
"url": "https://d0k3.secretalgorithm.com/GodMode9TD/latest.zip",
"inarchive": "GodMode9.firm",
"path": "/luma/payloads/GodMode9.firm"
},
{
"name": "GodMode9 (latest release)",
"url": "https://github.com/d0k3/GodMode9",
"inrelease": "GodMode9--.zip",
"inarchive": "GodMode9.firm",
"path": "/luma/payloads/GodMode9.firm"
},
{
"name": "Luma3DS (latest commit)",
"url": "https://astronautlevel2.github.io/Luma3DS/latest.zip",
"inarchive": "out/boot.firm",
"path": "/Payloads/Luma.firm"
},
{
"name": "Luma3DS (latest release)",
"url": "https://github.com/AuroraWright/Luma3DS",
"inrelease": "Luma3DSv*z",
"inarchive": "boot.firm",
"path": "/Payloads/Luma.firm"
}
]
}

But when I go back to the Main page the end of the code looks like:

	{
		"name": "payloads",
		"url": "https://drive.google.com/uc?export=download&id=0BwV38SIw48pSUTMycm5DNVpkN3M",
		"inzip": "payloads.json",
		"path": "/3ds/MultiUpdater/config.json"
	}
]

}

But when I go from payloads to Default the end looks like:

	{
		"name": "payloads",
		"url": "https://drive.google.com/uc?export=download&id=0BwV38SIw48pSUTMycm5DNVpkN3M",
		"inzip": "payloads.json",
		"path": "/3ds/MultiUpdater/config.json"
	}
]

}"inrelease": "Luma3DSv*z",
"inarchive": "boot.firm",
"path": "/Payloads/Luma.firm"
}
]
}

How to add boot9strap in config.json

Hi, I tried to add boot9strap in config.json as below:

{
		"name": "Boot9strap latest release",
		"url": "https://github.com/SciresM/boot9strap",
		"inrelease": "boot9strap-*.zip",
		"inarchive": "boot9strap.firm",
		"inarchive": "boot9strap.firm.sha",
		"path": "/boot9strap/boot9strap.firm",
		"path": "/boot9strap/boot9strap.firm.sha"
	}

Then, MultiUpdater says it could not find the matching zip file. And how to extract two files from a single zip file?

Please help. Thank you in advance for your help!

Issue I ran into 40 seconds ago

When there is about 3 or less items on screen, it gives me the error:
There is an error in your config.json.
If you want ill add the code
EDIT: Code below

{
"entries": [
{
"name": "Payloads",
"url": "https://drive.google.com/uc?export=download&id=0BwV38SIw48pSUTMycm5DNVpkN3M",
"inzip": "payloads.json",
"path": "/3ds/MultiUpdater/config.json"
},
{
"name": "Luma3DS (latest release)",
"url": "https://github.com/AuroraWright/Luma3DS",
"inrelease": "Luma3DSv*z",
"inarchive": "boot.firm",
"path": "/boot.firm"
},
{
"name": "Luma3DS (latest commit)",
"url": "https://astronautlevel2.github.io/Luma3DS/latest.zip",
"inarchive": "out/boot.firm",
"path": "/boot.firm"
}
]
}

Gives error code -8 if there isn't a space between the tag and data in "inarchive"

In the config, if MultiUpdater is given an input like this:

	{
		"name":"Multiupdater",
		"url":"https://github.com/LiquidFenrir/MultiUpdater",
		"inrelease":"MultiUpdater-*zip",
		"inarchive":"3ds/MultiUpdater/MultiUpdater.3dsx",
		"path":"/3ds/MultiUpdater/MultiUpdater.3dsx"
	}

MultiUpdater will refuse to extract it (error -8). However, when given an input like this:

	{
		"name": "Multiupdater",
		"url": "https://github.com/LiquidFenrir/MultiUpdater",
		"inrelease": "MultiUpdater-*zip",
		"inarchive": "3ds/MultiUpdater/MultiUpdater.3dsx",
		"path": "/3ds/MultiUpdater/MultiUpdater.3dsx"
	}

Multiupdater will work as intended. It doesn't say that it's malformed JSON, is this a bug?

[Bug] Delete archives in config doesn't actually delete them

Tested with the latest release. The top of my config file reads the following:

"config": 
{
	"self_updater": true,
	"delete_archives": true,
	"delete_cias": true
},

Instead of deleting the .archive files after updating my payloads, the .archive files remain in the path /3ds/MultiUpdater/. Can't say the same for CIAs as I don't have any entries for CIAs in my config file, but I can do some testing in a bit for that if necessary.

More Questions . . .

If I set a file to download to a folder that doesn't exist, will it create it for me?

Also, what happens in cases like PKSM where the download folder has the same file name in two different folders. What does it grab? I am asking this because PKSM has a rosalina version and a hax version in its download folder

Also can thisgrab entire folders?

failed file extraction

Couldn't read data from the file in the archive
Extraction failed!
Error: 0xfffffff8

		{
			"name": "CTRXplorer.3dsx (latest commit)",
			"url": "https://d0k3.secretalgorithm.com/CTRXplorer/latest.zip",
			"inarchive": "3ds-arm/3ds/CTRXplorer/CTRXplorer.3dsx",
			"path": "/3ds/CTRXplorer/CTRXplorer.3dsx"
		}

When downloading if replacing content with a smaller file it does not properly replace

It will download the content, however will place it inside the boundaries of the existing file, leaving a garbage chunk at the end it seems. The only workaround I've found for this in current versions is to download the file again.

For example using my .json from my server, I have to download it twice if I cut something out of it, to ensure I won't start up MultiUpdater and receive a parsing error.

Application crashes on Old 3DS

This is a self-explanatory issue, the app crashes when I attempt to launch it on my old 3DS. It happens after the Homebrew splash screen disappears. I installed the application through FBI's TitleDB option.

I have attached a picture of the crash bellow.

img_1158

problem when updating a payload

i run into a problem when updating any payload...
the updater doesnt overwrite correctly, because when i reboot and start GodMode9 says me "The payoad is invalid or corrupted."

[Suggestion] See the actual version before update it

Hello! I like this program, and I think that could be very useful to know the version of the payload / cia you have installed and the version available, to know if you have to update it or not. I think I don't see this feature, however maybe I'm wrong, sorry if that the case.

About the actual version installed, if there isn't a way to read the actual version of all payloads / cias (I don't know if it is the case) I suggest to, at least, when you update it within multiupdater, the updater could write the version you download to a log file and shows that info the next time (for example: last update with MultiUpdater: 7.7. Available on server: 8.0).

Like I said, I don't know if this is even possible.

And thanks for the updater, is very useful!

Error codes are displayed as hex, rather than signed int

While trying to update the 3DSX version of Hamcha and KunoichiZ's LumaUpdater, I ran into an issue with zip file decompression which gave the output

Opening as a zip file...
Operation failed!
Error: 0xfffffff8

Looking in file.h, that looks like it could be error -8 (0xfffffff8). It's a tiny bit confusing trying to debug when all the error codes are displayed in 2's compliment.

I've since fixed the issue with my config (invalid "inarchive")

Feature Request - Downloading & extracting multiple files in single entry

I posted this here as well:
https://gbatemp.net/threads/release-multiupdater-simple-updater-for-various-files-and-application.475662/

  • I'd like to request a feature so that we can take multiple files from a single site/release/archive. Something like:
        {
            "name": "FBI.cia",
            "url": "https://github.com/Steveice10/FBI",
            "inrelease": "FBI.cia",
            "path": "/cias/FBI.cia",
            "inrelease": "FBI.3dsx",
            "path": "/3ds/FBI/FBI.3dsx"
        },
  • And the ability to take multiple files from a single archive and put it in a directory. Something like:
        {
            "name": "Boot9strap.firm",
            "url": "https://github.com/SciresM/boot9strap",
            "inrelease": "boot9strap.*.zip",
            "inarchive": "boot9strap.firm",
            "inarchive": "boot9strap.firm.sha",
            "path": "/boot9strap/*"
        },
  • Better yet, the ability to download from everything from just 1 click (rather than having multiple entries in the list). Like:
        {
            "name": "All-in-one Download" [
                {
                    "url": "https://github.com/SciresM/boot9strap",
                    "inrelease": "boot9strap.*-ntr.zip",
                    "inarchive": "boot9strap_ntr.firm",
                    "path": "/ntrboot/boot9strap_ntr.firm"
                },
                {
                    "url": "https://github.com/SciresM/boot9strap",
                    "inrelease": "boot9strap.*-ntr.zip",
                    "inarchive": "boot9strap_ntr.firm",
                    "path": "/ntrboot/boot9strap_ntr.firm"
                }
            ]
        },
        {
            "name": "Other options",
            "url": "https://github.com/blah/blahblah",
            "inrelease": "helloworld.cia",
            "path": "/cias/helloworld.cia"
        }

The reason I ask, is to both make it simpler to update some (So you're not re-downloading the same archive to get multiple files from it, or updating both the .3dsx or .cia with a single click) OR to provide an all-in-one click option for getting all the necessary homebrew when setting up a newly hacked 3ds.

More flexible Github support

I was looking into the idea of adding an entry in my config.json file to update MultiUpdater itself.

At present, I've got it working correctly with this entry:

        {
            "name": "MultiUpdater (3DSX)",
            "url": "https://github.com/LiquidFenrir/MultiUpdater",
            "inrelease": "MultiUpdater-v*.*.*.zip",
            "inarchive": "3ds/MultiUpdater/MultiUpdater.3dsx",
            "path": "/3ds/MultiUpdater/MultiUpdater.3dsx"
        },

However, in looking through the MultiUpdater releases on Github, not every release has had a revision number. Right now the above code works, since the latest release is MultiUpdater-v3.2.1.zip, but if a 3.3 release comes out, the above "inrelease" line will fail for MultiUpdater-v3.3.zip since the third wildcard doesn't exist - it would be looking for something like MultiUpdater-v3.3.0.zip. Of course, with MultiUpdater specifically, you can just always use the same format for your releases, but that doesn't really address the root of the issue since other Github devs might not play by the rules.

Could the wildcard character * be extended to match one or more characters rather than just matching one character?

Thanks!

notabug support

multiupdater keeps on trying to make it a github api link but fails

httpcGetDownloadSizeState isn't safe to use

This call will return a size of 0 even if there's data, in the case of Transfer-Encoding: chunked, or other CGI type responses... Look at the patch I submitted to lpp-3ds for a similar issue and how it avoid it by looping over httpcDownloadData() until finished instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.