From 0460e82e6a93f668a234bec615a48f6cce7d3761 Mon Sep 17 00:00:00 2001 From: "Brian R. Bondy" Date: Wed, 15 Aug 2018 16:48:44 -0400 Subject: [PATCH 1/2] Allow starting Brave in single-process mode Example usage: npm run start -- --single_process https://github.com/brave/brave-browser/issues/753 --- lib/start.js | 3 +++ scripts/commands.js | 1 + 2 files changed, 4 insertions(+) diff --git a/lib/start.js b/lib/start.js index 0c86e3698efa..ef9943e9d1a2 100644 --- a/lib/start.js +++ b/lib/start.js @@ -23,6 +23,9 @@ const start = (buildConfig = config.defaultBuildConfig, options) => { // This only has meaning with MacOS and official build. braveArgs.push('--disable-brave-update') } + if (options.single_process) { + braveArgs.push('--single-process') + } let cmdOptions = { stdio: 'inherit', diff --git a/scripts/commands.js b/scripts/commands.js index 62bbd32994e5..b943f759d2a9 100644 --- a/scripts/commands.js +++ b/scripts/commands.js @@ -69,6 +69,7 @@ program .option('--disable_pdfjs_extension', 'disable loading the PDFJS extension') .option('--enable_brave_update', 'enable brave update') .option('--channel ', 'target channel to start', /^(beta|dev|nightly|release)$/i, 'release') + .option('--single_process', 'use a single process') .arguments('[build_config]') .action(start) From 41b13382af418849dd662ec9ba71e295777cbc7f Mon Sep 17 00:00:00 2001 From: "Brian R. Bondy" Date: Wed, 15 Aug 2018 17:43:48 -0400 Subject: [PATCH 2/2] Allow starting unofficial Release builds Example usage: npm run start -- Release --official_build=false Fix https://github.com/brave/brave-browser/issues/754 --- lib/config.js | 2 +- scripts/commands.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/config.js b/lib/config.js index 4a1f27c0512b..49d6b0104a77 100644 --- a/lib/config.js +++ b/lib/config.js @@ -241,7 +241,7 @@ Config.prototype.update = function (options) { this.officialBuild = this.buildConfig === 'Release' } - if (this.debugBuild) { + if (!this.officialBuild) { this.channel = 'development' } else if (options.channel !== 'release') { // In chromium src, empty string represents stable channel. diff --git a/scripts/commands.js b/scripts/commands.js index b943f759d2a9..f1dcb5afd349 100644 --- a/scripts/commands.js +++ b/scripts/commands.js @@ -69,6 +69,7 @@ program .option('--disable_pdfjs_extension', 'disable loading the PDFJS extension') .option('--enable_brave_update', 'enable brave update') .option('--channel ', 'target channel to start', /^(beta|dev|nightly|release)$/i, 'release') + .option('--official_build ', 'force official build settings') .option('--single_process', 'use a single process') .arguments('[build_config]') .action(start)