- Fix ninja build on all platforms (issue #922).
- Update make_distrib.py to support ninja builds via a new "ninja-build" flag (issue #922). - Improvements to automate.py: -- Allow specification of the depot_tools directory via a "depot-tools" flag (issue #592). -- Add ninja build support via a "ninja-build" flag (issue #922). -- Allow relative paths for download directories (issue #942). -- Add the ability to print commands without executing them via a "dry-run" flag. -- Specifying the "force-clean" flag will also remove the build output directory. -- Add support for a minimal distribution mode where only release binaries and resources are packaged. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1203 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
3184473656
commit
ef5142d9b3
|
@ -0,0 +1 @@
|
|||
CEF_MAJOR=1
|
107
cef1/cef.gyp
107
cef1/cef.gyp
|
@ -132,6 +132,7 @@
|
|||
'product_name': 'cefclient',
|
||||
'variables': {
|
||||
'repack_path': '../tools/grit/grit/format/repack.py',
|
||||
'PRODUCT_NAME': 'cefclient',
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
|
@ -186,11 +187,15 @@
|
|||
'<(PRODUCT_DIR)/libcef.dylib',
|
||||
],
|
||||
},
|
||||
],
|
||||
'postbuilds': [
|
||||
{
|
||||
# Add the WebCore resources to the bundle.
|
||||
'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/',
|
||||
'files': [
|
||||
'../third_party/WebKit/Source/WebCore/Resources/',
|
||||
'postbuild_name': 'Copy WebCore Resources',
|
||||
'action': [
|
||||
'cp',
|
||||
'-Rf',
|
||||
'${BUILT_PRODUCTS_DIR}/../../third_party/WebKit/Source/WebCore/Resources/',
|
||||
'${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Resources/'
|
||||
],
|
||||
},
|
||||
],
|
||||
|
@ -206,6 +211,9 @@
|
|||
],
|
||||
}],
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||
'dependencies':[
|
||||
'<(DEPTH)/build/linux/system.gyp:gtk',
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_linux)',
|
||||
'<@(cefclient_sources_linux)',
|
||||
|
@ -324,6 +332,7 @@
|
|||
'tests/unittests/mac/English.lproj/InfoPlist.strings',
|
||||
'tests/unittests/mac/English.lproj/MainMenu.xib',
|
||||
'tests/unittests/mac/Info.plist',
|
||||
'<(grit_out_dir)/devtools_resources.pak',
|
||||
],
|
||||
'mac_bundle_resources!': [
|
||||
# TODO(mark): Come up with a fancier way to do this (mac_info_plist?)
|
||||
|
@ -342,6 +351,7 @@
|
|||
'product_name': 'cef_unittests',
|
||||
'variables': {
|
||||
'repack_path': '../tools/grit/grit/format/repack.py',
|
||||
'PRODUCT_NAME': 'cef_unittests',
|
||||
},
|
||||
'run_as': {
|
||||
'action': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/MacOS/${PRODUCT_NAME}'],
|
||||
|
@ -395,12 +405,23 @@
|
|||
'copies': [
|
||||
{
|
||||
# Add library dependencies to the bundle.
|
||||
'destination': '<(PRODUCT_DIR)/cef_unittests.app/Contents/MacOS/',
|
||||
'destination': '<(PRODUCT_DIR)/<(PRODUCT_NAME).app/Contents/MacOS/',
|
||||
'files': [
|
||||
'<(PRODUCT_DIR)/libcef.dylib',
|
||||
],
|
||||
},
|
||||
],
|
||||
'postbuilds': [
|
||||
{
|
||||
'postbuild_name': 'Copy WebCore Resources',
|
||||
'action': [
|
||||
'cp',
|
||||
'-Rf',
|
||||
'${BUILT_PRODUCTS_DIR}/../../third_party/WebKit/Source/WebCore/Resources/',
|
||||
'${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Resources/'
|
||||
],
|
||||
},
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
|
||||
|
@ -410,6 +431,11 @@
|
|||
'tests/unittests/run_all_unittests_mac.mm',
|
||||
],
|
||||
}],
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||
'dependencies':[
|
||||
'<(DEPTH)/build/linux/system.gyp:gtk',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -417,35 +443,6 @@
|
|||
'type': 'shared_library',
|
||||
'msvs_guid': 'C13650D5-CF1A-4259-BE45-B1EBA6280E47',
|
||||
'dependencies': [
|
||||
'<(DEPTH)/base/base.gyp:base',
|
||||
'<(DEPTH)/base/base.gyp:base_i18n',
|
||||
'<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
|
||||
'<(DEPTH)/net/net.gyp:net',
|
||||
'<(DEPTH)/net/net.gyp:net_resources',
|
||||
'<(DEPTH)/printing/printing.gyp:printing',
|
||||
'<(DEPTH)/sdch/sdch.gyp:sdch',
|
||||
'<(DEPTH)/skia/skia.gyp:skia',
|
||||
'<(DEPTH)/third_party/bzip2/bzip2.gyp:bzip2',
|
||||
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
|
||||
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
|
||||
'<(DEPTH)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
|
||||
'<(DEPTH)/third_party/libjpeg_turbo/libjpeg.gyp:libjpeg',
|
||||
'<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
|
||||
'<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
|
||||
'<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt',
|
||||
'<(DEPTH)/third_party/modp_b64/modp_b64.gyp:modp_b64',
|
||||
'<(DEPTH)/third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore',
|
||||
'<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
|
||||
'<(DEPTH)/third_party/zlib/zlib.gyp:minizip',
|
||||
'<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
|
||||
'<(DEPTH)/ui/ui.gyp:ui_resources',
|
||||
'<(DEPTH)/ui/ui.gyp:ui',
|
||||
'<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
|
||||
'<(DEPTH)/webkit/support/webkit_support.gyp:glue',
|
||||
'<(DEPTH)/webkit/support/webkit_support.gyp:user_agent',
|
||||
'<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
|
||||
'<(DEPTH)/webkit/support/webkit_support.gyp:webkit_storage',
|
||||
'<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
|
||||
'libcef_static',
|
||||
],
|
||||
'defines': [
|
||||
|
@ -454,12 +451,6 @@
|
|||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
# Avoid "RC1102: internal error : too many arguments to RCPP" error by
|
||||
# explicitly specifying a short list of resource include directories.
|
||||
'resource_include_dirs' : [
|
||||
'.',
|
||||
'..',
|
||||
],
|
||||
'sources': [
|
||||
'<@(includes_common)',
|
||||
'<@(includes_capi)',
|
||||
|
@ -477,18 +468,17 @@
|
|||
'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',
|
||||
},
|
||||
'conditions': [
|
||||
['OS=="win"', {
|
||||
['OS=="win" and win_use_allocator_shim==1', {
|
||||
'dependencies': [
|
||||
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
|
||||
'<(DEPTH)/breakpad/breakpad.gyp:breakpad_handler',
|
||||
'<(DEPTH)/third_party/angle/src/build_angle.gyp:libEGL',
|
||||
'<(DEPTH)/third_party/angle/src/build_angle.gyp:libGLESv2',
|
||||
],
|
||||
}],
|
||||
['OS=="win"', {
|
||||
'sources': [
|
||||
'<@(includes_win)',
|
||||
'$(OutDir)/obj/global_intermediate/ui/ui_resources/ui_unscaled_resources.rc',
|
||||
'$(OutDir)/obj/global_intermediate/webkit/webkit_chromium_resources.rc',
|
||||
'$(OutDir)/obj/global_intermediate/webkit/webkit_resources.rc',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
|
||||
'libcef_dll/libcef_dll.rc',
|
||||
],
|
||||
'link_settings': {
|
||||
|
@ -505,22 +495,10 @@
|
|||
},
|
||||
}],
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||
'dependencies':[
|
||||
'dependencies':[
|
||||
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
|
||||
'<(DEPTH)/build/linux/system.gyp:gtk',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'cflags': [
|
||||
'<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0)',
|
||||
],
|
||||
},
|
||||
'link_settings': {
|
||||
'ldflags': [
|
||||
'<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-2.0 gthread-2.0)',
|
||||
],
|
||||
'libraries': [
|
||||
'<!@(<(pkg-config) --libs-only-l gtk+-2.0 gthread-2.0)',
|
||||
],
|
||||
},
|
||||
}],
|
||||
],
|
||||
},
|
||||
|
@ -544,6 +522,13 @@
|
|||
'<@(includes_wrapper)',
|
||||
'<@(libcef_dll_wrapper_sources_common)',
|
||||
],
|
||||
'conditions': [
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||
'dependencies':[
|
||||
'<(DEPTH)/build/linux/system.gyp:gtk',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'cef_extra_resources',
|
||||
|
|
|
@ -26,6 +26,11 @@ patches = [
|
|||
'name': 'webkit_933',
|
||||
'path': '../third_party/WebKit/Source/WebKit/chromium/src/',
|
||||
},
|
||||
{
|
||||
# http://code.google.com/p/gyp/issues/detail?id=331
|
||||
'name': 'gyp_331',
|
||||
'path': '../tools/gyp/pylib/',
|
||||
},
|
||||
{
|
||||
# http://code.google.com/p/chromiumembedded/issues/detail?id=364
|
||||
'name': 'spi_webcore_364',
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
Index: gyp/generator/ninja.py
|
||||
===================================================================
|
||||
--- gyp/generator/ninja.py (revision 1602)
|
||||
+++ gyp/generator/ninja.py (working copy)
|
||||
@@ -662,7 +662,16 @@
|
||||
for path in copy['files']:
|
||||
# Normalize the path so trailing slashes don't confuse us.
|
||||
path = os.path.normpath(path)
|
||||
- basename = os.path.split(path)[1]
|
||||
+ (parent_path, basename) = os.path.split(path)
|
||||
+
|
||||
+ # Xcode uses .lproj directories for localized resources. Add a special
|
||||
+ # case to maintain the localization directory component if present.
|
||||
+ if parent_path != '':
|
||||
+ parent_basename = os.path.basename(parent_path)
|
||||
+ (parent_root, parent_ext) = os.path.splitext(parent_basename)
|
||||
+ if parent_ext == '.lproj':
|
||||
+ basename = os.path.join(parent_basename, basename)
|
||||
+
|
||||
src = self.GypPathToNinja(path, env)
|
||||
dst = self.GypPathToNinja(os.path.join(copy['destination'], basename),
|
||||
env)
|
|
@ -23,9 +23,10 @@ def run(command_line, working_dir, depot_tools_dir=None):
|
|||
|
||||
sys.stdout.write('-------- Running "'+command_line+'" in "'+\
|
||||
working_dir+'"...'+"\n")
|
||||
args = shlex.split(command_line.replace('\\', '\\\\'))
|
||||
return subprocess.check_call(args, cwd=working_dir, env=env,
|
||||
shell=(sys.platform == 'win32'))
|
||||
if not options.dryrun:
|
||||
args = shlex.split(command_line.replace('\\', '\\\\'))
|
||||
return subprocess.check_call(args, cwd=working_dir, env=env,
|
||||
shell=(sys.platform == 'win32'))
|
||||
|
||||
def check_url(url):
|
||||
""" Check the URL and raise an exception if invalid. """
|
||||
|
@ -91,6 +92,8 @@ parser.add_option('--revision', dest='revision', type="int",
|
|||
help='CEF source revision')
|
||||
parser.add_option('--url', dest='url',
|
||||
help='CEF source URL')
|
||||
parser.add_option('--depot-tools', dest='depottools', metavar='DIR',
|
||||
help='download directory for depot_tools', default='')
|
||||
parser.add_option('--force-config',
|
||||
action='store_true', dest='forceconfig', default=False,
|
||||
help='force Chromium configuration')
|
||||
|
@ -117,7 +120,19 @@ parser.add_option('--no-release-build',
|
|||
help="don't perform the CEF release build")
|
||||
parser.add_option('--no-distrib',
|
||||
action='store_true', dest='nodistrib', default=False,
|
||||
help="don't create the CEF binary distribution")
|
||||
help="don't create any CEF binary distribution")
|
||||
parser.add_option('--minimal-distrib',
|
||||
action='store_true', dest='minimaldistrib', default=False,
|
||||
help='create a minimal CEF binary distribution')
|
||||
parser.add_option('--minimal-distrib-only',
|
||||
action='store_true', dest='minimaldistribonly', default=False,
|
||||
help='create a minimal CEF binary distribution only')
|
||||
parser.add_option('--ninja-build',
|
||||
action='store_true', dest='ninjabuild', default=False,
|
||||
help="build using ninja")
|
||||
parser.add_option('--dry-run',
|
||||
action='store_true', dest='dryrun', default=False,
|
||||
help="output commands without executing them")
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
# the downloaddir option is required
|
||||
|
@ -125,6 +140,11 @@ if options.downloaddir is None:
|
|||
parser.print_help(sys.stderr)
|
||||
sys.exit()
|
||||
|
||||
if options.noreleasebuild and (options.minimaldistrib or options.minimaldistribonly):
|
||||
print 'Invalid combination of options'
|
||||
parser.print_help(sys.stderr)
|
||||
sys.exit()
|
||||
|
||||
# script directory
|
||||
script_dir = os.path.dirname(__file__)
|
||||
|
||||
|
@ -176,7 +196,7 @@ except Exception, e:
|
|||
compat_url+"\n")
|
||||
raise
|
||||
|
||||
download_dir = options.downloaddir
|
||||
download_dir = os.path.abspath(options.downloaddir)
|
||||
if not os.path.exists(download_dir):
|
||||
# create the download directory
|
||||
os.makedirs(download_dir)
|
||||
|
@ -197,7 +217,10 @@ else:
|
|||
script_ext = '.sh'
|
||||
|
||||
# check if the "depot_tools" directory exists
|
||||
depot_tools_dir = os.path.join(download_dir, 'depot_tools')
|
||||
if options.depottools != '':
|
||||
depot_tools_dir = os.path.abspath(options.depottools)
|
||||
else:
|
||||
depot_tools_dir = os.path.join(download_dir, 'depot_tools')
|
||||
if not os.path.exists(depot_tools_dir):
|
||||
# checkout depot_tools
|
||||
run('svn checkout '+depot_tools_url+' '+depot_tools_dir, download_dir)
|
||||
|
@ -291,55 +314,60 @@ if release_url_changed or chromium_url_changed or options.forceconfig:
|
|||
# run gclient config to create the .gclient file
|
||||
run('gclient config '+url, chromium_dir, depot_tools_dir)
|
||||
|
||||
path = os.path.join(chromium_dir, '.gclient')
|
||||
if not os.path.exists(path):
|
||||
sys.stderr.write(".gclient file was not created\n")
|
||||
raise Exception('.gclient file was not created')
|
||||
if not options.dryrun:
|
||||
path = os.path.join(chromium_dir, '.gclient')
|
||||
if not os.path.exists(path):
|
||||
sys.stderr.write(".gclient file was not created\n")
|
||||
raise Exception('.gclient file was not created')
|
||||
|
||||
# read the resulting .gclient file
|
||||
fp = open(path, 'r')
|
||||
data = fp.read()
|
||||
fp.close()
|
||||
# read the resulting .gclient file
|
||||
fp = open(path, 'r')
|
||||
data = fp.read()
|
||||
fp.close()
|
||||
|
||||
custom_deps = \
|
||||
"\n "+'"src/third_party/WebKit/LayoutTests": None,'+\
|
||||
"\n "+'"src/chrome_frame/tools/test/reference_build/chrome": None,'+\
|
||||
"\n "+'"src/chrome/tools/test/reference_build/chrome_mac": None,'+\
|
||||
"\n "+'"src/chrome/tools/test/reference_build/chrome_win": None,'+\
|
||||
"\n "+'"src/chrome/tools/test/reference_build/chrome_linux": None,'
|
||||
custom_deps = \
|
||||
"\n "+'"src/third_party/WebKit/LayoutTests": None,'+\
|
||||
"\n "+'"src/chrome_frame/tools/test/reference_build/chrome": None,'+\
|
||||
"\n "+'"src/chrome/tools/test/reference_build/chrome_mac": None,'+\
|
||||
"\n "+'"src/chrome/tools/test/reference_build/chrome_win": None,'+\
|
||||
"\n "+'"src/chrome/tools/test/reference_build/chrome_linux": None,'
|
||||
|
||||
if not release_url is None:
|
||||
# TODO: Read the DEPS file and exclude all non-src directories.
|
||||
custom_deps += \
|
||||
"\n "+'"chromeos": None,'+\
|
||||
"\n "+'"depot_tools": None,'
|
||||
if not release_url is None:
|
||||
# TODO: Read the DEPS file and exclude all non-src directories.
|
||||
custom_deps += \
|
||||
"\n "+'"chromeos": None,'+\
|
||||
"\n "+'"depot_tools": None,'
|
||||
|
||||
# populate "custom_deps" section
|
||||
data = data.replace('"custom_deps" : {', '"custom_deps" : {'+custom_deps)
|
||||
# populate "custom_deps" section
|
||||
data = data.replace('"custom_deps" : {', '"custom_deps" : {'+custom_deps)
|
||||
|
||||
# write the new .gclient file
|
||||
fp = open(path, 'w')
|
||||
fp.write(data)
|
||||
fp.close()
|
||||
# write the new .gclient file
|
||||
fp = open(path, 'w')
|
||||
fp.write(data)
|
||||
fp.close()
|
||||
|
||||
if options.forceclean:
|
||||
if os.path.exists(chromium_src_dir):
|
||||
# revert all Chromium changes and delete all unversioned files
|
||||
run('gclient revert -n', chromium_dir, depot_tools_dir)
|
||||
|
||||
# remove the build output directories
|
||||
output_dirs = []
|
||||
if platform == 'windows':
|
||||
output_dirs.append(os.path.join(chromium_src_dir, 'build\\Debug'))
|
||||
output_dirs.append(os.path.join(chromium_src_dir, 'build\\Release'))
|
||||
elif platform == 'macosx':
|
||||
output_dirs.append(os.path.join(chromium_src_dir, 'xcodebuild'))
|
||||
elif platform == 'linux':
|
||||
output_dirs.append(os.path.join(chromium_src_dir, 'out'))
|
||||
if not options.dryrun:
|
||||
# remove the build output directories
|
||||
output_dirs = []
|
||||
if platform == 'windows':
|
||||
output_dirs.append(os.path.join(cef_src_dir, 'build\\Debug'))
|
||||
output_dirs.append(os.path.join(cef_src_dir, 'build\\Release'))
|
||||
elif platform == 'macosx':
|
||||
output_dirs.append(os.path.join(chromium_src_dir, 'xcodebuild'))
|
||||
elif platform == 'linux':
|
||||
output_dirs.append(os.path.join(chromium_src_dir, 'out'))
|
||||
|
||||
for output_dir in output_dirs:
|
||||
if os.path.exists(output_dir):
|
||||
shutil.rmtree(output_dir, onerror=onerror)
|
||||
if options.ninjabuild:
|
||||
output_dirs.append(os.path.join(chromium_src_dir, 'out'))
|
||||
|
||||
for output_dir in output_dirs:
|
||||
if os.path.exists(output_dir):
|
||||
shutil.rmtree(output_dir, onerror=onerror)
|
||||
|
||||
# force update, build and distrib steps
|
||||
options.forceupdate = True
|
||||
|
@ -356,7 +384,7 @@ elif release_url_changed or options.forceupdate:
|
|||
run('gclient sync --jobs 8 --force', chromium_dir, depot_tools_dir)
|
||||
|
||||
if not os.path.exists(cef_src_dir) or cef_url_changed:
|
||||
if cef_url_changed and os.path.exists(cef_src_dir):
|
||||
if not options.dryrun and cef_url_changed and os.path.exists(cef_src_dir):
|
||||
# delete the cef directory (it will be re-downloaded)
|
||||
shutil.rmtree(cef_src_dir)
|
||||
|
||||
|
@ -368,22 +396,50 @@ elif cef_rev_changed or options.forceupdate:
|
|||
|
||||
if any_changed or options.forceupdate:
|
||||
# create CEF projects
|
||||
if options.ninjabuild:
|
||||
os.environ['GYP_GENERATORS'] = 'ninja'
|
||||
path = os.path.join(cef_src_dir, 'cef_create_projects'+script_ext)
|
||||
run(path, cef_src_dir, depot_tools_dir)
|
||||
|
||||
if any_changed or options.forcebuild:
|
||||
path = os.path.join(cef_tools_dir, 'build_projects'+script_ext)
|
||||
if options.ninjabuild:
|
||||
command = 'ninja -C '
|
||||
target = ' cefclient'
|
||||
if not options.nodebugbuild:
|
||||
# make CEF Debug build
|
||||
run(command + os.path.join('out', 'Debug') + target, chromium_src_dir, depot_tools_dir)
|
||||
|
||||
if not options.nodebugbuild:
|
||||
# make CEF Debug build
|
||||
run(path+' Debug', cef_tools_dir, depot_tools_dir)
|
||||
if not options.noreleasebuild:
|
||||
# make CEF Release build
|
||||
run(command + os.path.join('out', 'Release') + target, chromium_src_dir, depot_tools_dir)
|
||||
else:
|
||||
path = os.path.join(cef_tools_dir, 'build_projects'+script_ext)
|
||||
|
||||
if not options.noreleasebuild:
|
||||
# make CEF Release build
|
||||
run(path+' Release', cef_tools_dir, depot_tools_dir)
|
||||
if not options.nodebugbuild:
|
||||
# make CEF Debug build
|
||||
run(path+' Debug', cef_tools_dir, depot_tools_dir)
|
||||
|
||||
if any_changed or options.forcedistrib:
|
||||
if not options.nodistrib:
|
||||
# make CEF binary distribution
|
||||
path = os.path.join(cef_tools_dir, 'make_distrib'+script_ext)
|
||||
if not options.noreleasebuild:
|
||||
# make CEF Release build
|
||||
run(path+' Release', cef_tools_dir, depot_tools_dir)
|
||||
|
||||
if (any_changed or options.forcedistrib) and not options.nodistrib:
|
||||
# make a CEF binary distribution
|
||||
make_minimal = options.minimaldistrib or options.minimaldistribonly
|
||||
path = os.path.join(cef_tools_dir, 'make_distrib'+script_ext)
|
||||
if options.ninjabuild:
|
||||
path = path + ' --ninja-build'
|
||||
if options.nodebugbuild or options.noreleasebuild or make_minimal:
|
||||
path = path + ' --allow-partial'
|
||||
|
||||
if not options.minimaldistribonly:
|
||||
# create the full distribution
|
||||
run(path, cef_tools_dir, depot_tools_dir)
|
||||
|
||||
if make_minimal:
|
||||
# create the minimial distribution
|
||||
path = path + ' --minimal'
|
||||
if not options.minimaldistribonly:
|
||||
# don't create the symbol archive twice
|
||||
path = path + ' --no-symbols'
|
||||
run(path, cef_tools_dir, depot_tools_dir)
|
||||
|
|
|
@ -5,11 +5,18 @@
|
|||
{
|
||||
'variables': {
|
||||
'chromium_code': 1,
|
||||
'linux_use_gold_binary': 0,
|
||||
'linux_use_gold_flags': 0,
|
||||
'conditions': [
|
||||
[ 'OS=="mac"', {
|
||||
# Don't use clang with CEF binary releases due to Chromium tree structure dependency.
|
||||
'clang': 0,
|
||||
}]
|
||||
}],
|
||||
['sysroot!=""', {
|
||||
'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
|
||||
}, {
|
||||
'pkg-config': 'pkg-config'
|
||||
}],
|
||||
]
|
||||
},
|
||||
'includes': [
|
||||
|
@ -112,7 +119,29 @@
|
|||
'<@(cefclient_bundle_resources_linux)',
|
||||
],
|
||||
},
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/',
|
||||
'files': [
|
||||
'Resources/chrome.pak',
|
||||
'Resources/devtools_resources.pak',
|
||||
'Resources/locales/',
|
||||
'$(BUILDTYPE)/libcef.so',
|
||||
],
|
||||
},
|
||||
],
|
||||
'dependencies': [
|
||||
'gtk',
|
||||
],
|
||||
'link_settings': {
|
||||
'ldflags': [
|
||||
# Look for libcef.so in the current directory. Path can also be
|
||||
# specified using the LD_LIBRARY_PATH environment variable.
|
||||
'-Wl,-rpath,.',
|
||||
],
|
||||
'libraries': [
|
||||
"$(BUILDTYPE)/libcef.so",
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
'<@(includes_linux)',
|
||||
'<@(cefclient_sources_linux)',
|
||||
|
@ -140,6 +169,41 @@
|
|||
# Target build path.
|
||||
'SYMROOT': 'xcodebuild',
|
||||
},
|
||||
'conditions': [
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||
'dependencies': [
|
||||
'gtk',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
]
|
||||
],
|
||||
'conditions': [
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'gtk',
|
||||
'type': 'none',
|
||||
'variables': {
|
||||
# gtk requires gmodule, but it does not list it as a dependency
|
||||
# in some misconfigured systems.
|
||||
'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0',
|
||||
},
|
||||
'direct_dependent_settings': {
|
||||
'cflags': [
|
||||
'<!@(<(pkg-config) --cflags <(gtk_packages))',
|
||||
],
|
||||
},
|
||||
'link_settings': {
|
||||
'ldflags': [
|
||||
'<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packages))',
|
||||
],
|
||||
'libraries': [
|
||||
'<!@(<(pkg-config) --libs-only-l <(gtk_packages))',
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
}], # OS=="linux" or OS=="freebsd" or OS=="openbsd"
|
||||
],
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
if [ -z "$1" ]; then
|
||||
echo "ERROR: Please specify a build target: Debug or Release"
|
||||
else
|
||||
make -j8 cefclient BUILDTYPE=$1
|
||||
fi
|
||||
|
||||
|
|
@ -73,6 +73,17 @@ def copy_files(src_glob, dst_folder, quiet = True):
|
|||
else:
|
||||
copy_file(fname, dst, quiet)
|
||||
|
||||
def remove_file(name, quiet = True):
|
||||
""" Remove the specified file. """
|
||||
try:
|
||||
if path_exists(name):
|
||||
os.remove(name)
|
||||
if not quiet:
|
||||
sys.stdout.write('Removing '+name+' file.\n')
|
||||
except IOError, (errno, strerror):
|
||||
sys.stderr.write('Failed to remove file '+name+': '+strerror)
|
||||
raise
|
||||
|
||||
def copy_dir(src, dst, quiet = True):
|
||||
""" Copy a directory tree. """
|
||||
try:
|
||||
|
@ -109,3 +120,11 @@ def make_dir(name, quiet = True):
|
|||
def get_files(search_glob):
|
||||
""" Returns all files matching the search glob. """
|
||||
return iglob(search_glob)
|
||||
|
||||
def read_version_file(file, args):
|
||||
""" Read and parse a version file (key=value pairs, one per line). """
|
||||
lines = read_file(file).split("\n")
|
||||
for line in lines:
|
||||
parts = line.split('=', 1)
|
||||
if len(parts) == 2:
|
||||
args[parts[0]] = parts[1]
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue