Comments (9)
I'd like this! The Wii U version actually has this through meta.xml
in some apps, which HBL expects. This information is used to check for "local" packages and detect updates against the version number in the meta.xml.
So there is a precedent there, in isPreviouslyInstalled()
:
https://github.com/vgmoose/libget/blob/master/src/Package.cpp#L331-L370
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 /switch
, the tricky part is lining up NRO version numbers with the ones in our repo. (to know whether or not to display an update or not). It is doable, but will take a little bit of care.
from hb-appstore.
To clarify, in the section of code I highlighted, if we think a match is found, the isPreviouslyInstalled()
method should return LOCAL
or UPDATE
, depending on whether or not the version string matches.
from hb-appstore.
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
from hb-appstore.
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?
from hb-appstore.
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)
from hb-appstore.
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?
from hb-appstore.
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
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).
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
On the client: Hashing and caching the result, invalidating based on timestamp, and comparing hash/metadata/install state to determine if an update is needed.
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.
from hb-appstore.
Currently, the "Local" state is only used for legacy Wii U apps that have XML metadata, and for hb-appstore itself (If it's running from an NRO, but hasn't technically been "installed" as a package). Introducing the new "Unsynced" state would change the meaning of "Local" slightly, but I think that's good.
Flow charts of how it works today vs how it should work in the future:
Current Logic (No detection)
This is how the four states are used today:
Future Logic (Detection)
The potential future way that the five states would used (slight change in "Local" meaning, and introduction of "Unsynced"):
from hb-appstore.
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.
from hb-appstore.
Related Issues (20)
- Apps not showing after adding exef and kip patches? HOT 1
- doesnt show up in the hb launcher HOT 2
- Crashes after quitting after updating the app HOT 1
- Can't download anything after a little bit of time HOT 2
- [Wii U] Crash Trying Opening HOT 2
- Downloads won't start (Wii U hb app store) HOT 2
- Infinite scrolling on app info screen HOT 4
- Configurable Settings (Theme, Colors, Sound, and Display)
- Better Wii Remote controller support HOT 2
- parsec HOT 1
- Garbled non-ASCII characters HOT 1
- Change HB AppStore music (Wii U) HOT 3
- freezing issue when SD card is full on wii u HOT 8
- [Feature Request] Add a reinstall button HOT 1
- Homebrew apps arent showing on the wii u channel HOT 2
- [Switch] Hangs on Exit (not Home button, the in-app exit button) HOT 2
- Update primary repo URLs for CDN / Download speed improvements HOT 1
- crashes when opened on wii u homebrew 2.1 by Dimak HOT 3
- Pretendo Support HOT 2
- Adjust Sort by Most Recent Doesn't work properly HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hb-appstore.