Skip to content
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

Add electron updater #3528

Closed
pierremtb opened this issue Aug 19, 2024 · 6 comments
Closed

Add electron updater #3528

pierremtb opened this issue Aug 19, 2024 · 6 comments
Assignees
Labels
desktop-app Issues from the desktop app.

Comments

@pierremtb
Copy link
Collaborator

No description provided.

@pierremtb pierremtb self-assigned this Aug 19, 2024
@pierremtb
Copy link
Collaborator Author

pierremtb added a commit that referenced this issue Aug 19, 2024
Will eventually fix #3528
@pierremtb
Copy link
Collaborator Author

Good bits on the underlying apis at https://www.codejam.info/2024/05/how-to-use-electron-auto-updater.html

@jessfraz jessfraz added the desktop-app Issues from the desktop app. label Aug 20, 2024
@pierremtb
Copy link
Collaborator Author

https://github.com/KittyCAD/modeling-app/actions/runs/10468905251/job/28991462449 got all required artifacts out to the GCS bucket (under test/electron). Now on to testing the auto updater

@pierremtb
Copy link
Collaborator Author

pierremtb commented Aug 27, 2024

@jessfraz Back to this issue for a general write up of the current state of affairs:

  1. To make the tauri updater work with our electron bundles, we need to make them available as .msi.tar.gz and .app.tar.gz archives on the bucket (easy, just unzip and tar), and more importantly manually generate a signature for them using the key pair we had set up for that for tauri. The tauri rust code is at https://github.com/tauri-apps/tauri/blob/fd68b7fdea3890d9f0a373a252a3682bd9d04138/tooling/cli/src/bundle.rs#L284, would seem reasonable to write and run a dumbed down version of that to manually generate that signature (not too concerning but haven't started on that yet).
  2. The default update-electron-app tool used for electron and forge only supports .exe from Squirrel I believe as per https://github.com/electron/update-electron-app?tab=readme-ov-file#what-kinds-of-assets-do-i-need-to-build. Which is a big blow. I do not see a path to get MSI to work here with this, at least in the short term.
    • One workaround I can think of: I've seen a lot of recommendations online for electron-builder instead of forge for packaging. Turns out their support for auto-updates is different than the default electron one, in a way that's more in line with what tauri was doing, and works with DMG for macOS, AppImage/DEB/RPM for Linux, and NSIS for Windows. While this wouldn't solve the problem directly as we're currently configured for MSI on tauri, we could try to migrate Windows users to NSIS first, just like in this tauri ticket, and then make the jump to Electron using the strategy in 1 but with .nsis.tar.gz and the corresponding signature. NSIS in tauri also seems to support file associations.
    • Another completely different approach for us could be to rely on app stores only, forge supports AppX for the Microsoft Store, and we figured out Mac App Store in the past so it shouldn't be a huge deal to get the electron app in. This would remove any need for auto-updates, the migration strategy would be just a deprecation notice and a link to download the app from the store. I think the biggest limitation here would be entreprise customers with limited or completely blocked access to the Microsoft Store. So maybe more like a last resort or big pivot option.

I will start looking at electron-builder more to see if it could be an option.

@lf94
Copy link
Contributor

lf94 commented Aug 27, 2024

@pierremtb Jess added "MakerWix" which produces msi files. It could help.

@pierremtb
Copy link
Collaborator Author

@lf94 Yes but auto-updates don't work with these unfortunately. Only Squirrel

@lf94 lf94 closed this as completed in e49beb6 Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop-app Issues from the desktop app.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants