Open IonCO opened 10 months ago
The new API in 3.0.0 exposes some components that can help with your use case. In particular:
ManifestProcessor
: it exposes FetchIndexAsync
, FetchBuildManifestAsync
, FetchPatchManifestAsync
and GetLocalBuildManifest
methods. They all return an object representing the specific index or manifest.UpdateProcessor
: it exposes the UpdateAsync
method, which deals with updating the application by applying the given UpdatePlan
. The UpdatePlan
is generated by passing in a From
version and a To
version. The To
version can be anything, you are not forced to pass in the latest version and you can even pass older versions (supporting the rollback case).Also, this new behavior will be exposed externally and triggered by the user's code by passing in the target version. This means that no decisions are taken internally by the PATCH core anymore.
Do you think this is enough to cover your use case?
@emanzione the new UpdateProcessor
& 'UpdatePlan' sounds just right for my use case, thanks. Can't wait for version 3.0.0.
A bit off-topic but, would this change be brought onto Avalonia and/or WPF?
My plan is to replace WPF with Avalonia, in this way I can maintain a single UI for each platform.
Since PATCH version 3.0 is close & there's a rewrite of the downloader-patcher logic, would it be possible to have a "version selection" feature before download/updating the game? Perhaps also by getting the available versions from the remote/server's build & patch indexes?
Using the given methods in PATCH version 2.6.7, I was able to get said indexes. But trying to change the download logic; from simply getting the newest one, to be able to choose versions; is quite difficult for me.