-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scan for Existing HB Apps #49
Comments
I'd like this! The Wii U version actually has this through So there is a precedent there, in There's also a check for the hb app store itself, whether or not it's already installed. Unfortunately though for Switch, package structure isn't always this consistent. I think the closest we could do without having Hint files support (#20), is matching on the NRO binary path, and then peeking inside the NRO metadata to compare the version number against the one in the repo. Given that some packages are just an NRO in |
To clarify, in the section of code I highlighted, if we think a match is found, the |
I’m more inclined to vote for a hashing based solution after seeing how devs treat the version field. A random sampling of the hint files should be good enough, only concern is it being a potentially slow operation. Perhaps file size is also a good indicator, as it can be measured without opening the hint file In my eyes this issue is the next remaining client feature that’s really needed to provide a good experience for the user. It’s super annoying to not see “installed” apps as installed |
Can't we just search for filenames (not full path) in manifest.json and then, if found, reinstall the newest version? Maybe ask the user for permission before doing this? |
Checking to see if all files that are in the manifest are expected is an interesting way to detect if a package is "complete" or is missing some files for an update. libget isn't fully able to handle this (right now we don't the manifest data without installing an app), however we have started generating some repo summaries which would contain this information If the newer version of a package has the same files/manifest content as what's on SD, however, wouldn't this still be unable to tell if it's out of date / needs updating? I suppose knowing it's installed is better than nothing and could be prompted to be updated. Ideally this would still be coupled with filesize or a quick hash, to prevent needlessly updating already-up-to-date app. (Although, in theory this update should be ok, if they both really are up-to-date) |
My premise is, that the step of detecting installed software is only needed once for the most homebrew users. I primarily used sdsetup to setup atmosphere and then update all the packages and atmosphere when eventually a new switch firmware update was safe to install. So my take on this would be to detect all installed .nro-files and then check them against an api call to the appstore submitting the filename/filesize/hash, which would respond with the corresponding manifest and install data which could be placed (or further checks and moving of files done) in the right directory. By this we could easily get a file hash to check if the version installed matches the newest version. If we can't safely determine the version number it would be strongly encouraged to update the nro to the latest version (even though it could be the newest version). What do you think? |
Been having a few conversations with @ITotalJustice and I'm feeling confident that we can get an initial version of currently-installed detection in the next release
I agree, the only concern is that hashing might be kind of expensive. Although, we can get around this by caching the hash result and only re-hashing if the file timestamp changes. And then on the repo end, tracking the "latest" hash and nro/wuhb version. So on the repo end, this involves adding: hash and metadata version Also on the client it should use a newer state, to track locally-installed-apps that we think need an update. Chart of states would be like: So, if the package is not installed, but the binary is present, and we think it belongs to an existing package, it will receive "Local" or "Unsynced" depending on if it (probably) needs an update or not. |
We are preparing to release 2.4 soon™ and a new method of previously-installed detection won't make it in unfortunately. I do really want to support this use-case, but it needs to work well first. |
Is your feature request related to a problem? Please describe.
When launching HB Appstore it does not scan the directory or sdcard to see if there's any pre-existing homebrew apps, like if you download a HB bundle such as Kosmos etc.
Describe the solution you'd like
A clear and concise description of what you want to happen. --- when you launch HB Appstore it should scan the director for any pre-existing homebrew applications
Platform:
Is this for the Switch, Wii U, or both versions? Both I guess...
The text was updated successfully, but these errors were encountered: