Electron-builder: Auto update generic server configuration

Created on 8 Dec 2016  路  4Comments  路  Source: electron-userland/electron-builder

  • Version: 10.6.0

  • Target: dmg, zip, nsis, AppImage. I'm building on Mac and Windows.

I find it difficult to setup auto update using a generic provider.

First of all, it seems that app-update.yml and latest.yml are only created on a Windows build.

I think that app-update.yml is not used with a generic provider because I have always to set the feed url using autoUpdater.setFeedURL.

Given that the base URL of my https server is

https://www.example.com/updateDir

which corresponds to the directory

[...]/updateDir/

should I set the feed URL to the following one?

https://www.example.com/updateDir/${platform}/${arch}/${version}

Given that I remapped the possible platforms and architectures to "mac", "win", "32" and "64", should I put the following files in the following directories?

[...]/updateDir/mac/64/App-0.4.0-mac.zip
[...]/updateDir/mac/64/App-0.4.0.dmg
[...]/updateDir/win/32/App Setup 0.4.0.exe
[...]/updateDir/win/32/latest.yml
[...]/updateDir/win/64/App Setup 0.4.0.exe
[...]/updateDir/win/64/latest.yml

I don't get how the latest part of the URL, ${version} should work using a generic provider. I mean, when an old app, let's say 0.2.0, will request an update on a Windows 32 machine, the URL will be:
https://www.example.com/updateDir/win/32/0.2.0

How could it work?

backlog help wanted readme improvement

Most helpful comment

@evshiron @develar I've already visited those links and it's difficult to understand how auto update should work and which are its limits. A sentence like "Currently, generic (any HTTPS web server), github and bintray are supported." is quite misleading :-)
Considering that I need a in-house server and I can't use any backend such as GitHub or Bintray, the only way is to use this release server https://github.com/ArekSredzki/electron-release-server ?

All 4 comments

electron-builder's Auto Updater is located in /nsis-auto-updater/ (published as electron-auto-updater), and it's used only on Windows builds. On non-Windows builds, Electron's Squirrel Auto Updater is used, which doesn't have generic provider support.

This should help:

@evshiron @develar I've already visited those links and it's difficult to understand how auto update should work and which are its limits. A sentence like "Currently, generic (any HTTPS web server), github and bintray are supported." is quite misleading :-)
Considering that I need a in-house server and I can't use any backend such as GitHub or Bintray, the only way is to use this release server https://github.com/ArekSredzki/electron-release-server ?

the only way is to use this release server

Due to macOS requirement, yes. Will be fixed (several months :)). Or you can try to use https://github.com/megahertz/electron-simple-updater (will be merged into electron-builder).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philcockfield picture philcockfield  路  3Comments

AidanNichol picture AidanNichol  路  3Comments

noahprince22 picture noahprince22  路  3Comments

JohnWeisz picture JohnWeisz  路  3Comments

xingoxu picture xingoxu  路  3Comments