-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Possible to build Windows installer without autoupdate? #279
Comments
Please see electron/windows-installer#42 Other questions — accepted, will be investigated. |
@havenchyk No, it not possible anymore. |
Ah, I see the commit. It's not possible. @develar basically, we can just skip including of |
@bsharper I have seen the behaviour before. The double run will go away as soon as you implement the handing of squirrel events. You don't need to do anything special just quit the app where you should. |
@demetris-manikas Thank you for the information. If I understand this correctly, I need to check for the squirrel arguments early on (before |
@develar That information was what I was looking for, thanks! |
@demetris-manikas That worked perfectly. I think squirrel was waiting 15 seconds then killing my program since it was expecting it to quit. Stopping it early on in the code made it start much faster. One of my test machines is an old laptop, and it was taking 30 seconds to get to where I could actually do anything. Now it's starting much more quickly. Thanks again. |
@develar Replacing the GIF with a transparent GIF did the trick, and @demetris-manikas link fixed my other issue. If it were possible to disable the loading animation and forced quit via the electron-builder options, the new installer would be at parity with NSIS for apps that don't need to auto-update, at least in my opinion. |
@bsharper I think, both solutions — NSIS (requires explicit installation) and Squirrel (autoupdate and other mentioned here issues) are not suitable for you. I think, SFX (self-extraction archive) is the best solution for you. Demo — https://www.dropbox.com/s/05w7w1trxiygiij/TestApp-win32-x64.exe?dl=1 (it is a 7z SFX). |
@develar Thanks for the suggestion. I'm hesitant to use a self-extracting archive because Electron will leave files behind under either C:\Users\User\AppData\ProgramName or ~/Application Support/Library/ProgramName. I know this will unlikely cause any issues for the user, but I like having a clean uninstall when possible. Also hiding the support files (like content_resources_200_percent.pak) looks cleaner. I was able to get Squirrel working more or less the way I wanted. I can close this issue if there no objections. After adding the check for the Squirrel command line switches (quitting early when appropriate) and creating a new "installing GIF", I'm happy with how it works now. I wasn't getting a desktop shortcut, so I created a simple NPM package to create a Desktop shortcut on Windows which runs after the initial install. I do really like the fact that Squirrel installs to the user's path instead of Program Files which requires admin. My program doesn't require admin rights to run, so this makes for a better experience. Just a thought, it might be useful to have a flag (handleSquirrelArguments maybe?) to let devs indicate if they are checking for the Squirrel args or not. If handleSquirrelArguments is true, builder could point to a different entry point that does quick check to see if one of the updater arguments is present, and quit if so. Otherwise it would run the normal main.js script. |
Hmm... Why solution https://github.com/develar/onshape-desktop-shell/blob/master/src/WinSquirrelStartupEventHandler.ts#L24 doesn't work for you? |
We should fix incomplete windows-installer docs and add link to https://github.com/mongodb-js/electron-squirrel-startup I don't want to add such option, because it is out of scope. https://github.com/mongodb-js/electron-squirrel-startup#usage is very simple to do. |
Wow, I don't know how I missed that. I cloned that repo and looked through the autoupdate file, even grepped "icon" just not "shortcut".
Understood. Thanks again for taking the time to look at the issues I was having. |
electron-builder is immensely useful, however a recent update has introduced a few issues I wanted to ask about.
I'm using Electron to rebuild a custom network diagnostic utility for work. This utility is not used regularly by any single client. In most circumstances it will be used for several hours then removed. Additionally, it is likely that one of our support staff will be installing and running it over an RDP session while the client watches.
Due to the nature of the utility I'm making, having the autoupdate feature isn't necessary. The previous version of electron-builder I used allowed the generation of NSIS executables, which was perfect, but that feature has since been removed. The new default installer shows an animated image that appears to be from Atom, closes the main program and reopens it before finally allowing continued operation. I could not see a way to disable the animation or prevent the main program from exiting once before running. I'm not setting an update URL that it would be checking, so I'm not even sure where/how it's checking for an update.
I have little doubt that a future Electron project I work on will benefit from having autoupdate built in, but for this one it seems to be getting in the way.
Questions:
Thank you!
The text was updated successfully, but these errors were encountered: