From 0b27db2ef4d47329c6f3d581313de44c2fd9b91b Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Mon, 23 May 2016 17:39:47 -0700 Subject: [PATCH 01/10] Create guide for how to create your own from-source Electron fork This PR adds the notes on how to use Surf to build and upload a custom version of Electron --- docs/development/custom-fork-guide.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/development/custom-fork-guide.md diff --git a/docs/development/custom-fork-guide.md b/docs/development/custom-fork-guide.md new file mode 100644 index 0000000000..fd772f2c93 --- /dev/null +++ b/docs/development/custom-fork-guide.md @@ -0,0 +1,27 @@ +## 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 + +1. Install [Surf](https://github.com/surf-build/surf), via npm: `npm install -g surf-build@latest` +1. Set the following Environment Variables: + + * `ATOM_SHELL_GITHUB_TOKEN` - a token that can create releases on GitHub + * `ATOM_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 symbols + * `ELECTRON_RELEASE` - Set to `true` and the upload part will run, leave unset and `surf-build` will just do CI-type checks, appropriate to run for every PR. + * `CI` - Set to `true` or else we'll fail + * `GITHUB_TOKEN` - set it to the same as `ATOM_SHELL_GITHUB_TOKEN` + * `SURF_TEMP` - set to `C:\Temp` on Windows or else you'll have MAX_PATH hatin' + * `TARGET_ARCH` - set to `ia32` or `x64` + +1. In `script/upload.py`, you _must_ set `ATOM_SHELL_REPO` to your fork, especially if you are a contributor to Electron proper + +1. `surf-build -r https://github.com/MYORG/electron -s YOUR_COMMIT -n 'surf-PLATFORM-ARCH'` + +1. Wait a very, very long time. + From 153a7f19aed4fac2507d82eb9e816692e622b8f9 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Mon, 23 May 2016 19:22:59 -0700 Subject: [PATCH 02/10] Add notes on S3 directory structure --- docs/development/custom-fork-guide.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/development/custom-fork-guide.md b/docs/development/custom-fork-guide.md index fd772f2c93..f6e725bfb9 100644 --- a/docs/development/custom-fork-guide.md +++ b/docs/development/custom-fork-guide.md @@ -9,6 +9,15 @@ If you're still convinced, press on to... ## How to create a full custom release for Electron with surf-build 1. Install [Surf](https://github.com/surf-build/surf), via npm: `npm install -g surf-build@latest` + +1. Create a new S3 bucket and create the following empty directory structure: + +``` +- atom-shell + - symbols + - dist +``` + 1. Set the following Environment Variables: * `ATOM_SHELL_GITHUB_TOKEN` - a token that can create releases on GitHub From 4734cbaf1cc4ada09501b13e7881c47afa1835c2 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 27 May 2016 14:00:04 -0700 Subject: [PATCH 03/10] Move custom fork content to app distribution doc --- docs/development/custom-fork-guide.md | 36 ----------------- docs/tutorial/application-distribution.md | 47 +++++++++++++++++++++++ 2 files changed, 47 insertions(+), 36 deletions(-) delete mode 100644 docs/development/custom-fork-guide.md diff --git a/docs/development/custom-fork-guide.md b/docs/development/custom-fork-guide.md deleted file mode 100644 index f6e725bfb9..0000000000 --- a/docs/development/custom-fork-guide.md +++ /dev/null @@ -1,36 +0,0 @@ -## 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 - -1. Install [Surf](https://github.com/surf-build/surf), via npm: `npm install -g surf-build@latest` - -1. Create a new S3 bucket and create the following empty directory structure: - -``` -- atom-shell - - symbols - - dist -``` - -1. Set the following Environment Variables: - - * `ATOM_SHELL_GITHUB_TOKEN` - a token that can create releases on GitHub - * `ATOM_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 symbols - * `ELECTRON_RELEASE` - Set to `true` and the upload part will run, leave unset and `surf-build` will just do CI-type checks, appropriate to run for every PR. - * `CI` - Set to `true` or else we'll fail - * `GITHUB_TOKEN` - set it to the same as `ATOM_SHELL_GITHUB_TOKEN` - * `SURF_TEMP` - set to `C:\Temp` on Windows or else you'll have MAX_PATH hatin' - * `TARGET_ARCH` - set to `ia32` or `x64` - -1. In `script/upload.py`, you _must_ set `ATOM_SHELL_REPO` to your fork, especially if you are a contributor to Electron proper - -1. `surf-build -r https://github.com/MYORG/electron -s YOUR_COMMIT -n 'surf-PLATFORM-ARCH'` - -1. Wait a very, very long time. - diff --git a/docs/tutorial/application-distribution.md b/docs/tutorial/application-distribution.md index a5d0f3797c..056530da12 100644 --- a/docs/tutorial/application-distribution.md +++ b/docs/tutorial/application-distribution.md @@ -125,3 +125,50 @@ packaging tools to do the work for you: * [electron-packager](https://github.com/maxogden/electron-packager) * [electron-builder](https://github.com/loopline-systems/electron-builder) + +### Creating a Custom Electron Fork + +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! + +#### Creating a Full Custom Electron Release with surf-build + +1. Install [Surf](https://github.com/surf-build/surf), via npm: + `npm install -g surf-build@latest` + +1. Create a new S3 bucket and create the following empty directory structure: + +``` +- atom-shell + - symbols + - dist +``` + +1. Set the following Environment Variables: + + * `ATOM_SHELL_GITHUB_TOKEN` - a token that can create releases on GitHub + * `ATOM_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 symbols + * `ELECTRON_RELEASE` - Set to `true` and the upload part will run, leave unset + and `surf-build` will just do CI-type checks, appropriate to run for every + pull request. + * `CI` - Set to `true` or else we'll fail + * `GITHUB_TOKEN` - set it to the same as `ATOM_SHELL_GITHUB_TOKEN` + * `SURF_TEMP` - set to `C:\Temp` on Windows to prevent path too long issues + * `TARGET_ARCH` - set to `ia32` or `x64` + +1. In `script/upload.py`, you _must_ set `ATOM_SHELL_REPO` to your fork, + especially if you are a contributor to Electron proper. + +1. `surf-build -r https://github.com/MYORG/electron -s YOUR_COMMIT -n 'surf-PLATFORM-ARCH'` + +1. Wait a very, very long time. From 556b39c6f24d929ba0952e69a87a4720a1f223bb Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 27 May 2016 14:00:26 -0700 Subject: [PATCH 04/10] ATOM_SHELL -> ELECTRON in env vars --- docs/tutorial/application-distribution.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/tutorial/application-distribution.md b/docs/tutorial/application-distribution.md index 056530da12..a05447b87c 100644 --- a/docs/tutorial/application-distribution.md +++ b/docs/tutorial/application-distribution.md @@ -155,18 +155,18 @@ we want to help you out! 1. Set the following Environment Variables: - * `ATOM_SHELL_GITHUB_TOKEN` - a token that can create releases on GitHub - * `ATOM_SHELL_S3_ACCESS_KEY`, `ATOM_SHELL_S3_BUCKET`, `ATOM_SHELL_S3_SECRET_KEY` + * `ELECTRON_GITHUB_TOKEN` - a token that can create releases on GitHub + * `ELECTRON_S3_ACCESS_KEY`, `ELECTRON_S3_BUCKET`, `ELECTRON_S3_SECRET_KEY` - the place where you'll upload node.js headers as well as symbols * `ELECTRON_RELEASE` - Set to `true` and the upload part will run, leave unset and `surf-build` will just do CI-type checks, appropriate to run for every pull request. * `CI` - Set to `true` or else we'll fail - * `GITHUB_TOKEN` - set it to the same as `ATOM_SHELL_GITHUB_TOKEN` + * `GITHUB_TOKEN` - set it to the same as `ELECTRON_GITHUB_TOKEN` * `SURF_TEMP` - set to `C:\Temp` on Windows to prevent path too long issues * `TARGET_ARCH` - set to `ia32` or `x64` -1. In `script/upload.py`, you _must_ set `ATOM_SHELL_REPO` to your fork, +1. In `script/upload.py`, you _must_ set `ELECTRON_REPO` to your fork, especially if you are a contributor to Electron proper. 1. `surf-build -r https://github.com/MYORG/electron -s YOUR_COMMIT -n 'surf-PLATFORM-ARCH'` From f17e64e7269ba2c9789bf2b0a5b7ba80c5139ed8 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 27 May 2016 14:01:38 -0700 Subject: [PATCH 05/10] Tweak fork section --- docs/tutorial/application-distribution.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/tutorial/application-distribution.md b/docs/tutorial/application-distribution.md index a05447b87c..bf6e1e837e 100644 --- a/docs/tutorial/application-distribution.md +++ b/docs/tutorial/application-distribution.md @@ -138,14 +138,14 @@ 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! +we appreciate your help. #### Creating a Full Custom Electron Release with surf-build 1. Install [Surf](https://github.com/surf-build/surf), via npm: `npm install -g surf-build@latest` -1. Create a new S3 bucket and create the following empty directory structure: +2. Create a new S3 bucket and create the following empty directory structure: ``` - atom-shell @@ -153,7 +153,7 @@ we want to help you out! - dist ``` -1. Set the following Environment Variables: +3. Set the following Environment Variables: * `ELECTRON_GITHUB_TOKEN` - a token that can create releases on GitHub * `ELECTRON_S3_ACCESS_KEY`, `ELECTRON_S3_BUCKET`, `ELECTRON_S3_SECRET_KEY` @@ -166,9 +166,9 @@ we want to help you out! * `SURF_TEMP` - set to `C:\Temp` on Windows to prevent path too long issues * `TARGET_ARCH` - set to `ia32` or `x64` -1. In `script/upload.py`, you _must_ set `ELECTRON_REPO` to your fork, +4. In `script/upload.py`, you _must_ set `ELECTRON_REPO` to your fork, especially if you are a contributor to Electron proper. -1. `surf-build -r https://github.com/MYORG/electron -s YOUR_COMMIT -n 'surf-PLATFORM-ARCH'` +5. `surf-build -r https://github.com/MYORG/electron -s YOUR_COMMIT -n 'surf-PLATFORM-ARCH'` -1. Wait a very, very long time. +6. Wait a very, very long time for the build to complete. From 2effa32e3eab556e1e0aec274bb3e2fa4d8cf94e Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 27 May 2016 14:02:22 -0700 Subject: [PATCH 06/10] Tighten up section title --- docs/tutorial/application-distribution.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/application-distribution.md b/docs/tutorial/application-distribution.md index bf6e1e837e..cd5fe47dec 100644 --- a/docs/tutorial/application-distribution.md +++ b/docs/tutorial/application-distribution.md @@ -140,7 +140,7 @@ 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 appreciate your help. -#### Creating a Full Custom Electron Release with surf-build +#### Creating a Custom Release with surf-build 1. Install [Surf](https://github.com/surf-build/surf), via npm: `npm install -g surf-build@latest` From 1e28e3fc27eb3afbe3db0561a51f24b998902cd7 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 27 May 2016 14:04:04 -0700 Subject: [PATCH 07/10] Add trailing slashes to directories --- docs/tutorial/application-distribution.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorial/application-distribution.md b/docs/tutorial/application-distribution.md index cd5fe47dec..bc2cdaefe8 100644 --- a/docs/tutorial/application-distribution.md +++ b/docs/tutorial/application-distribution.md @@ -148,9 +148,9 @@ we appreciate your help. 2. Create a new S3 bucket and create the following empty directory structure: ``` -- atom-shell - - symbols - - dist +- atom-shell/ + - symbols/ + - dist/ ``` 3. Set the following Environment Variables: From 82bc98ec3cb977453e57cd5c24acbd0ec52b7676 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 27 May 2016 14:05:01 -0700 Subject: [PATCH 08/10] Put - at end of previous line --- docs/tutorial/application-distribution.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorial/application-distribution.md b/docs/tutorial/application-distribution.md index bc2cdaefe8..7f6610a548 100644 --- a/docs/tutorial/application-distribution.md +++ b/docs/tutorial/application-distribution.md @@ -156,8 +156,8 @@ we appreciate your help. 3. Set the following Environment Variables: * `ELECTRON_GITHUB_TOKEN` - a token that can create releases on GitHub - * `ELECTRON_S3_ACCESS_KEY`, `ELECTRON_S3_BUCKET`, `ELECTRON_S3_SECRET_KEY` - - the place where you'll upload node.js headers as well as symbols + * `ELECTRON_S3_ACCESS_KEY`, `ELECTRON_S3_BUCKET`, `ELECTRON_S3_SECRET_KEY` - + the place where you'll upload node.js headers as well as symbols * `ELECTRON_RELEASE` - Set to `true` and the upload part will run, leave unset and `surf-build` will just do CI-type checks, appropriate to run for every pull request. From ba6c8b531fcb2d5eecb52514fc17bef4dada367e Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 27 May 2016 14:06:40 -0700 Subject: [PATCH 09/10] Add ELECTRON_REPO example --- docs/tutorial/application-distribution.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/application-distribution.md b/docs/tutorial/application-distribution.md index 7f6610a548..9db4b0f8c4 100644 --- a/docs/tutorial/application-distribution.md +++ b/docs/tutorial/application-distribution.md @@ -166,7 +166,7 @@ we appreciate your help. * `SURF_TEMP` - set to `C:\Temp` on Windows to prevent path too long issues * `TARGET_ARCH` - set to `ia32` or `x64` -4. In `script/upload.py`, you _must_ set `ELECTRON_REPO` to your fork, +4. In `script/upload.py`, you _must_ set `ELECTRON_REPO` to your fork (`MYORG/electron`), especially if you are a contributor to Electron proper. 5. `surf-build -r https://github.com/MYORG/electron -s YOUR_COMMIT -n 'surf-PLATFORM-ARCH'` From 6add7f8d498d44a12d8251f1c308fca6f1e89d65 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 27 May 2016 14:34:23 -0700 Subject: [PATCH 10/10] we -> it --- docs/tutorial/application-distribution.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/application-distribution.md b/docs/tutorial/application-distribution.md index 9db4b0f8c4..c8ec1f6d09 100644 --- a/docs/tutorial/application-distribution.md +++ b/docs/tutorial/application-distribution.md @@ -161,7 +161,7 @@ we appreciate your help. * `ELECTRON_RELEASE` - Set to `true` and the upload part will run, leave unset and `surf-build` will just do CI-type checks, appropriate to run for every pull request. - * `CI` - Set to `true` or else we'll fail + * `CI` - Set to `true` or else it will fail * `GITHUB_TOKEN` - set it to the same as `ELECTRON_GITHUB_TOKEN` * `SURF_TEMP` - set to `C:\Temp` on Windows to prevent path too long issues * `TARGET_ARCH` - set to `ia32` or `x64`