- 1 year ago
Building Electron with Electron Builder without downloading packages from github
By default, Electron Builder downloads required packages from GitHub during the build process. However, if you want to build Electron Builder without downloading packages from GitHub, you can use the --prepackaged
option to specify a pre-built version of Electron to use instead.
Here are the basic steps to build Electron Builder without downloading packages from GitHub:
Download a pre-built version of Electron that matches your app's architecture and version requirements. You can download pre-built versions of Electron from the official Electron website or from a third-party provider.
Extract the contents of the Electron archive to a directory on your machine.
Run the Electron Builder command with the
--prepackaged
option to specify the path to the pre-built Electron directory. For example:
csselectron-builder --prepackaged path/to/electron/
In the above command, replace "path/to/electron/" with the path to the directory where you extracted the pre-built Electron files.
When you run the Electron Builder command with the --prepackaged
option, Electron Builder will use the specified pre-built version of Electron instead of downloading packages from GitHub. This can be useful if you want to build Electron Builder in a restricted environment where downloading packages from GitHub is not allowed or if you want to speed up the build process by using a pre-built version of Electron.