Add the make_distrib tool for automated creation of CEF binary distributions (issue #260).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@294 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-09-27 15:02:08 +00:00
parent 42556715b0
commit ebc4feb095
27 changed files with 840 additions and 301 deletions

View File

@ -1,4 +1,4 @@
// Copyright (c) 2008-2009 Marshall A. Greenblatt. Portions Copyright (c)
// Copyright (c) 2008-2011 Marshall A. Greenblatt. Portions Copyright (c)
// 2006-2009 Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without

201
cef.gyp
View File

@ -1,4 +1,4 @@
# Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights
# Copyright (c) 2011 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.
@ -6,6 +6,10 @@
'variables': {
'chromium_code': 1,
},
'includes': [
# Bring in the source file lists for cefclient.
'cef_paths.gypi',
],
'targets': [
{
'target_name': 'cefclient',
@ -25,28 +29,8 @@
'..',
],
'sources': [
'include/cef.h',
'include/cef_nplugin.h',
'include/cef_runnable.h',
'include/cef_wrapper.h',
'tests/cefclient/binding_test.cpp',
'tests/cefclient/binding_test.h',
'tests/cefclient/cefclient.cpp',
'tests/cefclient/cefclient.h',
'tests/cefclient/client_handler.cpp',
'tests/cefclient/client_handler.h',
'tests/cefclient/client_popup_handler.cpp',
'tests/cefclient/client_popup_handler.h',
'tests/cefclient/download_handler.cpp',
'tests/cefclient/download_handler.h',
'tests/cefclient/extension_test.cpp',
'tests/cefclient/extension_test.h',
'tests/cefclient/resource_util.h',
'tests/cefclient/scheme_test.cpp',
'tests/cefclient/scheme_test.h',
'tests/cefclient/string_util.cpp',
'tests/cefclient/string_util.h',
'tests/cefclient/util.h',
'<@(includes_common)',
'<@(cefclient_sources_common)',
],
'mac_bundle_resources': [
'tests/cefclient/mac/cefclient.icns',
@ -88,28 +72,8 @@
],
},
'sources': [
'tests/cefclient/cefclient.rc',
'tests/cefclient/cefclient_win.cpp',
'tests/cefclient/client_handler_win.cpp',
'tests/cefclient/clientplugin.cpp',
'tests/cefclient/clientplugin.h',
'tests/cefclient/osrplugin.cpp',
'tests/cefclient/osrplugin.h',
'tests/cefclient/osrplugin_test.cpp',
'tests/cefclient/osrplugin_test.h',
'tests/cefclient/plugin_test.cpp',
'tests/cefclient/plugin_test.h',
'tests/cefclient/Resource.h',
'tests/cefclient/res/cefclient.ico',
'tests/cefclient/res/logo.png',
'tests/cefclient/res/logoball.png',
'tests/cefclient/res/small.ico',
'tests/cefclient/res/uiplugin.html',
'tests/cefclient/resource_util_win.cpp',
'tests/cefclient/uiplugin.cpp',
'tests/cefclient/uiplugin.h',
'tests/cefclient/uiplugin_test.cpp',
'tests/cefclient/uiplugin_test.h',
'<@(includes_win)',
'<@(cefclient_sources_win)',
],
}],
[ 'OS=="mac"', {
@ -166,15 +130,14 @@
],
},
'sources': [
'include/cef_application_mac.h',
'tests/cefclient/cefclient_mac.mm',
'tests/cefclient/client_handler_mac.mm',
'tests/cefclient/resource_util_mac.mm',
'<@(includes_mac)',
'<@(cefclient_sources_mac)',
],
}],
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'sources': [
'tests/cefclient/cefclient_gtk.cpp',
'<@(includes_linux)',
'<@(cefclient_sources_linux)',
],
}],
],
@ -274,10 +237,7 @@
'..',
],
'sources': [
'include/cef.h',
'include/cef_capi.h',
'include/cef_nplugin.h',
'include/cef_nplugin_capi.h',
'<@(includes_common)',
'libcef_dll/cef_logging.h',
'libcef_dll/cpptoc/browser_cpptoc.cc',
'libcef_dll/cpptoc/browser_cpptoc.h',
@ -393,11 +353,10 @@
'../views/views.gyp:views',
],
'sources': [
'<@(includes_win)',
'$(OutDir)/obj/global_intermediate/webkit/webkit_chromium_resources.rc',
'$(OutDir)/obj/global_intermediate/webkit/webkit_resources.rc',
'$(OutDir)/obj/global_intermediate/webkit/webkit_strings_en-US.rc',
'include/internal/cef_types_win.h',
'include/internal/cef_win.h',
'libcef_dll/libcef_dll.rc',
],
'link_settings': {
@ -424,110 +383,8 @@
'..',
],
'sources': [
'include/cef.h',
'include/cef_capi.h',
'include/cef_nplugin.h',
'include/cef_nplugin_capi.h',
'include/cef_wrapper.h',
'libcef_dll/cef_logging.h',
'libcef_dll/cpptoc/client_cpptoc.cc',
'libcef_dll/cpptoc/client_cpptoc.h',
'libcef_dll/cpptoc/content_filter_cpptoc.cc',
'libcef_dll/cpptoc/content_filter_cpptoc.h',
'libcef_dll/cpptoc/cookie_visitor_cpptoc.cc',
'libcef_dll/cpptoc/cookie_visitor_cpptoc.h',
'libcef_dll/cpptoc/cpptoc.h',
'libcef_dll/cpptoc/display_handler_cpptoc.cc',
'libcef_dll/cpptoc/display_handler_cpptoc.h',
'libcef_dll/cpptoc/domevent_listener_cpptoc.cc',
'libcef_dll/cpptoc/domevent_listener_cpptoc.h',
'libcef_dll/cpptoc/domvisitor_cpptoc.cc',
'libcef_dll/cpptoc/domvisitor_cpptoc.h',
'libcef_dll/cpptoc/download_handler_cpptoc.cc',
'libcef_dll/cpptoc/download_handler_cpptoc.h',
'libcef_dll/cpptoc/drag_handler_cpptoc.cc',
'libcef_dll/cpptoc/drag_handler_cpptoc.h',
'libcef_dll/cpptoc/find_handler_cpptoc.cc',
'libcef_dll/cpptoc/find_handler_cpptoc.h',
'libcef_dll/cpptoc/focus_handler_cpptoc.cc',
'libcef_dll/cpptoc/focus_handler_cpptoc.h',
'libcef_dll/cpptoc/jsbinding_handler_cpptoc.cc',
'libcef_dll/cpptoc/jsbinding_handler_cpptoc.h',
'libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc',
'libcef_dll/cpptoc/jsdialog_handler_cpptoc.h',
'libcef_dll/cpptoc/keyboard_handler_cpptoc.cc',
'libcef_dll/cpptoc/keyboard_handler_cpptoc.h',
'libcef_dll/cpptoc/life_span_handler_cpptoc.cc',
'libcef_dll/cpptoc/life_span_handler_cpptoc.h',
'libcef_dll/cpptoc/load_handler_cpptoc.cc',
'libcef_dll/cpptoc/load_handler_cpptoc.h',
'libcef_dll/cpptoc/menu_handler_cpptoc.cc',
'libcef_dll/cpptoc/menu_handler_cpptoc.h',
'libcef_dll/cpptoc/print_handler_cpptoc.cc',
'libcef_dll/cpptoc/print_handler_cpptoc.h',
'libcef_dll/cpptoc/read_handler_cpptoc.cc',
'libcef_dll/cpptoc/read_handler_cpptoc.h',
'libcef_dll/cpptoc/render_handler_cpptoc.cc',
'libcef_dll/cpptoc/render_handler_cpptoc.h',
'libcef_dll/cpptoc/request_handler_cpptoc.cc',
'libcef_dll/cpptoc/request_handler_cpptoc.h',
'libcef_dll/cpptoc/scheme_handler_cpptoc.cc',
'libcef_dll/cpptoc/scheme_handler_cpptoc.h',
'libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc',
'libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h',
'libcef_dll/cpptoc/task_cpptoc.cc',
'libcef_dll/cpptoc/task_cpptoc.h',
'libcef_dll/cpptoc/v8accessor_cpptoc.cc',
'libcef_dll/cpptoc/v8accessor_cpptoc.h',
'libcef_dll/cpptoc/v8handler_cpptoc.cc',
'libcef_dll/cpptoc/v8handler_cpptoc.h',
'libcef_dll/cpptoc/web_urlrequest_client_cpptoc.cc',
'libcef_dll/cpptoc/web_urlrequest_client_cpptoc.h',
'libcef_dll/cpptoc/write_handler_cpptoc.cc',
'libcef_dll/cpptoc/write_handler_cpptoc.h',
'libcef_dll/ctocpp/browser_ctocpp.cc',
'libcef_dll/ctocpp/browser_ctocpp.h',
'libcef_dll/ctocpp/ctocpp.h',
'libcef_dll/ctocpp/domdocument_ctocpp.cc',
'libcef_dll/ctocpp/domdocument_ctocpp.h',
'libcef_dll/ctocpp/domevent_ctocpp.cc',
'libcef_dll/ctocpp/domevent_ctocpp.h',
'libcef_dll/ctocpp/domnode_ctocpp.cc',
'libcef_dll/ctocpp/domnode_ctocpp.h',
'libcef_dll/ctocpp/drag_data_ctocpp.cc',
'libcef_dll/ctocpp/drag_data_ctocpp.h',
'libcef_dll/ctocpp/frame_ctocpp.cc',
'libcef_dll/ctocpp/frame_ctocpp.h',
'libcef_dll/ctocpp/post_data_ctocpp.cc',
'libcef_dll/ctocpp/post_data_ctocpp.h',
'libcef_dll/ctocpp/post_data_element_ctocpp.cc',
'libcef_dll/ctocpp/post_data_element_ctocpp.h',
'libcef_dll/ctocpp/request_ctocpp.cc',
'libcef_dll/ctocpp/request_ctocpp.h',
'libcef_dll/ctocpp/response_ctocpp.cc',
'libcef_dll/ctocpp/response_ctocpp.h',
'libcef_dll/ctocpp/scheme_handler_callback_ctocpp.cc',
'libcef_dll/ctocpp/scheme_handler_callback_ctocpp.h',
'libcef_dll/ctocpp/stream_reader_ctocpp.cc',
'libcef_dll/ctocpp/stream_reader_ctocpp.h',
'libcef_dll/ctocpp/stream_writer_ctocpp.cc',
'libcef_dll/ctocpp/stream_writer_ctocpp.h',
'libcef_dll/ctocpp/v8context_ctocpp.cc',
'libcef_dll/ctocpp/v8context_ctocpp.h',
'libcef_dll/ctocpp/v8value_ctocpp.cc',
'libcef_dll/ctocpp/v8value_ctocpp.h',
'libcef_dll/ctocpp/web_urlrequest_ctocpp.cc',
'libcef_dll/ctocpp/web_urlrequest_ctocpp.h',
'libcef_dll/ctocpp/xml_reader_ctocpp.cc',
'libcef_dll/ctocpp/xml_reader_ctocpp.h',
'libcef_dll/ctocpp/zip_reader_ctocpp.cc',
'libcef_dll/ctocpp/zip_reader_ctocpp.h',
'libcef_dll/transfer_util.cpp',
'libcef_dll/transfer_util.h',
'libcef_dll/wrapper/cef_byte_read_handler.cc',
'libcef_dll/wrapper/cef_xml_object.cc',
'libcef_dll/wrapper/cef_zip_archive.cc',
'libcef_dll/wrapper/libcef_dll_wrapper.cc',
'<@(includes_common)',
'<@(libcef_dll_wrapper_sources_common)',
],
},
{
@ -579,19 +436,7 @@
'../webkit/support/webkit_support.gyp:webkit_strings',
],
'sources': [
'include/cef.h',
'include/cef_nplugin.h',
'include/internal/cef_build.h',
'include/internal/cef_export.h',
'include/internal/cef_ptr.h',
'include/internal/cef_string.h',
'include/internal/cef_string_list.h',
'include/internal/cef_string_map.h',
'include/internal/cef_string_types.h',
'include/internal/cef_string_wrappers.h',
'include/internal/cef_time.h',
'include/internal/cef_types.h',
'include/internal/cef_types_wrappers.h',
'<@(includes_common)',
'libcef/browser_appcache_system.cc',
'libcef/browser_appcache_system.h',
'libcef/browser_database_system.cc',
@ -710,8 +555,7 @@
'../views/views.gyp:views',
],
'sources': [
'include/internal/cef_types_win.h',
'include/internal/cef_win.h',
'<@(includes_win)',
'libcef/browser_drag_delegate_win.cc',
'libcef/browser_drag_delegate_win.h',
'libcef/browser_impl_win.cc',
@ -735,9 +579,7 @@
}],
[ 'OS=="mac"', {
'sources': [
'include/cef_application_mac.h',
'include/internal/cef_types_mac.h',
'include/internal/cef_mac.h',
'<@(includes_mac)',
'libcef/browser_impl_mac.mm',
'libcef/browser_webkit_glue_mac.mm',
'libcef/browser_webview_delegate_mac.mm',
@ -766,8 +608,7 @@
}],
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'sources': [
'include/internal/cef_types_linux.h',
'include/internal/cef_linux.h',
'<@(includes_linux)',
'libcef/browser_impl_gtk.cc',
'libcef/browser_webkit_glue_gtk.cc',
'libcef/browser_webview_delegate_gtk.cc',

204
cef_paths.gypi Normal file
View File

@ -0,0 +1,204 @@
# Copyright (c) 2011 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.
{
'variables': {
'includes_common': [
'include/cef.h',
'include/cef_capi.h',
'include/cef_nplugin.h',
'include/cef_nplugin_capi.h',
'include/cef_runnable.h',
'include/cef_wrapper.h',
'include/internal/cef_build.h',
'include/internal/cef_export.h',
'include/internal/cef_nplugin_types.h',
'include/internal/cef_ptr.h',
'include/internal/cef_string.h',
'include/internal/cef_string_list.h',
'include/internal/cef_string_map.h',
'include/internal/cef_string_types.h',
'include/internal/cef_string_wrappers.h',
'include/internal/cef_time.h',
'include/internal/cef_tuple.h',
'include/internal/cef_types.h',
'include/internal/cef_types_wrappers.h',
],
'includes_win': [
'include/internal/cef_types_win.h',
'include/internal/cef_win.h',
],
'includes_mac': [
'include/cef_application_mac.h',
'include/internal/cef_mac.h',
'include/internal/cef_types_mac.h',
],
'includes_linux': [
'include/internal/cef_linux.h',
'include/internal/cef_types_linux.h',
],
'cefclient_sources_common': [
'tests/cefclient/binding_test.cpp',
'tests/cefclient/binding_test.h',
'tests/cefclient/cefclient.cpp',
'tests/cefclient/cefclient.h',
'tests/cefclient/client_handler.cpp',
'tests/cefclient/client_handler.h',
'tests/cefclient/client_popup_handler.cpp',
'tests/cefclient/client_popup_handler.h',
'tests/cefclient/download_handler.cpp',
'tests/cefclient/download_handler.h',
'tests/cefclient/extension_test.cpp',
'tests/cefclient/extension_test.h',
'tests/cefclient/res/domaccess.html',
'tests/cefclient/res/extensionperf.html',
'tests/cefclient/res/localstorage.html',
'tests/cefclient/res/xmlhttprequest.html',
'tests/cefclient/resource_util.h',
'tests/cefclient/scheme_test.cpp',
'tests/cefclient/scheme_test.h',
'tests/cefclient/string_util.cpp',
'tests/cefclient/string_util.h',
'tests/cefclient/util.h',
],
'cefclient_sources_win': [
'tests/cefclient/cefclient.rc',
'tests/cefclient/cefclient_win.cpp',
'tests/cefclient/client_handler_win.cpp',
'tests/cefclient/clientplugin.cpp',
'tests/cefclient/clientplugin.h',
'tests/cefclient/osrplugin.cpp',
'tests/cefclient/osrplugin.h',
'tests/cefclient/osrplugin_test.cpp',
'tests/cefclient/osrplugin_test.h',
'tests/cefclient/plugin_test.cpp',
'tests/cefclient/plugin_test.h',
'tests/cefclient/Resource.h',
'tests/cefclient/res/cefclient.ico',
'tests/cefclient/res/logo.png',
'tests/cefclient/res/logoball.png',
'tests/cefclient/res/modaldialog.html',
'tests/cefclient/res/modalmain.html',
'tests/cefclient/res/osrplugin.html',
'tests/cefclient/res/small.ico',
'tests/cefclient/res/uiplugin.html',
'tests/cefclient/resource_util_win.cpp',
'tests/cefclient/uiplugin.cpp',
'tests/cefclient/uiplugin.h',
'tests/cefclient/uiplugin_test.cpp',
'tests/cefclient/uiplugin_test.h',
],
'cefclient_sources_mac': [
'tests/cefclient/cefclient_mac.mm',
'tests/cefclient/client_handler_mac.mm',
'tests/cefclient/resource_util_mac.mm',
],
'cefclient_sources_linux': [
'tests/cefclient/cefclient_gtk.cpp',
],
'libcef_dll_wrapper_sources_common': [
'libcef_dll/cef_logging.h',
'libcef_dll/cpptoc/base_cpptoc.h',
'libcef_dll/cpptoc/client_cpptoc.cc',
'libcef_dll/cpptoc/client_cpptoc.h',
'libcef_dll/cpptoc/content_filter_cpptoc.cc',
'libcef_dll/cpptoc/content_filter_cpptoc.h',
'libcef_dll/cpptoc/cookie_visitor_cpptoc.cc',
'libcef_dll/cpptoc/cookie_visitor_cpptoc.h',
'libcef_dll/cpptoc/cpptoc.h',
'libcef_dll/cpptoc/display_handler_cpptoc.cc',
'libcef_dll/cpptoc/display_handler_cpptoc.h',
'libcef_dll/cpptoc/domevent_listener_cpptoc.cc',
'libcef_dll/cpptoc/domevent_listener_cpptoc.h',
'libcef_dll/cpptoc/domvisitor_cpptoc.cc',
'libcef_dll/cpptoc/domvisitor_cpptoc.h',
'libcef_dll/cpptoc/download_handler_cpptoc.cc',
'libcef_dll/cpptoc/download_handler_cpptoc.h',
'libcef_dll/cpptoc/drag_handler_cpptoc.cc',
'libcef_dll/cpptoc/drag_handler_cpptoc.h',
'libcef_dll/cpptoc/find_handler_cpptoc.cc',
'libcef_dll/cpptoc/find_handler_cpptoc.h',
'libcef_dll/cpptoc/focus_handler_cpptoc.cc',
'libcef_dll/cpptoc/focus_handler_cpptoc.h',
'libcef_dll/cpptoc/jsbinding_handler_cpptoc.cc',
'libcef_dll/cpptoc/jsbinding_handler_cpptoc.h',
'libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc',
'libcef_dll/cpptoc/jsdialog_handler_cpptoc.h',
'libcef_dll/cpptoc/keyboard_handler_cpptoc.cc',
'libcef_dll/cpptoc/keyboard_handler_cpptoc.h',
'libcef_dll/cpptoc/life_span_handler_cpptoc.cc',
'libcef_dll/cpptoc/life_span_handler_cpptoc.h',
'libcef_dll/cpptoc/load_handler_cpptoc.cc',
'libcef_dll/cpptoc/load_handler_cpptoc.h',
'libcef_dll/cpptoc/menu_handler_cpptoc.cc',
'libcef_dll/cpptoc/menu_handler_cpptoc.h',
'libcef_dll/cpptoc/print_handler_cpptoc.cc',
'libcef_dll/cpptoc/print_handler_cpptoc.h',
'libcef_dll/cpptoc/read_handler_cpptoc.cc',
'libcef_dll/cpptoc/read_handler_cpptoc.h',
'libcef_dll/cpptoc/render_handler_cpptoc.cc',
'libcef_dll/cpptoc/render_handler_cpptoc.h',
'libcef_dll/cpptoc/request_handler_cpptoc.cc',
'libcef_dll/cpptoc/request_handler_cpptoc.h',
'libcef_dll/cpptoc/scheme_handler_cpptoc.cc',
'libcef_dll/cpptoc/scheme_handler_cpptoc.h',
'libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc',
'libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h',
'libcef_dll/cpptoc/task_cpptoc.cc',
'libcef_dll/cpptoc/task_cpptoc.h',
'libcef_dll/cpptoc/v8accessor_cpptoc.cc',
'libcef_dll/cpptoc/v8accessor_cpptoc.h',
'libcef_dll/cpptoc/v8handler_cpptoc.cc',
'libcef_dll/cpptoc/v8handler_cpptoc.h',
'libcef_dll/cpptoc/web_urlrequest_client_cpptoc.cc',
'libcef_dll/cpptoc/web_urlrequest_client_cpptoc.h',
'libcef_dll/cpptoc/write_handler_cpptoc.cc',
'libcef_dll/cpptoc/write_handler_cpptoc.h',
'libcef_dll/ctocpp/base_ctocpp.h',
'libcef_dll/ctocpp/browser_ctocpp.cc',
'libcef_dll/ctocpp/browser_ctocpp.h',
'libcef_dll/ctocpp/ctocpp.h',
'libcef_dll/ctocpp/domdocument_ctocpp.cc',
'libcef_dll/ctocpp/domdocument_ctocpp.h',
'libcef_dll/ctocpp/domevent_ctocpp.cc',
'libcef_dll/ctocpp/domevent_ctocpp.h',
'libcef_dll/ctocpp/domnode_ctocpp.cc',
'libcef_dll/ctocpp/domnode_ctocpp.h',
'libcef_dll/ctocpp/drag_data_ctocpp.cc',
'libcef_dll/ctocpp/drag_data_ctocpp.h',
'libcef_dll/ctocpp/frame_ctocpp.cc',
'libcef_dll/ctocpp/frame_ctocpp.h',
'libcef_dll/ctocpp/post_data_ctocpp.cc',
'libcef_dll/ctocpp/post_data_ctocpp.h',
'libcef_dll/ctocpp/post_data_element_ctocpp.cc',
'libcef_dll/ctocpp/post_data_element_ctocpp.h',
'libcef_dll/ctocpp/request_ctocpp.cc',
'libcef_dll/ctocpp/request_ctocpp.h',
'libcef_dll/ctocpp/response_ctocpp.cc',
'libcef_dll/ctocpp/response_ctocpp.h',
'libcef_dll/ctocpp/scheme_handler_callback_ctocpp.cc',
'libcef_dll/ctocpp/scheme_handler_callback_ctocpp.h',
'libcef_dll/ctocpp/stream_reader_ctocpp.cc',
'libcef_dll/ctocpp/stream_reader_ctocpp.h',
'libcef_dll/ctocpp/stream_writer_ctocpp.cc',
'libcef_dll/ctocpp/stream_writer_ctocpp.h',
'libcef_dll/ctocpp/v8context_ctocpp.cc',
'libcef_dll/ctocpp/v8context_ctocpp.h',
'libcef_dll/ctocpp/v8value_ctocpp.cc',
'libcef_dll/ctocpp/v8value_ctocpp.h',
'libcef_dll/ctocpp/web_urlrequest_ctocpp.cc',
'libcef_dll/ctocpp/web_urlrequest_ctocpp.h',
'libcef_dll/ctocpp/xml_reader_ctocpp.cc',
'libcef_dll/ctocpp/xml_reader_ctocpp.h',
'libcef_dll/ctocpp/zip_reader_ctocpp.cc',
'libcef_dll/ctocpp/zip_reader_ctocpp.h',
'libcef_dll/transfer_util.cpp',
'libcef_dll/transfer_util.h',
'libcef_dll/wrapper/cef_byte_read_handler.cc',
'libcef_dll/wrapper/cef_xml_object.cc',
'libcef_dll/wrapper/cef_zip_archive.cc',
'libcef_dll/wrapper/libcef_dll_wrapper.cc',
],
},
}

View File

@ -3,7 +3,7 @@
// can be found in the LICENSE file.
#include "include/cef_wrapper.h"
#include "base/logging.h"
#include "libcef_dll/cef_logging.h"
CefByteReadHandler::CefByteReadHandler(const unsigned char* bytes, size_t size,
CefRefPtr<CefBase> source)

View File

@ -2,6 +2,7 @@
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
from file_util import *
import os
import re
import shutil
@ -14,46 +15,6 @@ import time
def notify(msg):
""" Display a message. """
sys.stdout.write(' NOTE: '+msg+'\n')
def read_file(name, normalize = True):
""" Function for reading a file. """
try:
f = open(name, 'r')
# read the data
data = f.read()
if normalize:
# normalize line endings
data = data.replace("\r\n", "\n")
return data
except IOError, (errno, strerror):
sys.stderr.write('Failed to read file '+filename+': '+strerror)
raise
else:
f.close()
def write_file(name, data):
""" Function for writing a file. """
notify('Writing file '+name)
try:
f = open(name, 'w')
# write the data
f.write(data)
except IOError, (errno, strerror):
sys.stderr.write('Failed to write file '+name+': '+strerror)
raise
else:
f.close()
def file_exists(name):
""" Returns true if the file currently exists. """
return os.path.exists(name)
def backup_file(name):
""" Renames the file to a name that includes the current time stamp. """
notify('Creating a backup of file '+name)
shutil.move(name, name+'.'+time.strftime('%Y-%m-%d-%H-%M-%S'))
def wrap_text(text, indent = '', maxchars = 80):
""" Wrap the text to the specified number of characters. If

13
tools/date_util.py Normal file
View File

@ -0,0 +1,13 @@
# Copyright (c) 2011 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 datetime
def get_year():
""" Returns the current year. """
return str(datetime.datetime.now().year)
def get_date():
""" Returns the current date. """
return datetime.datetime.now().strftime('%B %d, %Y')

View File

@ -0,0 +1,5 @@
Files in this directory have been copied from other locations in the Chromium
source tree. They have been modified only to the extent necessary to work in
the CEF Binary Distribution directory structure. Below is a listing of the
original file locations.

51
tools/distrib/README.txt Normal file
View File

@ -0,0 +1,51 @@
Chromium Embedded Framework (CEF) Binary Distribution
-------------------------------------------------------------------------------
CEF Revision: $CEF_REV$
Chromium Revision: $CHROMIUM_REV$
Date: $DATE$
This distribution contains all files necessary to build an application using
CEF. Please read the included LICENSE.txt file for licensing terms and
restrictions.
CONTENTS
--------
cefclient Contains the cefclient sample application configured to build
using the files in this distribution.
Debug Contains libcef.dll and other DLLs required to run the debug version
of CEF-based applications. Also acts as the build target for the
Debug build of cefclient.
docs Contains C++ API documentation generated from the CEF header files.
include Contains all required CEF and NPAPI-related header files. Read
the include/internal/npapi/README-TRANSFER.txt file for more
information about the NPAPI-related header files.
lib Contains Debug and Release versions of the libcef.lib library file
that all CEF-based applications must link against.
libcef_dll Contains the source code for the libcef_dll_wrapper static library
that all applications using the CEF C++ API must link against.
Release Contains libcef.dll and other DLLs required to run the release
version of CEF-based applications. Also acts as the build target for
the Release build of cefclient.
USAGE
-----
Visual Studio 2010: Open the cefclient2010.sln solution and build.
Visual Studio 2008: Open the cefclient2008.sln solution and build.
* If using VS2008 Express Edition add atlthunk.lib to the cefclient
Configuration Properties > Linker > Input > Additional Dependencies
Visual Studio 2005: Open the cefclient2005.sln solution and build.
Please visit the CEF Website for additional usage information.
http://code.google.com/p/chromiumembedded

View File

@ -0,0 +1,87 @@
# Copyright (c) 2011 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.
{
'variables': {
'chromium_code': 1,
},
'includes': [
# Bring in the source file lists for cefclient.
'cef_paths.gypi',
],
'targets': [
{
'target_name': 'cefclient',
'type': 'executable',
'msvs_guid': '6617FED9-C5D4-4907-BF55-A90062A6683F',
'dependencies': [
'libcef_dll_wrapper',
],
'defines': [
'USING_CEF_SHARED',
],
'include_dirs': [
'.',
'..',
],
'sources': [
'<@(includes_common)',
'<@(cefclient_sources_common)',
],
'conditions': [
['OS=="win"', {
'msvs_settings': {
'VCLinkerTool': {
# Set /SUBSYSTEM:WINDOWS.
'SubSystem': '2',
'EntryPointSymbol' : 'wWinMainCRTStartup',
},
},
'link_settings': {
'libraries': [
'-lcomctl32.lib',
'-lshlwapi.lib',
'-lrpcrt4.lib',
'-lopengl32.lib',
'-lglu32.lib',
'-llib/$(ConfigurationName)/libcef.lib'
],
},
'sources': [
'<@(includes_win)',
'<@(cefclient_sources_win)',
],
}],
[ 'OS=="mac"', {
'sources': [
'<@(includes_mac)',
'<@(cefclient_sources_mac)',
],
}],
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'sources': [
'<@(includes_linux)',
'<@(cefclient_sources_linux)',
],
}],
],
},
{
'target_name': 'libcef_dll_wrapper',
'type': 'static_library',
'msvs_guid': 'A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9',
'defines': [
'USING_CEF_SHARED',
],
'include_dirs': [
'.',
'..',
],
'sources': [
'<@(includes_common)',
'<@(libcef_dll_wrapper_sources_common)',
],
},
]
}

View File

@ -0,0 +1,64 @@
# Additional handling of transfer files.
# target: Target location relative to the target release directory. This
# value is required.
# source: Source location relative to the CEF root directory. This value
# is optional. If specified the target will be copied to this location
# and a TRANSFER-README.txt file will be created.
# post-process: Post-processing operation to perform. This value is
# optional and may be any one of the following:
# 'normalize_headers': Replace fully-qualified project header paths with
# the optionally specified 'new_header_path' value.
[
{
'source' : '../base/basictypes.h',
'target' : 'include/internal/npapi/basictypes.h',
'post-process' : 'normalize_headers',
},
{
'source' : '../build/build_config.h',
'target' : 'include/internal/npapi/build_config.h',
'post-process' : 'normalize_headers',
},
{
'source' : '../third_party/npapi/bindings/npapi.h',
'target' : 'include/internal/npapi/npapi.h',
'post-process' : 'normalize_headers',
},
{
'source' : '../third_party/npapi/bindings/npapi_extensions.h',
'target' : 'include/internal/npapi/npapi_extensions.h',
'post-process' : 'normalize_headers',
},
{
'source' : '../third_party/npapi/bindings/npfunctions.h',
'target' : 'include/internal/npapi/npfunctions.h',
'post-process' : 'normalize_headers',
},
{
'source' : '../third_party/npapi/bindings/nphostapi.h',
'target' : 'include/internal/npapi/nphostapi.h',
'post-process' : 'normalize_headers',
},
{
'source' : '../third_party/npapi/bindings/npruntime.h',
'target' : 'include/internal/npapi/npruntime.h',
'post-process' : 'normalize_headers',
},
{
'source' : '../third_party/npapi/bindings/nptypes.h',
'target' : 'include/internal/npapi/nptypes.h',
'post-process' : 'normalize_headers',
},
{
'source' : '../base/port.h',
'target' : 'include/internal/npapi/port.h',
'post-process' : 'normalize_headers',
},
{
'source' : None,
'target' : 'include/internal/cef_nplugin_types.h',
'post-process' : 'normalize_headers',
'new_header_path' : 'npapi/',
},
]

Binary file not shown.

Binary file not shown.

View File

@ -1,14 +1,15 @@
# Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights
# Copyright (c) 2011 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.
from glob import iglob
import os
import shutil
import sys
import time
def read_file(name, normalize = True):
""" Function for reading a file. """
""" Read a file. """
try:
f = open(name, 'r')
# read the data
@ -18,13 +19,13 @@ def read_file(name, normalize = True):
data = data.replace("\r\n", "\n")
return data
except IOError, (errno, strerror):
sys.stderr.write('Failed to read file '+filename+': '+strerror)
sys.stderr.write('Failed to read file '+name+': '+strerror)
raise
else:
f.close()
def write_file(name, data):
""" Function for writing a file. """
""" Write a file. """
try:
f = open(name, 'w')
# write the data
@ -35,10 +36,68 @@ def write_file(name, data):
else:
f.close()
def file_exists(name):
""" Returns true if the file currently exists. """
def path_exists(name):
""" Returns true if the path currently exists. """
return os.path.exists(name)
def backup_file(name):
""" Renames the file to a name that includes the current time stamp. """
shutil.move(name, name+'.'+time.strftime('%Y-%m-%d-%H-%M-%S'))
""" Rename the file to a name that includes the current time stamp. """
move_file(name, name+'.'+time.strftime('%Y-%m-%d-%H-%M-%S'))
def copy_file(src, dst, quiet = True):
""" Copy a file. """
try:
shutil.copy(src, dst)
if not quiet:
sys.stdout.write('Transferring '+src+' file.\n')
except IOError, (errno, strerror):
sys.stderr.write('Failed to copy file from '+src+' to '+dst+': '+strerror)
raise
def move_file(src, dst, quiet = True):
""" Move a file. """
try:
shutil.move(src, dst)
if not quiet:
sys.stdout.write('Moving '+src+' file.\n')
except IOError, (errno, strerror):
sys.stderr.write('Failed to move file from '+src+' to '+dst+': '+strerror)
raise
def copy_files(src_glob, dst_folder, quiet = True):
""" Copy multiple files. """
for fname in iglob(src_glob):
copy_file(fname, os.path.join(dst_folder, os.path.basename(fname)), quiet)
def copy_dir(src, dst, quiet = True):
""" Copy a directory tree. """
try:
remove_dir(dst, quiet)
shutil.copytree(src, dst)
if not quiet:
sys.stdout.write('Transferring '+src+' directory.\n')
except IOError, (errno, strerror):
sys.stderr.write('Failed to copy directory from '+src+' to '+dst+': '+strerror)
raise
def remove_dir(name, quiet = True):
""" Remove the specified directory. """
try:
if path_exists(name):
shutil.rmtree(name)
if not quiet:
sys.stdout.write('Removing '+name+' directory.\n')
except IOError, (errno, strerror):
sys.stderr.write('Failed to remove directory '+name+': '+strerror)
raise
def make_dir(name, quiet = True):
""" Create the specified directory. """
try:
if not path_exists(name):
if not quiet:
sys.stdout.write('Creating '+name+' directory.\n')
os.makedirs(name)
except IOError, (errno, strerror):
sys.stderr.write('Failed to create directory '+name+': '+strerror)
raise

View File

@ -3,50 +3,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from gclient_util import *
import os, sys
# The CEF root directory is the parent directory of _this_ script.
cef_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
try:
# depot_tools may already be in the import path.
import gclient_utils
except ImportError, e:
# Search the PATH environment variable to find the depot_tools folder.
depot_tools = None;
paths = os.environ.get('PATH').split(os.pathsep)
for path in paths:
if os.path.exists(os.path.join(path, 'gclient_utils.py')):
depot_tools = path
break
if depot_tools is None:
print >> sys.stderr, 'Error: could not find depot_tools in PATH.'
sys.exit(2)
# Add depot_tools to import path.
sys.path.append(depot_tools)
import gclient_utils
# Copied from gclient.py python code.
def RunAction(dir, command):
"""Runs the action."""
if command[0] == 'python':
# If the hook specified "python" as the first item, the action is a
# Python script. Run it by starting a new copy of the same
# interpreter.
command[0] = sys.executable
try:
gclient_utils.CheckCallAndFilterAndHeader(
command, cwd=dir, always=True)
except gclient_utils.Error, e:
# Use a discrete exit status code of 2 to indicate that a hook action
# failed. Users of this script may wish to treat hook action failures
# differently from VC failures.
print >> sys.stderr, 'Error: %s' % str(e)
sys.exit(2)
print "\nPatching build configuration and source files for CEF..."
patcher = [ 'python', 'tools/patcher.py',
'--patch-config', 'patch/patch.cfg' ];

45
tools/gclient_util.py Normal file
View File

@ -0,0 +1,45 @@
# Copyright (c) 2011 The Chromium Embedded Framework Authors.
# Portions copyright (c) 2006-2008 The Chromium 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 os, sys
try:
# depot_tools may already be in the import path.
import gclient_utils
except ImportError, e:
# Search the PATH environment variable to find the depot_tools folder.
depot_tools = None;
paths = os.environ.get('PATH').split(os.pathsep)
for path in paths:
if os.path.exists(os.path.join(path, 'gclient_utils.py')):
depot_tools = path
break
if depot_tools is None:
print >> sys.stderr, 'Error: could not find depot_tools in PATH.'
sys.exit(2)
# Add depot_tools to import path.
sys.path.append(depot_tools)
import gclient_utils
# Copied from gclient.py python code.
def RunAction(dir, command):
"""Runs the action."""
if command[0] == 'python':
# If the hook specified "python" as the first item, the action is a
# Python script. Run it by starting a new copy of the same
# interpreter.
command[0] = sys.executable
try:
gclient_utils.CheckCallAndFilterAndHeader(
command, cwd=dir, always=True)
except gclient_utils.Error, e:
# Use a discrete exit status code of 2 to indicate that a hook action
# failed. Users of this script may wish to treat hook action failures
# differently from VC failures.
print >> sys.stderr, 'Error: %s' % str(e)
sys.exit(2)

View File

@ -163,7 +163,7 @@ typedef struct _cef_base_t
def write_capi_header(header, file, backup):
if file_exists(file):
if path_exists(file):
oldcontents = read_file(file)
else:
oldcontents = ''

View File

@ -1,9 +1,16 @@
@echo off
set CPPDOC_PATH="C:\Program Files (x86)\richfeit\CppDoc\CppDoc.exe"
if not exist %CPPDOC_PATH% (
echo Please install CppDoc from http://www.cppdoc.com/
if "%1"=="" (
set CPPDOC_EXE="C:\Program Files (x86)\richfeit\CppDoc\CppDoc.exe"
set CPPDOC_REV="XXX"
) else (
set CPPDOC_EXE="C:\Program Files (x86)\richfeit\CppDoc\cppdoc_cmd.exe"
set CPPDOC_REV="%1"
)
if not exist %CPPDOC_EXE% (
echo ERROR: Please install CppDoc from http://www.cppdoc.com/
pause
) else (
%CPPDOC_PATH% -title="CEF C++ API Docs - Revision XXX" -footer="<center><a href="http://code.google.com/p/chromiumembedded" target="_top">Chromium Embedded Framework (CEF)</a> Copyright &copy 2011 Marshall A. Greenblatt</center>" -namespace-as-project -comment-format="///;//;///" -classdir=projects -module="cppdoc-standard" -extensions=h -languages="c=cpp,cc=cpp,cpp=cpp,cs=csharp,cxx=cpp,h=cpp,hpp=cpp,hxx=cpp,java=java" -D"OS_WIN" -D"USING_CEF_SHARED" -D"__cplusplus" -D"CEF_STRING_TYPE_UTF16" -enable-author=false -enable-deprecations=true -enable-since=true -enable-version=false -file-links-for-globals=false -generate-deprecations-list=false -generate-hierarchy=true -header-background-dark="#ccccff" -header-background-light="#eeeeff" -include-private=false -include-protected=true -index-file-base=index -overview-html=overview.html -reduce-summary-font=true -selected-text-background=navy -selected-text-foreground=white -separate-index-pages=false -show-cppdoc-version=false -show-timestamp=false -summary-html=project.html -suppress-details=false -suppress-frames-links=false -table-background=white -wrap-long-lines=false ..\include #cef_capi.h #cef_nplugin_capi.h #cef_runnable.h #cef_tuple.h "..\docs\index.html"
%CPPDOC_EXE% -overwrite -title="CEF C++ API Docs - Revision %CPPDOC_REV%" -footer="<center><a href="http://code.google.com/p/chromiumembedded" target="_top">Chromium Embedded Framework (CEF)</a> Copyright &copy 2011 Marshall A. Greenblatt</center>" -namespace-as-project -comment-format="///;//;///" -classdir=projects -module="cppdoc-standard" -extensions=h -languages="c=cpp,cc=cpp,cpp=cpp,cs=csharp,cxx=cpp,h=cpp,hpp=cpp,hxx=cpp,java=java" -D"OS_WIN" -D"USING_CEF_SHARED" -D"__cplusplus" -D"CEF_STRING_TYPE_UTF16" -enable-author=false -enable-deprecations=true -enable-since=true -enable-version=false -file-links-for-globals=false -generate-deprecations-list=false -generate-hierarchy=true -header-background-dark="#ccccff" -header-background-light="#eeeeff" -include-private=false -include-protected=true -index-file-base=index -overview-html=overview.html -reduce-summary-font=true -selected-text-background=navy -selected-text-foreground=white -separate-index-pages=false -show-cppdoc-version=false -show-timestamp=false -summary-html=project.html -suppress-details=false -suppress-frames-links=false -table-background=white -wrap-long-lines=false ..\include #cef_capi.h #cef_nplugin_capi.h #cef_runnable.h #cef_tuple.h "..\docs\index.html"
)

View File

@ -75,7 +75,7 @@ def make_cpptoc_header(header, clsname):
def write_cpptoc_header(header, clsname, dir, backup):
file = dir+os.sep+get_capi_name(clsname[3:], False)+'_cpptoc.h'
if file_exists(file):
if path_exists(file):
oldcontents = read_file(file)
else:
oldcontents = ''

View File

@ -155,7 +155,7 @@ def make_cpptoc_impl(header, clsname, impl):
def write_cpptoc_impl(header, clsname, dir, backup):
file = dir+os.sep+get_capi_name(clsname[3:], False)+'_cpptoc.cc'
if file_exists(file):
if path_exists(file):
oldcontents = read_file(file)
else:
oldcontents = ''

View File

@ -83,7 +83,7 @@ def make_ctocpp_header(header, clsname):
def write_ctocpp_header(header, clsname, dir, backup):
file = dir+os.sep+get_capi_name(clsname[3:], False)+'_ctocpp.h'
if file_exists(file):
if path_exists(file):
oldcontents = read_file(file)
else:
oldcontents = ''

View File

@ -133,7 +133,7 @@ def make_ctocpp_impl(header, clsname, impl):
def write_ctocpp_impl(header, clsname, dir, backup):
file = dir+os.sep+get_capi_name(clsname[3:], False)+'_ctocpp.cc'
if file_exists(file):
if path_exists(file):
oldcontents = read_file(file)
else:
oldcontents = ''

2
tools/make_distrib.bat Normal file
View File

@ -0,0 +1,2 @@
@echo off
..\..\third_party\python_26\python.exe make_distrib.py --output-dir ..\binary_distrib

237
tools/make_distrib.py Normal file
View File

@ -0,0 +1,237 @@
# Copyright (c) 2011 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.
from date_util import *
from file_util import *
from gclient_util import *
from optparse import OptionParser
import os
import re
from svn_util import *
import sys
def eval_file(src):
""" Loads and evaluates the contents of the specified file. """
return eval(read_file(src), {'__builtins__': None}, None)
def transfer_gypi_files(src_dir, gypi_paths, gypi_path_prefix, dst_dir, quiet):
""" Transfer files from one location to another. """
for path in gypi_paths:
src = os.path.join(src_dir, path)
dst = os.path.join(dst_dir, path.replace(gypi_path_prefix, ''))
dst_path = os.path.dirname(dst)
make_dir(dst_path, quiet)
copy_file(src, dst, quiet)
def normalize_headers(file, new_path = ''):
""" Normalize headers post-processing. Remove the path component from any
project include directives. """
data = read_file(file)
data = re.sub(r'''#include \"[a-zA-Z0-9_\/]+\/+([a-zA-Z0-9_\.]+)\"''', \
"// Include path modified for CEF Binary Distribution.\n#include \""+new_path+"\\1\"", data)
write_file(file, data)
def transfer_files(cef_dir, script_dir, transfer_cfg, output_dir, quiet):
""" Transfer files based on the specified configuration. """
if not path_exists(transfer_cfg):
return
configs = eval_file(transfer_cfg)
for cfg in configs:
dst = os.path.join(output_dir, cfg['target'])
# perform a copy if source is specified
if not cfg['source'] is None:
src = os.path.join(cef_dir, cfg['source'])
dst_path = os.path.dirname(dst)
make_dir(dst_path, quiet)
copy_file(src, dst, quiet)
# place a readme file in the destination directory
readme = os.path.join(dst_path, 'README-TRANSFER.txt')
if not path_exists(readme):
copy_file(os.path.join(script_dir, 'distrib/README-TRANSFER.txt'), readme)
open(readme, 'a').write(cfg['source']+"\n")
# perform any required post-processing
post = cfg['post-process']
if post == 'normalize_headers':
new_path = ''
if cfg.has_key('new_header_path'):
new_path = cfg['new_header_path']
normalize_headers(dst, new_path)
def generate_msvs_projects(version):
""" Generate MSVS projects for the specified version. """
sys.stdout.write('Generating '+version+' project files...')
os.environ['GYP_MSVS_VERSION'] = version
gyper = [ 'python', 'tools/gyp_cef', os.path.relpath(os.path.join(output_dir, 'cefclient.gyp'), cef_dir) ]
RunAction(cef_dir, gyper);
move_file(os.path.relpath(os.path.join(output_dir, 'cefclient.sln')), \
os.path.relpath(os.path.join(output_dir, 'cefclient'+version+'.sln')))
# cannot be loaded as a module
if __name__ != "__main__":
sys.stderr.write('This file cannot be loaded as a module!')
sys.exit()
# parse command-line options
disc = """
This utility builds the CEF Binary Distribution.
"""
parser = OptionParser(description=disc)
parser.add_option('--output-dir', dest='outputdir', metavar='DIR',
help='output directory [required]')
parser.add_option('-q', '--quiet',
action='store_true', dest='quiet', default=False,
help='do not output detailed status information')
(options, args) = parser.parse_args()
# the outputdir option is required
if options.outputdir is None:
parser.print_help(sys.stdout)
sys.exit()
# retrieve revision and date information
cef_rev = get_revision()
chromium_rev = get_revision('../../')
date = get_date()
# script directory
script_dir = os.path.dirname(__file__)
# CEF root directory
cef_dir = os.path.abspath(os.path.join(script_dir, os.pardir))
# output directory
output_dir = os.path.abspath(os.path.join(options.outputdir, 'cef_binary_r'+cef_rev))
remove_dir(output_dir, options.quiet)
make_dir(output_dir, options.quiet)
# write the README.TXT file
data = read_file(os.path.join(script_dir, 'distrib/README.TXT'))
data = data.replace('$CEF_REV$', cef_rev)
data = data.replace('$CHROMIUM_REV$', chromium_rev)
data = data.replace('$DATE$', date)
write_file(os.path.join(output_dir, 'README.TXT'), data)
if not options.quiet:
sys.stdout.write('Creating README.TXT file.\n')
# transfer the LICENSE.TXT file
copy_file(os.path.join(cef_dir, 'LICENSE.TXT'), output_dir, options.quiet)
# read the variables list from cef_paths.gypi
cef_paths = eval_file(os.path.join(cef_dir, 'cef_paths.gypi'))
cef_paths = cef_paths['variables']
# create the include directory
include_dir = os.path.join(output_dir, 'include')
make_dir(include_dir, options.quiet)
# create the cefclient directory
cefclient_dir = os.path.join(output_dir, 'cefclient')
make_dir(cefclient_dir, options.quiet)
# create the libcef_dll_wrapper directory
wrapper_dir = os.path.join(output_dir, 'libcef_dll')
make_dir(wrapper_dir, options.quiet)
# transfer common include files
transfer_gypi_files(cef_dir, cef_paths['includes_common'], \
'include/', include_dir, options.quiet)
# transfer common cefclient files
transfer_gypi_files(cef_dir, cef_paths['cefclient_sources_common'], \
'tests/cefclient/', cefclient_dir, options.quiet)
# transfer common libcef_dll_wrapper files
transfer_gypi_files(cef_dir, cef_paths['libcef_dll_wrapper_sources_common'], \
'libcef_dll/', wrapper_dir, options.quiet)
# transfer gyp files
copy_file(os.path.join(script_dir, 'distrib/cefclient.gyp'), output_dir, options.quiet)
paths_gypi = os.path.join(cef_dir, 'cef_paths.gypi')
data = read_file(paths_gypi)
data = data.replace('tests/cefclient/', 'cefclient/')
write_file(os.path.join(output_dir, 'cef_paths.gypi'), data)
# transfer additional files
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/transfer.cfg'), \
output_dir, options.quiet)
if sys.platform == 'win32':
# transfer include files
transfer_gypi_files(cef_dir, cef_paths['includes_win'], \
'include/', include_dir, options.quiet)
# transfer cefclient files
transfer_gypi_files(cef_dir, cef_paths['cefclient_sources_win'], \
'tests/cefclient/', cefclient_dir, options.quiet)
# transfer build/Debug files
dst_dir = os.path.join(output_dir, 'Debug')
make_dir(dst_dir, options.quiet)
copy_files(os.path.join(cef_dir, 'Debug/*.dll'), dst_dir, options.quiet)
copy_files(os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet)
# transfer build/Release files
dst_dir = os.path.join(output_dir, 'Release')
make_dir(dst_dir, options.quiet)
copy_files(os.path.join(cef_dir, 'Release/*.dll'), dst_dir, options.quiet)
copy_files(os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, 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)
# transfer lib/Release files
dst_dir = os.path.join(output_dir, 'lib/Release')
make_dir(dst_dir, options.quiet)
copy_file(os.path.join(cef_dir, 'Release/lib/libcef.lib'), dst_dir, options.quiet)
# generate doc files
os.popen('make_cppdocs.bat '+cef_rev)
# transfer docs files
dst_dir = os.path.join(output_dir, 'docs')
src_dir = os.path.join(cef_dir, 'docs')
if path_exists(dst_dir):
copy_dir(src_dir, dst_dir, options.quiet)
# transfer additional files, if any
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/win/transfer.cfg'), \
output_dir, options.quiet)
# generate the project files
generate_msvs_projects('2005');
generate_msvs_projects('2008');
generate_msvs_projects('2010');
elif sys.platform == 'darwin':
# transfer include files
transfer_gypi_files(cef_dir, cef_paths['includes_mac'], \
'include/', include_dir, options.quiet)
# transfer cefclient files
transfer_gypi_files(cef_dir, cef_paths['cefclient_sources_mac'], \
'tests/cefclient/', cefclient_dir, options.quiet)
# transfer additional files, if any
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/mac/transfer.cfg'), \
output_dir, options.quiet)
elif sys.platform == 'linux2':
# transfer include files
transfer_gypi_files(cef_dir, cef_paths['includes_linux'], \
'include/', include_dir, options.quiet)
# transfer cefclient files
transfer_gypi_files(cef_dir, cef_paths['cefclient_sources_linux'], \
'tests/cefclient/', cefclient_dir, options.quiet)
# transfer additional files, if any
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/linux/transfer.cfg'), \
output_dir, options.quiet)

View File

@ -1,2 +1,2 @@
@echo off
svn info | ..\third_party\python_26\python.exe tools\make_version_header.py --header libcef_dll\version.h
..\third_party\python_26\python.exe tools\make_version_header.py --header libcef_dll\version.h

View File

@ -2,11 +2,10 @@
# reserved. Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file.
from cef_parser import *
import datetime
from date_util import *
from file_util import *
from optparse import OptionParser
import os
import shutil
from svn_util import *
import sys
# cannot be loaded as a module
@ -33,26 +32,10 @@ if options.header is None:
parser.print_help(sys.stdout)
sys.exit()
def get_revision():
""" Retrieves the revision number from stdin. """
try:
# read the revision number
for line in sys.stdin:
if line[0:9] == "Revision:":
return line[10:-1];
raise IOError("Revision line not found.")
except IOError, (errno, strerror):
sys.stderr.write('Failed to read revision from stdin: ' + strerror)
raise
def get_year():
""" Returns the current year. """
return str(datetime.datetime.now().year)
def write_svn_header(file):
""" Creates the header file for the current revision if the revision has
changed or if the file doesn't already exist. """
if file_exists(file):
if path_exists(file):
oldcontents = read_file(file)
else:
oldcontents = ''

18
tools/svn_util.py Normal file
View File

@ -0,0 +1,18 @@
# Copyright (c) 2011 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 os
def get_revision(path = '.'):
""" Retrieves the revision number from stdin. """
try:
stream = os.popen('svn info '+path);
# read the revision number
for line in stream:
if line[0:9] == "Revision:":
return line[10:-1];
raise IOError("Revision line not found.")
except IOError, (errno, strerror):
sys.stderr.write('Failed to read revision from "svn info": ' + strerror)
raise

View File

@ -60,7 +60,7 @@ if options.cppheader is None:
sys.exit()
# make sure the header exists
if not file_exists(options.cppheader):
if not path_exists(options.cppheader):
sys.stderr.write('File '+options.cppheader+' does not exist.')
sys.exit()