diff --git a/cef3/cef.gyp b/cef3/cef.gyp index 3feabbf46..dd5c49a35 100644 --- a/cef3/cef.gyp +++ b/cef3/cef.gyp @@ -7,6 +7,10 @@ 'pkg-config': 'pkg-config', 'chromium_code': 1, 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/cef', + 'revision': ' <(INTERMEDIATE_DIR)/dummy_main.c' + ], + }, + ], + }, + { + # dylib for interposing Carbon calls in the plugin process. + 'target_name': 'plugin_carbon_interpose', + 'type': 'shared_library', + 'variables': { 'enable_wexit_time_destructors': 1, }, + # This target must not depend on static libraries, else the code in + # those libraries would appear twice in plugin processes: Once from + # Chromium Framework, and once from this dylib. + 'dependencies': [ + 'libcef', + ], + 'conditions': [ + ['component=="shared_library"', { + 'dependencies': [ + '<(DEPTH)/webkit/support/webkit_support.gyp:glue', + '<(DEPTH)/content/content.gyp:content_plugin', + ], + }], + ], + 'sources': [ + '<(DEPTH)/content/plugin/plugin_carbon_interpose_mac.cc', + ], + 'include_dirs': [ + '..', + ], + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/Carbon.framework', + ], + }, + 'xcode_settings': { + 'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)', + 'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)', + }, + 'postbuilds': [ + { + # The framework defines its load-time path + # (DYLIB_INSTALL_NAME_BASE) relative to the main executable + # (chrome). A different relative path needs to be used in + # libplugin_carbon_interpose.dylib. + 'postbuild_name': 'Fix Framework Link', + 'action': [ + 'install_name_tool', + '-change', + '@executable_path/libcef.dylib', + '@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Libraries/libcef.dylib', + '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}' + ], + }, + ], + }, { 'target_name': 'cefclient_helper_app', 'type': 'executable', diff --git a/cef3/tools/distrib/cefclient.gyp b/cef3/tools/distrib/cefclient.gyp index fd59d516e..2d9f6ee3d 100644 --- a/cef3/tools/distrib/cefclient.gyp +++ b/cef3/tools/distrib/cefclient.gyp @@ -100,6 +100,7 @@ 'destination': '<(PRODUCT_DIR)/cefclient.app/Contents/Frameworks', 'files': [ '<(PRODUCT_DIR)/cefclient Helper.app', + '$(CONFIGURATION)/libplugin_carbon_interpose.dylib', ], }, ], diff --git a/cef3/tools/make_distrib.py b/cef3/tools/make_distrib.py index 375baffa0..0701f4efb 100644 --- a/cef3/tools/make_distrib.py +++ b/cef3/tools/make_distrib.py @@ -367,9 +367,10 @@ elif platform == 'macosx': make_dir(dst_dir, options.quiet) copy_file(os.path.join(build_dir, 'ffmpegsumo.so'), dst_dir, options.quiet) copy_file(os.path.join(build_dir, 'libcef.dylib'), dst_dir, options.quiet) + copy_file(os.path.join(build_dir, 'libplugin_carbon_interpose.dylib'), dst_dir, options.quiet) else: build_dir = None - + # transfer xcodebuild/Release files build_dir = os.path.join(src_dir, 'xcodebuild/Release') if not options.allowpartial or path_exists(build_dir): @@ -377,6 +378,7 @@ elif platform == 'macosx': make_dir(dst_dir, options.quiet) copy_file(os.path.join(build_dir, 'ffmpegsumo.so'), dst_dir, options.quiet) copy_file(os.path.join(build_dir, 'libcef.dylib'), dst_dir, options.quiet) + copy_file(os.path.join(build_dir, 'libplugin_carbon_interpose.dylib'), dst_dir, options.quiet) if not options.nosymbols: # create the real dSYM file from the "fake" dSYM file diff --git a/cef3/tools/revision.py b/cef3/tools/revision.py new file mode 100644 index 000000000..1096c12dd --- /dev/null +++ b/cef3/tools/revision.py @@ -0,0 +1,19 @@ +# Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +# reserved. Use of this source code is governed by a BSD-style license that +# can be found in the LICENSE file. + +import svn_util as svn +import git_util as git +import sys + +# cannot be loaded as a module +if __name__ != "__main__": + sys.stderr.write('This file cannot be loaded as a module!') + sys.exit() + +try: + sys.stdout.write(svn.get_revision()) +except: + sys.stdout.write(git.get_svn_revision()) + +