
This PR adds the notes on how to use Surf to build and upload a custom version of Electron
1.9 KiB
Do I need to do this? Almost certainly not!
Creating a custom fork of Electron is almost certainly not something you will need to do in order to build your app, even for "Production Level" applications. Using a tool such as electron-packager
or electron-builder
will allow you to "Rebrand" Electron without having to do these steps.
You need to fork Electron when you have custom C++ code that you have patched directly into Electron, that either cannot be upstreamed, or has been rejected from the official version. As maintainers of Electron, we very much would like to make your scenario work, so please try as hard as you can to get your changes into the official version of Electron, it will be much much easier on you, and we want to help you out!
If you're still convinced, press on to...
How to create a full custom release for Electron with surf-build
- Install Surf, via npm:
npm install -g surf-build@latest
- Set the following Environment Variables:
ATOM_SHELL_GITHUB_TOKEN
- a token that can create releases on GitHubATOM_SHELL_S3_ACCESS_KEY
,ATOM_SHELL_S3_BUCKET
,ATOM_SHELL_S3_SECRET_KEY
- the place where you'll upload node.js headers as well as symbolsELECTRON_RELEASE
- Set totrue
and the upload part will run, leave unset andsurf-build
will just do CI-type checks, appropriate to run for every PR.CI
- Set totrue
or else we'll failGITHUB_TOKEN
- set it to the same asATOM_SHELL_GITHUB_TOKEN
SURF_TEMP
- set toC:\Temp
on Windows or else you'll have MAX_PATH hatin'TARGET_ARCH
- set toia32
orx64
-
In
script/upload.py
, you must setATOM_SHELL_REPO
to your fork, especially if you are a contributor to Electron proper -
surf-build -r https://github.com/MYORG/electron -s YOUR_COMMIT -n 'surf-PLATFORM-ARCH'
-
Wait a very, very long time.