mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@ -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.
|
// 2006-2009 Google Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
201
cef.gyp
201
cef.gyp
@ -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
|
# reserved. Use of this source code is governed by a BSD-style license that
|
||||||
# can be found in the LICENSE file.
|
# can be found in the LICENSE file.
|
||||||
|
|
||||||
@ -6,6 +6,10 @@
|
|||||||
'variables': {
|
'variables': {
|
||||||
'chromium_code': 1,
|
'chromium_code': 1,
|
||||||
},
|
},
|
||||||
|
'includes': [
|
||||||
|
# Bring in the source file lists for cefclient.
|
||||||
|
'cef_paths.gypi',
|
||||||
|
],
|
||||||
'targets': [
|
'targets': [
|
||||||
{
|
{
|
||||||
'target_name': 'cefclient',
|
'target_name': 'cefclient',
|
||||||
@ -25,28 +29,8 @@
|
|||||||
'..',
|
'..',
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
'include/cef.h',
|
'<@(includes_common)',
|
||||||
'include/cef_nplugin.h',
|
'<@(cefclient_sources_common)',
|
||||||
'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',
|
|
||||||
],
|
],
|
||||||
'mac_bundle_resources': [
|
'mac_bundle_resources': [
|
||||||
'tests/cefclient/mac/cefclient.icns',
|
'tests/cefclient/mac/cefclient.icns',
|
||||||
@ -88,28 +72,8 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
'sources': [
|
'sources': [
|
||||||
'tests/cefclient/cefclient.rc',
|
'<@(includes_win)',
|
||||||
'tests/cefclient/cefclient_win.cpp',
|
'<@(cefclient_sources_win)',
|
||||||
'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',
|
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
[ 'OS=="mac"', {
|
[ 'OS=="mac"', {
|
||||||
@ -166,15 +130,14 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
'sources': [
|
'sources': [
|
||||||
'include/cef_application_mac.h',
|
'<@(includes_mac)',
|
||||||
'tests/cefclient/cefclient_mac.mm',
|
'<@(cefclient_sources_mac)',
|
||||||
'tests/cefclient/client_handler_mac.mm',
|
|
||||||
'tests/cefclient/resource_util_mac.mm',
|
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||||
'sources': [
|
'sources': [
|
||||||
'tests/cefclient/cefclient_gtk.cpp',
|
'<@(includes_linux)',
|
||||||
|
'<@(cefclient_sources_linux)',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
@ -274,10 +237,7 @@
|
|||||||
'..',
|
'..',
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
'include/cef.h',
|
'<@(includes_common)',
|
||||||
'include/cef_capi.h',
|
|
||||||
'include/cef_nplugin.h',
|
|
||||||
'include/cef_nplugin_capi.h',
|
|
||||||
'libcef_dll/cef_logging.h',
|
'libcef_dll/cef_logging.h',
|
||||||
'libcef_dll/cpptoc/browser_cpptoc.cc',
|
'libcef_dll/cpptoc/browser_cpptoc.cc',
|
||||||
'libcef_dll/cpptoc/browser_cpptoc.h',
|
'libcef_dll/cpptoc/browser_cpptoc.h',
|
||||||
@ -393,11 +353,10 @@
|
|||||||
'../views/views.gyp:views',
|
'../views/views.gyp:views',
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
|
'<@(includes_win)',
|
||||||
'$(OutDir)/obj/global_intermediate/webkit/webkit_chromium_resources.rc',
|
'$(OutDir)/obj/global_intermediate/webkit/webkit_chromium_resources.rc',
|
||||||
'$(OutDir)/obj/global_intermediate/webkit/webkit_resources.rc',
|
'$(OutDir)/obj/global_intermediate/webkit/webkit_resources.rc',
|
||||||
'$(OutDir)/obj/global_intermediate/webkit/webkit_strings_en-US.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',
|
'libcef_dll/libcef_dll.rc',
|
||||||
],
|
],
|
||||||
'link_settings': {
|
'link_settings': {
|
||||||
@ -424,110 +383,8 @@
|
|||||||
'..',
|
'..',
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
'include/cef.h',
|
'<@(includes_common)',
|
||||||
'include/cef_capi.h',
|
'<@(libcef_dll_wrapper_sources_common)',
|
||||||
'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',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -579,19 +436,7 @@
|
|||||||
'../webkit/support/webkit_support.gyp:webkit_strings',
|
'../webkit/support/webkit_support.gyp:webkit_strings',
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
'include/cef.h',
|
'<@(includes_common)',
|
||||||
'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',
|
|
||||||
'libcef/browser_appcache_system.cc',
|
'libcef/browser_appcache_system.cc',
|
||||||
'libcef/browser_appcache_system.h',
|
'libcef/browser_appcache_system.h',
|
||||||
'libcef/browser_database_system.cc',
|
'libcef/browser_database_system.cc',
|
||||||
@ -710,8 +555,7 @@
|
|||||||
'../views/views.gyp:views',
|
'../views/views.gyp:views',
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
'include/internal/cef_types_win.h',
|
'<@(includes_win)',
|
||||||
'include/internal/cef_win.h',
|
|
||||||
'libcef/browser_drag_delegate_win.cc',
|
'libcef/browser_drag_delegate_win.cc',
|
||||||
'libcef/browser_drag_delegate_win.h',
|
'libcef/browser_drag_delegate_win.h',
|
||||||
'libcef/browser_impl_win.cc',
|
'libcef/browser_impl_win.cc',
|
||||||
@ -735,9 +579,7 @@
|
|||||||
}],
|
}],
|
||||||
[ 'OS=="mac"', {
|
[ 'OS=="mac"', {
|
||||||
'sources': [
|
'sources': [
|
||||||
'include/cef_application_mac.h',
|
'<@(includes_mac)',
|
||||||
'include/internal/cef_types_mac.h',
|
|
||||||
'include/internal/cef_mac.h',
|
|
||||||
'libcef/browser_impl_mac.mm',
|
'libcef/browser_impl_mac.mm',
|
||||||
'libcef/browser_webkit_glue_mac.mm',
|
'libcef/browser_webkit_glue_mac.mm',
|
||||||
'libcef/browser_webview_delegate_mac.mm',
|
'libcef/browser_webview_delegate_mac.mm',
|
||||||
@ -766,8 +608,7 @@
|
|||||||
}],
|
}],
|
||||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
|
||||||
'sources': [
|
'sources': [
|
||||||
'include/internal/cef_types_linux.h',
|
'<@(includes_linux)',
|
||||||
'include/internal/cef_linux.h',
|
|
||||||
'libcef/browser_impl_gtk.cc',
|
'libcef/browser_impl_gtk.cc',
|
||||||
'libcef/browser_webkit_glue_gtk.cc',
|
'libcef/browser_webkit_glue_gtk.cc',
|
||||||
'libcef/browser_webview_delegate_gtk.cc',
|
'libcef/browser_webview_delegate_gtk.cc',
|
||||||
|
204
cef_paths.gypi
Normal file
204
cef_paths.gypi
Normal 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',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
@ -3,7 +3,7 @@
|
|||||||
// can be found in the LICENSE file.
|
// can be found in the LICENSE file.
|
||||||
|
|
||||||
#include "include/cef_wrapper.h"
|
#include "include/cef_wrapper.h"
|
||||||
#include "base/logging.h"
|
#include "libcef_dll/cef_logging.h"
|
||||||
|
|
||||||
CefByteReadHandler::CefByteReadHandler(const unsigned char* bytes, size_t size,
|
CefByteReadHandler::CefByteReadHandler(const unsigned char* bytes, size_t size,
|
||||||
CefRefPtr<CefBase> source)
|
CefRefPtr<CefBase> source)
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# reserved. Use of this source code is governed by a BSD-style license that
|
# reserved. Use of this source code is governed by a BSD-style license that
|
||||||
# can be found in the LICENSE file.
|
# can be found in the LICENSE file.
|
||||||
|
|
||||||
|
from file_util import *
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
@ -14,46 +15,6 @@ import time
|
|||||||
def notify(msg):
|
def notify(msg):
|
||||||
""" Display a message. """
|
""" Display a message. """
|
||||||
sys.stdout.write(' NOTE: '+msg+'\n')
|
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):
|
def wrap_text(text, indent = '', maxchars = 80):
|
||||||
""" Wrap the text to the specified number of characters. If
|
""" Wrap the text to the specified number of characters. If
|
||||||
|
13
tools/date_util.py
Normal file
13
tools/date_util.py
Normal 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')
|
5
tools/distrib/README-TRANSFER.txt
Normal file
5
tools/distrib/README-TRANSFER.txt
Normal 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
51
tools/distrib/README.txt
Normal 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
|
87
tools/distrib/cefclient.gyp
Normal file
87
tools/distrib/cefclient.gyp
Normal 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)',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
64
tools/distrib/transfer.cfg
Normal file
64
tools/distrib/transfer.cfg
Normal 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/',
|
||||||
|
},
|
||||||
|
]
|
BIN
tools/distrib/win/d3dcompiler_43.dll
Normal file
BIN
tools/distrib/win/d3dcompiler_43.dll
Normal file
Binary file not shown.
BIN
tools/distrib/win/d3dx9_43.dll
Normal file
BIN
tools/distrib/win/d3dx9_43.dll
Normal file
Binary file not shown.
@ -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
|
# reserved. Use of this source code is governed by a BSD-style license that
|
||||||
# can be found in the LICENSE file.
|
# can be found in the LICENSE file.
|
||||||
|
|
||||||
|
from glob import iglob
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
def read_file(name, normalize = True):
|
def read_file(name, normalize = True):
|
||||||
""" Function for reading a file. """
|
""" Read a file. """
|
||||||
try:
|
try:
|
||||||
f = open(name, 'r')
|
f = open(name, 'r')
|
||||||
# read the data
|
# read the data
|
||||||
@ -18,13 +19,13 @@ def read_file(name, normalize = True):
|
|||||||
data = data.replace("\r\n", "\n")
|
data = data.replace("\r\n", "\n")
|
||||||
return data
|
return data
|
||||||
except IOError, (errno, strerror):
|
except IOError, (errno, strerror):
|
||||||
sys.stderr.write('Failed to read file '+filename+': '+strerror)
|
sys.stderr.write('Failed to read file '+name+': '+strerror)
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
def write_file(name, data):
|
def write_file(name, data):
|
||||||
""" Function for writing a file. """
|
""" Write a file. """
|
||||||
try:
|
try:
|
||||||
f = open(name, 'w')
|
f = open(name, 'w')
|
||||||
# write the data
|
# write the data
|
||||||
@ -35,10 +36,68 @@ def write_file(name, data):
|
|||||||
else:
|
else:
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
def file_exists(name):
|
def path_exists(name):
|
||||||
""" Returns true if the file currently exists. """
|
""" Returns true if the path currently exists. """
|
||||||
return os.path.exists(name)
|
return os.path.exists(name)
|
||||||
|
|
||||||
def backup_file(name):
|
def backup_file(name):
|
||||||
""" Renames the file to a name that includes the current time stamp. """
|
""" Rename the file to a name that includes the current time stamp. """
|
||||||
shutil.move(name, name+'.'+time.strftime('%Y-%m-%d-%H-%M-%S'))
|
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
|
@ -3,50 +3,12 @@
|
|||||||
# Use of this source code is governed by a BSD-style license that can be
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
|
from gclient_util import *
|
||||||
import os, sys
|
import os, sys
|
||||||
|
|
||||||
# The CEF root directory is the parent directory of _this_ script.
|
# 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))
|
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..."
|
print "\nPatching build configuration and source files for CEF..."
|
||||||
patcher = [ 'python', 'tools/patcher.py',
|
patcher = [ 'python', 'tools/patcher.py',
|
||||||
'--patch-config', 'patch/patch.cfg' ];
|
'--patch-config', 'patch/patch.cfg' ];
|
||||||
|
45
tools/gclient_util.py
Normal file
45
tools/gclient_util.py
Normal 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)
|
@ -163,7 +163,7 @@ typedef struct _cef_base_t
|
|||||||
|
|
||||||
|
|
||||||
def write_capi_header(header, file, backup):
|
def write_capi_header(header, file, backup):
|
||||||
if file_exists(file):
|
if path_exists(file):
|
||||||
oldcontents = read_file(file)
|
oldcontents = read_file(file)
|
||||||
else:
|
else:
|
||||||
oldcontents = ''
|
oldcontents = ''
|
||||||
|
@ -1,9 +1,16 @@
|
|||||||
@echo off
|
@echo off
|
||||||
set CPPDOC_PATH="C:\Program Files (x86)\richfeit\CppDoc\CppDoc.exe"
|
|
||||||
|
|
||||||
if not exist %CPPDOC_PATH% (
|
if "%1"=="" (
|
||||||
echo Please install CppDoc from http://www.cppdoc.com/
|
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
|
pause
|
||||||
) else (
|
) 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 © 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 © 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"
|
||||||
)
|
)
|
||||||
|
@ -75,7 +75,7 @@ def make_cpptoc_header(header, clsname):
|
|||||||
def write_cpptoc_header(header, clsname, dir, backup):
|
def write_cpptoc_header(header, clsname, dir, backup):
|
||||||
file = dir+os.sep+get_capi_name(clsname[3:], False)+'_cpptoc.h'
|
file = dir+os.sep+get_capi_name(clsname[3:], False)+'_cpptoc.h'
|
||||||
|
|
||||||
if file_exists(file):
|
if path_exists(file):
|
||||||
oldcontents = read_file(file)
|
oldcontents = read_file(file)
|
||||||
else:
|
else:
|
||||||
oldcontents = ''
|
oldcontents = ''
|
||||||
|
@ -155,7 +155,7 @@ def make_cpptoc_impl(header, clsname, impl):
|
|||||||
def write_cpptoc_impl(header, clsname, dir, backup):
|
def write_cpptoc_impl(header, clsname, dir, backup):
|
||||||
file = dir+os.sep+get_capi_name(clsname[3:], False)+'_cpptoc.cc'
|
file = dir+os.sep+get_capi_name(clsname[3:], False)+'_cpptoc.cc'
|
||||||
|
|
||||||
if file_exists(file):
|
if path_exists(file):
|
||||||
oldcontents = read_file(file)
|
oldcontents = read_file(file)
|
||||||
else:
|
else:
|
||||||
oldcontents = ''
|
oldcontents = ''
|
||||||
|
@ -83,7 +83,7 @@ def make_ctocpp_header(header, clsname):
|
|||||||
def write_ctocpp_header(header, clsname, dir, backup):
|
def write_ctocpp_header(header, clsname, dir, backup):
|
||||||
file = dir+os.sep+get_capi_name(clsname[3:], False)+'_ctocpp.h'
|
file = dir+os.sep+get_capi_name(clsname[3:], False)+'_ctocpp.h'
|
||||||
|
|
||||||
if file_exists(file):
|
if path_exists(file):
|
||||||
oldcontents = read_file(file)
|
oldcontents = read_file(file)
|
||||||
else:
|
else:
|
||||||
oldcontents = ''
|
oldcontents = ''
|
||||||
|
@ -133,7 +133,7 @@ def make_ctocpp_impl(header, clsname, impl):
|
|||||||
def write_ctocpp_impl(header, clsname, dir, backup):
|
def write_ctocpp_impl(header, clsname, dir, backup):
|
||||||
file = dir+os.sep+get_capi_name(clsname[3:], False)+'_ctocpp.cc'
|
file = dir+os.sep+get_capi_name(clsname[3:], False)+'_ctocpp.cc'
|
||||||
|
|
||||||
if file_exists(file):
|
if path_exists(file):
|
||||||
oldcontents = read_file(file)
|
oldcontents = read_file(file)
|
||||||
else:
|
else:
|
||||||
oldcontents = ''
|
oldcontents = ''
|
||||||
|
2
tools/make_distrib.bat
Normal file
2
tools/make_distrib.bat
Normal 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
237
tools/make_distrib.py
Normal 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)
|
@ -1,2 +1,2 @@
|
|||||||
@echo off
|
@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
|
||||||
|
@ -2,11 +2,10 @@
|
|||||||
# reserved. Use of this source code is governed by a BSD-style license that
|
# reserved. Use of this source code is governed by a BSD-style license that
|
||||||
# can be found in the LICENSE file.
|
# can be found in the LICENSE file.
|
||||||
|
|
||||||
from cef_parser import *
|
from date_util import *
|
||||||
import datetime
|
from file_util import *
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import os
|
from svn_util import *
|
||||||
import shutil
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# cannot be loaded as a module
|
# cannot be loaded as a module
|
||||||
@ -33,26 +32,10 @@ if options.header is None:
|
|||||||
parser.print_help(sys.stdout)
|
parser.print_help(sys.stdout)
|
||||||
sys.exit()
|
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):
|
def write_svn_header(file):
|
||||||
""" Creates the header file for the current revision if the revision has
|
""" Creates the header file for the current revision if the revision has
|
||||||
changed or if the file doesn't already exist. """
|
changed or if the file doesn't already exist. """
|
||||||
if file_exists(file):
|
if path_exists(file):
|
||||||
oldcontents = read_file(file)
|
oldcontents = read_file(file)
|
||||||
else:
|
else:
|
||||||
oldcontents = ''
|
oldcontents = ''
|
||||||
|
18
tools/svn_util.py
Normal file
18
tools/svn_util.py
Normal 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
|
@ -60,7 +60,7 @@ if options.cppheader is None:
|
|||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
# make sure the header exists
|
# 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.stderr.write('File '+options.cppheader+' does not exist.')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user