mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-17 04:30:46 +01:00
- 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
1
cef1/VERSION
Normal file
1
cef1/VERSION
Normal file
@ -0,0 +1 @@
|
|||||||
|
CEF_MAJOR=1
|
107
cef1/cef.gyp
107
cef1/cef.gyp
@ -132,6 +132,7 @@
|
|||||||
'product_name': 'cefclient',
|
'product_name': 'cefclient',
|
||||||
'variables': {
|
'variables': {
|
||||||
'repack_path': '../tools/grit/grit/format/repack.py',
|
'repack_path': '../tools/grit/grit/format/repack.py',
|
||||||
|
'PRODUCT_NAME': 'cefclient',
|
||||||
},
|
},
|
||||||
'actions': [
|
'actions': [
|
||||||
{
|
{
|
||||||
@ -186,11 +187,15 @@
|
|||||||
'<(PRODUCT_DIR)/libcef.dylib',
|
'<(PRODUCT_DIR)/libcef.dylib',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
],
|
||||||
|
'postbuilds': [
|
||||||
{
|
{
|
||||||
# Add the WebCore resources to the bundle.
|
'postbuild_name': 'Copy WebCore Resources',
|
||||||
'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/',
|
'action': [
|
||||||
'files': [
|
'cp',
|
||||||
'../third_party/WebKit/Source/WebCore/Resources/',
|
'-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"', {
|
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||||
|
'dependencies':[
|
||||||
|
'<(DEPTH)/build/linux/system.gyp:gtk',
|
||||||
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
'<@(includes_linux)',
|
'<@(includes_linux)',
|
||||||
'<@(cefclient_sources_linux)',
|
'<@(cefclient_sources_linux)',
|
||||||
@ -324,6 +332,7 @@
|
|||||||
'tests/unittests/mac/English.lproj/InfoPlist.strings',
|
'tests/unittests/mac/English.lproj/InfoPlist.strings',
|
||||||
'tests/unittests/mac/English.lproj/MainMenu.xib',
|
'tests/unittests/mac/English.lproj/MainMenu.xib',
|
||||||
'tests/unittests/mac/Info.plist',
|
'tests/unittests/mac/Info.plist',
|
||||||
|
'<(grit_out_dir)/devtools_resources.pak',
|
||||||
],
|
],
|
||||||
'mac_bundle_resources!': [
|
'mac_bundle_resources!': [
|
||||||
# TODO(mark): Come up with a fancier way to do this (mac_info_plist?)
|
# TODO(mark): Come up with a fancier way to do this (mac_info_plist?)
|
||||||
@ -342,6 +351,7 @@
|
|||||||
'product_name': 'cef_unittests',
|
'product_name': 'cef_unittests',
|
||||||
'variables': {
|
'variables': {
|
||||||
'repack_path': '../tools/grit/grit/format/repack.py',
|
'repack_path': '../tools/grit/grit/format/repack.py',
|
||||||
|
'PRODUCT_NAME': 'cef_unittests',
|
||||||
},
|
},
|
||||||
'run_as': {
|
'run_as': {
|
||||||
'action': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/MacOS/${PRODUCT_NAME}'],
|
'action': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/MacOS/${PRODUCT_NAME}'],
|
||||||
@ -395,12 +405,23 @@
|
|||||||
'copies': [
|
'copies': [
|
||||||
{
|
{
|
||||||
# Add library dependencies to the bundle.
|
# Add library dependencies to the bundle.
|
||||||
'destination': '<(PRODUCT_DIR)/cef_unittests.app/Contents/MacOS/',
|
'destination': '<(PRODUCT_DIR)/<(PRODUCT_NAME).app/Contents/MacOS/',
|
||||||
'files': [
|
'files': [
|
||||||
'<(PRODUCT_DIR)/libcef.dylib',
|
'<(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': {
|
'link_settings': {
|
||||||
'libraries': [
|
'libraries': [
|
||||||
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
|
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
|
||||||
@ -410,6 +431,11 @@
|
|||||||
'tests/unittests/run_all_unittests_mac.mm',
|
'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',
|
'type': 'shared_library',
|
||||||
'msvs_guid': 'C13650D5-CF1A-4259-BE45-B1EBA6280E47',
|
'msvs_guid': 'C13650D5-CF1A-4259-BE45-B1EBA6280E47',
|
||||||
'dependencies': [
|
'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',
|
'libcef_static',
|
||||||
],
|
],
|
||||||
'defines': [
|
'defines': [
|
||||||
@ -454,12 +451,6 @@
|
|||||||
'include_dirs': [
|
'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': [
|
'sources': [
|
||||||
'<@(includes_common)',
|
'<@(includes_common)',
|
||||||
'<@(includes_capi)',
|
'<@(includes_capi)',
|
||||||
@ -477,18 +468,17 @@
|
|||||||
'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',
|
'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',
|
||||||
},
|
},
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS=="win"', {
|
['OS=="win" and win_use_allocator_shim==1', {
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
|
'<(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': [
|
'sources': [
|
||||||
'<@(includes_win)',
|
'<@(includes_win)',
|
||||||
'$(OutDir)/obj/global_intermediate/ui/ui_resources/ui_unscaled_resources.rc',
|
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
|
||||||
'$(OutDir)/obj/global_intermediate/webkit/webkit_chromium_resources.rc',
|
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc',
|
||||||
'$(OutDir)/obj/global_intermediate/webkit/webkit_resources.rc',
|
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
|
||||||
'libcef_dll/libcef_dll.rc',
|
'libcef_dll/libcef_dll.rc',
|
||||||
],
|
],
|
||||||
'link_settings': {
|
'link_settings': {
|
||||||
@ -505,22 +495,10 @@
|
|||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||||
'dependencies':[
|
'dependencies':[
|
||||||
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
|
'<(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)',
|
'<@(includes_wrapper)',
|
||||||
'<@(libcef_dll_wrapper_sources_common)',
|
'<@(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',
|
'target_name': 'cef_extra_resources',
|
||||||
|
@ -26,6 +26,11 @@ patches = [
|
|||||||
'name': 'webkit_933',
|
'name': 'webkit_933',
|
||||||
'path': '../third_party/WebKit/Source/WebKit/chromium/src/',
|
'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
|
# http://code.google.com/p/chromiumembedded/issues/detail?id=364
|
||||||
'name': 'spi_webcore_364',
|
'name': 'spi_webcore_364',
|
||||||
|
22
cef1/patch/patches/gyp_331.patch
Normal file
22
cef1/patch/patches/gyp_331.patch
Normal file
@ -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 "'+\
|
sys.stdout.write('-------- Running "'+command_line+'" in "'+\
|
||||||
working_dir+'"...'+"\n")
|
working_dir+'"...'+"\n")
|
||||||
args = shlex.split(command_line.replace('\\', '\\\\'))
|
if not options.dryrun:
|
||||||
return subprocess.check_call(args, cwd=working_dir, env=env,
|
args = shlex.split(command_line.replace('\\', '\\\\'))
|
||||||
shell=(sys.platform == 'win32'))
|
return subprocess.check_call(args, cwd=working_dir, env=env,
|
||||||
|
shell=(sys.platform == 'win32'))
|
||||||
|
|
||||||
def check_url(url):
|
def check_url(url):
|
||||||
""" Check the URL and raise an exception if invalid. """
|
""" 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')
|
help='CEF source revision')
|
||||||
parser.add_option('--url', dest='url',
|
parser.add_option('--url', dest='url',
|
||||||
help='CEF source 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',
|
parser.add_option('--force-config',
|
||||||
action='store_true', dest='forceconfig', default=False,
|
action='store_true', dest='forceconfig', default=False,
|
||||||
help='force Chromium configuration')
|
help='force Chromium configuration')
|
||||||
@ -117,7 +120,19 @@ parser.add_option('--no-release-build',
|
|||||||
help="don't perform the CEF release build")
|
help="don't perform the CEF release build")
|
||||||
parser.add_option('--no-distrib',
|
parser.add_option('--no-distrib',
|
||||||
action='store_true', dest='nodistrib', default=False,
|
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()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
# the downloaddir option is required
|
# the downloaddir option is required
|
||||||
@ -125,6 +140,11 @@ if options.downloaddir is None:
|
|||||||
parser.print_help(sys.stderr)
|
parser.print_help(sys.stderr)
|
||||||
sys.exit()
|
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 directory
|
||||||
script_dir = os.path.dirname(__file__)
|
script_dir = os.path.dirname(__file__)
|
||||||
|
|
||||||
@ -176,7 +196,7 @@ except Exception, e:
|
|||||||
compat_url+"\n")
|
compat_url+"\n")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
download_dir = options.downloaddir
|
download_dir = os.path.abspath(options.downloaddir)
|
||||||
if not os.path.exists(download_dir):
|
if not os.path.exists(download_dir):
|
||||||
# create the download directory
|
# create the download directory
|
||||||
os.makedirs(download_dir)
|
os.makedirs(download_dir)
|
||||||
@ -197,7 +217,10 @@ else:
|
|||||||
script_ext = '.sh'
|
script_ext = '.sh'
|
||||||
|
|
||||||
# check if the "depot_tools" directory exists
|
# 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):
|
if not os.path.exists(depot_tools_dir):
|
||||||
# checkout depot_tools
|
# checkout depot_tools
|
||||||
run('svn checkout '+depot_tools_url+' '+depot_tools_dir, download_dir)
|
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 to create the .gclient file
|
||||||
run('gclient config '+url, chromium_dir, depot_tools_dir)
|
run('gclient config '+url, chromium_dir, depot_tools_dir)
|
||||||
|
|
||||||
path = os.path.join(chromium_dir, '.gclient')
|
if not options.dryrun:
|
||||||
if not os.path.exists(path):
|
path = os.path.join(chromium_dir, '.gclient')
|
||||||
sys.stderr.write(".gclient file was not created\n")
|
if not os.path.exists(path):
|
||||||
raise Exception('.gclient file was not created')
|
sys.stderr.write(".gclient file was not created\n")
|
||||||
|
raise Exception('.gclient file was not created')
|
||||||
|
|
||||||
# read the resulting .gclient file
|
# read the resulting .gclient file
|
||||||
fp = open(path, 'r')
|
fp = open(path, 'r')
|
||||||
data = fp.read()
|
data = fp.read()
|
||||||
fp.close()
|
fp.close()
|
||||||
|
|
||||||
custom_deps = \
|
custom_deps = \
|
||||||
"\n "+'"src/third_party/WebKit/LayoutTests": None,'+\
|
"\n "+'"src/third_party/WebKit/LayoutTests": None,'+\
|
||||||
"\n "+'"src/chrome_frame/tools/test/reference_build/chrome": 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_mac": None,'+\
|
||||||
"\n "+'"src/chrome/tools/test/reference_build/chrome_win": None,'+\
|
"\n "+'"src/chrome/tools/test/reference_build/chrome_win": None,'+\
|
||||||
"\n "+'"src/chrome/tools/test/reference_build/chrome_linux": None,'
|
"\n "+'"src/chrome/tools/test/reference_build/chrome_linux": None,'
|
||||||
|
|
||||||
if not release_url is None:
|
if not release_url is None:
|
||||||
# TODO: Read the DEPS file and exclude all non-src directories.
|
# TODO: Read the DEPS file and exclude all non-src directories.
|
||||||
custom_deps += \
|
custom_deps += \
|
||||||
"\n "+'"chromeos": None,'+\
|
"\n "+'"chromeos": None,'+\
|
||||||
"\n "+'"depot_tools": None,'
|
"\n "+'"depot_tools": None,'
|
||||||
|
|
||||||
# populate "custom_deps" section
|
# populate "custom_deps" section
|
||||||
data = data.replace('"custom_deps" : {', '"custom_deps" : {'+custom_deps)
|
data = data.replace('"custom_deps" : {', '"custom_deps" : {'+custom_deps)
|
||||||
|
|
||||||
# write the new .gclient file
|
# write the new .gclient file
|
||||||
fp = open(path, 'w')
|
fp = open(path, 'w')
|
||||||
fp.write(data)
|
fp.write(data)
|
||||||
fp.close()
|
fp.close()
|
||||||
|
|
||||||
if options.forceclean:
|
if options.forceclean:
|
||||||
if os.path.exists(chromium_src_dir):
|
if os.path.exists(chromium_src_dir):
|
||||||
# revert all Chromium changes and delete all unversioned files
|
# revert all Chromium changes and delete all unversioned files
|
||||||
run('gclient revert -n', chromium_dir, depot_tools_dir)
|
run('gclient revert -n', chromium_dir, depot_tools_dir)
|
||||||
|
|
||||||
# remove the build output directories
|
if not options.dryrun:
|
||||||
output_dirs = []
|
# remove the build output directories
|
||||||
if platform == 'windows':
|
output_dirs = []
|
||||||
output_dirs.append(os.path.join(chromium_src_dir, 'build\\Debug'))
|
if platform == 'windows':
|
||||||
output_dirs.append(os.path.join(chromium_src_dir, 'build\\Release'))
|
output_dirs.append(os.path.join(cef_src_dir, 'build\\Debug'))
|
||||||
elif platform == 'macosx':
|
output_dirs.append(os.path.join(cef_src_dir, 'build\\Release'))
|
||||||
output_dirs.append(os.path.join(chromium_src_dir, 'xcodebuild'))
|
elif platform == 'macosx':
|
||||||
elif platform == 'linux':
|
output_dirs.append(os.path.join(chromium_src_dir, 'xcodebuild'))
|
||||||
output_dirs.append(os.path.join(chromium_src_dir, 'out'))
|
elif platform == 'linux':
|
||||||
|
output_dirs.append(os.path.join(chromium_src_dir, 'out'))
|
||||||
|
|
||||||
for output_dir in output_dirs:
|
if options.ninjabuild:
|
||||||
if os.path.exists(output_dir):
|
output_dirs.append(os.path.join(chromium_src_dir, 'out'))
|
||||||
shutil.rmtree(output_dir, onerror=onerror)
|
|
||||||
|
for output_dir in output_dirs:
|
||||||
|
if os.path.exists(output_dir):
|
||||||
|
shutil.rmtree(output_dir, onerror=onerror)
|
||||||
|
|
||||||
# force update, build and distrib steps
|
# force update, build and distrib steps
|
||||||
options.forceupdate = True
|
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)
|
run('gclient sync --jobs 8 --force', chromium_dir, depot_tools_dir)
|
||||||
|
|
||||||
if not os.path.exists(cef_src_dir) or cef_url_changed:
|
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)
|
# delete the cef directory (it will be re-downloaded)
|
||||||
shutil.rmtree(cef_src_dir)
|
shutil.rmtree(cef_src_dir)
|
||||||
|
|
||||||
@ -368,22 +396,50 @@ elif cef_rev_changed or options.forceupdate:
|
|||||||
|
|
||||||
if any_changed or options.forceupdate:
|
if any_changed or options.forceupdate:
|
||||||
# create CEF projects
|
# create CEF projects
|
||||||
|
if options.ninjabuild:
|
||||||
|
os.environ['GYP_GENERATORS'] = 'ninja'
|
||||||
path = os.path.join(cef_src_dir, 'cef_create_projects'+script_ext)
|
path = os.path.join(cef_src_dir, 'cef_create_projects'+script_ext)
|
||||||
run(path, cef_src_dir, depot_tools_dir)
|
run(path, cef_src_dir, depot_tools_dir)
|
||||||
|
|
||||||
if any_changed or options.forcebuild:
|
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:
|
if not options.noreleasebuild:
|
||||||
# make CEF Debug build
|
# make CEF Release build
|
||||||
run(path+' Debug', cef_tools_dir, depot_tools_dir)
|
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:
|
if not options.nodebugbuild:
|
||||||
# make CEF Release build
|
# make CEF Debug build
|
||||||
run(path+' Release', cef_tools_dir, depot_tools_dir)
|
run(path+' Debug', cef_tools_dir, depot_tools_dir)
|
||||||
|
|
||||||
if any_changed or options.forcedistrib:
|
if not options.noreleasebuild:
|
||||||
if not options.nodistrib:
|
# make CEF Release build
|
||||||
# make CEF binary distribution
|
run(path+' Release', cef_tools_dir, depot_tools_dir)
|
||||||
path = os.path.join(cef_tools_dir, 'make_distrib'+script_ext)
|
|
||||||
|
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)
|
run(path, cef_tools_dir, depot_tools_dir)
|
||||||
|
@ -5,11 +5,18 @@
|
|||||||
{
|
{
|
||||||
'variables': {
|
'variables': {
|
||||||
'chromium_code': 1,
|
'chromium_code': 1,
|
||||||
|
'linux_use_gold_binary': 0,
|
||||||
|
'linux_use_gold_flags': 0,
|
||||||
'conditions': [
|
'conditions': [
|
||||||
[ 'OS=="mac"', {
|
[ 'OS=="mac"', {
|
||||||
# Don't use clang with CEF binary releases due to Chromium tree structure dependency.
|
# Don't use clang with CEF binary releases due to Chromium tree structure dependency.
|
||||||
'clang': 0,
|
'clang': 0,
|
||||||
}]
|
}],
|
||||||
|
['sysroot!=""', {
|
||||||
|
'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
|
||||||
|
}, {
|
||||||
|
'pkg-config': 'pkg-config'
|
||||||
|
}],
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
'includes': [
|
'includes': [
|
||||||
@ -112,7 +119,29 @@
|
|||||||
'<@(cefclient_bundle_resources_linux)',
|
'<@(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': [
|
'sources': [
|
||||||
'<@(includes_linux)',
|
'<@(includes_linux)',
|
||||||
'<@(cefclient_sources_linux)',
|
'<@(cefclient_sources_linux)',
|
||||||
@ -140,6 +169,41 @@
|
|||||||
# Target build path.
|
# Target build path.
|
||||||
'SYMROOT': 'xcodebuild',
|
'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"
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
8
cef1/tools/distrib/linux/build.sh
Executable file
8
cef1/tools/distrib/linux/build.sh
Executable file
@ -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:
|
else:
|
||||||
copy_file(fname, dst, quiet)
|
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):
|
def copy_dir(src, dst, quiet = True):
|
||||||
""" Copy a directory tree. """
|
""" Copy a directory tree. """
|
||||||
try:
|
try:
|
||||||
@ -109,3 +120,11 @@ def make_dir(name, quiet = True):
|
|||||||
def get_files(search_glob):
|
def get_files(search_glob):
|
||||||
""" Returns all files matching the search glob. """
|
""" Returns all files matching the search glob. """
|
||||||
return iglob(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]
|
||||||
|
@ -101,6 +101,7 @@ def transfer_files(cef_dir, script_dir, transfer_cfg, output_dir, quiet):
|
|||||||
def generate_msvs_projects(version):
|
def generate_msvs_projects(version):
|
||||||
""" Generate MSVS projects for the specified version. """
|
""" Generate MSVS projects for the specified version. """
|
||||||
sys.stdout.write('Generating '+version+' project files...')
|
sys.stdout.write('Generating '+version+' project files...')
|
||||||
|
os.environ['GYP_GENERATORS'] = 'msvs'
|
||||||
os.environ['GYP_MSVS_VERSION'] = version
|
os.environ['GYP_MSVS_VERSION'] = version
|
||||||
gyper = [ 'python', 'tools/gyp_cef', os.path.relpath(os.path.join(output_dir, 'cefclient.gyp'), cef_dir) ]
|
gyper = [ 'python', 'tools/gyp_cef', os.path.relpath(os.path.join(output_dir, 'cefclient.gyp'), cef_dir) ]
|
||||||
RunAction(cef_dir, gyper);
|
RunAction(cef_dir, gyper);
|
||||||
@ -120,6 +121,24 @@ def fix_msvs_projects():
|
|||||||
data = data.replace('..\\..\\..\\build\\', '')
|
data = data.replace('..\\..\\..\\build\\', '')
|
||||||
write_file(file, data)
|
write_file(file, data)
|
||||||
|
|
||||||
|
def fix_make_projects():
|
||||||
|
""" Fix the output directory path in Makefile all .mk files. """
|
||||||
|
find = os.path.relpath(output_dir, src_dir)
|
||||||
|
files = [os.path.join(output_dir, 'Makefile')]
|
||||||
|
for file in get_files(os.path.join(output_dir, '*.mk')):
|
||||||
|
files.append(file)
|
||||||
|
for file in files:
|
||||||
|
data = read_file(file)
|
||||||
|
data = data.replace(find, '.')
|
||||||
|
if os.path.basename(file) == 'Makefile':
|
||||||
|
# remove the quiet_cmd_regen_makefile section
|
||||||
|
pos = str.find(data, 'quiet_cmd_regen_makefile')
|
||||||
|
if pos >= 0:
|
||||||
|
epos = str.find(data, '#', pos)
|
||||||
|
if epos >= 0:
|
||||||
|
data = data[0:pos] + data[epos:]
|
||||||
|
write_file(file, data)
|
||||||
|
|
||||||
def run(command_line, working_dir):
|
def run(command_line, working_dir):
|
||||||
""" Run a command. """
|
""" Run a command. """
|
||||||
sys.stdout.write('-------- Running "'+command_line+'" in "'+\
|
sys.stdout.write('-------- Running "'+command_line+'" in "'+\
|
||||||
@ -144,6 +163,15 @@ parser.add_option('--output-dir', dest='outputdir', metavar='DIR',
|
|||||||
parser.add_option('--allow-partial',
|
parser.add_option('--allow-partial',
|
||||||
action='store_true', dest='allowpartial', default=False,
|
action='store_true', dest='allowpartial', default=False,
|
||||||
help='allow creation of partial distributions')
|
help='allow creation of partial distributions')
|
||||||
|
parser.add_option('--no-symbols',
|
||||||
|
action='store_true', dest='nosymbols', default=False,
|
||||||
|
help='do not create symbol files')
|
||||||
|
parser.add_option('--ninja-build',
|
||||||
|
action='store_true', dest='ninjabuild', default=False,
|
||||||
|
help='build was created using ninja')
|
||||||
|
parser.add_option('--minimal',
|
||||||
|
action='store_true', dest='minimal', default=False,
|
||||||
|
help='include only release build binary files')
|
||||||
parser.add_option('-q', '--quiet',
|
parser.add_option('-q', '--quiet',
|
||||||
action='store_true', dest='quiet', default=False,
|
action='store_true', dest='quiet', default=False,
|
||||||
help='do not output detailed status information')
|
help='do not output detailed status information')
|
||||||
@ -160,6 +188,9 @@ script_dir = os.path.dirname(__file__)
|
|||||||
# CEF root directory
|
# CEF root directory
|
||||||
cef_dir = os.path.abspath(os.path.join(script_dir, os.pardir))
|
cef_dir = os.path.abspath(os.path.join(script_dir, os.pardir))
|
||||||
|
|
||||||
|
# src directory
|
||||||
|
src_dir = os.path.abspath(os.path.join(cef_dir, os.pardir))
|
||||||
|
|
||||||
# retrieve url, revision and date information
|
# retrieve url, revision and date information
|
||||||
cef_info = get_svn_info(cef_dir)
|
cef_info = get_svn_info(cef_dir)
|
||||||
cef_url = cef_info['url']
|
cef_url = cef_info['url']
|
||||||
@ -170,15 +201,12 @@ chromium_rev = chromium_info['revision']
|
|||||||
date = get_date()
|
date = get_date()
|
||||||
|
|
||||||
# Read and parse the version file (key=value pairs, one per line)
|
# Read and parse the version file (key=value pairs, one per line)
|
||||||
chrome = {}
|
args = {}
|
||||||
lines = read_file(os.path.join(cef_dir, '../chrome/VERSION')).split("\n")
|
read_version_file(os.path.join(cef_dir, 'VERSION'), args)
|
||||||
for line in lines:
|
read_version_file(os.path.join(cef_dir, '../chrome/VERSION'), args)
|
||||||
parts = line.split('=', 1)
|
|
||||||
if len(parts) == 2:
|
|
||||||
chrome[parts[0]] = parts[1]
|
|
||||||
|
|
||||||
cef_ver = '1.'+chrome['BUILD']+'.'+cef_rev
|
cef_ver = args['CEF_MAJOR']+'.'+args['BUILD']+'.'+cef_rev
|
||||||
chromium_ver = chrome['MAJOR']+'.'+chrome['MINOR']+'.'+chrome['BUILD']+'.'+chrome['PATCH']
|
chromium_ver = args['MAJOR']+'.'+args['MINOR']+'.'+args['BUILD']+'.'+args['PATCH']
|
||||||
|
|
||||||
# Test the operating system.
|
# Test the operating system.
|
||||||
platform = '';
|
platform = '';
|
||||||
@ -190,16 +218,19 @@ elif sys.platform.startswith('linux'):
|
|||||||
platform = 'linux'
|
platform = 'linux'
|
||||||
|
|
||||||
# output directory
|
# output directory
|
||||||
output_dir = os.path.abspath(os.path.join(options.outputdir, \
|
output_dir_name = 'cef_binary_'+cef_ver+'_'+platform
|
||||||
'cef_binary_'+cef_ver+'_'+platform))
|
if options.minimal:
|
||||||
|
output_dir_name = output_dir_name + '_minimal'
|
||||||
|
output_dir = os.path.abspath(os.path.join(options.outputdir, output_dir_name))
|
||||||
remove_dir(output_dir, options.quiet)
|
remove_dir(output_dir, options.quiet)
|
||||||
make_dir(output_dir, options.quiet)
|
make_dir(output_dir, options.quiet)
|
||||||
|
|
||||||
# symbol directory
|
if not options.nosymbols:
|
||||||
symbol_dir = os.path.abspath(os.path.join(options.outputdir, \
|
# symbol directory
|
||||||
'cef_binary_'+cef_ver+'_'+platform+'_symbols'))
|
symbol_dir_name = output_dir_name + '_symbols'
|
||||||
remove_dir(symbol_dir, options.quiet)
|
symbol_dir = os.path.abspath(os.path.join(options.outputdir, symbol_dir_name))
|
||||||
make_dir(symbol_dir, options.quiet)
|
remove_dir(symbol_dir, options.quiet)
|
||||||
|
make_dir(symbol_dir, options.quiet)
|
||||||
|
|
||||||
# transfer the LICENSE.txt file
|
# transfer the LICENSE.txt file
|
||||||
copy_file(os.path.join(cef_dir, 'LICENSE.txt'), output_dir, options.quiet)
|
copy_file(os.path.join(cef_dir, 'LICENSE.txt'), output_dir, options.quiet)
|
||||||
@ -212,245 +243,317 @@ cef_paths = cef_paths['variables']
|
|||||||
cef_paths2 = eval_file(os.path.join(cef_dir, 'cef_paths2.gypi'))
|
cef_paths2 = eval_file(os.path.join(cef_dir, 'cef_paths2.gypi'))
|
||||||
cef_paths2 = cef_paths2['variables']
|
cef_paths2 = cef_paths2['variables']
|
||||||
|
|
||||||
# create the include directory
|
if not options.minimal:
|
||||||
include_dir = os.path.join(output_dir, 'include')
|
# create the include directory
|
||||||
make_dir(include_dir, options.quiet)
|
include_dir = os.path.join(output_dir, 'include')
|
||||||
|
make_dir(include_dir, options.quiet)
|
||||||
|
|
||||||
# create the cefclient directory
|
# create the cefclient directory
|
||||||
cefclient_dir = os.path.join(output_dir, 'cefclient')
|
cefclient_dir = os.path.join(output_dir, 'cefclient')
|
||||||
make_dir(cefclient_dir, options.quiet)
|
make_dir(cefclient_dir, options.quiet)
|
||||||
|
|
||||||
# create the libcef_dll_wrapper directory
|
# create the libcef_dll_wrapper directory
|
||||||
wrapper_dir = os.path.join(output_dir, 'libcef_dll')
|
wrapper_dir = os.path.join(output_dir, 'libcef_dll')
|
||||||
make_dir(wrapper_dir, options.quiet)
|
make_dir(wrapper_dir, options.quiet)
|
||||||
|
|
||||||
# transfer common include files
|
# transfer common include files
|
||||||
transfer_gypi_files(cef_dir, cef_paths2['includes_common'], \
|
transfer_gypi_files(cef_dir, cef_paths2['includes_common'], \
|
||||||
'include/', include_dir, options.quiet)
|
'include/', include_dir, options.quiet)
|
||||||
transfer_gypi_files(cef_dir, cef_paths2['includes_capi'], \
|
transfer_gypi_files(cef_dir, cef_paths2['includes_capi'], \
|
||||||
'include/', include_dir, options.quiet)
|
'include/', include_dir, options.quiet)
|
||||||
transfer_gypi_files(cef_dir, cef_paths2['includes_wrapper'], \
|
transfer_gypi_files(cef_dir, cef_paths2['includes_wrapper'], \
|
||||||
'include/', include_dir, options.quiet)
|
'include/', include_dir, options.quiet)
|
||||||
transfer_gypi_files(cef_dir, cef_paths['autogen_cpp_includes'], \
|
transfer_gypi_files(cef_dir, cef_paths['autogen_cpp_includes'], \
|
||||||
'include/', include_dir, options.quiet)
|
'include/', include_dir, options.quiet)
|
||||||
transfer_gypi_files(cef_dir, cef_paths['autogen_capi_includes'], \
|
transfer_gypi_files(cef_dir, cef_paths['autogen_capi_includes'], \
|
||||||
'include/', include_dir, options.quiet)
|
'include/', include_dir, options.quiet)
|
||||||
|
|
||||||
# transfer common cefclient files
|
# transfer common cefclient files
|
||||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_common'], \
|
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_common'], \
|
||||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||||
|
transfer_gypi_files(cef_dir, cef_paths2['cefclient_bundle_resources_common'], \
|
||||||
|
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||||
|
|
||||||
# transfer common libcef_dll_wrapper files
|
# transfer common libcef_dll_wrapper files
|
||||||
transfer_gypi_files(cef_dir, cef_paths2['libcef_dll_wrapper_sources_common'], \
|
transfer_gypi_files(cef_dir, cef_paths2['libcef_dll_wrapper_sources_common'], \
|
||||||
'libcef_dll/', wrapper_dir, options.quiet)
|
'libcef_dll/', wrapper_dir, options.quiet)
|
||||||
transfer_gypi_files(cef_dir, cef_paths['autogen_client_side'], \
|
transfer_gypi_files(cef_dir, cef_paths['autogen_client_side'], \
|
||||||
'libcef_dll/', wrapper_dir, options.quiet)
|
'libcef_dll/', wrapper_dir, options.quiet)
|
||||||
|
|
||||||
# transfer gyp files
|
# transfer gyp files
|
||||||
copy_file(os.path.join(script_dir, 'distrib/cefclient.gyp'), output_dir, options.quiet)
|
copy_file(os.path.join(script_dir, 'distrib/cefclient.gyp'), output_dir, options.quiet)
|
||||||
paths_gypi = os.path.join(cef_dir, 'cef_paths2.gypi')
|
paths_gypi = os.path.join(cef_dir, 'cef_paths2.gypi')
|
||||||
data = read_file(paths_gypi)
|
data = read_file(paths_gypi)
|
||||||
data = data.replace('tests/cefclient/', 'cefclient/')
|
data = data.replace('tests/cefclient/', 'cefclient/')
|
||||||
write_file(os.path.join(output_dir, 'cef_paths2.gypi'), data)
|
write_file(os.path.join(output_dir, 'cef_paths2.gypi'), data)
|
||||||
copy_file(os.path.join(cef_dir, 'cef_paths.gypi'), \
|
copy_file(os.path.join(cef_dir, 'cef_paths.gypi'), \
|
||||||
os.path.join(output_dir, 'cef_paths.gypi'), options.quiet)
|
os.path.join(output_dir, 'cef_paths.gypi'), options.quiet)
|
||||||
|
|
||||||
# transfer additional files
|
# transfer additional files
|
||||||
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/transfer.cfg'), \
|
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/transfer.cfg'), \
|
||||||
output_dir, options.quiet)
|
output_dir, options.quiet)
|
||||||
|
|
||||||
if platform == 'windows':
|
if platform == 'windows':
|
||||||
# create the README.TXT file
|
# create the README.TXT file
|
||||||
create_readme(os.path.join(script_dir, 'distrib/win/README.txt'), output_dir, cef_url, \
|
create_readme(os.path.join(script_dir, 'distrib/win/README.txt'), output_dir, cef_url, \
|
||||||
cef_rev, cef_ver, chromium_url, chromium_rev, chromium_ver, date)
|
cef_rev, cef_ver, chromium_url, chromium_rev, chromium_ver, date)
|
||||||
|
|
||||||
# transfer include files
|
if not options.minimal:
|
||||||
transfer_gypi_files(cef_dir, cef_paths2['includes_win'], \
|
# transfer include files
|
||||||
'include/', include_dir, options.quiet)
|
transfer_gypi_files(cef_dir, cef_paths2['includes_win'], \
|
||||||
|
'include/', include_dir, options.quiet)
|
||||||
|
|
||||||
# transfer cefclient files
|
# transfer cefclient files
|
||||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_win'], \
|
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_win'], \
|
||||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||||
|
|
||||||
# transfer build/Debug files
|
if options.ninjabuild:
|
||||||
if not options.allowpartial or path_exists(os.path.join(cef_dir, 'Debug')):
|
out_dir = os.path.join(src_dir, 'out')
|
||||||
dst_dir = os.path.join(output_dir, 'Debug')
|
libcef_dll_file = 'libcef.dll.lib'
|
||||||
make_dir(dst_dir, options.quiet)
|
|
||||||
copy_files(os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet)
|
|
||||||
copy_file(os.path.join(cef_dir, 'Debug/cefclient.exe'), dst_dir, options.quiet)
|
|
||||||
copy_file(os.path.join(cef_dir, 'Debug/devtools_resources.pak'), dst_dir, options.quiet)
|
|
||||||
copy_file(os.path.join(cef_dir, 'Debug/icudt.dll'), dst_dir, options.quiet)
|
|
||||||
copy_file(os.path.join(cef_dir, 'Debug/libcef.dll'), dst_dir, options.quiet)
|
|
||||||
copy_file(os.path.join(cef_dir, 'Debug/libEGL.dll'), dst_dir, options.quiet)
|
|
||||||
copy_file(os.path.join(cef_dir, 'Debug/libGLESv2.dll'), dst_dir, options.quiet)
|
|
||||||
copy_dir(os.path.join(cef_dir, 'Debug/locales'), os.path.join(dst_dir, 'locales'), \
|
|
||||||
options.quiet)
|
|
||||||
|
|
||||||
# transfer lib/Debug files
|
|
||||||
dst_dir = os.path.join(output_dir, 'lib/Debug')
|
|
||||||
make_dir(dst_dir, options.quiet)
|
|
||||||
copy_file(os.path.join(cef_dir, 'Debug/lib/libcef.lib'), dst_dir, options.quiet)
|
|
||||||
else:
|
else:
|
||||||
sys.stderr.write("No Debug build files.\n")
|
out_dir = cef_dir
|
||||||
|
libcef_dll_file = 'lib/libcef.lib'
|
||||||
|
|
||||||
|
if not options.minimal:
|
||||||
|
# transfer build/Debug files
|
||||||
|
build_dir = os.path.join(out_dir, 'Debug');
|
||||||
|
if not options.allowpartial or path_exists(os.path.join(build_dir, 'cefclient.exe')):
|
||||||
|
dst_dir = os.path.join(output_dir, 'Debug')
|
||||||
|
make_dir(dst_dir, options.quiet)
|
||||||
|
copy_files(os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet)
|
||||||
|
copy_files(os.path.join(build_dir, '*.dll'), dst_dir, options.quiet)
|
||||||
|
copy_file(os.path.join(build_dir, 'cefclient.exe'), dst_dir, options.quiet)
|
||||||
|
copy_file(os.path.join(build_dir, 'devtools_resources.pak'), dst_dir, options.quiet)
|
||||||
|
copy_dir(os.path.join(build_dir, 'locales'), os.path.join(dst_dir, 'locales'), \
|
||||||
|
options.quiet)
|
||||||
|
|
||||||
|
# transfer lib/Debug files
|
||||||
|
dst_dir = os.path.join(output_dir, 'lib/Debug')
|
||||||
|
make_dir(dst_dir, options.quiet)
|
||||||
|
copy_file(os.path.join(build_dir, libcef_dll_file), os.path.join(dst_dir, 'libcef.lib'), \
|
||||||
|
options.quiet)
|
||||||
|
else:
|
||||||
|
sys.stderr.write("No Debug build files.\n")
|
||||||
|
|
||||||
# transfer build/Release files
|
# transfer build/Release files
|
||||||
if not options.allowpartial or path_exists(os.path.join(cef_dir, 'Release')):
|
build_dir = os.path.join(out_dir, 'Release');
|
||||||
|
if not options.allowpartial or path_exists(os.path.join(build_dir, 'cefclient.exe')):
|
||||||
dst_dir = os.path.join(output_dir, 'Release')
|
dst_dir = os.path.join(output_dir, 'Release')
|
||||||
make_dir(dst_dir, options.quiet)
|
make_dir(dst_dir, options.quiet)
|
||||||
copy_files(os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet)
|
copy_files(os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet)
|
||||||
copy_file(os.path.join(cef_dir, 'Release/cefclient.exe'), dst_dir, options.quiet)
|
copy_files(os.path.join(build_dir, '*.dll'), dst_dir, options.quiet)
|
||||||
copy_file(os.path.join(cef_dir, 'Release/devtools_resources.pak'), dst_dir, options.quiet)
|
if not options.minimal:
|
||||||
copy_file(os.path.join(cef_dir, 'Release/icudt.dll'), dst_dir, options.quiet)
|
copy_file(os.path.join(build_dir, 'cefclient.exe'), dst_dir, options.quiet)
|
||||||
copy_file(os.path.join(cef_dir, 'Release/libcef.dll'), dst_dir, options.quiet)
|
copy_file(os.path.join(build_dir, 'devtools_resources.pak'), dst_dir, options.quiet)
|
||||||
copy_file(os.path.join(cef_dir, 'Release/libEGL.dll'), dst_dir, options.quiet)
|
copy_dir(os.path.join(build_dir, 'locales'), os.path.join(dst_dir, 'locales'), \
|
||||||
copy_file(os.path.join(cef_dir, 'Release/libGLESv2.dll'), dst_dir, options.quiet)
|
|
||||||
copy_dir(os.path.join(cef_dir, 'Release/locales'), os.path.join(dst_dir, 'locales'), \
|
|
||||||
options.quiet)
|
options.quiet)
|
||||||
|
|
||||||
# transfer lib/Release files
|
# transfer lib/Release files
|
||||||
dst_dir = os.path.join(output_dir, 'lib/Release')
|
dst_dir = os.path.join(output_dir, 'lib/Release')
|
||||||
make_dir(dst_dir, options.quiet)
|
make_dir(dst_dir, options.quiet)
|
||||||
copy_file(os.path.join(cef_dir, 'Release/lib/libcef.lib'), dst_dir, options.quiet)
|
copy_file(os.path.join(build_dir, libcef_dll_file), os.path.join(dst_dir, 'libcef.lib'), \
|
||||||
|
options.quiet)
|
||||||
|
|
||||||
# transfer symbols
|
if not options.nosymbols:
|
||||||
copy_file(os.path.join(cef_dir, 'Release/libcef.dll.pdb'), symbol_dir, options.quiet)
|
# transfer symbols
|
||||||
|
copy_file(os.path.join(build_dir, 'libcef.dll.pdb'), symbol_dir, options.quiet)
|
||||||
else:
|
else:
|
||||||
sys.stderr.write("No Release build files.\n")
|
sys.stderr.write("No Release build files.\n")
|
||||||
|
|
||||||
# generate doc files
|
if not options.minimal:
|
||||||
os.popen('make_cppdocs.bat '+cef_rev)
|
# generate doc files
|
||||||
|
os.popen('make_cppdocs.bat '+cef_rev)
|
||||||
|
|
||||||
# transfer docs files
|
# transfer docs files
|
||||||
dst_dir = os.path.join(output_dir, 'docs')
|
dst_dir = os.path.join(output_dir, 'docs')
|
||||||
src_dir = os.path.join(cef_dir, 'docs')
|
src_dir = os.path.join(cef_dir, 'docs')
|
||||||
if path_exists(src_dir):
|
if path_exists(src_dir):
|
||||||
copy_dir(src_dir, dst_dir, options.quiet)
|
copy_dir(src_dir, dst_dir, options.quiet)
|
||||||
|
|
||||||
# transfer additional files, if any
|
# transfer additional files, if any
|
||||||
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/win/transfer.cfg'), \
|
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/win/transfer.cfg'), \
|
||||||
output_dir, options.quiet)
|
output_dir, options.quiet)
|
||||||
|
|
||||||
# generate the project files
|
# generate the project files
|
||||||
generate_msvs_projects('2005');
|
generate_msvs_projects('2005');
|
||||||
generate_msvs_projects('2008');
|
generate_msvs_projects('2008');
|
||||||
generate_msvs_projects('2010');
|
generate_msvs_projects('2010');
|
||||||
fix_msvs_projects();
|
fix_msvs_projects();
|
||||||
|
|
||||||
elif platform == 'macosx':
|
elif platform == 'macosx':
|
||||||
# create the README.TXT file
|
# create the README.TXT file
|
||||||
create_readme(os.path.join(script_dir, 'distrib/mac/README.txt'), output_dir, cef_url, \
|
create_readme(os.path.join(script_dir, 'distrib/mac/README.txt'), output_dir, cef_url, \
|
||||||
cef_rev, cef_ver, chromium_url, chromium_rev, chromium_ver, date)
|
cef_rev, cef_ver, chromium_url, chromium_rev, chromium_ver, date)
|
||||||
|
|
||||||
# transfer include files
|
if not options.minimal:
|
||||||
transfer_gypi_files(cef_dir, cef_paths2['includes_mac'], \
|
# transfer include files
|
||||||
'include/', include_dir, options.quiet)
|
transfer_gypi_files(cef_dir, cef_paths2['includes_mac'], \
|
||||||
|
'include/', include_dir, options.quiet)
|
||||||
|
|
||||||
# transfer cefclient files
|
# transfer cefclient files
|
||||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_mac'], \
|
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_mac'], \
|
||||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_bundle_resources_mac'], \
|
transfer_gypi_files(cef_dir, cef_paths2['cefclient_bundle_resources_mac'], \
|
||||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||||
|
|
||||||
# transfer cefclient/mac files
|
# transfer cefclient/mac files
|
||||||
copy_dir(os.path.join(cef_dir, 'tests/cefclient/mac/'), os.path.join(output_dir, 'cefclient/mac/'), \
|
copy_dir(os.path.join(cef_dir, 'tests/cefclient/mac/'), os.path.join(output_dir, 'cefclient/mac/'), \
|
||||||
options.quiet)
|
options.quiet)
|
||||||
|
|
||||||
# transfer xcodebuild/Debug files
|
if options.ninjabuild:
|
||||||
if not options.allowpartial or path_exists(os.path.join(cef_dir, '../xcodebuild/Debug')):
|
out_dir = os.path.join(src_dir, 'out')
|
||||||
dst_dir = os.path.join(output_dir, 'Debug')
|
else:
|
||||||
make_dir(dst_dir, options.quiet)
|
out_dir = os.path.join(src_dir, 'xcodebuild')
|
||||||
copy_file(os.path.join(cef_dir, '../xcodebuild/Debug/libcef.dylib'), dst_dir, options.quiet)
|
|
||||||
|
valid_build_dir = None
|
||||||
|
|
||||||
|
if not options.minimal:
|
||||||
|
# transfer xcodebuild/Debug files
|
||||||
|
build_dir = os.path.join(out_dir, 'Debug')
|
||||||
|
if not options.allowpartial or path_exists(os.path.join(build_dir, 'cefclient.app')):
|
||||||
|
valid_build_dir = build_dir
|
||||||
|
dst_dir = os.path.join(output_dir, 'Debug')
|
||||||
|
make_dir(dst_dir, options.quiet)
|
||||||
|
copy_file(os.path.join(build_dir, 'libcef.dylib'), dst_dir, options.quiet)
|
||||||
|
|
||||||
# transfer xcodebuild/Release files
|
# transfer xcodebuild/Release files
|
||||||
if not options.allowpartial or path_exists(os.path.join(cef_dir, '../xcodebuild/Release')):
|
build_dir = os.path.join(out_dir, 'Release')
|
||||||
|
if not options.allowpartial or path_exists(os.path.join(build_dir, 'cefclient.app')):
|
||||||
|
valid_build_dir = build_dir
|
||||||
dst_dir = os.path.join(output_dir, 'Release')
|
dst_dir = os.path.join(output_dir, 'Release')
|
||||||
make_dir(dst_dir, options.quiet)
|
make_dir(dst_dir, options.quiet)
|
||||||
copy_file(os.path.join(cef_dir, '../xcodebuild/Release/libcef.dylib'), dst_dir, options.quiet)
|
copy_file(os.path.join(build_dir, 'libcef.dylib'), dst_dir, options.quiet)
|
||||||
|
|
||||||
# create the real dSYM file from the "fake" dSYM file
|
if not options.nosymbols:
|
||||||
sys.stdout.write("Creating the real dSYM file...\n")
|
# create the real dSYM file from the "fake" dSYM file
|
||||||
src_path = os.path.join(cef_dir, '../xcodebuild/Release/libcef.dylib.dSYM/Contents/Resources/DWARF/libcef.dylib')
|
sys.stdout.write("Creating the real dSYM file...\n")
|
||||||
dst_path = os.path.join(symbol_dir, 'libcef.dylib.dSYM')
|
src_path = os.path.join(build_dir, 'libcef.dylib.dSYM/Contents/Resources/DWARF/libcef.dylib')
|
||||||
run('dsymutil '+src_path+' -o '+dst_path, cef_dir)
|
dst_path = os.path.join(symbol_dir, 'libcef.dylib.dSYM')
|
||||||
|
run('dsymutil '+src_path+' -o '+dst_path, cef_dir)
|
||||||
|
|
||||||
# transfer resource files
|
if not valid_build_dir is None:
|
||||||
dst_dir = os.path.join(output_dir, 'Resources')
|
# transfer resource files
|
||||||
make_dir(dst_dir, options.quiet)
|
build_dir = valid_build_dir
|
||||||
copy_files(os.path.join(cef_dir, '../third_party/WebKit/Source/WebCore/Resources/*.*'), dst_dir, options.quiet)
|
dst_dir = os.path.join(output_dir, 'Resources')
|
||||||
copy_file(os.path.join(cef_dir, '../xcodebuild/Release/cefclient.app/Contents/Resources/chrome.pak'), dst_dir, options.quiet)
|
make_dir(dst_dir, options.quiet)
|
||||||
copy_file(os.path.join(cef_dir, '../xcodebuild/Release/cefclient.app/Contents/Resources/devtools_resources.pak'), dst_dir, options.quiet)
|
copy_files(os.path.join(cef_dir, '../third_party/WebKit/Source/WebCore/Resources/*.*'), dst_dir, options.quiet)
|
||||||
copy_files(os.path.join(cef_dir, '../xcodebuild/Release/cefclient.app/Contents/Resources/*.lproj'), dst_dir, options.quiet)
|
copy_file(os.path.join(build_dir, 'cefclient.app/Contents/Resources/chrome.pak'), dst_dir, options.quiet)
|
||||||
remove_dir(os.path.join(dst_dir, 'English.lproj'))
|
copy_file(os.path.join(build_dir, 'cefclient.app/Contents/Resources/devtools_resources.pak'), dst_dir, options.quiet)
|
||||||
|
copy_files(os.path.join(build_dir, 'cefclient.app/Contents/Resources/*.lproj'), dst_dir, options.quiet)
|
||||||
|
remove_dir(os.path.join(dst_dir, 'English.lproj'))
|
||||||
|
|
||||||
# transfer additional files, if any
|
|
||||||
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/mac/transfer.cfg'), \
|
|
||||||
output_dir, options.quiet)
|
|
||||||
|
|
||||||
# Generate Xcode project files
|
if not options.minimal:
|
||||||
sys.stdout.write('Generating Xcode project files...')
|
# transfer additional files, if any
|
||||||
gyper = [ 'python', 'tools/gyp_cef', os.path.relpath(os.path.join(output_dir, 'cefclient.gyp'), cef_dir) ]
|
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/mac/transfer.cfg'), \
|
||||||
RunAction(cef_dir, gyper);
|
output_dir, options.quiet)
|
||||||
|
|
||||||
# Post-process the Xcode project to fix file paths
|
# Generate Xcode project files
|
||||||
src_file = os.path.join(output_dir, 'cefclient.xcodeproj/project.pbxproj')
|
sys.stdout.write('Generating Xcode project files...')
|
||||||
data = read_file(src_file)
|
os.environ['GYP_GENERATORS'] = 'xcode'
|
||||||
data = data.replace('../../../build/mac/', 'tools/')
|
gyper = [ 'python', 'tools/gyp_cef', os.path.relpath(os.path.join(output_dir, 'cefclient.gyp'), cef_dir) ]
|
||||||
data = data.replace('../../../', '')
|
RunAction(cef_dir, gyper);
|
||||||
write_file(src_file, data)
|
|
||||||
|
# Post-process the Xcode project to fix file paths
|
||||||
|
src_file = os.path.join(output_dir, 'cefclient.xcodeproj/project.pbxproj')
|
||||||
|
data = read_file(src_file)
|
||||||
|
data = data.replace('../../../build/mac/', 'tools/')
|
||||||
|
data = data.replace('../../../build', 'build')
|
||||||
|
data = data.replace('../../../xcodebuild', 'xcodebuild')
|
||||||
|
write_file(src_file, data)
|
||||||
|
|
||||||
elif platform == 'linux':
|
elif platform == 'linux':
|
||||||
linux_build_dir = os.path.join(cef_dir, os.pardir, 'out')
|
|
||||||
|
|
||||||
# create the README.TXT file
|
# create the README.TXT file
|
||||||
create_readme(os.path.join(script_dir, 'distrib/linux/README.txt'), output_dir, cef_url, \
|
create_readme(os.path.join(script_dir, 'distrib/linux/README.txt'), output_dir, cef_url, \
|
||||||
cef_rev, cef_ver, chromium_url, chromium_rev, chromium_ver, date)
|
cef_rev, cef_ver, chromium_url, chromium_rev, chromium_ver, date)
|
||||||
|
|
||||||
# transfer build/Debug files
|
out_dir = os.path.join(src_dir, 'out')
|
||||||
if not options.allowpartial or path_exists(os.path.join(linux_build_dir, 'Debug')):
|
if options.ninjabuild:
|
||||||
dst_dir = os.path.join(output_dir, 'Debug')
|
lib_dir_name = 'lib'
|
||||||
make_dir(dst_dir, options.quiet)
|
|
||||||
copy_dir(os.path.join(linux_build_dir, 'Debug/lib.target'), os.path.join(dst_dir, 'lib.target'), options.quiet)
|
|
||||||
copy_file(os.path.join(linux_build_dir, 'Debug/cefclient'), dst_dir, options.quiet)
|
|
||||||
copy_file(os.path.join(linux_build_dir, 'Debug/chrome.pak'), dst_dir, options.quiet)
|
|
||||||
copy_file(os.path.join(linux_build_dir, 'Debug/devtools_resources.pak'), dst_dir, options.quiet)
|
|
||||||
copy_dir(os.path.join(linux_build_dir, 'Debug/locales'), os.path.join(dst_dir, 'locales'), options.quiet)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
sys.stderr.write("No Debug build files.\n")
|
lib_dir_name = 'lib.target'
|
||||||
|
|
||||||
# transfer build/Release files
|
valid_build_dir = None
|
||||||
if not options.allowpartial or path_exists(os.path.join(linux_build_dir, 'Release')):
|
|
||||||
|
if not options.minimal:
|
||||||
|
# transfer out/Debug files
|
||||||
|
build_dir = os.path.join(out_dir, 'Debug');
|
||||||
|
if not options.allowpartial or path_exists(os.path.join(build_dir, 'cefclient')):
|
||||||
|
valid_build_dir = build_dir
|
||||||
|
dst_dir = os.path.join(output_dir, 'Debug')
|
||||||
|
make_dir(dst_dir, options.quiet)
|
||||||
|
copy_file(os.path.join(build_dir, lib_dir_name, 'libcef.so'), dst_dir, options.quiet)
|
||||||
|
else:
|
||||||
|
sys.stderr.write("No Debug build files.\n")
|
||||||
|
|
||||||
|
# transfer out/Release files
|
||||||
|
build_dir = os.path.join(out_dir, 'Release');
|
||||||
|
if not options.allowpartial or path_exists(os.path.join(build_dir, 'cefclient')):
|
||||||
|
valid_build_dir = build_dir
|
||||||
dst_dir = os.path.join(output_dir, 'Release')
|
dst_dir = os.path.join(output_dir, 'Release')
|
||||||
make_dir(dst_dir, options.quiet)
|
make_dir(dst_dir, options.quiet)
|
||||||
copy_dir(os.path.join(linux_build_dir, 'Release/lib.target'), os.path.join(dst_dir, 'lib.target'), options.quiet)
|
copy_file(os.path.join(build_dir, lib_dir_name, 'libcef.so'), dst_dir, options.quiet)
|
||||||
copy_file(os.path.join(linux_build_dir, 'Release/cefclient'), dst_dir, options.quiet)
|
|
||||||
copy_file(os.path.join(linux_build_dir, 'Release/chrome.pak'), dst_dir, options.quiet)
|
|
||||||
copy_file(os.path.join(linux_build_dir, 'Release/devtools_resources.pak'), dst_dir, options.quiet)
|
|
||||||
copy_dir(os.path.join(linux_build_dir, 'Release/locales'), os.path.join(dst_dir, 'locales'), options.quiet)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
sys.stderr.write("No Release build files.\n")
|
sys.stderr.write("No Release build files.\n")
|
||||||
|
|
||||||
# transfer include files
|
if not valid_build_dir is None:
|
||||||
transfer_gypi_files(cef_dir, cef_paths2['includes_linux'], \
|
# transfer resource files
|
||||||
'include/', include_dir, options.quiet)
|
build_dir = valid_build_dir
|
||||||
|
dst_dir = os.path.join(output_dir, 'Resources')
|
||||||
|
make_dir(dst_dir, options.quiet)
|
||||||
|
copy_file(os.path.join(build_dir, 'chrome.pak'), dst_dir, options.quiet)
|
||||||
|
copy_file(os.path.join(build_dir, 'devtools_resources.pak'), dst_dir, options.quiet)
|
||||||
|
copy_dir(os.path.join(build_dir, 'locales'), os.path.join(dst_dir, 'locales'), options.quiet)
|
||||||
|
|
||||||
# transfer cefclient files
|
if not options.minimal:
|
||||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_linux'], \
|
# transfer include files
|
||||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
transfer_gypi_files(cef_dir, cef_paths2['includes_linux'], \
|
||||||
|
'include/', include_dir, options.quiet)
|
||||||
|
|
||||||
# transfer additional files, if any
|
# transfer cefclient files
|
||||||
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/linux/transfer.cfg'), \
|
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_linux'], \
|
||||||
output_dir, options.quiet)
|
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||||
|
transfer_gypi_files(cef_dir, cef_paths2['cefclient_bundle_resources_linux'], \
|
||||||
|
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||||
|
|
||||||
|
# transfer additional files, if any
|
||||||
|
copy_file(os.path.join(script_dir, 'distrib/linux/build.sh'), output_dir, options.quiet)
|
||||||
|
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/linux/transfer.cfg'), \
|
||||||
|
output_dir, options.quiet)
|
||||||
|
|
||||||
|
makefile = os.path.join(src_dir, 'Makefile')
|
||||||
|
makefile_tmp = ''
|
||||||
|
if path_exists(makefile):
|
||||||
|
# Back up the existing Makefile
|
||||||
|
makefile_tmp = makefile + '.cef_bak'
|
||||||
|
copy_file(makefile, makefile_tmp, options.quiet)
|
||||||
|
|
||||||
|
# Generate make project files
|
||||||
|
sys.stdout.write('Generating make project files...')
|
||||||
|
os.environ['GYP_GENERATORS'] = 'make'
|
||||||
|
gyper = [ 'python', 'tools/gyp_cef', os.path.relpath(os.path.join(output_dir, 'cefclient.gyp'), cef_dir) ]
|
||||||
|
RunAction(cef_dir, gyper);
|
||||||
|
|
||||||
|
# Copy the resulting Makefile to the destination directory
|
||||||
|
copy_file(makefile, output_dir, options.quiet)
|
||||||
|
|
||||||
|
remove_file(makefile, options.quiet)
|
||||||
|
if makefile_tmp != '':
|
||||||
|
# Restore the original Makefile
|
||||||
|
move_file(makefile_tmp, makefile, options.quiet)
|
||||||
|
|
||||||
|
# Post-process the make files
|
||||||
|
fix_make_projects()
|
||||||
|
|
||||||
# Create an archive of the output directory
|
# Create an archive of the output directory
|
||||||
zip_file = os.path.split(output_dir)[1] + '.zip'
|
zip_file = output_dir_name + '.zip'
|
||||||
if not options.quiet:
|
if not options.quiet:
|
||||||
sys.stdout.write('Creating '+zip_file+"...\n")
|
sys.stdout.write('Creating '+zip_file+"...\n")
|
||||||
create_archive(output_dir, os.path.join(output_dir, os.pardir, zip_file))
|
create_archive(output_dir, os.path.join(output_dir, os.pardir, zip_file))
|
||||||
|
|
||||||
# Create an archive of the symbol directory
|
if not options.nosymbols:
|
||||||
zip_file = os.path.split(symbol_dir)[1] + '.zip'
|
# Create an archive of the symbol directory
|
||||||
if not options.quiet:
|
zip_file = symbol_dir_name + '.zip'
|
||||||
sys.stdout.write('Creating '+zip_file+"...\n")
|
if not options.quiet:
|
||||||
create_archive(symbol_dir, os.path.join(symbol_dir, os.pardir, zip_file))
|
sys.stdout.write('Creating '+zip_file+"...\n")
|
||||||
|
create_archive(symbol_dir, os.path.join(symbol_dir, os.pardir, zip_file))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user