Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit 553cc51

Browse files
committed
First step toward solving brave/brave-browser#1540
1 parent ec3c5d5 commit 553cc51

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

app/windowsInit.js

+14
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@ function CopyManifestFile () {
5656
execSync(cmd)
5757
}
5858

59+
const getBraveCoreInstallerPath = () => {
60+
const appDir = getBraveBinPath()
61+
return path.join(appDir, 'resources', 'BraveBrowserSetup.exe')
62+
}
63+
64+
function InstallBraveCore () {
65+
const cmd = getBraveCoreInstallerPath() + " /silent /install"
66+
// TODO(bsclifton): get a proper version of the omaha installer
67+
// (built using https://github.com/brave/devops/pull/335)
68+
execSync(cmd)
69+
}
70+
5971
// windows installation events etc...
6072
if (process.platform === 'win32') {
6173
const shouldQuit = require('electron-squirrel-startup')
@@ -79,6 +91,8 @@ if (process.platform === 'win32') {
7991
// This function copies it from the versioned folder to the parent folder
8092
// (where the auto-update executable lives)
8193
CopyManifestFile()
94+
// Specific for Brave Ads trial
95+
InstallBraveCore()
8296
// Launch defaults helper to add defaults on install
8397
spawn(getBraveDefaultsBinPath(), [], { detached: true })
8498
} else if (isSquirrelUninstall) {

res/BraveBrowserSetup.exe

1.08 MB
Binary file not shown.

tools/buildPackage.js

+1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ if (isLinux) {
152152
cmds.push('move .\\temp.VisualElementsManifest.xml "' + path.join(buildDir, 'resources', 'Update.VisualElementsManifest.xml') + '"')
153153
cmds.push('copy .\\res\\start-tile-70.png "' + path.join(buildDir, 'resources', 'start-tile-70.png') + '"')
154154
cmds.push('copy .\\res\\start-tile-150.png "' + path.join(buildDir, 'resources', 'start-tile-150.png') + '"')
155+
cmds.push('copy .\\res\\BraveBrowserSetup.exe "' + path.join(buildDir, 'resources', 'BraveBrowserSetup.exe') + '"')
155156
cmds.push('makensis.exe -DARCH=' + arch + ` res/${channel}/braveDefaults.nsi`)
156157
cmds.push('ncp ./app/extensions ' + path.join(buildDir, 'resources', 'extensions'))
157158
// Make sure the Brave.exe binary is squirrel aware so we get squirrel events and so that Squirrel doesn't auto create shortcuts.

0 commit comments

Comments
 (0)