Skip to content

Conversation

@bitdisaster
Copy link
Contributor

@bitdisaster bitdisaster commented Dec 18, 2025

Description of Change

This PR implements MSIX auto-updating according to electron/rfcs#21 . The new upater module supports auto-updating via:

{
  "url": "https://mycompany.example.com/myapp/package.msix",
  "name": "My Release Name",
  "notes": "Theses are some release notes innit",
  "pub_date": "2013-09-18T12:29:53+01:00"
}
{
  "currentRelease": "2.0.0",
  "releases": [
    {
      "version": "1.0.0",
      "updateTo": {
        "version": "1.0.0",
        "pub_date": "2013-09-18T12:29:53+01:00",
        "notes": "Theses are some release notes innit",
        "name": "1.2.1",
        "url": "https://mycompany.example.com/myapp/package_1.msix""
      }
    },
    {
      "version": 2.0.0",
      "updateTo": {
        "version": "2.0.0",
        "pub_date": "2014-09-18T12:29:53+01:00",
        "notes": "Theses are some more release notes innit",
        "name": "1.2.3",
        "url": "https://mycompany.example.com/myapp/package_2.msix"
      }
    }
  ]
}
  • direct MSIX url link
    https://mycompany.example.com/myapp/package.msix

Additonally, MSIX supports downgrading by setting allowAnyVersion. False by default.

 autoUpdater.setFeedURL({ url: 'https://mycompany.example.com/myapp/package.msix', allowAnyVersion: true }

Checklist

Release Notes

Notes: Added support for MSIX auto-updating

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Dec 18, 2025
@bitdisaster bitdisaster marked this pull request as draft December 18, 2025 01:46
@bitdisaster bitdisaster marked this pull request as ready for review December 18, 2025 21:35
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Dec 25, 2025

Returns `string` - The current update feed URL.

### `autoUpdater.getPackageInfo()` _Windows_
Copy link
Member

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.

Copy link
Contributor Author

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) {
Copy link
Member

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

Suggested change
if (process.windowsStore) {
// windowsStore indicates whether the app is running as a packaged app, even outside of the store
if (process.windowsStore) {

Comment on lines +57 to +61
// Helper function for debug logging
void DebugLog(std::string_view log_msg) {
if (electron::debug_msix_updater)
LOG(INFO) << std::string(log_msg);
}
Copy link
Member

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.

Copy link
Contributor Author

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`;
Copy link
Member

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?

Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants