Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Add support for component updater
Browse files Browse the repository at this point in the history
  • Loading branch information
bbondy committed Sep 20, 2016
1 parent 28e6dea commit 62fcb4b
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 4 deletions.
1 change: 1 addition & 0 deletions chromiumcontent/chromiumcontent.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
'<(DEPTH)/chrome/chrome.gyp:chromedriver',
'extensions.gyp:extensions',
'autofill.gyp:autofill',
'update_client.gyp:update_client',
],
'conditions': [
['OS=="linux"', {
Expand Down
18 changes: 18 additions & 0 deletions chromiumcontent/update_client.gyp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
'targets': [
{
'target_name': 'update_client',
'type': 'none',
'dependencies': [
'<(DEPTH)/courgette/courgette.gyp:courgette_lib',
'<(DEPTH)/components/components.gyp:component_updater',
'<(DEPTH)/components/components.gyp:client_update_protocol',
'<(DEPTH)/components/components.gyp:update_client',
'<(DEPTH)/components/components.gyp:version_info',
'<(DEPTH)/third_party/lzma_sdk/lzma_sdk.gyp:lzma_sdk',
'<(DEPTH)/third_party/zlib/google/zip.gyp:zip',
]
}
]
}

10 changes: 7 additions & 3 deletions script/lib/brave.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
import lib.extensions
from lib.extensions import copy_extension_locales
import lib.autofill
import lib.update_client

BINARIES = lib.extensions.BINARIES
BINARIES['darwin'] = BINARIES['darwin'] + lib.autofill.BINARIES['darwin']
BINARIES['linux'] = BINARIES['linux'] + lib.autofill.BINARIES['linux']
BINARIES['win32'] = BINARIES['win32'] + lib.autofill.BINARIES['win32']
BINARIES['darwin'] = (BINARIES['darwin'] + lib.autofill.BINARIES['darwin'] +
lib.update_client.BINARIES['darwin'])
BINARIES['linux'] = (BINARIES['linux'] + lib.autofill.BINARIES['linux'] +
lib.update_client.BINARIES['linux'])
BINARIES['win32'] = (BINARIES['win32'] + lib.autofill.BINARIES['win32'] +
lib.update_client.BINARIES['win32'])

INCLUDE_DIRS = lib.extensions.INCLUDE_DIRS + lib.autofill.INCLUDE_DIRS
GENERATED_INCLUDE_DIRS = lib.extensions.GENERATED_INCLUDE_DIRS + lib.autofill.GENERATED_INCLUDE_DIRS
Expand Down
37 changes: 37 additions & 0 deletions script/lib/update_client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python

import os

BINARIES = {
'darwin': [
'libupdate_client.a',
'libclient_update_protocol.a',
'libcomponent_updater.a',
'libcourgette_lib.a',
'liblzma_sdk.a',
'libversion_info.a',
'libzip.a',
'libminizip.a',
],
'linux': [
'libupdate_client.a',
'libclient_update_protocol.a',
'libcomponent_updater.a',
'libcourgette_lib.a',
'liblzma_sdk.a',
'libversion_info.a',
'libzip.a',
'libminizip.a',
],
'win32': [
os.path.join('obj', 'components', 'client_update_protocol.lib'),
os.path.join('obj', 'components', 'component_updater.lib'),
os.path.join('obj', 'components', 'update_client.lib'),
os.path.join('obj', 'components', 'version_info.lib'),
os.path.join('obj', 'courgette', 'courgette_lib.lib'),
os.path.join('obj', 'third_party', 'lzma_sdk', 'lzma_sdk.lib'),
os.path.join('obj', 'third_party', 'zlib', 'google', 'zip.lib'),
os.path.join('obj', 'third_party', 'zlib', 'minizip.lib'),
os.path.join('obj', 'third_party', 'zlib', 'zlib.lib'),
],
}
9 changes: 8 additions & 1 deletion script/update
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def gyp_env(target_arch, component, gyp_defines):
else:
gyp_defines += ' ffmpeg_branding=Chrome component={0}'.format(component)

env['GYP_GENERATORS'] = 'ninja'
env['GYP_GENERATORS'] = 'ninja,xcode-ninja'

if sys.platform in ['win32', 'cygwin']:
# Do not let Chromium download their own toolchains.
Expand All @@ -143,6 +143,13 @@ def gyp_env(target_arch, component, gyp_defines):
# Always build on 64-bit machine.
gyp_defines += ' host_arch=x64'

# keep symbols for release builds
gyp_defines += ' mac_strip_release=0'

gyp_defines += ' mac_debug_optimization=0'
gyp_defines += ' mac_release_optimization=0'
gyp_defines += ' release_optimize=0'

# Build 32-bit or 64-bit.
gyp_defines += ' target_arch={0}'.format(target_arch)
env['GYP_DEFINES'] = gyp_defines
Expand Down

0 comments on commit 62fcb4b

Please sign in to comment.