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

Commit

Permalink
Add support for 32 bit linux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
posix4e committed Dec 1, 2016
1 parent 6023abd commit cffb9a5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
20 changes: 9 additions & 11 deletions tools/buildInstaller.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ var outDir = 'dist'
var arch = 'x64'
var cmds

if (isWindows) {
if (process.env.TARGET_ARCH === 'ia32') {
arch = 'ia32'
}
if (process.env.TARGET_ARCH === 'ia32') {
arch = 'ia32'
}
const buildDir = 'Brave-' + process.platform + '-' + arch

Expand Down Expand Up @@ -81,23 +79,23 @@ if (isDarwin) {
execute(cmds, {}, console.log.bind(null, 'done'))
}, (e) => console.log(`No dice: ${e.message}`))
} else if (isLinux) {
console.log('Install with sudo dpkg -i dist/brave_' + VersionInfo.braveVersion + '_amd64.deb')
console.log('Or install with sudo dnf install dist/brave_' + VersionInfo.braveVersion + '.x86_64.rpm')
console.log(format('Install with sudo dpkg -i dist/brave_' + VersionInfo.braveVersion + '_%s.deb',arch))
console.log(format('Or install with sudo dnf install dist/brave_' + VersionInfo.braveVersion + '.%s.rpm',arch))
cmds = [
// .deb file
'electron-installer-debian' +
' --src Brave-linux-x64/' +
format(' --src Brave-linux-%s/',arch) +
' --dest dist/' +
' --arch amd64' +
format(' --arch %s', arch) +
' --config res/linuxPackaging.json',
// .rpm file
'electron-installer-redhat' +
' --src Brave-linux-x64/' +
format(' --src Brave-linux-%s/',arch) +
' --dest dist/' +
' --arch x86_64' +
format(' --arch %s', arch) +
' --config res/linuxPackaging.json',
// .tar.bz2 file
'tar -jcvf dist/Brave.tar.bz2 ./Brave-linux-x64'
format('tar -jcvf dist/Brave.tar.bz2 ./Brave-linux-%s', arch)
]
execute(cmds, {}, console.log.bind(null, 'done'))
} else {
Expand Down
12 changes: 8 additions & 4 deletions tools/buildPackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@

var VersionInfo = require('./lib/versionInfo')
var execute = require('./lib/execute')
var format = require('util').format

const ignoredPaths = require('./lib/ignoredPaths')
const config = require('./lib/config')
const path = require('path')


const isWindows = process.platform === 'win32'
const isDarwin = process.platform === 'darwin'
var arch = 'x64'
const isLinux = process.platform === 'linux'

var appIcon
if (process.env.TARGET_ARCH === 'ia32') {
arch = 'ia32'
}

if (isWindows) {
appIcon = 'res/app.ico'
if (process.env.TARGET_ARCH === 'ia32') {
arch = 'ia32'
}
} else if (isDarwin) {
appIcon = 'res/app.icns'
} else {
Expand Down Expand Up @@ -107,7 +111,7 @@ function BuildManifestFile () {
}

if (isLinux) {
cmds.push('mv Brave-linux-x64/Brave Brave-linux-x64/brave')
cmds.push(format('mv Brave-linux-%s/Brave Brave-linux-%s/brave', arch, arch))
cmds.push('ncp ./app/extensions ' + path.join(buildDir, 'resources', 'extensions'))
} else if (isDarwin) {
cmds.push('ncp ./app/extensions ' + path.join(buildDir, 'Brave.app', 'Contents', 'Resources', 'extensions'))
Expand Down

0 comments on commit cffb9a5

Please sign in to comment.