electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.68k stars 1.74k forks source link

Option to use system-installed electrion instead of per-package electron #1041

Closed nlowe closed 7 years ago

nlowe commented 7 years ago

I'm trying to package stanfieldr/ghetto-skype for Arch Linux. With v1.5.0, the project is now using electron-builder. I cannot seem to find a way to use the system installed copy of electron. The build system currently pulls an entire copy of electron, bloating the package to ~240mb. Arch has an electron package in the official community repos, which lets us share the large runtime amongst packages that we install, decreasing the overall size of each application significantly in most cases.

Is there existing functionality that I've missed, or does this not exist yet?

develar commented 7 years ago

Do you mean from a user perspective (why app is so large) or from a developer perspective (why I need to use npm package electron if system provides)?

nlowe commented 7 years ago

From a developer perspective more or less. I believe the final package is large because you're essentially bundling a chrome(ium) runtime, correct?

develar commented 7 years ago

bundling a chrome(ium) runtime, correct?

Yes. And in case of Linux we don't change executable. Executable is just renamed.

I don't think that it is good idea to reuse system provided executable. Well you can — use some shell script to act as a proxy (find system installed electron and run app using it). But.... brrr....

Probably you can just use AppImage?