-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Auto Updater + Per Platform Installer RFC #2878
Comments
cc @manyoso |
Thanks for the RFC. I've added this to our project page and marked it as high priority. Some questions:
|
If the installer supports it. MacOS, it will to be sure, for Windows, I know installers generally complain about downgrades, but I'm fairly sure with some registry tweaks that's viable.
Yes, the new updater would be a standalone exe (it needs to to actually update Gpt4All in the first place), so users can invoke that to restart the upgrade process.
Yes, all of the above on Windows. I'm less familiar with MacOS, but I'm pretty sure you can mount, extract, and install a DMG from the command line, so also yes. |
Okay, please proceed. |
Status and timeline for feature implementation, testing, and deployment: Current Status (10/9): Headless version for offline implemented, being tested by @johnwparent Timeline:
Once final sprint is complete, general deployment + larger scale testing. cc @manyoso |
This PR establishes the initial infrastructure required to migrate gpt4all away from reliance on the IFW framwork by implementing a custom updater. This custom updater (currently headless only) can perform the same operations as the existing updater with the option for more functionality to be added and most importantly, is installer agnostic, meaning gpt4all can start to leverage platform specific installers. Implements both offline and online installation and update mechanisms. Initial implementation of: #2878
This PR establishes the initial infrastructure required to migrate gpt4all away from reliance on the IFW framwork by implementing a custom updater. This custom updater (currently headless only) can perform the same operations as the existing updater with the option for more functionality to be added and most importantly, is installer agnostic, meaning gpt4all can start to leverage platform specific installers. Implements both offline and online installation and update mechanisms. Initial implementation of: #2878
This PR establishes the initial infrastructure required to migrate gpt4all away from reliance on the IFW framwork by implementing a custom updater. This custom updater (currently headless only) can perform the same operations as the existing updater with the option for more functionality to be added and most importantly, is installer agnostic, meaning gpt4all can start to leverage platform specific installers. Implements both offline and online installation and update mechanisms. Initial implementation of: #2878 Signed-off-by: John Parent <john.parent@kitware.com>
Auto Updater + Per Platform Installer RFC
Authors:
@johnwparent
1 Summary
Gpt4All auto updater responsible for detecting when an upgrade to Gpt4All (or any subcomponent if and when there are any) on a given system is available, and in the event that an upgrade is desired, for facilitating the process of that upgrade on the local system.
Gpt4All per platform installers provide binary installers for Gpt4All from a platform specific installer framework, taking advantage of the aforementioned auto updater to facilitate upgrades.
To facilitate the above, an bespoke installer manifest scheme and update flow provides the mechanisms required for an auto updater to drive the custom installers to drive their own upgrades using platform specific behavior.
2 Motivation
Currently Gpt4All uses the Qt IFW installers + associated CPack generator to construct binary installers for distribution. Alternatively, Gpt4All could be taking advantage of CPack’s other generators to create more customized, platform specific installers. Platform specific installers would allow for more customization with respect to their given platform’s consideration (such as the Windows registry or DragNDrop on MacOS) and the features of the specific installer frameworks. Further still per platform installers would allow for more optimization and better user experiences as each installer is specialized for its given context. Signing too, becomes a simpler process when using non IFW installers.
At the moment, usage of the IFW installers is fixed due to a reliance on the Qt maintenance tool to facilitate the update/repair process as well as the upgrade process on the advent of a new Gpt4All release. The maintenance tool is generated as a part of, and shipped inside of the IFW installers Gpt4All currently generates and relies on. It’s primarily responsible for detecting updates per installation component, and allowing the optional re-install or upgrade of these components, chief of which is Gpt4All itself. In order to function properly, detect updates, and update/install/repair components, the maintenance tool is reliant on a hosted repository of a highly specific structure, which requires the use of another Qt tool to generate, adding further complexity to the build and release process. In order to move away from the IFW installers, Gpt4All needs to move away from the utilization of the maintenance tool, as other installers are incompatible with the repository layout the maintenance tool requires, and in general, are not compatible with being upgraded by any tool other than themselves. Gpt4All then, needs an in house auto-updater to replace the Qt maintenance tool, and once that reliance is severed, it can progress to implementing custom installers, providing the benefits mentioned above.
3 Proposed Implementation
3.1.
First it is required to replace the maintenance tool so our installers can receive updates. This requires creating our own auto updater. The autoupdater has three primary responsibilities:
In order to do all of the above, it requires an understanding of the current version of Gpt4All, as well as an understanding of other versions available, and important metadata about those versions. To do this, we need a new hosted repository layout, more generic than the maintenancetool repositories, with compatibility for each of the platform installers.
At the root of this repository resides a manifest, denoting available versions, providing information about those versions, and other metadata detailed below.
Metadata scheme
This would replace the existing release.json file gpt4all currently uses to provide context about upgrades + availability
At the root of the repository, a single manifest file named gpt4all.xml will be present. This will be a symlink to the most recent version’s manifest file. Otherwise the repository consists of a manifest file per release and the structure required by a given installer (installer dependent)
The auto updater fetches this root, symlinked manifest file via web request, and parses the information within.
At this point the behavior is much the same as what exists in gpt4all at present, a version is returned, and if more recent than the current version, Gpt4all prompts the user to upgrade.
In the event of an upgrade operation, because we use our own updater, and powerful, platform specific installers, the best actors to actually perform the upgrade are the installers themselves, which are capable of doing so. To that end, they are not capable of detecting upgrades or finding new versions of themselves, instead they can update themselves when they’re already on the system. To that end the auto updater reads the manifest file, which per the scheme provides the url to download the latest installer from. The auto updater then downloads that installer, kills the gpt4all process, initiates the installer with the platform appropriate arguments and any arguments denoted in the manifest.
3.2 installers
The installers themselves are a vital part of the upgrade, platform specific implementations are as follows:
Windows: InnoSetup
MacOs: DragNDrop (DMG’s)
Linux: rpm, deb, archives
(linux is driven entirely by maintenance tool and system package managers)
Actual implementations are effected via Cpack's packaging generators and whatever customization is determined to be required.
The text was updated successfully, but these errors were encountered: