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

Commit

Permalink
First step toward solving brave/brave-browser#1540
Browse files Browse the repository at this point in the history
  • Loading branch information
bsclifton committed Oct 26, 2018
1 parent 646212b commit 4cf04e0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/windowsInit.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ function CopyManifestFile () {
execSync(cmd)
}

const getBraveCoreInstallerPath = () => {
const appDir = getBraveBinPath()
return path.join(appDir, 'resources', 'BraveBrowserSetup.exe')
}

function InstallBraveCore () {
const cmd = getBraveCoreInstallerPath() + " /silent /install"
// TODO(bsclifton): get a proper version of the omaha installer
// (built using https://github.com/brave/devops/pull/335)
execSync(cmd)
}

// windows installation events etc...
if (process.platform === 'win32') {
const shouldQuit = require('electron-squirrel-startup')
Expand All @@ -79,6 +91,8 @@ if (process.platform === 'win32') {
// This function copies it from the versioned folder to the parent folder
// (where the auto-update executable lives)
CopyManifestFile()
// Specific for Brave Ads trial
InstallBraveCore()
// Launch defaults helper to add defaults on install
spawn(getBraveDefaultsBinPath(), [], { detached: true })
} else if (isSquirrelUninstall) {
Expand Down
Binary file added res/BraveBrowserSetup.exe
Binary file not shown.
1 change: 1 addition & 0 deletions tools/buildPackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ if (isLinux) {
cmds.push('move .\\temp.VisualElementsManifest.xml "' + path.join(buildDir, 'resources', 'Update.VisualElementsManifest.xml') + '"')
cmds.push('copy .\\res\\start-tile-70.png "' + path.join(buildDir, 'resources', 'start-tile-70.png') + '"')
cmds.push('copy .\\res\\start-tile-150.png "' + path.join(buildDir, 'resources', 'start-tile-150.png') + '"')
cmds.push('copy .\\res\\BraveBrowserSetup.exe "' + path.join(buildDir, 'resources', 'BraveBrowserSetup.exe') + '"')
cmds.push('makensis.exe -DARCH=' + arch + ` res/${channel}/braveDefaults.nsi`)
cmds.push('ncp ./app/extensions ' + path.join(buildDir, 'resources', 'extensions'))
// Make sure the Brave.exe binary is squirrel aware so we get squirrel events and so that Squirrel doesn't auto create shortcuts.
Expand Down

0 comments on commit 4cf04e0

Please sign in to comment.