Also build with static_library version of libchromiumcontent
This commit is contained in:
parent
ca161e29ce
commit
dab9e9be67
5 changed files with 102 additions and 69 deletions
58
atom.gyp
58
atom.gyp
|
@ -392,12 +392,16 @@
|
|||
# Rules for excluding e.g. foo_win.cc from the build on non-Windows.
|
||||
'filename_rules.gypi',
|
||||
],
|
||||
'conditions': [
|
||||
['libchromiumcontent_component', {
|
||||
'configurations': {
|
||||
'Debug': {
|
||||
'defines': [ 'DEBUG' ],
|
||||
'cflags': [ '-g', '-O0' ],
|
||||
},
|
||||
},
|
||||
}],
|
||||
],
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
|
@ -494,16 +498,16 @@
|
|||
{
|
||||
'destination': '<(PRODUCT_DIR)',
|
||||
'files': [
|
||||
'<(libchromiumcontent_library_dir)/chromiumcontent.dll',
|
||||
'<(libchromiumcontent_library_dir)/ffmpegsumo.dll',
|
||||
'<(libchromiumcontent_library_dir)/libEGL.dll',
|
||||
'<(libchromiumcontent_library_dir)/libGLESv2.dll',
|
||||
'<(libchromiumcontent_resources_dir)/icudtl.dat',
|
||||
'<(libchromiumcontent_resources_dir)/content_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_resources_dir)/content_shell.pak',
|
||||
'<(libchromiumcontent_resources_dir)/ui_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_resources_dir)/natives_blob.bin',
|
||||
'<(libchromiumcontent_resources_dir)/snapshot_blob.bin',
|
||||
'<(libchromiumcontent_dir)/chromiumcontent.dll',
|
||||
'<(libchromiumcontent_dir)/ffmpegsumo.dll',
|
||||
'<(libchromiumcontent_dir)/libEGL.dll',
|
||||
'<(libchromiumcontent_dir)/libGLESv2.dll',
|
||||
'<(libchromiumcontent_dir)/icudtl.dat',
|
||||
'<(libchromiumcontent_dir)/content_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/content_shell.pak',
|
||||
'<(libchromiumcontent_dir)/ui_resources_200_percent.pak',
|
||||
'<(libchromiumcontent_dir)/natives_blob.bin',
|
||||
'<(libchromiumcontent_dir)/snapshot_blob.bin',
|
||||
'external_binaries/d3dcompiler_47.dll',
|
||||
'external_binaries/msvcp120.dll',
|
||||
'external_binaries/msvcr120.dll',
|
||||
|
@ -524,12 +528,12 @@
|
|||
{
|
||||
'destination': '<(PRODUCT_DIR)',
|
||||
'files': [
|
||||
'<(libchromiumcontent_library_dir)/libchromiumcontent.so',
|
||||
'<(libchromiumcontent_library_dir)/libffmpegsumo.so',
|
||||
'<(libchromiumcontent_resources_dir)/icudtl.dat',
|
||||
'<(libchromiumcontent_resources_dir)/content_shell.pak',
|
||||
'<(libchromiumcontent_resources_dir)/natives_blob.bin',
|
||||
'<(libchromiumcontent_resources_dir)/snapshot_blob.bin',
|
||||
'<(libchromiumcontent_dir)/libchromiumcontent.so',
|
||||
'<(libchromiumcontent_dir)/libffmpegsumo.so',
|
||||
'<(libchromiumcontent_dir)/icudtl.dat',
|
||||
'<(libchromiumcontent_dir)/content_shell.pak',
|
||||
'<(libchromiumcontent_dir)/natives_blob.bin',
|
||||
'<(libchromiumcontent_dir)/snapshot_blob.bin',
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -716,7 +720,7 @@
|
|||
'--build-dir=<(PRODUCT_DIR)',
|
||||
'--binary=<(PRODUCT_DIR)/<(product_name).app/Contents/MacOS/<(product_name)',
|
||||
'--symbols-dir=<(PRODUCT_DIR)/Atom-Shell.breakpad.syms',
|
||||
'--libchromiumcontent-dir=<(libchromiumcontent_library_dir)',
|
||||
'--libchromiumcontent-dir=<(libchromiumcontent_dir)',
|
||||
'--clear',
|
||||
'--jobs=16',
|
||||
],
|
||||
|
@ -739,7 +743,7 @@
|
|||
'--symbols-dir=<(PRODUCT_DIR)/Atom-Shell.breakpad.syms',
|
||||
'--jobs=16',
|
||||
'<(PRODUCT_DIR)',
|
||||
'<(libchromiumcontent_library_dir)',
|
||||
'<(libchromiumcontent_dir)',
|
||||
],
|
||||
},
|
||||
],
|
||||
|
@ -763,7 +767,7 @@
|
|||
'--build-dir=<(PRODUCT_DIR)',
|
||||
'--binary=<(PRODUCT_DIR)/<(project_name)',
|
||||
'--symbols-dir=<(PRODUCT_DIR)/Atom-Shell.breakpad.syms',
|
||||
'--libchromiumcontent-dir=<(libchromiumcontent_library_dir)',
|
||||
'--libchromiumcontent-dir=<(libchromiumcontent_dir)',
|
||||
'--clear',
|
||||
'--jobs=16',
|
||||
],
|
||||
|
@ -808,7 +812,7 @@
|
|||
],
|
||||
},
|
||||
'inputs': [
|
||||
'<(libchromiumcontent_library_dir)/<(chromedriver_binary)',
|
||||
'<(libchromiumcontent_dir)/<(chromedriver_binary)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/<(chromedriver_binary)',
|
||||
|
@ -839,7 +843,7 @@
|
|||
'include_dirs': [
|
||||
'.',
|
||||
'vendor',
|
||||
'<(libchromiumcontent_include_dir)',
|
||||
'<(libchromiumcontent_src_dir)',
|
||||
],
|
||||
'defines': [
|
||||
'PRODUCT_NAME="<(product_name)"',
|
||||
|
@ -859,10 +863,10 @@
|
|||
'mac_bundle': 1,
|
||||
'mac_bundle_resources': [
|
||||
'atom/common/resources/mac/MainMenu.xib',
|
||||
'<(libchromiumcontent_resources_dir)/content_shell.pak',
|
||||
'<(libchromiumcontent_resources_dir)/icudtl.dat',
|
||||
'<(libchromiumcontent_resources_dir)/natives_blob.bin',
|
||||
'<(libchromiumcontent_resources_dir)/snapshot_blob.bin',
|
||||
'<(libchromiumcontent_dir)/content_shell.pak',
|
||||
'<(libchromiumcontent_dir)/icudtl.dat',
|
||||
'<(libchromiumcontent_dir)/natives_blob.bin',
|
||||
'<(libchromiumcontent_dir)/snapshot_blob.bin',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'INFOPLIST_FILE': 'atom/common/resources/mac/Info.plist',
|
||||
|
@ -879,7 +883,7 @@
|
|||
'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Libraries',
|
||||
'files': [
|
||||
'<@(libchromiumcontent_shared_libraries)',
|
||||
'<(libchromiumcontent_library_dir)/ffmpegsumo.so',
|
||||
'<(libchromiumcontent_dir)/ffmpegsumo.so',
|
||||
'<(PRODUCT_DIR)/libnode.dylib',
|
||||
],
|
||||
},
|
||||
|
@ -974,7 +978,7 @@
|
|||
'action_name': 'Create node.lib',
|
||||
'inputs': [
|
||||
'<(PRODUCT_DIR)/node.dll.lib',
|
||||
'<(libchromiumcontent_library_dir)/chromiumcontent.dll.lib',
|
||||
'<(libchromiumcontent_dir)/chromiumcontent.dll.lib',
|
||||
],
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/node.lib',
|
||||
|
|
41
common.gypi
41
common.gypi
|
@ -107,23 +107,42 @@
|
|||
],
|
||||
}],
|
||||
['_target_name=="node"', {
|
||||
'variables': {
|
||||
'conditions': [
|
||||
['OS=="linux"', {
|
||||
'libraries': [
|
||||
'<(libchromiumcontent_library_dir)/libv8.so',
|
||||
['OS=="linux" and libchromiumcontent_component==1', {
|
||||
'v8_libs': ['<(libchromiumcontent_dir)/libv8.so']
|
||||
}],
|
||||
['OS=="mac" and libchromiumcontent_component==1', {
|
||||
'v8_libs': ['<(libchromiumcontent_dir)/libv8.dylib']
|
||||
}],
|
||||
['OS=="win" and libchromiumcontent_component==1', {
|
||||
'v8_libs': ['<(libchromiumcontent_dir)/v8.dll.lib']
|
||||
}],
|
||||
['OS in ["linux", "mac"] and libchromiumcontent_component==0', {
|
||||
'v8_libs': [
|
||||
'<(libchromiumcontent_dir)/libv8_base.a',
|
||||
'<(libchromiumcontent_dir)/libv8_external_snapshot.a',
|
||||
'<(libchromiumcontent_dir)/libv8_libbase.a',
|
||||
'<(libchromiumcontent_dir)/libv8_libplatform.a',
|
||||
'<(libchromiumcontent_dir)/libicudata.a',
|
||||
'<(libchromiumcontent_dir)/libicui18n.a',
|
||||
'<(libchromiumcontent_dir)/libicuuc.a',
|
||||
],
|
||||
}],
|
||||
['OS=="win"', {
|
||||
'libraries': [
|
||||
'<(libchromiumcontent_library_dir)/v8.dll.lib',
|
||||
],
|
||||
}],
|
||||
['OS=="mac"', {
|
||||
'libraries': [
|
||||
'<(libchromiumcontent_library_dir)/libv8.dylib',
|
||||
['OS=="win" and libchromiumcontent_component==0', {
|
||||
'v8_libs': [
|
||||
'<(libchromiumcontent_dir)/v8_base.lib',
|
||||
'<(libchromiumcontent_dir)/v8_external_snapshot.lib',
|
||||
'<(libchromiumcontent_dir)/v8_libbase.lib',
|
||||
'<(libchromiumcontent_dir)/v8_libplatform.lib',
|
||||
'<(libchromiumcontent_dir)/icudata.lib',
|
||||
'<(libchromiumcontent_dir)/icui18n.lib',
|
||||
'<(libchromiumcontent_dir)/icuuc.lib',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
'libraries': ['<@(v8_libs)']
|
||||
}],
|
||||
['_target_name=="libuv"', {
|
||||
'conditions': [
|
||||
|
|
|
@ -19,7 +19,7 @@ def main():
|
|||
|
||||
args = parse_args()
|
||||
for config in args.configuration:
|
||||
build_path = os.path.join('out', config)
|
||||
build_path = os.path.join('out', 'Real' + config)
|
||||
ret = subprocess.call([ninja, '-C', build_path, args.target])
|
||||
if ret != 0:
|
||||
sys.exit(ret)
|
||||
|
|
|
@ -14,7 +14,7 @@ def main():
|
|||
os.chdir(SOURCE_ROOT)
|
||||
|
||||
update_external_binaries()
|
||||
update_gyp()
|
||||
return update_gyp()
|
||||
|
||||
|
||||
def update_external_binaries():
|
||||
|
@ -23,27 +23,37 @@ def update_external_binaries():
|
|||
|
||||
|
||||
def update_gyp():
|
||||
gyp = os.path.join('vendor', 'brightray', 'vendor', 'gyp', 'gyp_main.py')
|
||||
python = sys.executable
|
||||
arch = DIST_ARCH
|
||||
target_arch = DIST_ARCH
|
||||
if sys.platform == 'darwin':
|
||||
# Only have 64bit build on OS X.
|
||||
arch = 'x64'
|
||||
target_arch = 'x64'
|
||||
elif sys.platform in ['cygwin', 'win32']:
|
||||
# Only have 32bit build on Windows.
|
||||
arch = 'ia32'
|
||||
target_arch = 'ia32'
|
||||
|
||||
# Since gyp doesn't support specify link_settings for each configuration,
|
||||
# we are not able to link to different libraries in "Debug" and "Release"
|
||||
# configurations.
|
||||
# In order to work around this, we decided to generate the configuration
|
||||
# for twice, one is to generate "Debug" config, the other one to generate
|
||||
# the "Release" config. And the settings are controlled by the variable
|
||||
# "libchromiumcontent_component" which is defined before running gyp.
|
||||
return (run_gyp(target_arch, 0) or run_gyp(target_arch, 1))
|
||||
|
||||
|
||||
def run_gyp(target_arch, component):
|
||||
python = sys.executable
|
||||
if sys.platform == 'cygwin':
|
||||
# Force using win32 python on cygwin.
|
||||
python = os.path.join('vendor', 'python_26', 'python.exe')
|
||||
|
||||
ret = subprocess.call([python, gyp,
|
||||
gyp = os.path.join('vendor', 'brightray', 'vendor', 'gyp', 'gyp_main.py')
|
||||
return subprocess.call([python, gyp,
|
||||
'-f', 'ninja', '--depth', '.', 'atom.gyp',
|
||||
'-Icommon.gypi',
|
||||
'-Dlinux_clang=0', # Disable brightray's clang setting
|
||||
'-Dtarget_arch={0}'.format(arch),
|
||||
'-Dlibchromiumcontent_component={0}'.format(component),
|
||||
'-Dlinux_clang=0', # FIXME remove me.
|
||||
'-Dtarget_arch={0}'.format(target_arch),
|
||||
'-Dlibrary=static_library'])
|
||||
if ret != 0:
|
||||
sys.exit(ret)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
2
vendor/brightray
vendored
2
vendor/brightray
vendored
|
@ -1 +1 @@
|
|||
Subproject commit a430d8f653602fd108094398b2ef79dc7126c819
|
||||
Subproject commit 09c73a0e615807fe238f74b697e60696d6451bd1
|
Loading…
Add table
Add a link
Reference in a new issue