diff --git a/app/windowsInit.js b/app/windowsInit.js index 183b53d2318..2c77ffbe18a 100644 --- a/app/windowsInit.js +++ b/app/windowsInit.js @@ -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') @@ -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) { diff --git a/res/BraveBrowserSetup.exe b/res/BraveBrowserSetup.exe new file mode 100644 index 00000000000..10ea1fe3f2a Binary files /dev/null and b/res/BraveBrowserSetup.exe differ diff --git a/tools/buildPackage.js b/tools/buildPackage.js index 924b1a477b4..940ae0854d8 100644 --- a/tools/buildPackage.js +++ b/tools/buildPackage.js @@ -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.