megahertz / electron-simple-updater Goto Github PK
View Code? Open in Web Editor NEWSimple way to enable update for the electron application
License: MIT License
Simple way to enable update for the electron application
License: MIT License
I have tried to use simple-updater with https://github.com/SimulatedGREG/electron-vue this boilerplate but the package.json is not loaded so the version and updater url is always empty.
In the index.js i tried this:
`import { app, BrowserWindow } from 'electron'
const updater = require('electron-simple-updater');
updater.init({
checkUpdateOnStart: false,
autoDownload: false
});
console.log(updater);`
but version is empty, why is the version and the update url not loaded from the package.json?
I don't know why these errors?
/Applications/daying.app/Contents/Resources/electron.asar/renderer/api/remote.js:267:16
at metaToPlainObject (/Applications/daying.app/Contents/Resources/electron.asar/renderer/api/remote.js:271:5)
at metaToValue (/Applications/daying.app/Contents/Resources/electron.asar/renderer/api/remote.js:213:14)
at metaToValue (/Applications/daying.app/Contents/Resources/electron.asar/renderer/api/remote.js:203:22)
at EventEmitter.<anonymous> (/Applications/daying.app/Contents/Resources/electron.asar/renderer/api/remote.js:282:31)
at emitThree (events.js:116:13)
at EventEmitter.emit (events.js:194:7)
How can I use private repository for update purpose?
Hi, I am using your updater and I have problem when I import it, it can't ready properto 'on' on undefined on line 35 of index.js.
I was able to fix it by including autoupdater like this:
const electron = require('electron');
const app = electron.remote.app;
const autoUpdater = electron.remote.autoUpdater;
But I would like to know if this is my issue or issue of library. Am I doing something wrong? I have my electron 1.4.7 in devDependecies of project and I don't have it installed globally.
Hi so i finally managed with your help and some figuring out got the updates and publishing to work the way i need.
here is my config
setText('version', updater.version);
setText('build', updater.buildId);updater.checkForUpdates();
updater.on('update-available', onUpdateAvailable);
updater.on('update-not-available', onUpdateNotAvailable)
updater.on('update-downloading', onUpdateDownloading);
updater.on('update-downloaded', onUpdateDownloaded);
updater.setOptions('logger', {
info(text) { log('info', text); },
warn(text) { log('warn', text); }
});
function onUpdateNotAvailable(){
console.log("SHOULD ALLOW USER TO LOGIN/OFFLINE OR ONLINE");
}
function onUpdateAvailable(meta) {
setText('new-version', meta.version);
setText('description', meta.readme);
console.log("SHOULD STOP USER FROM LOGIN AND UPDATE");
updater.downloadUpdate();
}
function onUpdateDownloading() {
console.log("SHOULD SHOW USER DOWNLOADING");
}
function onUpdateDownloaded() {
console.log("SHOULD INSTALL AND CHECK AGAIN");
updater.quitAndInstall();
}
//logger
function log(level, text) {
console.log([${level}] ${text}
);
}
//text
function setText(id, text) {
console.log([${id}] ${text}
);
}
once the app starts here is the log from the console.
version 0.0.4
index.js:45 build win32-x64-prod-v0.0.4
index.js:41 [info] Found version 0.0.5 at https://github.com/Custardcs/FilmplicityReleases/releases/download/win32-x64-prod-v0.0.5
index.js:45 new-version 0.0.5
index.js:45 description undefined
index.js:30 SHOULD STOP USER FROM LOGIN AND UPDATE
index.js:34 SHOULD SHOW USER DOWNLOADING
index.js:41 [info] Downloading updates from https://github.com/Custardcs/FilmplicityReleases/releases/download/win32-x64-prod-v0.0.5
index.js:41 [info] Found version 0.0.5 at https://github.com/Custardcs/FilmplicityReleases/releases/download/win32-x64-prod-v0.0.5
index.js:45 new-version 0.0.5
index.js:45 description undefined
index.js:30 SHOULD STOP USER FROM LOGIN AND UPDATE
index.js:34 SHOULD SHOW USER DOWNLOADING
index.js:41 [info] Downloading updates from https://github.com/Custardcs/FilmplicityReleases/releases/download/win32-x64-prod-v0.0.5
index.js:34 SHOULD SHOW USER DOWNLOADING
index.js:41 [info] Downloading updates from https://github.com/Custardcs/FilmplicityReleases/releases/download/win32-x64-prod-v0.0.5
index.js:34 SHOULD SHOW USER DOWNLOADING
index.js:41 [info] Downloading updates from https://github.com/Custardcs/FilmplicityReleases/releases/download/win32-x64-prod-v0.0.5
3index.js:41 [warn] Error: Command failed: 4294967295
System.AggregateException: One or more errors occurred. ---> System.Exception: Couldn't acquire lock, is another instance running
at Squirrel.SingleGlobalInstance..ctor(String key, TimeSpan timeOut)
at Squirrel.UpdateManager.b__32_0()
at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.UpdateManager.<CheckForUpdate>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Squirrel.Update.Program.<Update>d__5.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at Squirrel.Update.Program.executeCommandLine(String[] args) at Squirrel.Update.Program.main(String[] args) at Squirrel.Update.Program.Main(String[] args) ---> (Inner Exception #0) System.Exception: Couldn't acquire lock, is another instance running at Squirrel.SingleGlobalInstance..ctor(String key, TimeSpan timeOut) at Squirrel.UpdateManager.<acquireUpdateLock>b__32_0() at System.Threading.Tasks.Task
1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.UpdateManager.d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Update.Program.d__5.MoveNext()<---
i got a few questions why does it hit into the
SHOULD SHOW USER DOWNLOADING
so many times?
Check AppImageUpdate, it uses zsync-curl for binary delta updates. Which means that going from nightly to nightly, you only download the few MB that have actually changed. Haven't checked how well it performs on Electron apps specifically, but I'd assume serious time and bandwidth savings.
Currently, our team is using electron-simple-updater perfectly to update the production release. But the problem occurs when we wants to have a new development channel which hosts release on Enterprise GitHub.
Does anyone know if this project supports Enterprise GitHub?
Thanks in advance.
Hi,
Can you help me about squirrel.windows? I can't find how install it on my electron project.
Thanks in advance.
The example uses the old updates.json format:
{
"win32-x64-prod": {
"updateUrl": "https://github.com/megahertz/electron-simple-updater/releases/download/example-win32-x64-prod-v0.0.2",
"installerUrl": "https://github.com/megahertz/electron-simple-updater/releases/download/example-win32-x64-prod-v0.0.2/Simple.Updater.Example.Setup.0.0.2.exe",
"version": "0.0.2",
"platform": "win32",
"readme": "Second version"
}
}
This should be updated to reflect the new format:
{
"win32-x64-prod": {
"update": "https://github.com/megahertz/electron-simple-updater/releases/download/example-win32-x64-prod-v0.0.2",
"version": "0.0.2",
"platform": "win32",
"readme": "Second version"
}
}
Alternatively, it would be good if there was better error-checking when parsing the json. If updateUrl
exists (instead of update
), it doesn't work and doesn't throw any clear errors as to why.
Just integrated this into my project. It all seems to be working (just confirming the updates download and install now). 🎉🎉🎉
Well done, significantly less grief than a Nuts server and Electrons standard AutoUpdate module.
Hi, first of all, congrats for your great work.
I started a project when I need to use an offline solution on a local network. So I cannot update the apps on my web server.
When I tried to connect to my network share folder it produces the following error:
[warn] Error: connect ECONNREFUSED 127.0.0.1:80
I use the following code:
updater.init('\\\\10.0.1.1\\c\\update');
The path is correct and with fs I can browse the files.
Sample code:
const testFolder = '\\\\10.0.1.1\\c\\update';
const fs = require('fs');
fs.readdir(
...
console.log(file);
...
Can you help me?
Thank you
The update link for Darwin is specified as follows:
"darwin-x64-prod": {
"update": "https://github.com/megahertz/electron-simple-updater/releases/download/example-darwin-x64-prod-v0.0.2/release.json",
"version": "0.0.2",
"platform": "darwin",
"readme": "Second version"
}
Is it possible to change the:
update: XXXX/XXXX/XXXX/release.json
to XXXX/XXXX/XXXX/MyApp-0.0.11-mac.zip
?
The electron-builder does not seem to produce a release.json for me so it has to be created manually. In any-case, release.json it does not seem to provide any useful meta except for the url.
Hi,
Thank you for taking the time to build this module. However, I'm struggling to get this module working on my Mac machine, for my mac build, that I created with Electron packager and Electron Installer, but I keep getting this message:
There is no metadata for update. Run checkForUpdates first. Update for darwin-x64-prod-v2.0.0 is not available Update for darwin-x64-prod-v2.0.0 is not available
Below is the link to see my updates.json, and the zip file, as well as the dmg installer for Mac:
Update Repo with all the updates.json, packages, etc.
In my main.js, I have this code:
const updater = require('electron-simple-updater'); updater.init("https://github.com/tjoye20/vthreat-updates/releases/download/v2.0.0/updates.json") updater.checkForUpdates(); updater.downloadUpdate();
Can you help me determine why it's not finding the metadata and downloading the update. The currently packaged version of the app is version 1.0.0, and the updates.json now is version 2.0.0
Your help would be greatly appreciated.
-Tj
I have a self signed certificate for HTTPS and when I try to get the new version I get this error
{ Error: self signed certificate
at TLSSocket.<anonymous> (_tls_wrap.js:1085:38)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:185:7)
at TLSSocket._finishInit (_tls_wrap.js:603:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:433:38) code: 'DEPTH_ZERO_SELF_SIGNED_CERT' }
I tried with event-certificate-error but app didn't catch the signal.
What should the windows update file be? zip or portable exe? Or setup.exe?
"win32-x64-prod": {
"readme": "Second release",
"update": "https://github.com/megahertz/electron-simple-updater/releases/download/win32-x64-prod-v0.0.2",
"install": "https://github.com/megahertz/electron-simple-updater/releases/download/win32-x64-prod-v0.0.2/Simple.Updater.Example.Setup.0.0.2.exe",
"version": "0.0.2"
}
The example just points to a directory.
On Windows, the updater is erroring out and keeping the app from even being opened.
Below is the log of the error:
error.txt
Here's my setup in the app:
const updater = require('electron-simple-updater');
function onUpdateDownloaded() {
updater.quitAndInstall();
}
updater.init()
updater.on('update-downloaded', onUpdateDownloaded);
Can you help me determine what the problem is?
Getting http status : 404
http://192.168.1.8/updates/win32-x64-prod-v1.0.6/releases?id=myapp&localversion=1.0.4&arch=amd64
updater.json
"updater": {
"url": "http://192.168.1.8/updates/updates.json"
},
publisher.json
{
"transport": {
"remoteUrl": "http://192.168.1.8/updates",
"module": "local",
"localDir": "dist",
"outPath": "updates",
"updatesJsonPath": "http://192.168.1.8/updates/updates.json"
}
}
please suggest
Hello, i just signed my app successfully, i created 2 apps, one with an alert, and one update
without that alert, but when i open first app my log say this.
and downloading never ends...
is there any fix for this?
Electron V 1.6.6
Electron-simple-updater V 1.2.1
UPDATE
well i figured out that my app was not signed correctly, but now, when downloading starts, then ends, i receive same error.. :(
Here access call checks with W_OK that the file is writable:
https://github.com/megahertz/electron-simple-updater/blob/master/lib/linux.js#L47
However, since fs.rename
call is used to replace the file (write to directory entry, not to the file), it doesn't actually care that the file is writable by the current user — only directory permissions matter here. Even if the file is not writable, but the directory is writable, the file can be replaced.
Two ways to fix it:
updates are working on windows but when i run the same code on mac it stuck on downloading updates from(url)
its not throwing any issues or errors
electron-builder default target for windows now NSIS and electron-auto-updater was implemented — https://github.com/electron-userland/electron-builder/tree/master/nsis-auto-updater (https://github.com/electron-userland/electron-builder/wiki/Auto-Update)
As far I see in your project you did great job:
These task are planed to be implemented in the electron-builder. But I don't want to reinvent the wheel :)
Maybe you can help me to merge your excellent module into electron-auto-updater
? Or maybe better just support electron-simple-updater
in the electron-builder?
Well, finally, I will "steal" all your ideas and will implement it in the electron-auto-updater
, but maybe some cooperation will be better :)
What do you think?
Привет из Германии ;)
I have ember electron app compiled with electron-forge.
I run with your example.. and console is showing "electron-simple-updater is not initialized", what is going on?
Andd when I run checkforupdates.. it shows "update is disabled" without any error..
Also, I put disabled to false, and neither is not working
updater.init({
checkUpdateOnStart: false,
autoDownload: false,
disabled: false,
});
In package.json
"updater": {
"url": "https://raw.githubusercontent.com/megahertz/electron-simple-updater/master/example/updates.json"
},
Thanks!!
Hi!
Once update is downloaded (autoDownload), I ask to the user if he want to update now, or remind later, if you click remind later, and you restart app, when is initializing, is downloading again the update..
Can I have the update downloaded yet and ask to update now directly when app is initializing?
Thanks!
I find it if I don't choose quitAndInstall
,and the update installer will be downloaded again?
updater.init({
// autoDownload: false,
logger: console,
url: 'https://boat.alibaba.com/ide/update.json'
})
updater.on('error', (err)=>{
console.log('error')
console.log(err)
console.log(err.message)
console.log(err.stack)
})
updater.on('update-downloading', (meta)=>{
console.log('[update-downloading]', meta)
})
updater.on('update-downloaded', (meta) => {
console.log('[update-downloaded]', meta);
let restart = window.confirm('there has been a update version, whether to update immediately ?')
if(restart){
updater.quitAndInstall()
}
})
btw, if I choose update, the update result is right.
and I want know where is the download path ?
I'm using this package to a great effect in my music player.
One of the users reported an issue where he's unable to update the program automatically if he uses AppImage: nukeop/nuclear#36
Any ideas what could cause this message?
Cheers
on line 35 index.js i have this error
Hey there!
Does updater support zipped dmg's for bandwidth saving and overall downloading speedup?
Zipped version of the app usually takes around 30% of the binary size.
Oh, i see. Its hidden here: https://github.com/megahertz/electron-simple-updater/releases/download/darwin-x64-prod-v0.0.2/release.json Quick question then: which version has downloading priority in such case: zipped or binary?
On Mac the update is starting and the downloading callback is triggered, but then nothing happens, the file is not downloaded and "update-downloaded" never called. It is here required to sign the app for mac that this works?
On Windows the update works.
The desktop file is lacking a Categories=
entry in the *.desktop
file.
According to the menu spec,
By including one of the Main Categories in an application's desktop entry file, the application will be ensured that it will show up in a section of the application menu dedicated to this category. If multiple Main Categories are included in a single desktop entry file, the entry may appear more than once in the menu.
Hence, please add at least one of the following in the Categories=
key.
Main Category | Description | Notes |
---|---|---|
AudioVideo | Application for presenting, creating, or processing multimedia (audio/video) | |
Audio | An audio application | Desktop entry must include AudioVideo as well |
Video | A video application | Desktop entry must include AudioVideo as well |
Development | An application for development | |
Education | Educational software | |
Game | A game | |
Graphics | Application for viewing, creating, or processing graphics | |
Network | Network application such as a web browser | |
Office | An office type application | |
Science | Scientific software | |
Settings | Settings applications | Entries may appear in a separate menu or as part of a "Control Center" |
System | System application, "System Tools" such as say a log viewer or network monitor | |
Utility | Small utility application, "Accessories" |
In addition, you could specify one or more from the longer list of Additional Categories.
Please test the result with desktop-file-validate
and make sure it passes.
electron-builder offers native support for this since v19.22.1.
Reference: AppImage/appimage.github.io#2
Is there no built-in way to check for updates at regular intervals? I sort of expected init()
to do that by default. Does a setInterval need to be set?
Hi!
I think that beta channel should can to update to a release,
exists any way for achieve this? or to do in my app?
much thanks!
log:
[warn] Error: Update check failed. The server sent an invalid JSON response. Try again later.
https://lionsec.b0.upaiyun.com/desktop/updates.json
{
"darwin-x64-prod": {
"readme": "Second Release",
"update": "https://lionsec.b0.upaiyun.com/desktop/darwin-x64-prod-v1.0.0/release.json",
"version": "1.0.0"
}
}
What should I do?
Thanks a lot for any help!
hi im having a small issue
when i build the app using > "distall": "build --arch=all",
it builds both 32 and 64...
but if i go > npm run publish it only uploads the 64bit how do i upload the 32?
I've discovered that if you:
a) Install an app
b) publish an app update while the app is still running
c) check for updates (without restarting app)
...then the updates will never install. It seems that if it receives a 404 the first time, it will never check again to see if subsequent update checks are valid.
Consider scenaro. I have updates.json as
{
"linux-x64-prod": {
"readme": "Second release",
"update": "...",
"install": "...",
"version": "1.0.0"
}
}
and then I host or publish this on a server. When my app runs it says
{"level":"info","message":"Update for linux-x64-prod-v1.0.0 is not available","timestamp":"2017-01-31T15:03:57.501Z"}
that is perfectly valid. But now i make some changes and now I change the verrion to 2.0 as
{
"linux-x64-prod": {
"readme": "Second release",
"update": "...",
"install": "...",
"version": "2.0.0"
}
}
and now I publish this updates.json.
and push latest build. When I start my app. It says
{"level":"info","message":"Found version 2.0.0 at .....}
that is valid and then we get message
{"level":"info","message":"New version 2.0.0 has been downloaded","timestamp":"2017-01-31T15:13:05.173Z"}
but now I close my app and start the app. It shows new changes, but in logs we see
{"level":"info","message":"Found version 2.0.0 at ...}
It happens every time when I start app. I am expecting that it should not download version2.0 again as its already there.
I am thinking of storing the version returned from response in a file and check , either to download it or not.
Hi, I wonder if electron-simple-updater is able to auto update an application running on Linux with ARM architecture (raspberry pi 3). Thank you in advance.
I am getting an error while clicking the install button as"can not find squirrel" and the next log message i.e. downloading the update from the url is displayed but the update doesn't gets downloaded.
Uncaught Exception:
Error: Cannot find module 'electron-simple-updater' at Module._resolveFilename (module.js:470:15)
This is thrown after I run the app. Any ideas why this is happening?
Update used to work fine with earlier appimages generated by earlier versions of electron-builder (<= 19.33.0).
But electron-simple-updater is not able to find desktop shortcut data ([Desktop Entry]) in the appimages generated by newer version of electron-builder (failed with electron-builder version 19.34.2)
I extracted the content of newer appimages and the desktop file does exist with "[Desktop Entry]". Maybe some change is needed in electron-simple-updater to be compatible with newer appimages.
hello this package is not replacing files on windows...
any fix?
Hey guys I am trying to get this to work with my electron app that's on bitbucket.
Concerning the two lines of code that is placed in at the entry point of the app, I'm assuming i should be using my own updates.json file, instead of the one they're providing correct?
In my updates.json file, it says it should be pointing to a zipped .app file. Can this be uploaded to the bitbucket project, and taken from there when updating, or do I need to have that file on a server? I guess the confusion comes from the word "hosting" in step 3, not sure if that means a server or my bitbucket project, or something else
Let me know what you guys think.
Thanks!
Michael
Hey,
I didn't get any call back response after updater Init, error, update avail etc
Please Give me Suggestion I'm Using Angular 4 and for update Squirrel.Windows
Platform is Windows Machine Only
`const updater = require('electron-simple-updater');
updater.init({
checkUpdateOnStart: true,
autoDownload: false,
url:"urlHere"
});
updater.checkForUpdates();
updater.on('checking-for-update',checkUpdate);
updater.on('update-available', UpdateAvailable);
updater.on('update-not-available', onUpdateNotAvailable)
updater.on('error', updateError);
function updateError() {
console.log('error');
}
function onUpdateNotAvailable() {
console.log('No update');
}
function UpdateAvailable() {
console.log('update Avail');
}
function checkUpdate() {
console.log('checkUpdate');
}`
I use this in main.js
Recipe: gitlab::database_migrations
bash[migrate gitlab-rails database] action run
run
on resource 'bash[migrate gitlab-rails database]'Expected process to exit with [0], but received '137'
---- Begin output of "bash" "/tmp/chef-script20170225-15635-2afg6l" ----
STDOUT:
STDERR:
---- End output of "bash" "/tmp/chef-script20170225-15635-2afg6l" ----
Ran "bash" "/tmp/chef-script20170225-15635-2afg6l" returned 137
51: bash "migrate gitlab-rails database" do
52: code <<-EOH
53: set -e
54: log_file="#{node['gitlab']['gitlab-rails']['log_directory']}/gitlab-rails-db-migrate-$(date +%Y-%m-%d-%H-%M-%S).log"
55: umask 077
56: /opt/gitlab/bin/gitlab-rake gitlab:db:configure 2>& 1 | tee ${log_file}
57: STATUS=${PIPESTATUS[0]}
58: echo $STATUS > #{db_migrate_status_file}
59: exit $STATUS
60: EOH
61: environment env_variables unless env_variables.empty?
62: notifies :run, 'execute[enable pg_trgm extension]', :before unless omnibus_helper.not_listening?("postgresql") || !node['gitlab']['postgresql']['enable']
63: notifies :run, "execute[clear the gitlab-rails cache]", :immediately unless omnibus_helper.not_listening?("redis") || !node['gitlab']['gitlab-rails']['rake_cache_clear']
64: dependent_services.each do |svc|
65: notifies :restart, svc, :immediately
66: end
67: not_if "(test -f #{db_migrate_status_file}) && (cat #{db_migrate_status_file} | grep -Fx 0)"
68: only_if { node['gitlab']['gitlab-rails']['auto_migrate'] }
69: end
bash("migrate gitlab-rails database") do
action [:run]
updated true
retries 0
retry_delay 2
default_guard_interpreter :default
command "migrate gitlab-rails database"
backup 5
returns 0
code " set -e\n log_file="/var/log/gitlab/gitlab-rails/gitlab-rails-db-migrate-$(date +%Y-%m-%d-%H-%M-%S).log"\n umask 077\n /opt/gitlab/bin/gitlab-rake gitlab:db:configure 2>& 1 | tee ${log_file}\n STATUS=${PIPESTATUS[0]}\n echo $STATUS > /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-873248b1f0d3a7a5535771a3a1635803-77254ab\n exit $STATUS\n"
interpreter "bash"
declared_type :bash
cookbook_name "gitlab"
recipe_name "database_migrations"
not_if "(test -f /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-873248b1f0d3a7a5535771a3a1635803-77254ab) && (cat /var/opt/gitlab/gitlab-rails/upgrade-status/db-migrate-873248b1f0d3a7a5535771a3a1635803-77254ab | grep -Fx 0)"
only_if { #code block }
end
x86_64-linux
hi I see the default electron uses this can we access this method through yours?
autoUpdater.on('download-progress', (progressObj) => {
// })
Hello,
Is there any way we can get event which lets us know what % of # of bytes is downloaded? If not, i think it would be worthy addition to this library.
Thanks
Could you outline the differences between this and autoUpdater?
What are the benefits to each?
This would be very useful in the readme.md
Thanks 👍
I publish an app with version 1.0.4 in package.json, when I use electron-simple-updater, I make the updates.json like:
{
"win32-x64-prod": {
"readme": "日常更新",
"update": "https://xxxx/worker-management/1520414279",
"install": "https://xxxx/worker-management/1520414279/%E4%BC%8A%E4%BA%91%E4%BB%93TEM%20Setup%201.0.5.exe",
"version": "1.0.5"
}
}
I run this script to pack:
"pack:win": "electron-builder --win --ia32"
my update url is
"updater": { "url": "http://xxxx/worker-management/raw/master/updates.json?private_token=xxxx" }
in main.js
updater.init({
checkUpdateOnStart: false,
autoDownload: false
})
in render.js:
import { remote } from 'electron'
export default function update() {
const updater = remote.require('electron-simple-updater')
updater.on('update-available', meta => {
console.log('[updater] update avaiable', meta.version)
updater.downloadUpdate()
})
updater.on('update-not-available', () => {
console.log('there is no available update')
})
updater.on('update-downloading', () => {})
updater.on('update-downloaded', () => {
if (window.confirm('Restart and install updates?')) {
updater.quitAndInstall()
}
})
updater.on('error', err => {
console.warn(err)
})
updater.checkForUpdates()
}
I always got 'there is no available update'.
What is wrong with my case?
Can you confirm whether or this package will work with a private GitHub repo? If so, could you provide any additional detail on the setup steps required?
I've been able to get auto-update working correctly on a public facing account but when I switch it over to a private repo it errors out.
The only reference to private accounts I can find is:
"private": true,
in the root package.json example (not sure if this related or not)It would be great if there were an ability to have a progress meter for app downloads / installs. Any chance that events could push regular changes in percentage complete?
thank you so much for your solution, i'm asking if we can use gitLab instead of gitHub
I can see that this url contains file size of 39 mb.
https://github.com/megahertz/electron-simple-updater/releases/download/darwin-x64-prod-v0.0.2/Simple.Updater.Example-0.0.2-mac.zip
Is there any way to update only html/css/js files which are actually used by the app?
Thanks for awesome library.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.