node.js - electon 打包发布问题
PHP中文网
PHP中文网 2017-04-17 13:43:26
0
2
673

我想问一下,electon_packager 应用发布以后
后续我的客户端代码修改了,重新发了个包,用户需要用这个新的包,electron 有没有提供一些好的机制让用户去自动更新呢?

比如系统提醒什么的?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
黄舟

I read the official documentation of electron again and found that it actually provides such a thing
But it needs to be packaged into an installation package, and electron-release-server is also needed as the server
autoUpdater: http: //electron.atom.io/docs/v0.37.5/api...

The following is invalid

electron itself does not seem to provide a similar mechanism

You can check the version yourself and then pop up a reminder. You should be able to use Notification directly on win8 and above. The following uses the Tray provided by electron
. Download updates after that can only be done by the user themselves.

However, after electron is started, it does not seem to occupy js or asar files
Maybe you can directly download and overwrite the js and asar files in your own directory?

小葫芦

If you don’t encrypt your JS code, I think it’s very simple. It should be possible to directly download and overwrite the js in your own directory. When I was playing, I used electron to package a program, and then just modified the following JS and HTML files without having to package it again and again.

However, in the end, I think electron is just a toy, you can just play with it, and it has little value from all aspects. The program is large in size and runs slowly. If you really want to use webkit, the best way is to manually embed webkit into your program.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template