Electron-builder: Can I disable differential download?

Created on 17 Feb 2020  路  8Comments  路  Source: electron-userland/electron-builder

  • electron-builder: 21.2.0

  • electron-updater: 4.2.0

  • Target: NSIS

I want to disable differential download on NSIS using electron-updater, so it always fallback to full download. Is there a way to do it?

backlog

Most helpful comment

I'm also interested in disabling this default behavior. I think this should be relatively simple to add as a property. @develar wdyt?

autoUpdater.differentialDownload = false

By setting this to false, electron-updater should automatically fallback to a full download and not try to download blockmaps or throw exceptions.

All 8 comments

I recently wanted to do the same. Checked the implementation and it seems there isn't currently a way to disable differential downloads. In my case I am still using the Nuts server for downloads and it doesn't support either blockmap files or HTTP ranges.

Your best bet would be to fork electron-updater.

@akorchev Thanks for the suggestion. I would leave the fork solution as a last resource, don't want to deal with the maintenance and extra tests for it.

I'm currently considering deleting the blockmap after the publish and add a handler to the exception thrown. Any thoughts on that or warns are more than welcome.

I'm also interested in disabling this default behavior. I think this should be relatively simple to add as a property. @develar wdyt?

autoUpdater.differentialDownload = false

By setting this to false, electron-updater should automatically fallback to a full download and not try to download blockmaps or throw exceptions.

If you look at the electron-builder configuration documentation you can find this option differentialPackage. If you set that to false, a blockmap file will no longer be generated. However, electron-updater will still try to download the blockmap and if it fails, it falls back to a full download.

so this option

autoUpdater.differentialDownload = false

is still needed to prevent unnecessary download attempts.

differentialPackage works only on NSIS WEB targets per the documentation.

If I don't add differentialPackage to NSIS target, I still get .blockmap files generated.

@gschattenhofer

differentialPackage works only on NSIS WEB targets per the documentation.

I think this is not correct.

Per the documentation

differentialPackage Boolean - Defaults to true for web installer (nsis-web)

It just defaults to true for web installer. It doesn't mean that it only works on it. In my experience if you set it false, it will full download the package.

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Was this page helpful?
0 / 5 - 0 ratings