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

fix(windows): autoInstallOnAppQuit #1682

Merged
merged 2 commits into from
Oct 12, 2020
Merged

Conversation

lidel
Copy link
Member

@lidel lidel commented Oct 8, 2020

lidel/electron-updater-altschmerz#1 demonstrated that autoInstallOnAppQuit works fine on Windows, but we had a bunch of code responsible for doing it manually, probably due to macOS not being supported natively by autoInstallOnAppQuit.

Docs for electron-updater 4.3.5 state:

Screenshot_2020-10-09 Auto Update - electron-builder

Due to this, the fix from #1679 was not applied correctly: macOS-specific handling executed first and broke updates on Windows.

This PR ensures that macOS keeps using the old upgrade paths, but Windows and AppImage leverage upstream code for applying upgrades.

Closes #1570 and most likely closes #1630 too.

autoInstallOnAppQuit works fine on windows, but we had a bunch of code
responsible for doing it manually due to macOS not being supported
natively by autoInstallOnAppQuit.

Due to this fix from
#1679 was not applied
correctly, and macOS-specific handling broke updates on windows.

This change ensures that macOS keeps using the old upgrade paths, but
Windows and AppImage leverage upstream code for applying upgrades.

License: MIT
Signed-off-by: Marcin Rataj <[email protected]>
@lidel lidel force-pushed the fix/windows-update-install-on-quit branch from b90d68b to 0544aff Compare October 8, 2020 22:56
@lidel
Copy link
Member Author

lidel commented Oct 8, 2020

Sadly this last mile is specific to our codebase and won't fix old versions.

To properly test this we need to tag v0.13.1 and v0.13.2 and do quick smoke test by installing v0.13.1 and testing if it upgrades fine to v0.13.2.

  • Autoupdate on Windows does not require signing, so I'll try to do the above test in the fork at lidel/ipfs-desktop first.

@lidel
Copy link
Member Author

lidel commented Oct 8, 2020

Ok, tested this on Windows with my fork and both per user and per all users upgraded correctly on Windows.
There should be no change to behaviour on macOS.

@lidel lidel requested a review from rafaelramalho19 October 8, 2020 23:48
@lidel lidel marked this pull request as ready for review October 8, 2020 23:48
@lidel lidel requested a review from hacdias October 9, 2020 00:01
@lidel lidel added this to the v0.13.1 milestone Oct 9, 2020
Comment on lines -114 to -116
e.preventDefault()
await stopIpfs()
app.quit()
Copy link
Member Author

@lidel lidel Oct 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what was the purpose of e.preventDefault(), but it seemed to interfere with autoInstallOnAppQuit on Windows

src/auto-updater/index.js Outdated Show resolved Hide resolved
Copy link
Member

@hacdias hacdias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

License: MIT
Signed-off-by: Marcin Rataj <[email protected]>
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.

IPFS Desktop stuck at "IPFS is Starting" on Windows 10 Auto-update broken on Windows
2 participants