-
Notifications
You must be signed in to change notification settings - Fork 16.9k
feat: msix auto-updater #49230
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
base: main
Are you sure you want to change the base?
feat: msix auto-updater #49230
Conversation
|
|
||
| Returns `string` - The current update feed URL. | ||
|
|
||
| ### `autoUpdater.getPackageInfo()` _Windows_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this belongs elsewhere as a public API. I would be fine with it under app, but I'm curious what others think.
If we want to decide this later in favor of getting this out sooner, we could make it private by prefixing it as _getPackageInfo while not publicly documenting it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I wasn't sure either. My reasoning was that it gets info about the package, not the app. It's also not a hard requirement for this PR but might be useful for devs.
| @@ -1,5 +1,9 @@ | |||
| if (process.platform === 'win32') { | |||
| module.exports = require('./auto-updater/auto-updater-win'); | |||
| if (process.windowsStore) { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be useful to clarify this until we have a better named property
| if (process.windowsStore) { | |
| // windowsStore indicates whether the app is running as a packaged app, even outside of the store | |
| if (process.windowsStore) { |
| // Helper function for debug logging | ||
| void DebugLog(std::string_view log_msg) { | ||
| if (electron::debug_msix_updater) | ||
| LOG(INFO) << std::string(log_msg); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could see this info being useful enough that I could be in favor of including it without the flag. As in, only requiring ELECTRON_ENABLE_LOGGING.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm not sure about this either. I followed the model we have in the windows notification code.
|
|
||
| // Get path to MSIX fixture package | ||
| export function getMsixFixturePath (version: 'v1' | 'v2'): string { | ||
| const filename = `HelloMSIX_${version}.msix`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does HelloMSIX come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added two lightweight MSIX packages in the test fixtures
Description of Change
This PR implements MSIX auto-updating according to electron/rfcs#21 . The new upater module supports auto-updating via:
https://mycompany.example.com/myapp/package.msixAdditonally, MSIX supports downgrading by setting
allowAnyVersion. False by default.Checklist
npm testpassesRelease Notes
Notes: Added support for MSIX auto-updating