Merge branch 'master' into rename-to-electron

This commit is contained in:
Cheng Zhao 2015-04-12 21:49:08 +08:00
commit 43fe82e1e5
46 changed files with 1033 additions and 1364 deletions

1
.gitignore vendored
View file

@ -10,4 +10,5 @@ node_modules/
*.xcodeproj
*.swp
*.pyc
debug.log
npm-debug.log

View file

@ -1,28 +0,0 @@
# appveyor file
# http://www.appveyor.com/docs/appveyor-yml
version: "{build}"
init:
- git config --global core.autocrlf input
environment:
matrix:
- nodejs_version: 0.10
platform:
- x86
install:
- ps: Install-Product node $env:nodejs_version
- cmd: SET PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH%
- cmd: SET PATH=C:\python27;%PATH%
- cmd: python script/bootstrap.py
- cmd: python script/build.py -c Debug
test_script:
- node --version
- npm --version
- cmd: python script/cpplint.py
- cmd: python script/coffeelint.py
build: off

690
atom.gyp
View file

@ -1,403 +1,19 @@
{
'variables': {
'includes': [
'vendor/native_mate/native_mate_files.gypi',
],
'project_name%': 'atom',
'product_name%': 'Atom',
'app_sources': [
'atom/app/atom_main.cc',
'atom/app/atom_main.h',
],
'bundle_sources': [
'atom/browser/resources/mac/atom.icns',
],
'coffee_sources': [
'atom/browser/api/lib/app.coffee',
'atom/browser/api/lib/atom-delegate.coffee',
'atom/browser/api/lib/auto-updater.coffee',
'atom/browser/api/lib/browser-window.coffee',
'atom/browser/api/lib/content-tracing.coffee',
'atom/browser/api/lib/dialog.coffee',
'atom/browser/api/lib/global-shortcut.coffee',
'atom/browser/api/lib/ipc.coffee',
'atom/browser/api/lib/menu.coffee',
'atom/browser/api/lib/menu-item.coffee',
'atom/browser/api/lib/power-monitor.coffee',
'atom/browser/api/lib/protocol.coffee',
'atom/browser/api/lib/screen.coffee',
'atom/browser/api/lib/tray.coffee',
'atom/browser/api/lib/web-contents.coffee',
'atom/browser/lib/chrome-extension.coffee',
'atom/browser/lib/guest-view-manager.coffee',
'atom/browser/lib/guest-window-manager.coffee',
'atom/browser/lib/init.coffee',
'atom/browser/lib/objects-registry.coffee',
'atom/browser/lib/rpc-server.coffee',
'atom/common/api/lib/callbacks-registry.coffee',
'atom/common/api/lib/clipboard.coffee',
'atom/common/api/lib/crash-reporter.coffee',
'atom/common/api/lib/id-weak-map.coffee',
'atom/common/api/lib/native-image.coffee',
'atom/common/api/lib/original-fs.coffee',
'atom/common/api/lib/shell.coffee',
'atom/common/lib/init.coffee',
'atom/renderer/lib/chrome-api.coffee',
'atom/renderer/lib/init.coffee',
'atom/renderer/lib/inspector.coffee',
'atom/renderer/lib/override.coffee',
'atom/renderer/lib/web-view/guest-view-internal.coffee',
'atom/renderer/lib/web-view/web-view.coffee',
'atom/renderer/lib/web-view/web-view-attributes.coffee',
'atom/renderer/lib/web-view/web-view-constants.coffee',
'atom/renderer/api/lib/ipc.coffee',
'atom/renderer/api/lib/remote.coffee',
'atom/renderer/api/lib/screen.coffee',
'atom/renderer/api/lib/web-frame.coffee',
],
'coffee2c_sources': [
'atom/common/lib/asar.coffee',
'atom/common/lib/asar_init.coffee',
],
'lib_sources': [
'atom/app/atom_content_client.cc',
'atom/app/atom_content_client.h',
'atom/app/atom_main_args.cc',
'atom/app/atom_main_args.h',
'atom/app/atom_main_delegate.cc',
'atom/app/atom_main_delegate.h',
'atom/app/atom_main_delegate_mac.mm',
'atom/app/node_main.cc',
'atom/app/node_main.h',
'atom/browser/api/atom_api_app.cc',
'atom/browser/api/atom_api_app.h',
'atom/browser/api/atom_api_auto_updater.cc',
'atom/browser/api/atom_api_auto_updater.h',
'atom/browser/api/atom_api_content_tracing.cc',
'atom/browser/api/atom_api_dialog.cc',
'atom/browser/api/atom_api_global_shortcut.cc',
'atom/browser/api/atom_api_global_shortcut.h',
'atom/browser/api/atom_api_menu.cc',
'atom/browser/api/atom_api_menu.h',
'atom/browser/api/atom_api_menu_views.cc',
'atom/browser/api/atom_api_menu_views.h',
'atom/browser/api/atom_api_menu_mac.h',
'atom/browser/api/atom_api_menu_mac.mm',
'atom/browser/api/atom_api_power_monitor.cc',
'atom/browser/api/atom_api_power_monitor.h',
'atom/browser/api/atom_api_protocol.cc',
'atom/browser/api/atom_api_protocol.h',
'atom/browser/api/atom_api_screen.cc',
'atom/browser/api/atom_api_screen.h',
'atom/browser/api/atom_api_tray.cc',
'atom/browser/api/atom_api_tray.h',
'atom/browser/api/atom_api_web_contents.cc',
'atom/browser/api/atom_api_web_contents.h',
'atom/browser/api/atom_api_web_view_manager.cc',
'atom/browser/api/atom_api_window.cc',
'atom/browser/api/atom_api_window.h',
'atom/browser/api/event.cc',
'atom/browser/api/event.h',
'atom/browser/api/event_emitter.cc',
'atom/browser/api/event_emitter.h',
'atom/browser/auto_updater.cc',
'atom/browser/auto_updater.h',
'atom/browser/auto_updater_delegate.h',
'atom/browser/auto_updater_linux.cc',
'atom/browser/auto_updater_mac.mm',
'atom/browser/auto_updater_win.cc',
'atom/browser/atom_access_token_store.cc',
'atom/browser/atom_access_token_store.h',
'atom/browser/atom_browser_client.cc',
'atom/browser/atom_browser_client.h',
'atom/browser/atom_browser_context.cc',
'atom/browser/atom_browser_context.h',
'atom/browser/atom_browser_main_parts.cc',
'atom/browser/atom_browser_main_parts.h',
'atom/browser/atom_browser_main_parts_linux.cc',
'atom/browser/atom_browser_main_parts_mac.mm',
'atom/browser/atom_javascript_dialog_manager.cc',
'atom/browser/atom_javascript_dialog_manager.h',
'atom/browser/atom_resource_dispatcher_host_delegate.cc',
'atom/browser/atom_resource_dispatcher_host_delegate.h',
'atom/browser/atom_speech_recognition_manager_delegate.cc',
'atom/browser/atom_speech_recognition_manager_delegate.h',
'atom/browser/browser.cc',
'atom/browser/browser.h',
'atom/browser/browser_linux.cc',
'atom/browser/browser_mac.mm',
'atom/browser/browser_win.cc',
'atom/browser/browser_observer.h',
'atom/browser/javascript_environment.cc',
'atom/browser/javascript_environment.h',
'atom/browser/mac/atom_application.h',
'atom/browser/mac/atom_application.mm',
'atom/browser/mac/atom_application_delegate.h',
'atom/browser/mac/atom_application_delegate.mm',
'atom/browser/native_window.cc',
'atom/browser/native_window.h',
'atom/browser/native_window_views.cc',
'atom/browser/native_window_views.h',
'atom/browser/native_window_mac.h',
'atom/browser/native_window_mac.mm',
'atom/browser/native_window_observer.h',
'atom/browser/net/adapter_request_job.cc',
'atom/browser/net/adapter_request_job.h',
'atom/browser/net/asar/asar_protocol_handler.cc',
'atom/browser/net/asar/asar_protocol_handler.h',
'atom/browser/net/asar/url_request_asar_job.cc',
'atom/browser/net/asar/url_request_asar_job.h',
'atom/browser/net/atom_url_request_job_factory.cc',
'atom/browser/net/atom_url_request_job_factory.h',
'atom/browser/net/url_request_string_job.cc',
'atom/browser/net/url_request_string_job.h',
'atom/browser/net/url_request_buffer_job.cc',
'atom/browser/net/url_request_buffer_job.h',
'atom/browser/node_debugger.cc',
'atom/browser/node_debugger.h',
'atom/browser/ui/accelerator_util.cc',
'atom/browser/ui/accelerator_util.h',
'atom/browser/ui/accelerator_util_mac.mm',
'atom/browser/ui/accelerator_util_views.cc',
'atom/browser/ui/cocoa/atom_menu_controller.h',
'atom/browser/ui/cocoa/atom_menu_controller.mm',
'atom/browser/ui/cocoa/event_processing_window.h',
'atom/browser/ui/cocoa/event_processing_window.mm',
'atom/browser/ui/file_dialog.h',
'atom/browser/ui/file_dialog_gtk.cc',
'atom/browser/ui/file_dialog_mac.mm',
'atom/browser/ui/file_dialog_win.cc',
'atom/browser/ui/message_box.h',
'atom/browser/ui/message_box_mac.mm',
'atom/browser/ui/message_box_views.cc',
'atom/browser/ui/tray_icon.cc',
'atom/browser/ui/tray_icon.h',
'atom/browser/ui/tray_icon_gtk.cc',
'atom/browser/ui/tray_icon_gtk.h',
'atom/browser/ui/tray_icon_cocoa.h',
'atom/browser/ui/tray_icon_cocoa.mm',
'atom/browser/ui/tray_icon_observer.h',
'atom/browser/ui/tray_icon_win.cc',
'atom/browser/ui/views/frameless_view.cc',
'atom/browser/ui/views/frameless_view.h',
'atom/browser/ui/views/global_menu_bar_x11.cc',
'atom/browser/ui/views/global_menu_bar_x11.h',
'atom/browser/ui/views/menu_bar.cc',
'atom/browser/ui/views/menu_bar.h',
'atom/browser/ui/views/menu_delegate.cc',
'atom/browser/ui/views/menu_delegate.h',
'atom/browser/ui/views/menu_layout.cc',
'atom/browser/ui/views/menu_layout.h',
'atom/browser/ui/views/submenu_button.cc',
'atom/browser/ui/views/submenu_button.h',
'atom/browser/ui/views/win_frame_view.cc',
'atom/browser/ui/views/win_frame_view.h',
'atom/browser/ui/win/notify_icon_host.cc',
'atom/browser/ui/win/notify_icon_host.h',
'atom/browser/ui/win/notify_icon.cc',
'atom/browser/ui/win/notify_icon.h',
'atom/browser/ui/x/window_state_watcher.cc',
'atom/browser/ui/x/window_state_watcher.h',
'atom/browser/ui/x/x_window_utils.cc',
'atom/browser/ui/x/x_window_utils.h',
'atom/browser/web_view_manager.cc',
'atom/browser/web_view_manager.h',
'atom/browser/web_dialog_helper.cc',
'atom/browser/web_dialog_helper.h',
'atom/browser/window_list.cc',
'atom/browser/window_list.h',
'atom/browser/window_list_observer.h',
'atom/common/api/api_messages.h',
'atom/common/api/atom_api_asar.cc',
'atom/common/api/atom_api_clipboard.cc',
'atom/common/api/atom_api_crash_reporter.cc',
'atom/common/api/atom_api_id_weak_map.cc',
'atom/common/api/atom_api_id_weak_map.h',
'atom/common/api/atom_api_native_image.cc',
'atom/common/api/atom_api_native_image.h',
'atom/common/api/atom_api_native_image_mac.mm',
'atom/common/api/atom_api_shell.cc',
'atom/common/api/atom_api_v8_util.cc',
'atom/common/api/atom_bindings.cc',
'atom/common/api/atom_bindings.h',
'atom/common/api/object_life_monitor.cc',
'atom/common/api/object_life_monitor.h',
'atom/common/asar/archive.cc',
'atom/common/asar/archive.h',
'atom/common/asar/asar_util.cc',
'atom/common/asar/asar_util.h',
'atom/common/asar/scoped_temporary_file.cc',
'atom/common/asar/scoped_temporary_file.h',
'atom/common/common_message_generator.cc',
'atom/common/common_message_generator.h',
'atom/common/crash_reporter/crash_reporter.cc',
'atom/common/crash_reporter/crash_reporter.h',
'atom/common/crash_reporter/crash_reporter_linux.cc',
'atom/common/crash_reporter/crash_reporter_linux.h',
'atom/common/crash_reporter/crash_reporter_mac.h',
'atom/common/crash_reporter/crash_reporter_mac.mm',
'atom/common/crash_reporter/crash_reporter_win.cc',
'atom/common/crash_reporter/crash_reporter_win.h',
'atom/common/crash_reporter/linux/crash_dump_handler.cc',
'atom/common/crash_reporter/linux/crash_dump_handler.h',
'atom/common/crash_reporter/win/crash_service.cc',
'atom/common/crash_reporter/win/crash_service.h',
'atom/common/crash_reporter/win/crash_service_main.cc',
'atom/common/crash_reporter/win/crash_service_main.h',
'atom/common/draggable_region.cc',
'atom/common/draggable_region.h',
'atom/common/google_api_key.h',
'atom/common/linux/application_info.cc',
'atom/common/native_mate_converters/accelerator_converter.cc',
'atom/common/native_mate_converters/accelerator_converter.h',
'atom/common/native_mate_converters/file_path_converter.h',
'atom/common/native_mate_converters/gfx_converter.cc',
'atom/common/native_mate_converters/gfx_converter.h',
'atom/common/native_mate_converters/gurl_converter.h',
'atom/common/native_mate_converters/image_converter.cc',
'atom/common/native_mate_converters/image_converter.h',
'atom/common/native_mate_converters/string16_converter.h',
'atom/common/native_mate_converters/v8_value_converter.cc',
'atom/common/native_mate_converters/v8_value_converter.h',
'atom/common/native_mate_converters/value_converter.cc',
'atom/common/native_mate_converters/value_converter.h',
'atom/common/node_bindings.cc',
'atom/common/node_bindings.h',
'atom/common/node_bindings_linux.cc',
'atom/common/node_bindings_linux.h',
'atom/common/node_bindings_mac.cc',
'atom/common/node_bindings_mac.h',
'atom/common/node_bindings_win.cc',
'atom/common/node_bindings_win.h',
'atom/common/node_includes.h',
'atom/common/options_switches.cc',
'atom/common/options_switches.h',
'atom/common/platform_util.h',
'atom/common/platform_util_linux.cc',
'atom/common/platform_util_mac.mm',
'atom/common/platform_util_win.cc',
'atom/renderer/api/atom_api_renderer_ipc.cc',
'atom/renderer/api/atom_api_spell_check_client.cc',
'atom/renderer/api/atom_api_spell_check_client.h',
'atom/renderer/api/atom_api_web_frame.cc',
'atom/renderer/api/atom_api_web_frame.h',
'atom/renderer/atom_render_view_observer.cc',
'atom/renderer/atom_render_view_observer.h',
'atom/renderer/atom_renderer_client.cc',
'atom/renderer/atom_renderer_client.h',
'atom/renderer/guest_view_container.cc',
'atom/renderer/guest_view_container.h',
'chromium_src/chrome/browser/browser_process.cc',
'chromium_src/chrome/browser/browser_process.h',
'chromium_src/chrome/browser/chrome_notification_types.h',
'chromium_src/chrome/browser/extensions/global_shortcut_listener.cc',
'chromium_src/chrome/browser/extensions/global_shortcut_listener.h',
'chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.mm',
'chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.h',
'chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.cc',
'chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.h',
'chromium_src/chrome/browser/extensions/global_shortcut_listener_win.cc',
'chromium_src/chrome/browser/extensions/global_shortcut_listener_win.h',
'chromium_src/chrome/browser/printing/print_job.cc',
'chromium_src/chrome/browser/printing/print_job.h',
'chromium_src/chrome/browser/printing/print_job_manager.cc',
'chromium_src/chrome/browser/printing/print_job_manager.h',
'chromium_src/chrome/browser/printing/print_job_worker.cc',
'chromium_src/chrome/browser/printing/print_job_worker.h',
'chromium_src/chrome/browser/printing/print_job_worker_owner.cc',
'chromium_src/chrome/browser/printing/print_job_worker_owner.h',
'chromium_src/chrome/browser/printing/print_view_manager_base.cc',
'chromium_src/chrome/browser/printing/print_view_manager_base.h',
'chromium_src/chrome/browser/printing/print_view_manager_basic.cc',
'chromium_src/chrome/browser/printing/print_view_manager_basic.h',
'chromium_src/chrome/browser/printing/print_view_manager_observer.h',
'chromium_src/chrome/browser/printing/printer_query.cc',
'chromium_src/chrome/browser/printing/printer_query.h',
'chromium_src/chrome/browser/printing/printing_message_filter.cc',
'chromium_src/chrome/browser/printing/printing_message_filter.h',
'chromium_src/chrome/browser/speech/tts_controller.h',
'chromium_src/chrome/browser/speech/tts_controller_impl.cc',
'chromium_src/chrome/browser/speech/tts_controller_impl.h',
'chromium_src/chrome/browser/speech/tts_linux.cc',
'chromium_src/chrome/browser/speech/tts_mac.mm',
'chromium_src/chrome/browser/speech/tts_message_filter.cc',
'chromium_src/chrome/browser/speech/tts_message_filter.h',
'chromium_src/chrome/browser/speech/tts_platform.cc',
'chromium_src/chrome/browser/speech/tts_platform.h',
'chromium_src/chrome/browser/speech/tts_win.cc',
'chromium_src/chrome/browser/ui/browser_dialogs.h',
'chromium_src/chrome/browser/ui/cocoa/color_chooser_mac.mm',
'chromium_src/chrome/browser/ui/views/color_chooser_aura.cc',
'chromium_src/chrome/browser/ui/views/color_chooser_aura.h',
'chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc',
'chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h',
'chromium_src/chrome/common/print_messages.cc',
'chromium_src/chrome/common/print_messages.h',
'chromium_src/chrome/common/tts_messages.h',
'chromium_src/chrome/common/tts_utterance_request.cc',
'chromium_src/chrome/common/tts_utterance_request.h',
'chromium_src/chrome/renderer/printing/print_web_view_helper.cc',
'chromium_src/chrome/renderer/printing/print_web_view_helper_linux.cc',
'chromium_src/chrome/renderer/printing/print_web_view_helper_mac.mm',
'chromium_src/chrome/renderer/printing/print_web_view_helper_pdf_win.cc',
'chromium_src/chrome/renderer/printing/print_web_view_helper.h',
'chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.cc',
'chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.h',
'chromium_src/chrome/renderer/tts_dispatcher.cc',
'chromium_src/chrome/renderer/tts_dispatcher.h',
'chromium_src/library_loaders/libgio_loader.cc',
'chromium_src/library_loaders/libgio.h',
'chromium_src/library_loaders/libspeechd_loader.cc',
'chromium_src/library_loaders/libspeechd.h',
'<@(native_mate_files)',
'<(SHARED_INTERMEDIATE_DIR)/atom_natives.h',
],
'lib_sources_win': [
'chromium_src/chrome/browser/ui/views/color_chooser_dialog.cc',
'chromium_src/chrome/browser/ui/views/color_chooser_dialog.h',
'chromium_src/chrome/browser/ui/views/color_chooser_win.cc',
],
'framework_sources': [
'atom/app/atom_library_main.h',
'atom/app/atom_library_main.mm',
],
'locales': [
'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
'vi', 'zh-CN', 'zh-TW',
],
'version%': '0.23.0',
'atom_source_root': '<!(["python", "tools/atom_source_root.py"])',
'conditions': [
['OS=="win"', {
'app_sources': [
'atom/browser/resources/win/resource.h',
'atom/browser/resources/win/atom.ico',
'atom/browser/resources/win/atom.rc',
'<(libchromiumcontent_src_dir)/content/app/startup_helper_win.cc',
],
}], # OS=="win"
['OS=="mac"', {
'apply_locales_cmd': ['python', 'tools/mac/apply_locales.py'],
}], # OS=="mac"
],
},
'includes': [
'filenames.gypi',
'vendor/native_mate/native_mate_files.gypi',
],
'target_defaults': {
'mac_framework_dirs': [
'<(atom_source_root)/external_binaries',
],
'includes': [
# Rules for excluding e.g. foo_win.cc from the build on non-Windows.
'filename_rules.gypi',
],
'configurations': {
'Debug': {
'defines': [ 'DEBUG' ],
'cflags': [ '-g', '-O0' ],
},
},
},
'targets': [
{
@ -474,6 +90,7 @@
{
'postbuild_name': 'Make Empty Localizations',
'variables': {
'apply_locales_cmd': ['python', 'tools/mac/apply_locales.py'],
'locale_dirs': [
'>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
],
@ -490,24 +107,42 @@
],
}], # OS!="mac"
['OS=="win"', {
'msvs_settings': {
'VCLinkerTool': {
'AdditionalOptions': [
# Force linking even though we have duplicate symbols between
# BoringSSL and OpenSSL.
'/FORCE:MULTIPLE',
],
},
},
'copies': [
{
'variables': {
'conditions': [
['libchromiumcontent_component', {
'copied_libraries': [
'<@(libchromiumcontent_shared_libraries)',
'<@(libchromiumcontent_shared_v8_libraries)',
],
}, {
'copied_libraries': [],
}],
],
},
'destination': '<(PRODUCT_DIR)',
'files': [
'<(libchromiumcontent_library_dir)/chromiumcontent.dll',
'<(libchromiumcontent_library_dir)/ffmpegsumo.dll',
'<(libchromiumcontent_library_dir)/libEGL.dll',
'<(libchromiumcontent_library_dir)/libGLESv2.dll',
'<(libchromiumcontent_resources_dir)/icudtl.dat',
'<(libchromiumcontent_resources_dir)/content_resources_200_percent.pak',
'<(libchromiumcontent_resources_dir)/content_shell.pak',
'<(libchromiumcontent_resources_dir)/ui_resources_200_percent.pak',
'<(libchromiumcontent_resources_dir)/natives_blob.bin',
'<(libchromiumcontent_resources_dir)/snapshot_blob.bin',
'<@(copied_libraries)',
'<(libchromiumcontent_dir)/ffmpegsumo.dll',
'<(libchromiumcontent_dir)/libEGL.dll',
'<(libchromiumcontent_dir)/libGLESv2.dll',
'<(libchromiumcontent_dir)/icudtl.dat',
'<(libchromiumcontent_dir)/content_resources_200_percent.pak',
'<(libchromiumcontent_dir)/content_shell.pak',
'<(libchromiumcontent_dir)/ui_resources_200_percent.pak',
'<(libchromiumcontent_dir)/natives_blob.bin',
'<(libchromiumcontent_dir)/snapshot_blob.bin',
'external_binaries/d3dcompiler_47.dll',
'external_binaries/msvcp120.dll',
'external_binaries/msvcr120.dll',
'external_binaries/vccorlib120.dll',
'external_binaries/xinput1_3.dll',
],
},
@ -522,14 +157,29 @@
['OS=="linux"', {
'copies': [
{
'variables': {
'conditions': [
['libchromiumcontent_component', {
'copied_libraries': [
'<(PRODUCT_DIR)/lib/libnode.so',
'<@(libchromiumcontent_shared_libraries)',
'<@(libchromiumcontent_shared_v8_libraries)',
],
}, {
'copied_libraries': [
'<(PRODUCT_DIR)/lib/libnode.so',
],
}],
],
},
'destination': '<(PRODUCT_DIR)',
'files': [
'<(libchromiumcontent_library_dir)/libchromiumcontent.so',
'<(libchromiumcontent_library_dir)/libffmpegsumo.so',
'<(libchromiumcontent_resources_dir)/icudtl.dat',
'<(libchromiumcontent_resources_dir)/content_shell.pak',
'<(libchromiumcontent_resources_dir)/natives_blob.bin',
'<(libchromiumcontent_resources_dir)/snapshot_blob.bin',
'<@(copied_libraries)',
'<(libchromiumcontent_dir)/libffmpegsumo.so',
'<(libchromiumcontent_dir)/icudtl.dat',
'<(libchromiumcontent_dir)/content_shell.pak',
'<(libchromiumcontent_dir)/natives_blob.bin',
'<(libchromiumcontent_dir)/snapshot_blob.bin',
],
},
{
@ -559,6 +209,8 @@
# Defined in Chromium but not exposed in its gyp file.
'V8_USE_EXTERNAL_STARTUP_DATA',
'ENABLE_PLUGINS',
# Needed by Node.
'NODE_WANT_INTERNALS=1',
],
'sources': [
'<@(lib_sources)',
@ -575,11 +227,11 @@
'vendor/node/deps/http_parser',
'vendor/node/deps/uv/include',
# The `node.h` is using `#include"v8.h"`.
'vendor/brightray/vendor/download/libchromiumcontent/src/v8/include',
'<(libchromiumcontent_src_dir)/v8/include',
# The `node.h` is using `#include"ares.h"`.
'vendor/node/deps/cares/include',
# The `third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h` is using `platform/PlatformExport.h`.
'vendor/brightray/vendor/download/libchromiumcontent/src/third_party/WebKit/Source',
'<(libchromiumcontent_src_dir)/third_party/WebKit/Source',
],
'direct_dependent_settings': {
'include_dirs': [
@ -590,6 +242,11 @@
'vendor/brightray/brightray.gyp:brightray',
],
'conditions': [
['libchromiumcontent_component', {
'link_settings': {
'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
},
}],
['OS=="win"', {
'sources': [
'<@(lib_sources_win)',
@ -603,6 +260,13 @@
],
},
'dependencies': [
# Node is built as static_library on Windows, so we also need to
# include its dependencies here.
'vendor/node/deps/cares/cares.gyp:cares',
'vendor/node/deps/http_parser/http_parser.gyp:http_parser',
'vendor/node/deps/uv/uv.gyp:libuv',
'vendor/node/deps/zlib/zlib.gyp:zlib',
# Build with breakpad support.
'vendor/breakpad/breakpad.gyp:breakpad_handler',
'vendor/breakpad/breakpad.gyp:breakpad_sender',
],
@ -624,15 +288,13 @@
],
},
# Required settings of using breakpad.
'include_dirs': [
'vendor/breakpad/src',
],
'cflags': [
'<!@(pkg-config --cflags dbus-1)',
'-Wno-deprecated-register',
'cflags_cc': [
'-Wno-empty-body',
'-Wno-reserved-user-defined-literal',
],
'include_dirs': [
'vendor/breakpad/src',
],
'dependencies': [
'vendor/breakpad/breakpad.gyp:breakpad_client',
],
@ -690,138 +352,6 @@
}
],
}, # target atom_coffee2c
{
'target_name': '<(project_name)_dump_symbols',
'type': 'none',
'dependencies': [
'<(project_name)',
],
'conditions': [
['OS=="mac"', {
'dependencies': [
'vendor/breakpad/breakpad.gyp:dump_syms',
],
'actions': [
{
'action_name': 'Dump Symbols',
'inputs': [
'<(PRODUCT_DIR)/<(product_name).app/Contents/MacOS/<(product_name)',
],
'outputs': [
'<(PRODUCT_DIR)/Atom-Shell.breakpad.syms',
],
'action': [
'python',
'tools/posix/generate_breakpad_symbols.py',
'--build-dir=<(PRODUCT_DIR)',
'--binary=<(PRODUCT_DIR)/<(product_name).app/Contents/MacOS/<(product_name)',
'--symbols-dir=<(PRODUCT_DIR)/Atom-Shell.breakpad.syms',
'--libchromiumcontent-dir=<(libchromiumcontent_library_dir)',
'--clear',
'--jobs=16',
],
},
],
}], # OS=="mac"
['OS=="win"', {
'actions': [
{
'action_name': 'Dump Symbols',
'inputs': [
'<(PRODUCT_DIR)/<(project_name).exe',
],
'outputs': [
'<(PRODUCT_DIR)/Atom-Shell.breakpad.syms',
],
'action': [
'python',
'tools/win/generate_breakpad_symbols.py',
'--symbols-dir=<(PRODUCT_DIR)/Atom-Shell.breakpad.syms',
'--jobs=16',
'<(PRODUCT_DIR)',
'<(libchromiumcontent_library_dir)',
],
},
],
}], # OS=="win"
['OS=="linux"', {
'dependencies': [
'vendor/breakpad/breakpad.gyp:dump_syms',
],
'actions': [
{
'action_name': 'Dump Symbols',
'inputs': [
'<(PRODUCT_DIR)/<(project_name)',
],
'outputs': [
'<(PRODUCT_DIR)/Atom-Shell.breakpad.syms',
],
'action': [
'python',
'tools/posix/generate_breakpad_symbols.py',
'--build-dir=<(PRODUCT_DIR)',
'--binary=<(PRODUCT_DIR)/<(project_name)',
'--symbols-dir=<(PRODUCT_DIR)/Atom-Shell.breakpad.syms',
'--libchromiumcontent-dir=<(libchromiumcontent_library_dir)',
'--clear',
'--jobs=16',
],
},
{
'action_name': 'Strip Binary',
'inputs': [
'<(PRODUCT_DIR)/libchromiumcontent.so',
'<(PRODUCT_DIR)/libffmpegsumo.so',
'<(PRODUCT_DIR)/<(project_name)',
# Add the syms folder as input would force this action to run
# after the 'Dump Symbols' action. And since it is a folder,
# it would be ignored by the 'strip' command.
'<(PRODUCT_DIR)/Atom-Shell.breakpad.syms',
],
'outputs': [
# Gyp action requires a output file, add a fake one here.
'<(PRODUCT_DIR)/dummy_file',
],
'action': [
'tools/posix/strip.sh',
'<@(_inputs)',
],
},
],
}], # OS=="linux"
],
}, # target <(project_name>_dump_symbols
{
'target_name': 'copy_chromedriver',
'type': 'none',
'actions': [
{
'action_name': 'Copy ChromeDriver Binary',
'variables': {
'conditions': [
['OS=="win"', {
'chromedriver_binary': 'chromedriver.exe',
},{
'chromedriver_binary': 'chromedriver',
}],
],
},
'inputs': [
'<(libchromiumcontent_library_dir)/<(chromedriver_binary)',
],
'outputs': [
'<(PRODUCT_DIR)/<(chromedriver_binary)',
],
'action': [
'python',
'tools/copy_binary.py',
'<@(_inputs)',
'<@(_outputs)',
],
}
],
}, # copy_chromedriver
],
'conditions': [
['OS=="mac"', {
@ -839,7 +369,7 @@
'include_dirs': [
'.',
'vendor',
'<(libchromiumcontent_include_dir)',
'<(libchromiumcontent_src_dir)',
],
'defines': [
'PRODUCT_NAME="<(product_name)"',
@ -859,10 +389,10 @@
'mac_bundle': 1,
'mac_bundle_resources': [
'atom/common/resources/mac/MainMenu.xib',
'<(libchromiumcontent_resources_dir)/content_shell.pak',
'<(libchromiumcontent_resources_dir)/icudtl.dat',
'<(libchromiumcontent_resources_dir)/natives_blob.bin',
'<(libchromiumcontent_resources_dir)/snapshot_blob.bin',
'<(libchromiumcontent_dir)/content_shell.pak',
'<(libchromiumcontent_dir)/icudtl.dat',
'<(libchromiumcontent_dir)/natives_blob.bin',
'<(libchromiumcontent_dir)/snapshot_blob.bin',
],
'xcode_settings': {
'INFOPLIST_FILE': 'atom/common/resources/mac/Info.plist',
@ -876,11 +406,25 @@
},
'copies': [
{
'variables': {
'conditions': [
['libchromiumcontent_component', {
'copied_libraries': [
'<(PRODUCT_DIR)/libnode.dylib',
'<@(libchromiumcontent_shared_libraries)',
'<@(libchromiumcontent_shared_v8_libraries)',
],
}, {
'copied_libraries': [
'<(PRODUCT_DIR)/libnode.dylib',
],
}],
],
},
'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Libraries',
'files': [
'<(libchromiumcontent_library_dir)/ffmpegsumo.so',
'<(libchromiumcontent_library_dir)/libchromiumcontent.dylib',
'<(PRODUCT_DIR)/libnode.dylib',
'<@(copied_libraries)',
'<(libchromiumcontent_dir)/ffmpegsumo.so',
],
},
{
@ -961,37 +505,5 @@
},
],
}], # OS!="mac"
['OS=="win"', {
'targets': [
{
'target_name': 'generate_node_lib',
'type': 'none',
'dependencies': [
'<(project_name)',
],
'actions': [
{
'action_name': 'Create node.lib',
'inputs': [
'<(PRODUCT_DIR)/node.dll.lib',
'<(libchromiumcontent_library_dir)/chromiumcontent.dll.lib',
],
'outputs': [
'<(PRODUCT_DIR)/node.lib',
],
'action': [
'lib.exe',
'/nologo',
# We can't use <(_outputs) here because that escapes the
# backslash in the path, which confuses lib.exe.
'/OUT:<(PRODUCT_DIR)\\node.lib',
'<@(_inputs)',
],
'msvs_cygwin_shell': 0,
},
],
}, # target generate_node_lib
],
}], # OS==win
],
}

View file

@ -4,9 +4,10 @@
#include "atom/browser/atom_browser_main_parts.h"
#include <gio/gio.h>
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
#include "library_loaders/libgio.h"
#include "ui/gfx/switches.h"
namespace atom {
@ -16,8 +17,8 @@ namespace {
const char* kInterfaceSchema = "org.gnome.desktop.interface";
const char* kScaleFactor = "scaling-factor";
bool SchemaExists(const LibGioLoader& libgio_loader, const char* schema_name) {
const gchar* const* schemas = libgio_loader.g_settings_list_schemas();
bool SchemaExists(const char* schema_name) {
const gchar* const* schemas = g_settings_list_schemas();
while (*schemas) {
if (strcmp(schema_name, static_cast<const char*>(*schemas)) == 0)
return true;
@ -26,9 +27,8 @@ bool SchemaExists(const LibGioLoader& libgio_loader, const char* schema_name) {
return false;
}
bool KeyExists(const LibGioLoader& libgio_loader, GSettings* client,
const char* key) {
gchar** keys = libgio_loader.g_settings_list_keys(client);
bool KeyExists(GSettings* client, const char* key) {
gchar** keys = g_settings_list_keys(client);
if (!keys)
return false;
@ -45,24 +45,15 @@ bool KeyExists(const LibGioLoader& libgio_loader, GSettings* client,
}
void GetDPIFromGSettings(guint* scale_factor) {
LibGioLoader libgio_loader;
// Try also without .0 at the end; on some systems this may be required.
if (!libgio_loader.Load("libgio-2.0.so.0") &&
!libgio_loader.Load("libgio-2.0.so")) {
VLOG(1) << "Cannot load gio library. Will fall back to gconf.";
return;
}
GSettings* client = nullptr;
if (!SchemaExists(libgio_loader, kInterfaceSchema) ||
!(client = libgio_loader.g_settings_new(kInterfaceSchema))) {
if (!SchemaExists(kInterfaceSchema) ||
!(client = g_settings_new(kInterfaceSchema))) {
VLOG(1) << "Cannot create gsettings client.";
return;
}
if (KeyExists(libgio_loader, client, kScaleFactor))
*scale_factor = libgio_loader.g_settings_get_uint(client, kScaleFactor);
if (KeyExists(client, kScaleFactor))
*scale_factor = g_settings_get_uint(client, kScaleFactor);
g_object_unref(client);
}

View file

@ -54,8 +54,9 @@
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/screen.h"
#include "ui/gl/gpu_switching_manager.h"
#if defined(OS_WIN)
#include "ui/gfx/switches.h"
@ -65,10 +66,6 @@ using content::NavigationEntry;
using content::RenderWidgetHostView;
using content::RenderWidgetHost;
namespace content {
CONTENT_EXPORT extern bool g_use_transparent_window;
}
namespace atom {
namespace {
@ -115,7 +112,7 @@ NativeWindow::NativeWindow(content::WebContents* web_contents,
// Tell the content module to initialize renderer widget with transparent
// mode.
content::g_use_transparent_window = transparent_;
ui::GpuSwitchingManager::SetTransparent(transparent_);
// Read icon before window is created.
options.Get(switches::kIcon, &icon_);

View file

@ -17,7 +17,7 @@
<key>CFBundleIconFile</key>
<string>atom.icns</string>
<key>CFBundleVersion</key>
<string>0.22.3</string>
<string>0.23.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.8.0</string>
<key>NSMainNibFile</key>

View file

@ -50,8 +50,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,22,3,0
PRODUCTVERSION 0,22,3,0
FILEVERSION 0,23,0,0
PRODUCTVERSION 0,23,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -68,12 +68,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "GitHub, Inc."
VALUE "FileDescription", "Atom-Shell"
VALUE "FileVersion", "0.22.3"
VALUE "FileVersion", "0.23.0"
VALUE "InternalName", "atom.exe"
VALUE "LegalCopyright", "Copyright (C) 2013 GitHub, Inc. All rights reserved."
VALUE "OriginalFilename", "atom.exe"
VALUE "ProductName", "Atom-Shell"
VALUE "ProductVersion", "0.22.3"
VALUE "ProductVersion", "0.23.0"
VALUE "SquirrelAwareVersion", "1"
END
END

View file

@ -6,8 +6,8 @@
#define ATOM_VERSION_H
#define ATOM_MAJOR_VERSION 0
#define ATOM_MINOR_VERSION 22
#define ATOM_PATCH_VERSION 3
#define ATOM_MINOR_VERSION 23
#define ATOM_PATCH_VERSION 0
#define ATOM_VERSION_IS_RELEASE 1

View file

@ -52,6 +52,14 @@ REFERENCE_MODULE(atom_renderer_ipc);
REFERENCE_MODULE(atom_renderer_web_frame);
#undef REFERENCE_MODULE
// The "v8::Function::kLineOffsetNotFound" is exported in node.dll, but the
// linker can not find it, could be a bug of VS.
#if defined(OS_WIN) && !defined(DEBUG)
namespace v8 {
const int Function::kLineOffsetNotFound = -1;
}
#endif
namespace atom {
namespace {

View file

@ -1,48 +0,0 @@
// This is generated file. Do not modify directly.
// Path to the code generator: tools/generate_library_loader/generate_library_loader.py .
#ifndef LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H
#define LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H
#include <gio/gio.h>
#define LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN
#include <string>
class LibGioLoader {
public:
LibGioLoader();
~LibGioLoader();
bool Load(const std::string& library_name)
__attribute__((warn_unused_result));
bool loaded() const { return loaded_; }
typeof(&::g_settings_new) g_settings_new;
typeof(&::g_settings_get_child) g_settings_get_child;
typeof(&::g_settings_get_string) g_settings_get_string;
typeof(&::g_settings_get_boolean) g_settings_get_boolean;
typeof(&::g_settings_get_uint) g_settings_get_uint;
typeof(&::g_settings_get_strv) g_settings_get_strv;
typeof(&::g_settings_is_writable) g_settings_is_writable;
typeof(&::g_settings_list_schemas) g_settings_list_schemas;
typeof(&::g_settings_list_keys) g_settings_list_keys;
private:
void CleanUp(bool unload);
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN)
void* library_;
#endif
bool loaded_;
// Disallow copy constructor and assignment operator.
LibGioLoader(const LibGioLoader&);
void operator=(const LibGioLoader&);
};
#endif // LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H

View file

@ -1,174 +0,0 @@
// This is generated file. Do not modify directly.
// Path to the code generator: tools/generate_library_loader/generate_library_loader.py .
#include "library_loaders/libgio.h"
#include <dlfcn.h>
// Put these sanity checks here so that they fire at most once
// (to avoid cluttering the build output).
#if !defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN) && !defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED)
#error neither LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN nor LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED defined
#endif
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN) && defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED)
#error both LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN and LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED defined
#endif
LibGioLoader::LibGioLoader() : loaded_(false) {
}
LibGioLoader::~LibGioLoader() {
CleanUp(loaded_);
}
bool LibGioLoader::Load(const std::string& library_name) {
if (loaded_)
return false;
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN)
library_ = dlopen(library_name.c_str(), RTLD_LAZY);
if (!library_)
return false;
#endif
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN)
g_settings_new =
reinterpret_cast<typeof(this->g_settings_new)>(
dlsym(library_, "g_settings_new"));
#endif
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED)
g_settings_new = &::g_settings_new;
#endif
if (!g_settings_new) {
CleanUp(true);
return false;
}
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN)
g_settings_get_child =
reinterpret_cast<typeof(this->g_settings_get_child)>(
dlsym(library_, "g_settings_get_child"));
#endif
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED)
g_settings_get_child = &::g_settings_get_child;
#endif
if (!g_settings_get_child) {
CleanUp(true);
return false;
}
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN)
g_settings_get_string =
reinterpret_cast<typeof(this->g_settings_get_string)>(
dlsym(library_, "g_settings_get_string"));
#endif
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED)
g_settings_get_string = &::g_settings_get_string;
#endif
if (!g_settings_get_string) {
CleanUp(true);
return false;
}
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN)
g_settings_get_boolean =
reinterpret_cast<typeof(this->g_settings_get_boolean)>(
dlsym(library_, "g_settings_get_boolean"));
#endif
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED)
g_settings_get_boolean = &::g_settings_get_boolean;
#endif
if (!g_settings_get_boolean) {
CleanUp(true);
return false;
}
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN)
g_settings_get_uint =
reinterpret_cast<typeof(this->g_settings_get_uint)>(
dlsym(library_, "g_settings_get_uint"));
#endif
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED)
g_settings_get_uint = &::g_settings_get_uint;
#endif
if (!g_settings_get_uint) {
CleanUp(true);
return false;
}
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN)
g_settings_get_strv =
reinterpret_cast<typeof(this->g_settings_get_strv)>(
dlsym(library_, "g_settings_get_strv"));
#endif
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED)
g_settings_get_strv = &::g_settings_get_strv;
#endif
if (!g_settings_get_strv) {
CleanUp(true);
return false;
}
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN)
g_settings_is_writable =
reinterpret_cast<typeof(this->g_settings_is_writable)>(
dlsym(library_, "g_settings_is_writable"));
#endif
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED)
g_settings_is_writable = &::g_settings_is_writable;
#endif
if (!g_settings_is_writable) {
CleanUp(true);
return false;
}
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN)
g_settings_list_schemas =
reinterpret_cast<typeof(this->g_settings_list_schemas)>(
dlsym(library_, "g_settings_list_schemas"));
#endif
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED)
g_settings_list_schemas = &::g_settings_list_schemas;
#endif
if (!g_settings_list_schemas) {
CleanUp(true);
return false;
}
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN)
g_settings_list_keys =
reinterpret_cast<typeof(this->g_settings_list_keys)>(
dlsym(library_, "g_settings_list_keys"));
#endif
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED)
g_settings_list_keys = &::g_settings_list_keys;
#endif
if (!g_settings_list_keys) {
CleanUp(true);
return false;
}
loaded_ = true;
return true;
}
void LibGioLoader::CleanUp(bool unload) {
#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN)
if (unload) {
dlclose(library_);
library_ = NULL;
}
#endif
loaded_ = false;
g_settings_new = NULL;
g_settings_get_child = NULL;
g_settings_get_string = NULL;
g_settings_get_boolean = NULL;
g_settings_get_uint = NULL;
g_settings_get_strv = NULL;
g_settings_is_writable = NULL;
g_settings_list_schemas = NULL;
g_settings_list_keys = NULL;
}

View file

@ -3,18 +3,12 @@
'vendor/brightray/brightray.gypi',
],
'variables': {
'clang': 0,
'openssl_no_asm': 1,
'conditions': [
['OS=="mac" or OS=="linux"', {
'clang': 1,
}],
],
# Required by breakpad.
'os_bsd': 0,
# Reflects node's config.gypi.
'component%': 'static_library',
'python': 'python',
'openssl_no_asm': 1,
'node_install_npm': 'false',
'node_prefix': '',
'node_shared_cares': 'false',
@ -40,10 +34,11 @@
# Settings to compile node under Windows.
'target_defaults': {
'target_conditions': [
['_target_name in ["libuv", "http_parser", "cares", "openssl", "openssl-cli", "node", "zlib"]', {
['_target_name in ["libuv", "http_parser", "openssl", "cares", "node", "zlib"]', {
'msvs_disabled_warnings': [
4703, # potentially uninitialized local pointer variable 'req' used
4013, # 'free' undefined; assuming extern returning int
4018, # signed/unsigned mismatch
4054, #
4057, # 'function' : 'volatile LONG *' differs in indirection to slightly different base types from 'unsigned long *'
4189, #
@ -53,6 +48,7 @@
4152, # function/data pointer conversion in expression
4206, # translation unit is empty
4204, # non-constant aggregate initializer
4210, # nonstandard extension used : function given file scope
4214, # bit field types other than int
4232, # address of dllimport 'free' is not static, identity not guaranteed
4291, # no matching operator delete found
@ -76,6 +72,7 @@
'-Wno-unused-function',
'-Wno-sometimes-uninitialized',
'-Wno-pointer-sign',
'-Wno-sign-compare',
'-Wno-string-plus-int',
'-Wno-unused-variable',
'-Wno-deprecated-declarations',
@ -95,36 +92,88 @@
'-Wno-unused-value',
'-Wno-deprecated-declarations',
'-Wno-return-type',
# Fix relocation error when compiling as shared library.
# Required when building as shared library.
'-fPIC',
],
}],
],
}],
['_target_name in ["node", "atom_lib"]', {
'include_dirs': [
'vendor/brightray/vendor/download/libchromiumcontent/src/v8/include',
],
}],
['_target_name=="node"', {
'include_dirs': [ '<(libchromiumcontent_src_dir)/v8/include' ],
'conditions': [
['OS=="linux"', {
'libraries': [
'<(libchromiumcontent_library_dir)/libchromiumcontent.so',
],
['OS=="mac" and libchromiumcontent_component==0', {
# -all_load is the "whole-archive" on OS X.
'xcode_settings': {
'OTHER_LDFLAGS': [ '-Wl,-all_load' ],
},
}],
['OS=="win"', {
'libraries': [
'<(libchromiumcontent_library_dir)/chromiumcontent.dll.lib',
'libraries': [ '-lwinmm.lib' ],
'conditions': [
['libchromiumcontent_component==0', {
'variables': {
'conditions': [
['target_arch=="ia32"', {
'reference_symbols': [
'_u_errorName_52',
'_ubidi_setPara_52',
'_ucsdet_getName_52',
'_ulocdata_close_52',
'_uregex_matches_52',
'_uscript_getCode_52',
'_usearch_setPattern_52',
'?createInstance@Transliterator@icu_52@@SAPAV12@ABVUnicodeString@2@W4UTransDirection@@AAW4UErrorCode@@@Z',
'?nameToUnicodeUTF8@IDNA@icu_52@@UBEXABVStringPiece@2@AAVByteSink@2@AAVIDNAInfo@2@AAW4UErrorCode@@@Z',
'?kLineOffsetNotFound@Function@v8@@2HB',
],
}, {
'reference_symbols': [
'u_errorName_52',
'ubidi_setPara_52',
'ucsdet_getName_52',
'uidna_openUTS46_52',
'ulocdata_close_52',
'uregex_matches_52',
'uscript_getCode_52',
'usearch_setPattern_52',
'?createInstance@Transliterator@icu_52@@SAPEAV12@AEBVUnicodeString@2@W4UTransDirection@@AEAW4UErrorCode@@@Z'
],
}],
],
},
'msvs_settings': {
'VCLinkerTool': {
# There is nothing like "whole-archive" on Windows, so we
# have to manually force some objets files to be included
# by referencing them.
'ForceSymbolReferences': [ '<@(reference_symbols)' ], # '/INCLUDE'
},
},
}],
],
}],
['OS=="mac"', {
'libraries': [
'<(libchromiumcontent_library_dir)/libchromiumcontent.dylib',
['OS=="linux" and libchromiumcontent_component==0', {
# Prevent the linker from stripping symbols.
'ldflags': [
'-Wl,--whole-archive',
'<@(libchromiumcontent_v8_libraries)',
'-Wl,--no-whole-archive',
],
}, {
'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
}],
],
}],
['_target_name=="openssl"', {
'xcode_settings': {
'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',
},
'cflags': [
'-fvisibility=hidden',
],
}],
['_target_name=="libuv"', {
'conditions': [
['OS=="win"', {
@ -152,85 +201,28 @@
'-Wno-empty-body',
],
}], # OS=="linux"
['OS=="win"', {
'msvs_disabled_warnings': [
# unreferenced local function has been removed.
4505,
],
}], # OS=="win"
],
}],
['_type in ["executable", "shared_library"]', {
# On some machines setting CLANG_CXX_LIBRARY doesn't work for linker.
'xcode_settings': {
'OTHER_LDFLAGS': [
'-stdlib=libc++'
],
},
}],
],
'msvs_cygwin_shell': 0, # Strangely setting it to 1 would make building under cygwin fail.
'msvs_disabled_warnings': [
4005, # (node.h) macro redefinition
4189, # local variable is initialized but not referenced
4201, # (uv.h) nameless struct/union
4267, # conversion from 'size_t' to 'int', possible loss of data
4503, # decorated name length exceeded, name was truncated
4800, # (v8.h) forcing value to bool 'true' or 'false'
4819, # The file contains a character that cannot be represented in the current code page
4996, # (atlapp.h) 'GetVersionExW': was declared deprecated
],
'msvs_settings': {
'VCCLCompilerTool': {
# Programs that use the Standard C++ library must be compiled with C++
# exception handling enabled.
# http://support.microsoft.com/kb/154419
'ExceptionHandling': 1,
},
'VCLinkerTool': {
'AdditionalOptions': [
# ATL 8.0 included in WDK 7.1 makes the linker to generate following
# warnings:
# - warning LNK4254: section 'ATL' (50000040) merged into
# '.rdata' (40000040) with different attributes
# - warning LNK4078: multiple 'ATL' sections found with
# different attributes
'/ignore:4254',
'/ignore:4078',
# views_chromiumcontent.lib generates this warning because it's
# symobls are defined as dllexport but used as static library:
# - warning LNK4217: locally defined symbol imported in function
# - warning LNK4049: locally defined symbol imported
'/ignore:4217',
'/ignore:4049',
],
},
},
'xcode_settings': {
'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
},
},
'conditions': [
# Settings to compile with clang under OS X.
['clang==1', {
'make_global_settings': [
['CC', '/usr/bin/clang'],
['CXX', '/usr/bin/clang++'],
['LINK', '$(CXX)'],
['CC.host', '$(CC)'],
['CXX.host', '$(CXX)'],
['LINK.host', '$(LINK)'],
],
'target_defaults': {
'cflags_cc': [
'-std=c++11',
],
'xcode_settings': {
'CC': '/usr/bin/clang',
'LDPLUSPLUS': '/usr/bin/clang++',
'OTHER_CFLAGS': [
'-fcolor-diagnostics',
],
'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++
'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', # -std=c++11
},
},
}], # clang==1
# The breakdpad on Windows assumes Debug_x64 and Release_x64 configurations.
['OS=="win"', {
'target_defaults': {
@ -251,24 +243,5 @@
},
},
}], # OS=="mac"
# The breakpad on Linux needs the binary to be built with -g to generate
# unmangled symbols.
['OS=="linux"', {
'target_defaults': {
'cflags': [ '-g' ],
'conditions': [
['target_arch=="ia32"', {
'target_conditions': [
['_toolset=="target"', {
'ldflags': [
# Workaround for linker OOM.
'-Wl,--no-keep-memory',
],
}],
],
}],
],
},
}],
],
}

View file

@ -59,6 +59,7 @@ Modules for both processes:
* [Coding style](development/coding-style.md)
* [Source code directory structure](development/source-code-directory-structure.md)
* [Technical differences to NW.js (formerly node-webkit)](development/atom-shell-vs-node-webkit.md)
* [Build system overview](development/build-system-overview.md)
* [Build instructions (Mac)](development/build-instructions-mac.md)
* [Build instructions (Windows)](development/build-instructions-windows.md)
* [Build instructions (Linux)](development/build-instructions-linux.md)

View file

@ -9,7 +9,10 @@
On Ubuntu you could install the libraries via:
```bash
$ sudo apt-get install build-essential clang libdbus-1-dev libgtk2.0-dev libnotify-dev libgnome-keyring-dev libgconf2-dev gcc-multilib g++-multilib
$ sudo apt-get install build-essential clang libdbus-1-dev libgtk2.0-dev \
libnotify-dev libgnome-keyring-dev libgconf2-dev \
libasound2-dev libcap-dev libcups2-dev libxtst-dev \
gcc-multilib g++-multilib
```
Latest Node.js could be installed via ppa:
@ -52,10 +55,10 @@ $ ./script/build.py
You can also only build the `Debug` target:
```bash
$ ./script/build.py -c Debug
$ ./script/build.py -c D
```
After building is done, you can find `atom` under `out/Debug`.
After building is done, you can find `atom` under `out/D`.
## Troubleshooting

View file

@ -39,10 +39,10 @@ $ ./script/build.py
You can also only build the `Debug` target:
```bash
$ ./script/build.py -c Debug
$ ./script/build.py -c D
```
After building is done, you can find `Atom.app` under `out/Debug`.
After building is done, you can find `Atom.app` under `out/D`.
## 32bit support

View file

@ -49,10 +49,10 @@ python script\build.py
You can also only build the Debug target:
```powershell
python script\build.py -c Debug
python script\build.py -c D
```
After building is done, you can find `atom.exe` under `out\Debug`.
After building is done, you can find `atom.exe` under `out\D`.
## 64bit support

View file

@ -0,0 +1,64 @@
# Build system overview
Atom Shell uses `gyp` for project generation, and `ninja` for building, project
configurations can be found in `.gyp` and `.gypi` files.
## Gyp files
Following `gyp` files contain the main rules of building Atom Shell:
* `atom.gyp` defines how Atom Shell itself is built.
* `common.gypi` adjusts the build configurations of Node to make it build
together with Chromium.
* `vendor/brightray/brightray.gyp` defines how `brightray` is built, and
includes the default configurations of linking with Chromium.
* `vendor/brightray/brightray.gypi` includes general build configurations about
building.
## Component build
Since Chromium is quite a large project, the final linking stage would take
quite a few minutes, making it hard for development. In order to solve this,
Chromium introduced the "component build", which builds each component as a
separate shared library, making linking very quick but sacrificing file size
and performance.
In Atom Shell we took a very similar approach: for `Debug` builds, the binary
will be linked to shared library version of Chromium's components to achieve
fast linking time; for `Release` builds, the binary will be linked to the static
library versions, so we can have the best possible binary size and performance.
## Minimal bootstrapping
All of Chromium's prebuilt binaries are downloaded when running the bootstrap
script. By default both static libraries and shared libraries will be
downloaded and the final size should be between 800MB and 2GB according to the
platform.
If you only want to build Atom Shell quickly for testing or development, you
can only download the shared library versions by passing the `--dev` parameter:
```bash
$ ./script/bootstrap.py --dev
$ ./script/build.py -c D
```
## Two-phrase project generation
Atom Shell links with different sets of libraries in `Release` and `Debug`
builds, however `gyp` doesn't support configuring different link settings for
different configurations.
To work around this Atom Shell uses a `gyp` variable
`libchromiumcontent_component` to control which link settings to use, and only
generates one target when running `gyp`.
## Target names
Unlike most projects that use `Release` and `Debug` as target names, Atom Shell
uses `R` and `D` instead. This is because `gyp` randomly crashes if there is
only one `Release` or `Debug` build configuration is defined, and Atom Shell has
to only generate one target for one time as stated above.
This only affects developers, if you are only building Atom Shell for rebranding
you are not affected.

View file

@ -1,33 +1,8 @@
# Using native Node modules
The native Node modules are supported by atom-shell, but since atom-shell is
using a different V8 version from official Node, you need to use `apm` instead
of `npm` to install Node modules.
The usage of [apm](https://github.com/atom/apm) is quite similar to `npm`, to
install dependencies from `package.json` of current project, just do:
```bash
$ cd /path/to/atom-shell/project/
$ apm install .
```
But you should notice that `apm install module` won't work because it will
install a user package for [Atom Editor](https://github.com/atom/atom) instead.
## Which version of apm to use
Generally using the latest release of `apm` for latest atom-shell always works,
but if you are uncertain of the which version of `apm` to use, you may manually
instruct `apm` to use headers of a specified version of atom-shell by setting
the `ATOM_NODE_VERSION` environment.
For example force installing modules for atom-shell v0.16.0:
```bash
$ export ATOM_NODE_VERSION=0.16.0
$ apm install .
```
using a different V8 version from official Node, you have to manually specify
the location of atom-shell's headers when building native modules.
## Native Node module compatibility
@ -41,10 +16,7 @@ To solve this, you should use modules that support Node v0.11.x,
For old modules that only support Node v0.10.x, you should use the
[nan](https://github.com/rvagg/nan) module to port it to v0.11.x.
## Other ways of installing native modules
Apart from `apm`, you can also use `node-gyp` and `npm` to manually build the
native modules.
## How to install native modules
### The node-gyp way
@ -63,9 +35,12 @@ where to download the headers. The `--arch=ia32` says the module is built for
### The npm way
You can also use `npm` to install modules, the steps are exactly the same with
Node modules, except that you need to setup some environment variables:
```bash
export npm_config_disturl=https://atom.io/download/atom-shell
export npm_config_target=0.6.0
export npm_config_arch=ia32
export npm_config_target=0.23.0
export npm_config_arch=x64
HOME=~/.atom-shell-gyp npm install module-name
```

View file

@ -1,77 +0,0 @@
# Copyright (c) 2012 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.
# This gypi file defines the patterns used for determining whether a
# file is excluded from the build on a given platform. It is
# included by common.gypi for chromium_code.
{
'target_conditions': [
['OS!="win"', {
'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)win/'],
['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
}],
['OS!="mac"', {
'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc|mm?)$'],
['exclude', '(^|/)(cocoa|mac)/'] ],
}],
['OS!="ios"', {
'sources/': [ ['exclude', '_ios(_unittest)?\\.(h|cc|mm?)$'],
['exclude', '(^|/)ios/'] ],
}],
['OS!="mac" and OS!="ios"', {
'sources/': [ ['exclude', '\\.mm?$' ] ],
}],
# Do not exclude the linux files on *BSD since most of them can be
# shared at this point.
# In case a file is not needed, it is going to be excluded later on.
# TODO(evan): the above is not correct; we shouldn't build _linux
# files on non-linux.
['OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
'sources/': [
['exclude', '(^|/)library_loaders/'],
['exclude', '_linux(_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)linux_[^/]*\\.(h|cc)$'],
['exclude', '(^|/)linux/'],
['exclude', '_x11(_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)x11_[^/]*\\.(h|cc)$'],
['exclude', '(^|/)x11/'],
],
}],
['OS!="android"', {
'sources/': [
['exclude', '_android(_unittest)?\\.cc$'],
['exclude', '(^|/)android/'],
],
}],
['OS=="win"', {
'sources/': [
['exclude', '_posix(_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)posix/'],
],
}],
['OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
'sources/': [
['exclude', '_xdg(_unittest)?\\.(h|cc)$'],
],
}],
['OS!="linux" and OS!="openbsd" and OS!="freebsd"', {
'sources/': [
['exclude', '_gtk(_browsertest|_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)gtk/'],
['exclude', '(^|/)gtk_[^/]*\\.(h|cc)$'],
['exclude', '(^|/)libgtk2ui/'],
['exclude', '(^|/)x/'],
],
}],
['OS=="mac"', {
'sources/': [ ['exclude', '_aura(_browsertest|_unittest)?\\.(h|cc)$'],
['exclude', '(^|/)aura/'],
['exclude', '_views\\.(h|cc)$'],
['exclude', '(^|/)views/'],
],
}],
]
}

377
filenames.gypi Normal file
View file

@ -0,0 +1,377 @@
{
'variables': {
'app_sources': [
'atom/app/atom_main.cc',
'atom/app/atom_main.h',
],
'bundle_sources': [
'atom/browser/resources/mac/atom.icns',
],
'coffee_sources': [
'atom/browser/api/lib/app.coffee',
'atom/browser/api/lib/atom-delegate.coffee',
'atom/browser/api/lib/auto-updater.coffee',
'atom/browser/api/lib/browser-window.coffee',
'atom/browser/api/lib/content-tracing.coffee',
'atom/browser/api/lib/dialog.coffee',
'atom/browser/api/lib/global-shortcut.coffee',
'atom/browser/api/lib/ipc.coffee',
'atom/browser/api/lib/menu.coffee',
'atom/browser/api/lib/menu-item.coffee',
'atom/browser/api/lib/power-monitor.coffee',
'atom/browser/api/lib/protocol.coffee',
'atom/browser/api/lib/screen.coffee',
'atom/browser/api/lib/tray.coffee',
'atom/browser/api/lib/web-contents.coffee',
'atom/browser/lib/chrome-extension.coffee',
'atom/browser/lib/guest-view-manager.coffee',
'atom/browser/lib/guest-window-manager.coffee',
'atom/browser/lib/init.coffee',
'atom/browser/lib/objects-registry.coffee',
'atom/browser/lib/rpc-server.coffee',
'atom/common/api/lib/callbacks-registry.coffee',
'atom/common/api/lib/clipboard.coffee',
'atom/common/api/lib/crash-reporter.coffee',
'atom/common/api/lib/id-weak-map.coffee',
'atom/common/api/lib/native-image.coffee',
'atom/common/api/lib/original-fs.coffee',
'atom/common/api/lib/shell.coffee',
'atom/common/lib/init.coffee',
'atom/renderer/lib/chrome-api.coffee',
'atom/renderer/lib/init.coffee',
'atom/renderer/lib/inspector.coffee',
'atom/renderer/lib/override.coffee',
'atom/renderer/lib/web-view/guest-view-internal.coffee',
'atom/renderer/lib/web-view/web-view.coffee',
'atom/renderer/lib/web-view/web-view-attributes.coffee',
'atom/renderer/lib/web-view/web-view-constants.coffee',
'atom/renderer/api/lib/ipc.coffee',
'atom/renderer/api/lib/remote.coffee',
'atom/renderer/api/lib/screen.coffee',
'atom/renderer/api/lib/web-frame.coffee',
],
'coffee2c_sources': [
'atom/common/lib/asar.coffee',
'atom/common/lib/asar_init.coffee',
],
'lib_sources': [
'atom/app/atom_content_client.cc',
'atom/app/atom_content_client.h',
'atom/app/atom_main_args.cc',
'atom/app/atom_main_args.h',
'atom/app/atom_main_delegate.cc',
'atom/app/atom_main_delegate.h',
'atom/app/atom_main_delegate_mac.mm',
'atom/app/node_main.cc',
'atom/app/node_main.h',
'atom/browser/api/atom_api_app.cc',
'atom/browser/api/atom_api_app.h',
'atom/browser/api/atom_api_auto_updater.cc',
'atom/browser/api/atom_api_auto_updater.h',
'atom/browser/api/atom_api_content_tracing.cc',
'atom/browser/api/atom_api_dialog.cc',
'atom/browser/api/atom_api_global_shortcut.cc',
'atom/browser/api/atom_api_global_shortcut.h',
'atom/browser/api/atom_api_menu.cc',
'atom/browser/api/atom_api_menu.h',
'atom/browser/api/atom_api_menu_views.cc',
'atom/browser/api/atom_api_menu_views.h',
'atom/browser/api/atom_api_menu_mac.h',
'atom/browser/api/atom_api_menu_mac.mm',
'atom/browser/api/atom_api_power_monitor.cc',
'atom/browser/api/atom_api_power_monitor.h',
'atom/browser/api/atom_api_protocol.cc',
'atom/browser/api/atom_api_protocol.h',
'atom/browser/api/atom_api_screen.cc',
'atom/browser/api/atom_api_screen.h',
'atom/browser/api/atom_api_tray.cc',
'atom/browser/api/atom_api_tray.h',
'atom/browser/api/atom_api_web_contents.cc',
'atom/browser/api/atom_api_web_contents.h',
'atom/browser/api/atom_api_web_view_manager.cc',
'atom/browser/api/atom_api_window.cc',
'atom/browser/api/atom_api_window.h',
'atom/browser/api/event.cc',
'atom/browser/api/event.h',
'atom/browser/api/event_emitter.cc',
'atom/browser/api/event_emitter.h',
'atom/browser/auto_updater.cc',
'atom/browser/auto_updater.h',
'atom/browser/auto_updater_delegate.h',
'atom/browser/auto_updater_linux.cc',
'atom/browser/auto_updater_mac.mm',
'atom/browser/auto_updater_win.cc',
'atom/browser/atom_access_token_store.cc',
'atom/browser/atom_access_token_store.h',
'atom/browser/atom_browser_client.cc',
'atom/browser/atom_browser_client.h',
'atom/browser/atom_browser_context.cc',
'atom/browser/atom_browser_context.h',
'atom/browser/atom_browser_main_parts.cc',
'atom/browser/atom_browser_main_parts.h',
'atom/browser/atom_browser_main_parts_linux.cc',
'atom/browser/atom_browser_main_parts_mac.mm',
'atom/browser/atom_javascript_dialog_manager.cc',
'atom/browser/atom_javascript_dialog_manager.h',
'atom/browser/atom_resource_dispatcher_host_delegate.cc',
'atom/browser/atom_resource_dispatcher_host_delegate.h',
'atom/browser/atom_speech_recognition_manager_delegate.cc',
'atom/browser/atom_speech_recognition_manager_delegate.h',
'atom/browser/browser.cc',
'atom/browser/browser.h',
'atom/browser/browser_linux.cc',
'atom/browser/browser_mac.mm',
'atom/browser/browser_win.cc',
'atom/browser/browser_observer.h',
'atom/browser/javascript_environment.cc',
'atom/browser/javascript_environment.h',
'atom/browser/mac/atom_application.h',
'atom/browser/mac/atom_application.mm',
'atom/browser/mac/atom_application_delegate.h',
'atom/browser/mac/atom_application_delegate.mm',
'atom/browser/native_window.cc',
'atom/browser/native_window.h',
'atom/browser/native_window_views.cc',
'atom/browser/native_window_views.h',
'atom/browser/native_window_mac.h',
'atom/browser/native_window_mac.mm',
'atom/browser/native_window_observer.h',
'atom/browser/net/adapter_request_job.cc',
'atom/browser/net/adapter_request_job.h',
'atom/browser/net/asar/asar_protocol_handler.cc',
'atom/browser/net/asar/asar_protocol_handler.h',
'atom/browser/net/asar/url_request_asar_job.cc',
'atom/browser/net/asar/url_request_asar_job.h',
'atom/browser/net/atom_url_request_job_factory.cc',
'atom/browser/net/atom_url_request_job_factory.h',
'atom/browser/net/url_request_string_job.cc',
'atom/browser/net/url_request_string_job.h',
'atom/browser/net/url_request_buffer_job.cc',
'atom/browser/net/url_request_buffer_job.h',
'atom/browser/node_debugger.cc',
'atom/browser/node_debugger.h',
'atom/browser/ui/accelerator_util.cc',
'atom/browser/ui/accelerator_util.h',
'atom/browser/ui/accelerator_util_mac.mm',
'atom/browser/ui/accelerator_util_views.cc',
'atom/browser/ui/cocoa/atom_menu_controller.h',
'atom/browser/ui/cocoa/atom_menu_controller.mm',
'atom/browser/ui/cocoa/event_processing_window.h',
'atom/browser/ui/cocoa/event_processing_window.mm',
'atom/browser/ui/file_dialog.h',
'atom/browser/ui/file_dialog_gtk.cc',
'atom/browser/ui/file_dialog_mac.mm',
'atom/browser/ui/file_dialog_win.cc',
'atom/browser/ui/message_box.h',
'atom/browser/ui/message_box_mac.mm',
'atom/browser/ui/message_box_views.cc',
'atom/browser/ui/tray_icon.cc',
'atom/browser/ui/tray_icon.h',
'atom/browser/ui/tray_icon_gtk.cc',
'atom/browser/ui/tray_icon_gtk.h',
'atom/browser/ui/tray_icon_cocoa.h',
'atom/browser/ui/tray_icon_cocoa.mm',
'atom/browser/ui/tray_icon_observer.h',
'atom/browser/ui/tray_icon_win.cc',
'atom/browser/ui/views/frameless_view.cc',
'atom/browser/ui/views/frameless_view.h',
'atom/browser/ui/views/global_menu_bar_x11.cc',
'atom/browser/ui/views/global_menu_bar_x11.h',
'atom/browser/ui/views/menu_bar.cc',
'atom/browser/ui/views/menu_bar.h',
'atom/browser/ui/views/menu_delegate.cc',
'atom/browser/ui/views/menu_delegate.h',
'atom/browser/ui/views/menu_layout.cc',
'atom/browser/ui/views/menu_layout.h',
'atom/browser/ui/views/submenu_button.cc',
'atom/browser/ui/views/submenu_button.h',
'atom/browser/ui/views/win_frame_view.cc',
'atom/browser/ui/views/win_frame_view.h',
'atom/browser/ui/win/notify_icon_host.cc',
'atom/browser/ui/win/notify_icon_host.h',
'atom/browser/ui/win/notify_icon.cc',
'atom/browser/ui/win/notify_icon.h',
'atom/browser/ui/x/window_state_watcher.cc',
'atom/browser/ui/x/window_state_watcher.h',
'atom/browser/ui/x/x_window_utils.cc',
'atom/browser/ui/x/x_window_utils.h',
'atom/browser/web_view_manager.cc',
'atom/browser/web_view_manager.h',
'atom/browser/web_dialog_helper.cc',
'atom/browser/web_dialog_helper.h',
'atom/browser/window_list.cc',
'atom/browser/window_list.h',
'atom/browser/window_list_observer.h',
'atom/common/api/api_messages.h',
'atom/common/api/atom_api_asar.cc',
'atom/common/api/atom_api_clipboard.cc',
'atom/common/api/atom_api_crash_reporter.cc',
'atom/common/api/atom_api_id_weak_map.cc',
'atom/common/api/atom_api_id_weak_map.h',
'atom/common/api/atom_api_native_image.cc',
'atom/common/api/atom_api_native_image.h',
'atom/common/api/atom_api_native_image_mac.mm',
'atom/common/api/atom_api_shell.cc',
'atom/common/api/atom_api_v8_util.cc',
'atom/common/api/atom_bindings.cc',
'atom/common/api/atom_bindings.h',
'atom/common/api/object_life_monitor.cc',
'atom/common/api/object_life_monitor.h',
'atom/common/asar/archive.cc',
'atom/common/asar/archive.h',
'atom/common/asar/asar_util.cc',
'atom/common/asar/asar_util.h',
'atom/common/asar/scoped_temporary_file.cc',
'atom/common/asar/scoped_temporary_file.h',
'atom/common/common_message_generator.cc',
'atom/common/common_message_generator.h',
'atom/common/crash_reporter/crash_reporter.cc',
'atom/common/crash_reporter/crash_reporter.h',
'atom/common/crash_reporter/crash_reporter_linux.cc',
'atom/common/crash_reporter/crash_reporter_linux.h',
'atom/common/crash_reporter/crash_reporter_mac.h',
'atom/common/crash_reporter/crash_reporter_mac.mm',
'atom/common/crash_reporter/crash_reporter_win.cc',
'atom/common/crash_reporter/crash_reporter_win.h',
'atom/common/crash_reporter/linux/crash_dump_handler.cc',
'atom/common/crash_reporter/linux/crash_dump_handler.h',
'atom/common/crash_reporter/win/crash_service.cc',
'atom/common/crash_reporter/win/crash_service.h',
'atom/common/crash_reporter/win/crash_service_main.cc',
'atom/common/crash_reporter/win/crash_service_main.h',
'atom/common/draggable_region.cc',
'atom/common/draggable_region.h',
'atom/common/google_api_key.h',
'atom/common/linux/application_info.cc',
'atom/common/native_mate_converters/accelerator_converter.cc',
'atom/common/native_mate_converters/accelerator_converter.h',
'atom/common/native_mate_converters/file_path_converter.h',
'atom/common/native_mate_converters/gfx_converter.cc',
'atom/common/native_mate_converters/gfx_converter.h',
'atom/common/native_mate_converters/gurl_converter.h',
'atom/common/native_mate_converters/image_converter.cc',
'atom/common/native_mate_converters/image_converter.h',
'atom/common/native_mate_converters/string16_converter.h',
'atom/common/native_mate_converters/v8_value_converter.cc',
'atom/common/native_mate_converters/v8_value_converter.h',
'atom/common/native_mate_converters/value_converter.cc',
'atom/common/native_mate_converters/value_converter.h',
'atom/common/node_bindings.cc',
'atom/common/node_bindings.h',
'atom/common/node_bindings_linux.cc',
'atom/common/node_bindings_linux.h',
'atom/common/node_bindings_mac.cc',
'atom/common/node_bindings_mac.h',
'atom/common/node_bindings_win.cc',
'atom/common/node_bindings_win.h',
'atom/common/node_includes.h',
'atom/common/options_switches.cc',
'atom/common/options_switches.h',
'atom/common/platform_util.h',
'atom/common/platform_util_linux.cc',
'atom/common/platform_util_mac.mm',
'atom/common/platform_util_win.cc',
'atom/renderer/api/atom_api_renderer_ipc.cc',
'atom/renderer/api/atom_api_spell_check_client.cc',
'atom/renderer/api/atom_api_spell_check_client.h',
'atom/renderer/api/atom_api_web_frame.cc',
'atom/renderer/api/atom_api_web_frame.h',
'atom/renderer/atom_render_view_observer.cc',
'atom/renderer/atom_render_view_observer.h',
'atom/renderer/atom_renderer_client.cc',
'atom/renderer/atom_renderer_client.h',
'atom/renderer/guest_view_container.cc',
'atom/renderer/guest_view_container.h',
'chromium_src/chrome/browser/browser_process.cc',
'chromium_src/chrome/browser/browser_process.h',
'chromium_src/chrome/browser/chrome_notification_types.h',
'chromium_src/chrome/browser/extensions/global_shortcut_listener.cc',
'chromium_src/chrome/browser/extensions/global_shortcut_listener.h',
'chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.mm',
'chromium_src/chrome/browser/extensions/global_shortcut_listener_mac.h',
'chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.cc',
'chromium_src/chrome/browser/extensions/global_shortcut_listener_x11.h',
'chromium_src/chrome/browser/extensions/global_shortcut_listener_win.cc',
'chromium_src/chrome/browser/extensions/global_shortcut_listener_win.h',
'chromium_src/chrome/browser/printing/print_job.cc',
'chromium_src/chrome/browser/printing/print_job.h',
'chromium_src/chrome/browser/printing/print_job_manager.cc',
'chromium_src/chrome/browser/printing/print_job_manager.h',
'chromium_src/chrome/browser/printing/print_job_worker.cc',
'chromium_src/chrome/browser/printing/print_job_worker.h',
'chromium_src/chrome/browser/printing/print_job_worker_owner.cc',
'chromium_src/chrome/browser/printing/print_job_worker_owner.h',
'chromium_src/chrome/browser/printing/print_view_manager_base.cc',
'chromium_src/chrome/browser/printing/print_view_manager_base.h',
'chromium_src/chrome/browser/printing/print_view_manager_basic.cc',
'chromium_src/chrome/browser/printing/print_view_manager_basic.h',
'chromium_src/chrome/browser/printing/print_view_manager_observer.h',
'chromium_src/chrome/browser/printing/printer_query.cc',
'chromium_src/chrome/browser/printing/printer_query.h',
'chromium_src/chrome/browser/printing/printing_message_filter.cc',
'chromium_src/chrome/browser/printing/printing_message_filter.h',
'chromium_src/chrome/browser/speech/tts_controller.h',
'chromium_src/chrome/browser/speech/tts_controller_impl.cc',
'chromium_src/chrome/browser/speech/tts_controller_impl.h',
'chromium_src/chrome/browser/speech/tts_linux.cc',
'chromium_src/chrome/browser/speech/tts_mac.mm',
'chromium_src/chrome/browser/speech/tts_message_filter.cc',
'chromium_src/chrome/browser/speech/tts_message_filter.h',
'chromium_src/chrome/browser/speech/tts_platform.cc',
'chromium_src/chrome/browser/speech/tts_platform.h',
'chromium_src/chrome/browser/speech/tts_win.cc',
'chromium_src/chrome/browser/ui/browser_dialogs.h',
'chromium_src/chrome/browser/ui/cocoa/color_chooser_mac.mm',
'chromium_src/chrome/browser/ui/views/color_chooser_aura.cc',
'chromium_src/chrome/browser/ui/views/color_chooser_aura.h',
'chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc',
'chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h',
'chromium_src/chrome/common/print_messages.cc',
'chromium_src/chrome/common/print_messages.h',
'chromium_src/chrome/common/tts_messages.h',
'chromium_src/chrome/common/tts_utterance_request.cc',
'chromium_src/chrome/common/tts_utterance_request.h',
'chromium_src/chrome/renderer/printing/print_web_view_helper.cc',
'chromium_src/chrome/renderer/printing/print_web_view_helper_linux.cc',
'chromium_src/chrome/renderer/printing/print_web_view_helper_mac.mm',
'chromium_src/chrome/renderer/printing/print_web_view_helper_pdf_win.cc',
'chromium_src/chrome/renderer/printing/print_web_view_helper.h',
'chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.cc',
'chromium_src/chrome/renderer/spellchecker/spellcheck_worditerator.h',
'chromium_src/chrome/renderer/tts_dispatcher.cc',
'chromium_src/chrome/renderer/tts_dispatcher.h',
'chromium_src/library_loaders/libspeechd_loader.cc',
'chromium_src/library_loaders/libspeechd.h',
'<@(native_mate_files)',
'<(SHARED_INTERMEDIATE_DIR)/atom_natives.h',
],
'lib_sources_win': [
'chromium_src/chrome/browser/ui/views/color_chooser_dialog.cc',
'chromium_src/chrome/browser/ui/views/color_chooser_dialog.h',
'chromium_src/chrome/browser/ui/views/color_chooser_win.cc',
],
'framework_sources': [
'atom/app/atom_library_main.h',
'atom/app/atom_library_main.mm',
],
'locales': [
'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
'vi', 'zh-CN', 'zh-TW',
],
'atom_source_root': '<!(["python", "tools/atom_source_root.py"])',
'conditions': [
['OS=="win"', {
'app_sources': [
'atom/browser/resources/win/resource.h',
'atom/browser/resources/win/atom.ico',
'atom/browser/resources/win/atom.rc',
'<(libchromiumcontent_src_dir)/content/app/startup_helper_win.cc',
],
}], # OS=="win"
],
},
}

View file

@ -1,15 +1,7 @@
{
"name": "atom-shell",
"version": "0.22.3",
"licenses": [
{
"type": "MIT",
"url": "http://github.com/atom/atom-shell/raw/master/LICENSE.md"
}
],
"devDependencies": {
"asar": "0.2.2",
"atom-package-manager": "0.144.0",
"coffee-script": "~1.7.1",
"coffeelint": "~1.3.0",
"request": "*",

View file

@ -4,9 +4,9 @@ import argparse
import os
import sys
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, \
enable_verbose_mode, is_verbose_mode
from lib.util import execute_stdout, scoped_cwd
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, PLATFORM, \
enable_verbose_mode, is_verbose_mode, get_target_arch
from lib.util import execute_stdout, get_atom_shell_version, scoped_cwd
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
@ -19,8 +19,7 @@ def main():
os.chdir(SOURCE_ROOT)
args = parse_args()
if (args.yes is False and
sys.platform not in ('win32', 'cygwin')):
if not args.yes and PLATFORM != 'win32':
check_root()
if args.verbose:
enable_verbose_mode()
@ -28,12 +27,12 @@ def main():
update_win32_python()
update_submodules()
update_node_modules('.')
bootstrap_brightray(args.url)
bootstrap_brightray(args.dev, args.url, args.target_arch)
create_chrome_version_h()
touch_config_gypi()
update_atom_shell()
update_atom_modules('spec')
update_atom_modules('spec', args.target_arch)
def parse_args():
@ -47,12 +46,17 @@ def parse_args():
parser.add_argument('-v', '--verbose',
action='store_true',
help='Prints the output of the subprocesses')
parser.add_argument('-d', '--dev', action='store_true',
help='Do not download static_library build')
parser.add_argument('-y', '--yes', '--assume-yes',
action='store_true',
help='Run non-interactively by assuming "yes" to all ' \
'prompts.')
parser.add_argument('--target_arch', default=get_target_arch(),
help='Manually specify the arch to build for')
return parser.parse_args()
def check_root():
if os.geteuid() == 0:
print "We suggest not running this as root, unless you're really sure."
@ -66,27 +70,34 @@ def update_submodules():
execute_stdout(['git', 'submodule', 'update', '--init', '--recursive'])
def bootstrap_brightray(url):
def bootstrap_brightray(is_dev, url, target_arch):
bootstrap = os.path.join(VENDOR_DIR, 'brightray', 'script', 'bootstrap')
execute_stdout([sys.executable, bootstrap, '--commit',
LIBCHROMIUMCONTENT_COMMIT, url])
args = [
'--commit', LIBCHROMIUMCONTENT_COMMIT,
'--target_arch', target_arch,
url,
]
if is_dev:
args = ['--dev'] + args
execute_stdout([sys.executable, bootstrap] + args)
def update_node_modules(dirname):
def update_node_modules(dirname, env=None):
if env is None:
env = os.environ
with scoped_cwd(dirname):
if is_verbose_mode():
execute_stdout([NPM, 'install', '--verbose'])
execute_stdout([NPM, 'install', '--verbose'], env)
else:
execute_stdout([NPM, 'install'])
execute_stdout([NPM, 'install'], env)
def update_atom_modules(dirname):
with scoped_cwd(dirname):
apm = os.path.join(SOURCE_ROOT, 'node_modules', '.bin', 'apm')
if sys.platform in ['win32', 'cygwin']:
apm = os.path.join(SOURCE_ROOT, 'node_modules', 'atom-package-manager',
'bin', 'apm.cmd')
execute_stdout([apm, 'install'])
def update_atom_modules(dirname, target_arch):
env = os.environ.copy()
env['npm_config_arch'] = target_arch
env['npm_config_target'] = get_atom_shell_version()
env['npm_config_disturl'] = 'https://atom.io/download/atom-shell'
update_node_modules(dirname, env)
def update_win32_python():

View file

@ -19,7 +19,7 @@ def main():
args = parse_args()
for config in args.configuration:
build_path = os.path.join('out', config)
build_path = os.path.join('out', config[0])
ret = subprocess.call([ninja, '-C', build_path, args.target])
if ret != 0:
sys.exit(ret)

View file

@ -27,12 +27,11 @@ def main():
version = '.'.join(versions[:3])
with scoped_cwd(SOURCE_ROOT):
update_package_json(version)
update_atom_gyp(version)
update_win_rc(version, versions)
update_version_h(versions)
update_info_plist(version)
tag_version(version)
git_push()
def increase_version(versions, index):
@ -42,15 +41,15 @@ def increase_version(versions, index):
return versions
def update_package_json(version):
pattern = re.compile(' *"version" *: *"[0-9.]+"')
with open('package.json', 'r') as f:
def update_atom_gyp(version):
pattern = re.compile(" *'version%' *: *'[0-9.]+'")
with open('atom.gyp', 'r') as f:
lines = f.readlines()
for i in range(0, len(lines)):
if pattern.match(lines[i]):
lines[i] = ' "version": "{0}",\n'.format(version)
with open('package.json', 'w') as f:
lines[i] = " 'version%': '{0}',\n".format(version)
with open('atom.gyp', 'w') as f:
f.write(''.join(lines))
return
@ -118,10 +117,5 @@ def tag_version(version):
execute(['git', 'tag', 'v{0}'.format(version)])
def git_push():
execute(['git', 'push'])
execute(['git', 'push', '--tags'])
if __name__ == '__main__':
sys.exit(main())

View file

@ -43,10 +43,10 @@ def main():
if is_travis and sys.platform == 'linux2':
with scoped_env('CXX', 'g++'):
with scoped_env('CC', 'gcc'):
run_script('bootstrap.py')
run_script('bootstrap.py', ['--dev'])
run_script('update.py')
else:
run_script('bootstrap.py')
run_script('bootstrap.py', ['--dev'])
run_script('cpplint.py')
if sys.platform != 'win32':

20
script/clean.py Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env python
import os
import sys
from lib.util import rm_rf
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
def main():
os.chdir(SOURCE_ROOT)
rm_rf('node_modules')
rm_rf('out')
rm_rf('spec/node_modules')
if __name__ == '__main__':
sys.exit(main())

View file

@ -1,14 +1,14 @@
#!/usr/bin/env python
import argparse
import os
import re
import shutil
import subprocess
import sys
import stat
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, TARGET_PLATFORM, \
DIST_ARCH
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, PLATFORM, \
get_target_arch
from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \
execute, get_chromedriver_version
@ -17,32 +17,24 @@ ATOM_SHELL_VERSION = get_atom_shell_version()
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'Release')
SYMBOL_NAME = {
'darwin': 'libchromiumcontent.dylib.dSYM',
'linux': 'libchromiumcontent.so.dbg',
'win32': 'chromiumcontent.dll.pdb',
}[TARGET_PLATFORM]
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
CHROMIUM_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor',
'download', 'libchromiumcontent', 'static_library')
TARGET_BINARIES = {
'darwin': [
],
'win32': [
'atom.exe',
'chromiumcontent.dll',
'content_shell.pak',
'd3dcompiler_47.dll',
'node.dll',
'ffmpegsumo.dll',
'icudtl.dat',
'libEGL.dll',
'libGLESv2.dll',
'msvcp120.dll',
'msvcr120.dll',
'node.dll',
'content_resources_200_percent.pak',
'ui_resources_200_percent.pak',
'vccorlib120.dll',
'xinput1_3.dll',
'natives_blob.bin',
'snapshot_blob.bin',
@ -50,10 +42,9 @@ TARGET_BINARIES = {
'linux': [
'atom',
'content_shell.pak',
'libnode.so',
'icudtl.dat',
'libchromiumcontent.so',
'libffmpegsumo.so',
'libnode.so',
'natives_blob.bin',
'snapshot_blob.bin',
],
@ -82,16 +73,14 @@ def main():
rm_rf(DIST_DIR)
os.makedirs(DIST_DIR)
args = parse_args()
force_build()
download_libchromiumcontent_symbols(args.url)
create_symbols()
copy_binaries()
copy_chromedriver()
copy_license()
if TARGET_PLATFORM == 'linux':
if PLATFORM == 'linux':
strip_binaries()
copy_system_libraries()
create_version()
@ -100,45 +89,44 @@ def main():
create_symbols_zip()
def parse_args():
parser = argparse.ArgumentParser(description='Create distributions')
parser.add_argument('-u', '--url',
help='The base URL from which to download '
'libchromiumcontent (i.e., the URL you passed to '
'libchromiumcontent\'s script/upload script',
default=BASE_URL,
required=False)
return parser.parse_args()
def force_build():
build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
execute([sys.executable, build, '-c', 'Release'])
def copy_binaries():
for binary in TARGET_BINARIES[TARGET_PLATFORM]:
for binary in TARGET_BINARIES[PLATFORM]:
shutil.copy2(os.path.join(OUT_DIR, binary), DIST_DIR)
for directory in TARGET_DIRECTORIES[TARGET_PLATFORM]:
for directory in TARGET_DIRECTORIES[PLATFORM]:
shutil.copytree(os.path.join(OUT_DIR, directory),
os.path.join(DIST_DIR, directory),
symlinks=True)
def copy_chromedriver():
build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
execute([sys.executable, build, '-c', 'Release', '-t', 'copy_chromedriver'])
binary = 'chromedriver'
if TARGET_PLATFORM == 'win32':
binary += '.exe'
shutil.copy2(os.path.join(OUT_DIR, binary), DIST_DIR)
if PLATFORM == 'win32':
chromedriver = 'chromedriver.exe'
else:
chromedriver = 'chromedriver'
src = os.path.join(CHROMIUM_DIR, chromedriver)
dest = os.path.join(DIST_DIR, chromedriver)
# Copy file and keep the executable bit.
shutil.copyfile(src, dest)
os.chmod(dest, os.stat(dest).st_mode | stat.S_IEXEC)
def copy_license():
shutil.copy2(os.path.join(SOURCE_ROOT, 'LICENSE'), DIST_DIR)
def strip_binaries():
for binary in TARGET_BINARIES[PLATFORM]:
if binary.endswith('.so') or '.' not in binary:
execute(['strip', os.path.join(DIST_DIR, binary)])
def copy_system_libraries():
ldd = execute(['ldd', os.path.join(OUT_DIR, 'atom')])
lib_re = re.compile('\t(.*) => (.+) \(.*\)$')
@ -159,53 +147,33 @@ def create_version():
version_file.write(ATOM_SHELL_VERSION)
def download_libchromiumcontent_symbols(url):
brightray_dir = os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor')
target_dir = os.path.join(brightray_dir, 'download', 'libchromiumcontent')
symbols_path = os.path.join(target_dir, 'Release', SYMBOL_NAME)
if os.path.exists(symbols_path):
return
download = os.path.join(brightray_dir, 'libchromiumcontent', 'script',
'download')
subprocess.check_call([sys.executable, download, '-f', '-s', '-c',
LIBCHROMIUMCONTENT_COMMIT, url, target_dir])
def create_symbols():
directory = 'Atom-Shell.breakpad.syms'
rm_rf(os.path.join(OUT_DIR, directory))
build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
subprocess.check_output([sys.executable, build, '-c', 'Release',
'-t', 'atom_dump_symbols'])
shutil.copytree(os.path.join(OUT_DIR, directory),
os.path.join(DIST_DIR, directory),
symlinks=True)
destination = os.path.join(DIST_DIR, 'Atom-Shell.breakpad.syms')
dump_symbols = os.path.join(SOURCE_ROOT, 'script', 'dump-symbols.py')
execute([sys.executable, dump_symbols, destination])
def create_dist_zip():
dist_name = 'atom-shell-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
TARGET_PLATFORM, DIST_ARCH)
PLATFORM, get_target_arch())
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
with scoped_cwd(DIST_DIR):
files = TARGET_BINARIES[TARGET_PLATFORM] + ['LICENSE', 'version']
if TARGET_PLATFORM == 'linux':
files = TARGET_BINARIES[PLATFORM] + ['LICENSE', 'version']
if PLATFORM == 'linux':
files += [lib for lib in SYSTEM_LIBRARIES if os.path.exists(lib)]
dirs = TARGET_DIRECTORIES[TARGET_PLATFORM]
dirs = TARGET_DIRECTORIES[PLATFORM]
make_zip(zip_file, files, dirs)
def create_chromedriver_zip():
dist_name = 'chromedriver-{0}-{1}-{2}.zip'.format(get_chromedriver_version(),
TARGET_PLATFORM, DIST_ARCH)
PLATFORM, get_target_arch())
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
with scoped_cwd(DIST_DIR):
files = ['LICENSE']
if TARGET_PLATFORM == 'win32':
if PLATFORM == 'win32':
files += ['chromedriver.exe']
else:
files += ['chromedriver']
@ -214,8 +182,8 @@ def create_chromedriver_zip():
def create_symbols_zip():
dist_name = 'atom-shell-{0}-{1}-{2}-symbols.zip'.format(ATOM_SHELL_VERSION,
TARGET_PLATFORM,
DIST_ARCH)
PLATFORM,
get_target_arch())
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
with scoped_cwd(DIST_DIR):

68
script/dump-symbols.py Executable file
View file

@ -0,0 +1,68 @@
#!/usr/bin/env python
import os
import sys
from lib.config import PLATFORM
from lib.util import atom_gyp, execute, rm_rf
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
CHROMIUM_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor',
'download', 'libchromiumcontent', 'static_library')
def main(destination):
if PLATFORM == 'win32':
register_required_dll()
rm_rf(destination)
(project_name, product_name) = get_names_from_gyp()
if PLATFORM in ['darwin', 'linux']:
# Generate the dump_syms tool.
build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
execute([sys.executable, build, '-c', 'R', '-t', 'dump_syms'])
generate_breakpad_symbols = os.path.join(SOURCE_ROOT, 'tools', 'posix',
'generate_breakpad_symbols.py')
if PLATFORM == 'darwin':
start = os.path.join(OUT_DIR, '{0}.app'.format(product_name), 'Contents',
'MacOS', product_name)
else:
start = os.path.join(OUT_DIR, project_name)
args = [
'--build-dir={0}'.format(OUT_DIR),
'--binary={0}'.format(start),
'--symbols-dir={0}'.format(destination),
'--libchromiumcontent-dir={0}'.format(CHROMIUM_DIR),
'--clear',
'--jobs=16',
]
else:
generate_breakpad_symbols = os.path.join(SOURCE_ROOT, 'tools', 'win',
'generate_breakpad_symbols.py')
args = [
'--symbols-dir={0}'.format(destination),
'--jobs=16',
os.path.relpath(OUT_DIR),
]
execute([sys.executable, generate_breakpad_symbols] + args)
def register_required_dll():
register = os.path.join(SOURCE_ROOT, 'tools', 'win',
'register_msdia80_dll.js')
execute(['node.exe', os.path.relpath(register)]);
def get_names_from_gyp():
variables = atom_gyp()
return (variables['project_name%'], variables['product_name%'])
if __name__ == '__main__':
sys.exit(main(sys.argv[1]))

View file

@ -1,23 +1,15 @@
#!/usr/bin/env python
import errno
import os
import platform
import sys
BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = 'c01b10faf0d478e48f537210ec263fabd551578d'
LIBCHROMIUMCONTENT_COMMIT = 'f1ad1412461ba3345a27cfe935ffc872dba0ac5b'
ARCH = {
'cygwin': '32bit',
'darwin': '64bit',
'linux2': platform.architecture()[0],
'win32': '32bit',
}[sys.platform]
DIST_ARCH = {
'32bit': 'ia32',
'64bit': 'x64',
}[ARCH]
TARGET_PLATFORM = {
PLATFORM = {
'cygwin': 'win32',
'darwin': 'darwin',
'linux2': 'linux',
@ -26,10 +18,51 @@ TARGET_PLATFORM = {
verbose_mode = False
def get_target_arch():
# Always build 64bit on OS X.
if PLATFORM == 'darwin':
return 'x64'
# Only build for host's arch on Linux.
elif PLATFORM == 'linux':
if platform.architecture()[0] == '32bit':
return 'ia32'
else:
return 'x64'
# On Windows it depends on user.
elif PLATFORM == 'win32':
try:
target_arch_path = os.path.join(__file__, '..', '..', '..', 'vendor',
'brightray', 'vendor', 'download',
'libchromiumcontent', '.target_arch')
with open(os.path.normpath(target_arch_path)) as f:
return f.read().strip()
except IOError as e:
if e.errno != errno.ENOENT:
raise
# Build 32bit by default.
return 'ia32'
# Maybe we will support other platforms in future.
else:
return 'x64'
def s3_config():
config = (os.environ.get('ATOM_SHELL_S3_BUCKET', ''),
os.environ.get('ATOM_SHELL_S3_ACCESS_KEY', ''),
os.environ.get('ATOM_SHELL_S3_SECRET_KEY', ''))
message = ('Error: Please set the $ATOM_SHELL_S3_BUCKET, '
'$ATOM_SHELL_S3_ACCESS_KEY, and '
'$ATOM_SHELL_S3_SECRET_KEY environment variables')
assert all(len(c) for c in config), message
return config
def enable_verbose_mode():
print 'Running in verbose mode'
global verbose_mode
verbose_mode = True
def is_verbose_mode():
return verbose_mode

View file

@ -129,11 +129,11 @@ def safe_mkdir(path):
raise
def execute(argv):
def execute(argv, env=os.environ):
if is_verbose_mode():
print ' '.join(argv)
try:
output = subprocess.check_output(argv, stderr=subprocess.STDOUT)
output = subprocess.check_output(argv, stderr=subprocess.STDOUT, env=env)
if is_verbose_mode():
print output
return output
@ -142,27 +142,35 @@ def execute(argv):
raise e
def execute_stdout(argv):
def execute_stdout(argv, env=os.environ):
if is_verbose_mode():
print ' '.join(argv)
try:
subprocess.check_call(argv)
subprocess.check_call(argv, env=env)
except subprocess.CalledProcessError as e:
print e.output
raise e
else:
execute(argv)
execute(argv, env)
def atom_gyp():
SOURCE_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
gyp = os.path.join(SOURCE_ROOT, 'atom.gyp')
with open(gyp) as f:
obj = eval(f.read());
return obj['variables']
def get_atom_shell_version():
return subprocess.check_output(['git', 'describe', '--tags']).strip()
return 'v' + atom_gyp()['version%']
def get_chromedriver_version():
SOURCE_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
chromedriver = os.path.join(SOURCE_ROOT, 'out', 'Release', 'chromedriver')
chromedriver = os.path.join(SOURCE_ROOT, 'dist', 'chromedriver')
output = subprocess.check_output([chromedriver, '-v']).strip()
return 'v' + output[13:]
return 'v' + output[13:output.rfind(' ')]
def parse_version(version):
@ -176,17 +184,6 @@ def parse_version(version):
return vs + ['0'] * (4 - len(vs))
def s3_config():
config = (os.environ.get('ATOM_SHELL_S3_BUCKET', ''),
os.environ.get('ATOM_SHELL_S3_ACCESS_KEY', ''),
os.environ.get('ATOM_SHELL_S3_SECRET_KEY', ''))
message = ('Error: Please set the $ATOM_SHELL_S3_BUCKET, '
'$ATOM_SHELL_S3_ACCESS_KEY, and '
'$ATOM_SHELL_S3_SECRET_KEY environment variables')
assert all(len(c) for c in config), message
return config
def s3put(bucket, access_key, secret_key, prefix, key_prefix, files):
args = [
's3put',

View file

@ -11,13 +11,17 @@ SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
def main():
os.chdir(SOURCE_ROOT)
config = 'D'
if len(sys.argv) == 2 and sys.argv[1] == '-R':
config = 'R'
if sys.platform == 'darwin':
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'Debug', 'Atom.app',
atom_shell = os.path.join(SOURCE_ROOT, 'out', config, 'Atom.app',
'Contents', 'MacOS', 'Atom')
elif sys.platform == 'win32':
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'Debug', 'atom.exe')
atom_shell = os.path.join(SOURCE_ROOT, 'out', config, 'atom.exe')
else:
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'Debug', 'atom')
atom_shell = os.path.join(SOURCE_ROOT, 'out', config, 'atom')
subprocess.check_call([atom_shell, 'spec'] + sys.argv[1:])

View file

@ -29,7 +29,6 @@ def main():
download_and_unzip('Squirrel')
elif sys.platform in ['cygwin', 'win32']:
download_and_unzip('directxsdk')
download_and_unzip('vs2012_crt')
with open(version_file, 'w') as f:
f.write(VERSION)

View file

@ -4,7 +4,7 @@ import os
import subprocess
import sys
from lib.config import DIST_ARCH
from lib.config import get_target_arch
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
@ -14,7 +14,7 @@ def main():
os.chdir(SOURCE_ROOT)
update_external_binaries()
update_gyp()
return update_gyp()
def update_external_binaries():
@ -23,28 +23,30 @@ def update_external_binaries():
def update_gyp():
gyp = os.path.join('vendor', 'brightray', 'vendor', 'gyp', 'gyp_main.py')
# Since gyp doesn't support specify link_settings for each configuration,
# we are not able to link to different libraries in "Debug" and "Release"
# configurations.
# In order to work around this, we decided to generate the configuration
# for twice, one is to generate "Debug" config, the other one to generate
# the "Release" config. And the settings are controlled by the variable
# "libchromiumcontent_component" which is defined before running gyp.
target_arch = get_target_arch()
return (run_gyp(target_arch, 0) or run_gyp(target_arch, 1))
def run_gyp(target_arch, component):
python = sys.executable
arch = DIST_ARCH
if sys.platform == 'darwin':
# Only have 64bit build on OS X.
arch = 'x64'
elif sys.platform in ['cygwin', 'win32']:
# Only have 32bit build on Windows.
arch = 'ia32'
if sys.platform == 'cygwin':
# Force using win32 python on cygwin.
python = os.path.join('vendor', 'python_26', 'python.exe')
ret = subprocess.call([python, gyp,
'-f', 'ninja', '--depth', '.', 'atom.gyp',
'-Icommon.gypi',
'-Dlinux_clang=0', # Disable brightray's clang setting
'-Dtarget_arch={0}'.format(arch),
'-Dlibrary=static_library'])
if ret != 0:
sys.exit(ret)
if sys.platform == 'cygwin':
# Force using win32 python on cygwin.
python = os.path.join('vendor', 'python_26', 'python.exe')
gyp = os.path.join('vendor', 'brightray', 'vendor', 'gyp', 'gyp_main.py')
defines = [
'-Dlibchromiumcontent_component={0}'.format(component),
'-Dtarget_arch={0}'.format(target_arch),
'-Dlibrary=static_library',
]
return subprocess.call([python, gyp, '-f', 'ninja', '--depth', '.',
'atom.gyp', '-Icommon.gypi'] + defines)
if __name__ == '__main__':
sys.exit(main())

View file

@ -5,7 +5,8 @@ import hashlib
import os
import tempfile
from lib.util import download, rm_rf, s3_config, s3put
from lib.config import s3_config
from lib.util import download, rm_rf, s3put
DIST_URL = 'https://atom.io/download/atom-shell/'

31
script/upload-index-json.py Executable file
View file

@ -0,0 +1,31 @@
#!/usr/bin/env python
import os
import sys
from lib.config import PLATFORM, s3_config
from lib.util import execute, s3put, scoped_cwd
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
def main():
# Upload the index.json.
with scoped_cwd(SOURCE_ROOT):
atom_shell = os.path.join(OUT_DIR, 'atom')
if PLATFORM == 'win32':
atom_shell += '.exe'
index_json = os.path.relpath(os.path.join(OUT_DIR, 'index.json'))
execute([atom_shell,
os.path.join('tools', 'dump-version-info.js'),
index_json])
bucket, access_key, secret_key = s3_config()
s3put(bucket, access_key, secret_key, OUT_DIR, 'atom-shell/dist',
[index_json])
if __name__ == '__main__':
sys.exit(main())

View file

@ -7,14 +7,14 @@ import shutil
import sys
import tarfile
from lib.config import TARGET_PLATFORM
from lib.util import execute, safe_mkdir, scoped_cwd, s3_config, s3put
from lib.config import PLATFORM, get_target_arch, s3_config
from lib.util import execute, safe_mkdir, scoped_cwd, s3put
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
NODE_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'node')
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'Release')
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
HEADERS_SUFFIX = [
'.h',
@ -47,11 +47,6 @@ def main():
bucket, access_key, secret_key = s3_config()
upload_node(bucket, access_key, secret_key, args.version)
# Upload the SHASUMS.txt.
execute([sys.executable,
os.path.join(SOURCE_ROOT, 'script', 'upload-checksums.py'),
'-v', args.version])
def parse_args():
parser = argparse.ArgumentParser(description='upload sumsha file')
@ -109,39 +104,21 @@ def upload_node(bucket, access_key, secret_key, version):
s3put(bucket, access_key, secret_key, DIST_DIR,
'atom-shell/dist/{0}'.format(version), glob.glob('node-*.tar.gz'))
if TARGET_PLATFORM == 'win32':
# Generate the node.lib.
build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
execute([sys.executable, build, '-c', 'Release', '-t', 'generate_node_lib'])
if PLATFORM == 'win32':
if get_target_arch() == 'ia32':
node_lib = os.path.join(DIST_DIR, 'node.lib')
else:
node_lib = os.path.join(DIST_DIR, 'x64', 'node.lib')
safe_mkdir(os.path.dirname(node_lib))
# Upload the 32bit node.lib.
node_lib = os.path.join(OUT_DIR, 'node.lib')
s3put(bucket, access_key, secret_key, OUT_DIR,
# Copy atom.lib to node.lib
atom_lib = os.path.join(OUT_DIR, 'node.dll.lib')
shutil.copy2(atom_lib, node_lib)
# Upload the node.lib.
s3put(bucket, access_key, secret_key, DIST_DIR,
'atom-shell/dist/{0}'.format(version), [node_lib])
# Upload the fake 64bit node.lib.
touch_x64_node_lib()
node_lib = os.path.join(OUT_DIR, 'x64', 'node.lib')
s3put(bucket, access_key, secret_key, OUT_DIR,
'atom-shell/dist/{0}'.format(version), [node_lib])
# Upload the index.json
with scoped_cwd(SOURCE_ROOT):
atom_shell = os.path.join(OUT_DIR, 'atom.exe')
index_json = os.path.relpath(os.path.join(OUT_DIR, 'index.json'))
execute([atom_shell,
os.path.join('script', 'dump-version-info.js'),
index_json])
s3put(bucket, access_key, secret_key, OUT_DIR, 'atom-shell/dist',
[index_json])
def touch_x64_node_lib():
x64_dir = os.path.join(OUT_DIR, 'x64')
safe_mkdir(x64_dir)
with open(os.path.join(x64_dir, 'node.lib'), 'w+') as node_lib:
node_lib.write('Invalid library')
if __name__ == '__main__':
sys.exit(main())

View file

@ -3,15 +3,16 @@
import os
import glob
from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config
from lib.config import s3_config
from lib.util import execute, rm_rf, safe_mkdir, s3put
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
SYMBOLS_DIR = 'dist\\symbols'
DOWNLOAD_DIR = 'vendor\\brightray\\vendor\\download\\libchromiumcontent'
PDB_LIST = [
'out\\Release\\atom.exe.pdb',
DOWNLOAD_DIR + '\\Release\\chromiumcontent.dll.pdb',
'out\\R\\atom.exe.pdb',
'out\\R\\node.dll.pdb',
]

View file

@ -7,7 +7,7 @@ import subprocess
import sys
import tempfile
from lib.config import DIST_ARCH, TARGET_PLATFORM
from lib.config import PLATFORM, get_target_arch
from lib.util import execute, get_atom_shell_version, parse_version, \
get_chromedriver_version, scoped_cwd
from lib.github import GitHub
@ -18,17 +18,17 @@ ATOM_SHELL_VERSION = get_atom_shell_version()
CHROMEDRIVER_VERSION = get_chromedriver_version()
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'Release')
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
DIST_NAME = 'atom-shell-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
TARGET_PLATFORM,
DIST_ARCH)
PLATFORM,
get_target_arch())
SYMBOLS_NAME = 'atom-shell-{0}-{1}-{2}-symbols.zip'.format(ATOM_SHELL_VERSION,
TARGET_PLATFORM,
DIST_ARCH)
PLATFORM,
get_target_arch())
CHROMEDRIVER_NAME = 'chromedriver-{0}-{1}-{2}.zip'.format(CHROMEDRIVER_VERSION,
TARGET_PLATFORM,
DIST_ARCH)
PLATFORM,
get_target_arch())
def main():
@ -46,9 +46,26 @@ def main():
sys.stderr.flush()
return 1
# Upload atom-shell with GitHub Releases API.
github = GitHub(auth_token())
release_id = create_or_get_release_draft(github, args.version)
if args.publish_release:
# Upload the SHASUMS.txt.
execute([sys.executable,
os.path.join(SOURCE_ROOT, 'script', 'upload-checksums.py'),
'-v', ATOM_SHELL_VERSION])
# Upload the index.json.
execute([sys.executable,
os.path.join(SOURCE_ROOT, 'script', 'upload-index-json.py')])
# Press the publish button.
publish_release(github, release_id)
# Do not upload other files when passed "-p".
return
# Upload atom-shell with GitHub Releases API.
upload_atom_shell(github, release_id, os.path.join(DIST_DIR, DIST_NAME))
upload_atom_shell(github, release_id, os.path.join(DIST_DIR, SYMBOLS_NAME))
@ -57,19 +74,15 @@ def main():
upload_atom_shell(github, release_id,
os.path.join(DIST_DIR, CHROMEDRIVER_NAME))
if args.publish_release:
if TARGET_PLATFORM == 'win32':
# Upload PDBs to Windows symbol server.
execute([sys.executable,
os.path.join(SOURCE_ROOT, 'script', 'upload-windows-pdb.py')])
if PLATFORM == 'win32':
# Upload PDBs to Windows symbol server.
execute([sys.executable,
os.path.join(SOURCE_ROOT, 'script', 'upload-windows-pdb.py')])
# Upload node headers.
execute([sys.executable,
os.path.join(SOURCE_ROOT, 'script', 'upload-node-headers.py'),
'-v', ATOM_SHELL_VERSION])
# Press the publish button.
publish_release(github, release_id)
# Upload node headers.
execute([sys.executable,
os.path.join(SOURCE_ROOT, 'script', 'upload-node-headers.py'),
'-v', ATOM_SHELL_VERSION])
def parse_args():
@ -83,13 +96,13 @@ def parse_args():
def get_atom_shell_build_version():
if TARGET_PLATFORM == 'darwin':
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'Release', 'Atom.app',
if PLATFORM == 'darwin':
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'R', 'Atom.app',
'Contents', 'MacOS', 'Atom')
elif TARGET_PLATFORM == 'win32':
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'Release', 'atom.exe')
elif PLATFORM == 'win32':
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'R', 'atom.exe')
else:
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'Release', 'atom')
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'R', 'atom')
return subprocess.check_output([atom_shell, '--version']).strip()

View file

@ -17,6 +17,9 @@ describe 'crash-reporter module', ->
beforeEach -> w = new BrowserWindow(show: false)
afterEach -> w.destroy()
# It is not working on 64bit Windows.
return if process.platform is 'win32' and process.arch is 'x64'
it 'should send minidump when renderer crashes', (done) ->
@timeout 60000
server = http.createServer (req, res) ->

View file

@ -1,12 +0,0 @@
#!/usr/bin/env python
import os
import shutil
import stat
import sys
src = sys.argv[1]
dist = sys.argv[2]
shutil.copyfile(src, dist)
os.chmod(dist, os.stat(dist).st_mode | stat.S_IEXEC)

View file

@ -17,16 +17,10 @@ function getDate() {
return year + '-' + month + '-' + day;
}
function getApmVersion() {
var package = require(path.resolve(__dirname, '..', 'package.json'));
return package.devDependencies['atom-package-manager'];
}
function getInfoForCurrentVersion() {
var json = {};
json.version = process.versions['atom-shell'];
json.date = getDate();
json.apm = getApmVersion();
var names = ['node', 'v8', 'uv', 'zlib', 'openssl', 'modules', 'chrome']
for (var i in names) {
@ -43,6 +37,8 @@ function getInfoForCurrentVersion() {
'linux-x64-symbols',
'win32-ia32',
'win32-ia32-symbols',
'win32-x64',
'win32-x64-symbols',
];
return json;

View file

@ -61,8 +61,10 @@ def FindBundlePart(full_path):
def GetDSYMBundle(options, binary_path):
"""Finds the .dSYM bundle to the binary."""
if binary_path[0] == '/' or binary_path == '':
return binary_path
if os.path.isabs(binary_path):
dsym_path = binary_path + '.dSYM'
if os.path.exists(dsym_path):
return dsym_path
filename = FindBundlePart(binary_path)
search_dirs = [options.build_dir, options.libchromiumcontent_dir]

6
tools/win/generate_breakpad_symbols.py Normal file → Executable file
View file

@ -47,11 +47,6 @@ def mkdir_p(path):
else: raise
def RegisterRequiredDll():
register = os.path.join(os.path.dirname(__file__), 'register_msdia80_dll.js')
subprocess.check_call(['node.exe', register]);
def GenerateSymbols(options, binaries):
"""Dumps the symbols of binary and places them in the given directory."""
@ -124,7 +119,6 @@ def main():
pdbs += glob.glob(os.path.join(directory, '*.exe.pdb'))
pdbs += glob.glob(os.path.join(directory, '*.dll.pdb'))
RegisterRequiredDll();
GenerateSymbols(options, pdbs)
return 0

2
vendor/breakpad vendored

@ -1 +1 @@
Subproject commit 1e937567e92d2c3beed4556f3c68a4b0362b1e6d
Subproject commit 4427c1170387afe46eb3fad259436f1f9f5efa86

2
vendor/brightray vendored

@ -1 +1 @@
Subproject commit f71216bd73014199df70425a01dd269ba2dd0c6c
Subproject commit ec0a660b0b70e6ea5a4ee760a753b8fac31a5de2

2
vendor/node vendored

@ -1 +1 @@
Subproject commit 790c4a3af36144fcdd5fe39d0cb6cd622f282434
Subproject commit da4d745446fcc63bfc205477703533712dd01e2c