Squirrel / Squirrel.Windows

An installation and update framework for Windows desktop apps
MIT License
7.23k stars 1.02k forks source link

Can not launch the app via stub exe #1863

Open q837477816 opened 11 months ago

q837477816 commented 11 months ago

Squirrel version(s) 2.0.1

Description We have an Electron app and are migrating from electron-updater to squirrel.windows. During the upgrade process, we encountered an issue where the app becomes unable to launch from the desktop shortcut if it exits during the upgrade process. After investigating the upgrade mechanism of squirrel, we found that Stubexe calculates and concatenates a path pointing to the latest MyApp.exe.

However, it was observed that when the app interrupts and exits during the apply releases process, the app-latestVersion directory might be created, but some files inside it could be missing. Consequently, this causes Stubexe to fail to launch MyApp.

I have submitted a PR to fix the problem. My thought is to create a temp-app-xxxx directory during the apply releases process and install the new version there. After the installation is completed, rename the temp-app-xxxx directory to the final app-xxxx directory.

Steps to recreate

  1. Launch a squirrel.windows-based electron app
  2. After the app download the updates, quit the app when it is applying for releases
  3. Click the shortcut on the Desktop to launch the app

Expected behavior The app should be able to launch.

Actual behavior The app has no response.

Additional information None