rfc: MSIX auto-updater#21
Conversation
9f823ff to
344c351
Compare
RFC says that the updater will support both, msix support in the autoUpdater API will enable only when running in a windows package environment I.e. dev chooses, ship a squirrel exe, an msix, or both for fun |
|
The intention here is to first propose it as an alternative updater solution without explicitly discussing the future of Squirrel.Windows in Electron since it's a bit out of scope. IMO without a clear path for apps to migrate from Squirrel.Windows -> MSIX, I think there's no path to actually removing it from Electron. |
|
This is an excellent proposal, and I think it covers a lot of what one would need for authoring a net new app using MSIX as a delivery mechanism. I think the decisions are reasonable and easy enough to build on. I don't have enough context to address the Squirrel comments as my experience with MSIX has been shoehorning it into a bespoke system that is made of some For our purposes we'd be adapting an existing build/deploy/upgrade stack so it would be useful to know how modular the proposed delivery would be: where would the code for the That is, if there's the option to have an open source lib with the It exceeds the scope of this document but it does stand to reason that the other big lift for meeting our needs at Notion are being able to build an appropriate In all, this addresses a good first chunk of what we need to get MSIX off the ground. We'll need a good documentation story and references on the other pieces (namely 1. Application Manifest XML files, 2. Knowing what is and is not reasonable to expect from an MSIX installation versus a traditional installer that can spray files and registry keys wherever it wants and 3. How to get up and running digitally signing the packages). It stands to emphasize that an MSIX deployment is a huge lift: it's probably not an appropriate deployment mechanism for a hobbyist project unless it's very simple, it's more for larger enterprise installation cases. |
| * | ||
| * Throws if the current application has no packaged identity. | ||
| */ | ||
| getPackagedAppInfo(): WindowsPackagedAppInfo; |
There was a problem hiding this comment.
Would this be exposed in the windowsPackagedApp API? Would that be something apps could import if they wanted lower-level access to these APIs?
There was a problem hiding this comment.
Yes we should expose that API. For many purposes, developers will need to know at runtime of an app whether its MSIX packaged. For example, if you want to check whether Notifications are enabled for your app, you need to call the Window API for that differently. If you are not an MSIX packager app, you have to pass in the AUMID. If you are a MSIX packaged App then you shouldn't pass the AUMID, otherwise the API call fails. So there will be always slight differences in MSIX packaged apps.
| * 'FullName' ID. | ||
| * e.g. 91750D7E.Slack_4.38.65535.0_arm64__8she8kybcnzg4 | ||
| */ | ||
| id: string; |
There was a problem hiding this comment.
Are these values queried using Windows APIs? Might be worth linking to the APIs that will be used to gather this info.
There was a problem hiding this comment.
Yes! This is the API that gives the info https://learn.microsoft.com/en-us/uwp/api/windows.applicationmodel.package.current?view=winrt-26100
344c351 to
3c40233
Compare

MSIX is an app package format developed by Microsoft for Windows. It is designed to replace previous generations of installer formats such as AppX, MSI, and ClickOnce.
This RFC proposes adding first-class support for MSIX packages in Electron by supporting its native auto-update API with Electron's
autoUpdatermodule.This change would reroute
autoUpdaterrequests for MSIX-packaged apps away from Electron's existing Squirrel.Windows implementation and into a new code path that calls the MSIX update APIs.