Comments (4)
It actually does that already :)
There are 3 kinds of things to update: the app itself, its dependencies and plugins.
Plugins are silently updated if possible. Meaning, while your app is running, if a new version of a plugin becomes available then it will silently download it side-by-side your currently running version and on next launch it will just load that update instead. There is an 'udpateAvailable' event that fires so you can notify users through the UI.
If you develop the majority of your code in plugins then most of your updates will be silent.
The only time a non-silent update happens is if a "dependency" of the app itself is missing or if the app itself has an update. If your installer has no dependencies by default (except electron-updater
of course) then it will force it into update mode on first launch which will get the latest version even for older downloads of the installer.
from electron-updater.
if the app itself has an update
Why can't this be silent? That's really what I'm looking for.
from electron-updater.
Ah, well even as I'm writing this I'm having thoughts on how I could make it work.
But the primary challenge is that a) you can't update electron.exe
itself while its running. Similarly if you overwrite dependencies under node_modules
then depending on what is already loaded or not you can end up with non-deterministic results for the currently running application. And since npm/node doesn't support side-by-side versions of modules you would need to side-by-side the entire application.
Typically (in windows at least) you have a top level link to the main .exe of the program you're trying to run so it's tricky to have side-by-side versions. Thus, when the app or dependencies need updates, what it does right now is to copy electron into a temp folder then run it from there and update the original app.
But there are things we can do to either solve it completely or at least make it faster such as:
a) download all the tarballs ahead of time then notify the user of an update. So the update process, while still not idea, would be much faster.
b) figure out a way to side-by-side the entire app. Which would probably result in a simple .exe that goes at the root that knows how to launch electron as a child process in a sub-folder.
myapp.exe
myapp.config
/v0.0.1/myapp.exe
/v0.0.2/mapp.exe
Where the root myapp.exe looks at myapp.config which has the current version to use and then fires up the more specific version as a child process. I think that could be doable. :)
from electron-updater.
Might also be worth to look into how Atom does it. Maybe any missing APIs that's needed to achieve this could be implemented in Electron.
from electron-updater.
Related Issues (20)
- Pass old and new versions into the `updateAvailable` HOT 1
- Add documentation for semver syntax and how it affects updater HOT 1
- Allow for the interval to be passed in. HOT 1
- Allow custom template for "updating" message HOT 1
- Add blurb to doc about "Must Have Error Callback" HOT 1
- First run after installation or repair, should clean up the appdata dir
- The updater should never be caught in an update loop HOT 2
- Updater test tool
- Add note for required npm to build and pack electron-updater HOT 3
- Support for different npm package name HOT 3
- [Question] Does this support updates for Linux? HOT 1
- Stuck in the updating page HOT 3
- How to solve the "permission denied" problem? HOT 4
- Does electron-updater work for portable app? HOT 10
- Should check if app is online before checking/updating. HOT 2
- Force updater HOT 2
- electron 1.X+ crash HOT 6
- I am getting below error after app update HOT 1
- emitError is not a function
- Electron Windows App uninstaller permission HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-updater.