Merge branch 'master' into rename-to-electron
This commit is contained in:
commit
43fe82e1e5
46 changed files with 1033 additions and 1364 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -10,4 +10,5 @@ node_modules/
|
||||||
*.xcodeproj
|
*.xcodeproj
|
||||||
*.swp
|
*.swp
|
||||||
*.pyc
|
*.pyc
|
||||||
|
debug.log
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
28
appveyor.yml
28
appveyor.yml
|
@ -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
690
atom.gyp
|
@ -1,403 +1,19 @@
|
||||||
{
|
{
|
||||||
'variables': {
|
'variables': {
|
||||||
'includes': [
|
|
||||||
'vendor/native_mate/native_mate_files.gypi',
|
|
||||||
],
|
|
||||||
'project_name%': 'atom',
|
'project_name%': 'atom',
|
||||||
'product_name%': 'Atom',
|
'product_name%': 'Atom',
|
||||||
'app_sources': [
|
'version%': '0.23.0',
|
||||||
'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',
|
|
||||||
],
|
|
||||||
'atom_source_root': '<!(["python", "tools/atom_source_root.py"])',
|
'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': {
|
'target_defaults': {
|
||||||
'mac_framework_dirs': [
|
'mac_framework_dirs': [
|
||||||
'<(atom_source_root)/external_binaries',
|
'<(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': [
|
'targets': [
|
||||||
{
|
{
|
||||||
|
@ -474,6 +90,7 @@
|
||||||
{
|
{
|
||||||
'postbuild_name': 'Make Empty Localizations',
|
'postbuild_name': 'Make Empty Localizations',
|
||||||
'variables': {
|
'variables': {
|
||||||
|
'apply_locales_cmd': ['python', 'tools/mac/apply_locales.py'],
|
||||||
'locale_dirs': [
|
'locale_dirs': [
|
||||||
'>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
|
'>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
|
||||||
],
|
],
|
||||||
|
@ -490,24 +107,42 @@
|
||||||
],
|
],
|
||||||
}], # OS!="mac"
|
}], # OS!="mac"
|
||||||
['OS=="win"', {
|
['OS=="win"', {
|
||||||
|
'msvs_settings': {
|
||||||
|
'VCLinkerTool': {
|
||||||
|
'AdditionalOptions': [
|
||||||
|
# Force linking even though we have duplicate symbols between
|
||||||
|
# BoringSSL and OpenSSL.
|
||||||
|
'/FORCE:MULTIPLE',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
'copies': [
|
'copies': [
|
||||||
{
|
{
|
||||||
|
'variables': {
|
||||||
|
'conditions': [
|
||||||
|
['libchromiumcontent_component', {
|
||||||
|
'copied_libraries': [
|
||||||
|
'<@(libchromiumcontent_shared_libraries)',
|
||||||
|
'<@(libchromiumcontent_shared_v8_libraries)',
|
||||||
|
],
|
||||||
|
}, {
|
||||||
|
'copied_libraries': [],
|
||||||
|
}],
|
||||||
|
],
|
||||||
|
},
|
||||||
'destination': '<(PRODUCT_DIR)',
|
'destination': '<(PRODUCT_DIR)',
|
||||||
'files': [
|
'files': [
|
||||||
'<(libchromiumcontent_library_dir)/chromiumcontent.dll',
|
'<@(copied_libraries)',
|
||||||
'<(libchromiumcontent_library_dir)/ffmpegsumo.dll',
|
'<(libchromiumcontent_dir)/ffmpegsumo.dll',
|
||||||
'<(libchromiumcontent_library_dir)/libEGL.dll',
|
'<(libchromiumcontent_dir)/libEGL.dll',
|
||||||
'<(libchromiumcontent_library_dir)/libGLESv2.dll',
|
'<(libchromiumcontent_dir)/libGLESv2.dll',
|
||||||
'<(libchromiumcontent_resources_dir)/icudtl.dat',
|
'<(libchromiumcontent_dir)/icudtl.dat',
|
||||||
'<(libchromiumcontent_resources_dir)/content_resources_200_percent.pak',
|
'<(libchromiumcontent_dir)/content_resources_200_percent.pak',
|
||||||
'<(libchromiumcontent_resources_dir)/content_shell.pak',
|
'<(libchromiumcontent_dir)/content_shell.pak',
|
||||||
'<(libchromiumcontent_resources_dir)/ui_resources_200_percent.pak',
|
'<(libchromiumcontent_dir)/ui_resources_200_percent.pak',
|
||||||
'<(libchromiumcontent_resources_dir)/natives_blob.bin',
|
'<(libchromiumcontent_dir)/natives_blob.bin',
|
||||||
'<(libchromiumcontent_resources_dir)/snapshot_blob.bin',
|
'<(libchromiumcontent_dir)/snapshot_blob.bin',
|
||||||
'external_binaries/d3dcompiler_47.dll',
|
'external_binaries/d3dcompiler_47.dll',
|
||||||
'external_binaries/msvcp120.dll',
|
|
||||||
'external_binaries/msvcr120.dll',
|
|
||||||
'external_binaries/vccorlib120.dll',
|
|
||||||
'external_binaries/xinput1_3.dll',
|
'external_binaries/xinput1_3.dll',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -522,14 +157,29 @@
|
||||||
['OS=="linux"', {
|
['OS=="linux"', {
|
||||||
'copies': [
|
'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)',
|
'destination': '<(PRODUCT_DIR)',
|
||||||
'files': [
|
'files': [
|
||||||
'<(libchromiumcontent_library_dir)/libchromiumcontent.so',
|
'<@(copied_libraries)',
|
||||||
'<(libchromiumcontent_library_dir)/libffmpegsumo.so',
|
'<(libchromiumcontent_dir)/libffmpegsumo.so',
|
||||||
'<(libchromiumcontent_resources_dir)/icudtl.dat',
|
'<(libchromiumcontent_dir)/icudtl.dat',
|
||||||
'<(libchromiumcontent_resources_dir)/content_shell.pak',
|
'<(libchromiumcontent_dir)/content_shell.pak',
|
||||||
'<(libchromiumcontent_resources_dir)/natives_blob.bin',
|
'<(libchromiumcontent_dir)/natives_blob.bin',
|
||||||
'<(libchromiumcontent_resources_dir)/snapshot_blob.bin',
|
'<(libchromiumcontent_dir)/snapshot_blob.bin',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -559,6 +209,8 @@
|
||||||
# Defined in Chromium but not exposed in its gyp file.
|
# Defined in Chromium but not exposed in its gyp file.
|
||||||
'V8_USE_EXTERNAL_STARTUP_DATA',
|
'V8_USE_EXTERNAL_STARTUP_DATA',
|
||||||
'ENABLE_PLUGINS',
|
'ENABLE_PLUGINS',
|
||||||
|
# Needed by Node.
|
||||||
|
'NODE_WANT_INTERNALS=1',
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
'<@(lib_sources)',
|
'<@(lib_sources)',
|
||||||
|
@ -575,11 +227,11 @@
|
||||||
'vendor/node/deps/http_parser',
|
'vendor/node/deps/http_parser',
|
||||||
'vendor/node/deps/uv/include',
|
'vendor/node/deps/uv/include',
|
||||||
# The `node.h` is using `#include"v8.h"`.
|
# 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"`.
|
# The `node.h` is using `#include"ares.h"`.
|
||||||
'vendor/node/deps/cares/include',
|
'vendor/node/deps/cares/include',
|
||||||
# The `third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h` is using `platform/PlatformExport.h`.
|
# 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': {
|
'direct_dependent_settings': {
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
|
@ -590,6 +242,11 @@
|
||||||
'vendor/brightray/brightray.gyp:brightray',
|
'vendor/brightray/brightray.gyp:brightray',
|
||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
|
['libchromiumcontent_component', {
|
||||||
|
'link_settings': {
|
||||||
|
'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
|
||||||
|
},
|
||||||
|
}],
|
||||||
['OS=="win"', {
|
['OS=="win"', {
|
||||||
'sources': [
|
'sources': [
|
||||||
'<@(lib_sources_win)',
|
'<@(lib_sources_win)',
|
||||||
|
@ -603,6 +260,13 @@
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'dependencies': [
|
'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_handler',
|
||||||
'vendor/breakpad/breakpad.gyp:breakpad_sender',
|
'vendor/breakpad/breakpad.gyp:breakpad_sender',
|
||||||
],
|
],
|
||||||
|
@ -624,15 +288,13 @@
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
# Required settings of using breakpad.
|
# Required settings of using breakpad.
|
||||||
'include_dirs': [
|
'cflags_cc': [
|
||||||
'vendor/breakpad/src',
|
|
||||||
],
|
|
||||||
'cflags': [
|
|
||||||
'<!@(pkg-config --cflags dbus-1)',
|
|
||||||
'-Wno-deprecated-register',
|
|
||||||
'-Wno-empty-body',
|
'-Wno-empty-body',
|
||||||
'-Wno-reserved-user-defined-literal',
|
'-Wno-reserved-user-defined-literal',
|
||||||
],
|
],
|
||||||
|
'include_dirs': [
|
||||||
|
'vendor/breakpad/src',
|
||||||
|
],
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'vendor/breakpad/breakpad.gyp:breakpad_client',
|
'vendor/breakpad/breakpad.gyp:breakpad_client',
|
||||||
],
|
],
|
||||||
|
@ -690,138 +352,6 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
}, # target atom_coffee2c
|
}, # 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': [
|
'conditions': [
|
||||||
['OS=="mac"', {
|
['OS=="mac"', {
|
||||||
|
@ -839,7 +369,7 @@
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'.',
|
'.',
|
||||||
'vendor',
|
'vendor',
|
||||||
'<(libchromiumcontent_include_dir)',
|
'<(libchromiumcontent_src_dir)',
|
||||||
],
|
],
|
||||||
'defines': [
|
'defines': [
|
||||||
'PRODUCT_NAME="<(product_name)"',
|
'PRODUCT_NAME="<(product_name)"',
|
||||||
|
@ -859,10 +389,10 @@
|
||||||
'mac_bundle': 1,
|
'mac_bundle': 1,
|
||||||
'mac_bundle_resources': [
|
'mac_bundle_resources': [
|
||||||
'atom/common/resources/mac/MainMenu.xib',
|
'atom/common/resources/mac/MainMenu.xib',
|
||||||
'<(libchromiumcontent_resources_dir)/content_shell.pak',
|
'<(libchromiumcontent_dir)/content_shell.pak',
|
||||||
'<(libchromiumcontent_resources_dir)/icudtl.dat',
|
'<(libchromiumcontent_dir)/icudtl.dat',
|
||||||
'<(libchromiumcontent_resources_dir)/natives_blob.bin',
|
'<(libchromiumcontent_dir)/natives_blob.bin',
|
||||||
'<(libchromiumcontent_resources_dir)/snapshot_blob.bin',
|
'<(libchromiumcontent_dir)/snapshot_blob.bin',
|
||||||
],
|
],
|
||||||
'xcode_settings': {
|
'xcode_settings': {
|
||||||
'INFOPLIST_FILE': 'atom/common/resources/mac/Info.plist',
|
'INFOPLIST_FILE': 'atom/common/resources/mac/Info.plist',
|
||||||
|
@ -876,11 +406,25 @@
|
||||||
},
|
},
|
||||||
'copies': [
|
'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',
|
'destination': '<(PRODUCT_DIR)/<(product_name) Framework.framework/Versions/A/Libraries',
|
||||||
'files': [
|
'files': [
|
||||||
'<(libchromiumcontent_library_dir)/ffmpegsumo.so',
|
'<@(copied_libraries)',
|
||||||
'<(libchromiumcontent_library_dir)/libchromiumcontent.dylib',
|
'<(libchromiumcontent_dir)/ffmpegsumo.so',
|
||||||
'<(PRODUCT_DIR)/libnode.dylib',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -961,37 +505,5 @@
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}], # OS!="mac"
|
}], # 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
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,10 @@
|
||||||
|
|
||||||
#include "atom/browser/atom_browser_main_parts.h"
|
#include "atom/browser/atom_browser_main_parts.h"
|
||||||
|
|
||||||
|
#include <gio/gio.h>
|
||||||
|
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/strings/string_number_conversions.h"
|
#include "base/strings/string_number_conversions.h"
|
||||||
#include "library_loaders/libgio.h"
|
|
||||||
#include "ui/gfx/switches.h"
|
#include "ui/gfx/switches.h"
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
@ -16,8 +17,8 @@ namespace {
|
||||||
const char* kInterfaceSchema = "org.gnome.desktop.interface";
|
const char* kInterfaceSchema = "org.gnome.desktop.interface";
|
||||||
const char* kScaleFactor = "scaling-factor";
|
const char* kScaleFactor = "scaling-factor";
|
||||||
|
|
||||||
bool SchemaExists(const LibGioLoader& libgio_loader, const char* schema_name) {
|
bool SchemaExists(const char* schema_name) {
|
||||||
const gchar* const* schemas = libgio_loader.g_settings_list_schemas();
|
const gchar* const* schemas = g_settings_list_schemas();
|
||||||
while (*schemas) {
|
while (*schemas) {
|
||||||
if (strcmp(schema_name, static_cast<const char*>(*schemas)) == 0)
|
if (strcmp(schema_name, static_cast<const char*>(*schemas)) == 0)
|
||||||
return true;
|
return true;
|
||||||
|
@ -26,9 +27,8 @@ bool SchemaExists(const LibGioLoader& libgio_loader, const char* schema_name) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KeyExists(const LibGioLoader& libgio_loader, GSettings* client,
|
bool KeyExists(GSettings* client, const char* key) {
|
||||||
const char* key) {
|
gchar** keys = g_settings_list_keys(client);
|
||||||
gchar** keys = libgio_loader.g_settings_list_keys(client);
|
|
||||||
if (!keys)
|
if (!keys)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -45,24 +45,15 @@ bool KeyExists(const LibGioLoader& libgio_loader, GSettings* client,
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetDPIFromGSettings(guint* scale_factor) {
|
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;
|
GSettings* client = nullptr;
|
||||||
if (!SchemaExists(libgio_loader, kInterfaceSchema) ||
|
if (!SchemaExists(kInterfaceSchema) ||
|
||||||
!(client = libgio_loader.g_settings_new(kInterfaceSchema))) {
|
!(client = g_settings_new(kInterfaceSchema))) {
|
||||||
VLOG(1) << "Cannot create gsettings client.";
|
VLOG(1) << "Cannot create gsettings client.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (KeyExists(libgio_loader, client, kScaleFactor))
|
if (KeyExists(client, kScaleFactor))
|
||||||
*scale_factor = libgio_loader.g_settings_get_uint(client, kScaleFactor);
|
*scale_factor = g_settings_get_uint(client, kScaleFactor);
|
||||||
|
|
||||||
g_object_unref(client);
|
g_object_unref(client);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,9 @@
|
||||||
#include "ui/gfx/geometry/size_conversions.h"
|
#include "ui/gfx/geometry/size_conversions.h"
|
||||||
#include "ui/gfx/geometry/point.h"
|
#include "ui/gfx/geometry/point.h"
|
||||||
#include "ui/gfx/geometry/rect.h"
|
#include "ui/gfx/geometry/rect.h"
|
||||||
#include "ui/gfx/screen.h"
|
|
||||||
#include "ui/gfx/geometry/size.h"
|
#include "ui/gfx/geometry/size.h"
|
||||||
|
#include "ui/gfx/screen.h"
|
||||||
|
#include "ui/gl/gpu_switching_manager.h"
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
#include "ui/gfx/switches.h"
|
#include "ui/gfx/switches.h"
|
||||||
|
@ -65,10 +66,6 @@ using content::NavigationEntry;
|
||||||
using content::RenderWidgetHostView;
|
using content::RenderWidgetHostView;
|
||||||
using content::RenderWidgetHost;
|
using content::RenderWidgetHost;
|
||||||
|
|
||||||
namespace content {
|
|
||||||
CONTENT_EXPORT extern bool g_use_transparent_window;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -115,7 +112,7 @@ NativeWindow::NativeWindow(content::WebContents* web_contents,
|
||||||
|
|
||||||
// Tell the content module to initialize renderer widget with transparent
|
// Tell the content module to initialize renderer widget with transparent
|
||||||
// mode.
|
// mode.
|
||||||
content::g_use_transparent_window = transparent_;
|
ui::GpuSwitchingManager::SetTransparent(transparent_);
|
||||||
|
|
||||||
// Read icon before window is created.
|
// Read icon before window is created.
|
||||||
options.Get(switches::kIcon, &icon_);
|
options.Get(switches::kIcon, &icon_);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>atom.icns</string>
|
<string>atom.icns</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>0.22.3</string>
|
<string>0.23.0</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.8.0</string>
|
<string>10.8.0</string>
|
||||||
<key>NSMainNibFile</key>
|
<key>NSMainNibFile</key>
|
||||||
|
|
|
@ -50,8 +50,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 0,22,3,0
|
FILEVERSION 0,23,0,0
|
||||||
PRODUCTVERSION 0,22,3,0
|
PRODUCTVERSION 0,23,0,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -68,12 +68,12 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "GitHub, Inc."
|
VALUE "CompanyName", "GitHub, Inc."
|
||||||
VALUE "FileDescription", "Atom-Shell"
|
VALUE "FileDescription", "Atom-Shell"
|
||||||
VALUE "FileVersion", "0.22.3"
|
VALUE "FileVersion", "0.23.0"
|
||||||
VALUE "InternalName", "atom.exe"
|
VALUE "InternalName", "atom.exe"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2013 GitHub, Inc. All rights reserved."
|
VALUE "LegalCopyright", "Copyright (C) 2013 GitHub, Inc. All rights reserved."
|
||||||
VALUE "OriginalFilename", "atom.exe"
|
VALUE "OriginalFilename", "atom.exe"
|
||||||
VALUE "ProductName", "Atom-Shell"
|
VALUE "ProductName", "Atom-Shell"
|
||||||
VALUE "ProductVersion", "0.22.3"
|
VALUE "ProductVersion", "0.23.0"
|
||||||
VALUE "SquirrelAwareVersion", "1"
|
VALUE "SquirrelAwareVersion", "1"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
#define ATOM_VERSION_H
|
#define ATOM_VERSION_H
|
||||||
|
|
||||||
#define ATOM_MAJOR_VERSION 0
|
#define ATOM_MAJOR_VERSION 0
|
||||||
#define ATOM_MINOR_VERSION 22
|
#define ATOM_MINOR_VERSION 23
|
||||||
#define ATOM_PATCH_VERSION 3
|
#define ATOM_PATCH_VERSION 0
|
||||||
|
|
||||||
#define ATOM_VERSION_IS_RELEASE 1
|
#define ATOM_VERSION_IS_RELEASE 1
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,14 @@ REFERENCE_MODULE(atom_renderer_ipc);
|
||||||
REFERENCE_MODULE(atom_renderer_web_frame);
|
REFERENCE_MODULE(atom_renderer_web_frame);
|
||||||
#undef REFERENCE_MODULE
|
#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 atom {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -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
|
|
|
@ -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;
|
|
||||||
|
|
||||||
}
|
|
185
common.gypi
185
common.gypi
|
@ -3,18 +3,12 @@
|
||||||
'vendor/brightray/brightray.gypi',
|
'vendor/brightray/brightray.gypi',
|
||||||
],
|
],
|
||||||
'variables': {
|
'variables': {
|
||||||
'clang': 0,
|
|
||||||
'openssl_no_asm': 1,
|
|
||||||
'conditions': [
|
|
||||||
['OS=="mac" or OS=="linux"', {
|
|
||||||
'clang': 1,
|
|
||||||
}],
|
|
||||||
],
|
|
||||||
# Required by breakpad.
|
# Required by breakpad.
|
||||||
'os_bsd': 0,
|
'os_bsd': 0,
|
||||||
# Reflects node's config.gypi.
|
# Reflects node's config.gypi.
|
||||||
'component%': 'static_library',
|
'component%': 'static_library',
|
||||||
'python': 'python',
|
'python': 'python',
|
||||||
|
'openssl_no_asm': 1,
|
||||||
'node_install_npm': 'false',
|
'node_install_npm': 'false',
|
||||||
'node_prefix': '',
|
'node_prefix': '',
|
||||||
'node_shared_cares': 'false',
|
'node_shared_cares': 'false',
|
||||||
|
@ -40,10 +34,11 @@
|
||||||
# Settings to compile node under Windows.
|
# Settings to compile node under Windows.
|
||||||
'target_defaults': {
|
'target_defaults': {
|
||||||
'target_conditions': [
|
'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': [
|
'msvs_disabled_warnings': [
|
||||||
4703, # potentially uninitialized local pointer variable 'req' used
|
4703, # potentially uninitialized local pointer variable 'req' used
|
||||||
4013, # 'free' undefined; assuming extern returning int
|
4013, # 'free' undefined; assuming extern returning int
|
||||||
|
4018, # signed/unsigned mismatch
|
||||||
4054, #
|
4054, #
|
||||||
4057, # 'function' : 'volatile LONG *' differs in indirection to slightly different base types from 'unsigned long *'
|
4057, # 'function' : 'volatile LONG *' differs in indirection to slightly different base types from 'unsigned long *'
|
||||||
4189, #
|
4189, #
|
||||||
|
@ -53,6 +48,7 @@
|
||||||
4152, # function/data pointer conversion in expression
|
4152, # function/data pointer conversion in expression
|
||||||
4206, # translation unit is empty
|
4206, # translation unit is empty
|
||||||
4204, # non-constant aggregate initializer
|
4204, # non-constant aggregate initializer
|
||||||
|
4210, # nonstandard extension used : function given file scope
|
||||||
4214, # bit field types other than int
|
4214, # bit field types other than int
|
||||||
4232, # address of dllimport 'free' is not static, identity not guaranteed
|
4232, # address of dllimport 'free' is not static, identity not guaranteed
|
||||||
4291, # no matching operator delete found
|
4291, # no matching operator delete found
|
||||||
|
@ -76,6 +72,7 @@
|
||||||
'-Wno-unused-function',
|
'-Wno-unused-function',
|
||||||
'-Wno-sometimes-uninitialized',
|
'-Wno-sometimes-uninitialized',
|
||||||
'-Wno-pointer-sign',
|
'-Wno-pointer-sign',
|
||||||
|
'-Wno-sign-compare',
|
||||||
'-Wno-string-plus-int',
|
'-Wno-string-plus-int',
|
||||||
'-Wno-unused-variable',
|
'-Wno-unused-variable',
|
||||||
'-Wno-deprecated-declarations',
|
'-Wno-deprecated-declarations',
|
||||||
|
@ -95,36 +92,88 @@
|
||||||
'-Wno-unused-value',
|
'-Wno-unused-value',
|
||||||
'-Wno-deprecated-declarations',
|
'-Wno-deprecated-declarations',
|
||||||
'-Wno-return-type',
|
'-Wno-return-type',
|
||||||
# Fix relocation error when compiling as shared library.
|
# Required when building as shared library.
|
||||||
'-fPIC',
|
'-fPIC',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
['_target_name in ["node", "atom_lib"]', {
|
|
||||||
'include_dirs': [
|
|
||||||
'vendor/brightray/vendor/download/libchromiumcontent/src/v8/include',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
['_target_name=="node"', {
|
['_target_name=="node"', {
|
||||||
|
'include_dirs': [ '<(libchromiumcontent_src_dir)/v8/include' ],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS=="linux"', {
|
['OS=="mac" and libchromiumcontent_component==0', {
|
||||||
'libraries': [
|
# -all_load is the "whole-archive" on OS X.
|
||||||
'<(libchromiumcontent_library_dir)/libchromiumcontent.so',
|
'xcode_settings': {
|
||||||
],
|
'OTHER_LDFLAGS': [ '-Wl,-all_load' ],
|
||||||
|
},
|
||||||
}],
|
}],
|
||||||
['OS=="win"', {
|
['OS=="win"', {
|
||||||
'libraries': [
|
'libraries': [ '-lwinmm.lib' ],
|
||||||
'<(libchromiumcontent_library_dir)/chromiumcontent.dll.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"', {
|
['OS=="linux" and libchromiumcontent_component==0', {
|
||||||
'libraries': [
|
# Prevent the linker from stripping symbols.
|
||||||
'<(libchromiumcontent_library_dir)/libchromiumcontent.dylib',
|
'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"', {
|
['_target_name=="libuv"', {
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS=="win"', {
|
['OS=="win"', {
|
||||||
|
@ -152,85 +201,28 @@
|
||||||
'-Wno-empty-body',
|
'-Wno-empty-body',
|
||||||
],
|
],
|
||||||
}], # OS=="linux"
|
}], # 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_cygwin_shell': 0, # Strangely setting it to 1 would make building under cygwin fail.
|
||||||
'msvs_disabled_warnings': [
|
'msvs_disabled_warnings': [
|
||||||
4005, # (node.h) macro redefinition
|
4005, # (node.h) macro redefinition
|
||||||
4189, # local variable is initialized but not referenced
|
4189, # local variable is initialized but not referenced
|
||||||
4201, # (uv.h) nameless struct/union
|
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
|
4503, # decorated name length exceeded, name was truncated
|
||||||
4800, # (v8.h) forcing value to bool 'true' or 'false'
|
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
|
4819, # The file contains a character that cannot be represented in the current code page
|
||||||
4996, # (atlapp.h) 'GetVersionExW': was declared deprecated
|
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': [
|
'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.
|
# The breakdpad on Windows assumes Debug_x64 and Release_x64 configurations.
|
||||||
['OS=="win"', {
|
['OS=="win"', {
|
||||||
'target_defaults': {
|
'target_defaults': {
|
||||||
|
@ -251,24 +243,5 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}], # OS=="mac"
|
}], # 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',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@ Modules for both processes:
|
||||||
* [Coding style](development/coding-style.md)
|
* [Coding style](development/coding-style.md)
|
||||||
* [Source code directory structure](development/source-code-directory-structure.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)
|
* [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 (Mac)](development/build-instructions-mac.md)
|
||||||
* [Build instructions (Windows)](development/build-instructions-windows.md)
|
* [Build instructions (Windows)](development/build-instructions-windows.md)
|
||||||
* [Build instructions (Linux)](development/build-instructions-linux.md)
|
* [Build instructions (Linux)](development/build-instructions-linux.md)
|
||||||
|
|
|
@ -9,7 +9,10 @@
|
||||||
On Ubuntu you could install the libraries via:
|
On Ubuntu you could install the libraries via:
|
||||||
|
|
||||||
```bash
|
```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:
|
Latest Node.js could be installed via ppa:
|
||||||
|
@ -52,10 +55,10 @@ $ ./script/build.py
|
||||||
You can also only build the `Debug` target:
|
You can also only build the `Debug` target:
|
||||||
|
|
||||||
```bash
|
```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
|
## Troubleshooting
|
||||||
|
|
||||||
|
|
|
@ -39,10 +39,10 @@ $ ./script/build.py
|
||||||
You can also only build the `Debug` target:
|
You can also only build the `Debug` target:
|
||||||
|
|
||||||
```bash
|
```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
|
## 32bit support
|
||||||
|
|
||||||
|
|
|
@ -49,10 +49,10 @@ python script\build.py
|
||||||
You can also only build the Debug target:
|
You can also only build the Debug target:
|
||||||
|
|
||||||
```powershell
|
```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
|
## 64bit support
|
||||||
|
|
||||||
|
|
64
docs/development/build-system-overview.md
Normal file
64
docs/development/build-system-overview.md
Normal 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.
|
|
@ -1,33 +1,8 @@
|
||||||
# Using native Node modules
|
# Using native Node modules
|
||||||
|
|
||||||
The native Node modules are supported by atom-shell, but since atom-shell is
|
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
|
using a different V8 version from official Node, you have to manually specify
|
||||||
of `npm` to install Node modules.
|
the location of atom-shell's headers when building native 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 .
|
|
||||||
```
|
|
||||||
|
|
||||||
## Native Node module compatibility
|
## 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
|
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.
|
[nan](https://github.com/rvagg/nan) module to port it to v0.11.x.
|
||||||
|
|
||||||
## Other ways of installing native modules
|
## How to install native modules
|
||||||
|
|
||||||
Apart from `apm`, you can also use `node-gyp` and `npm` to manually build the
|
|
||||||
native modules.
|
|
||||||
|
|
||||||
### The node-gyp way
|
### 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
|
### 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
|
```bash
|
||||||
export npm_config_disturl=https://atom.io/download/atom-shell
|
export npm_config_disturl=https://atom.io/download/atom-shell
|
||||||
export npm_config_target=0.6.0
|
export npm_config_target=0.23.0
|
||||||
export npm_config_arch=ia32
|
export npm_config_arch=x64
|
||||||
HOME=~/.atom-shell-gyp npm install module-name
|
HOME=~/.atom-shell-gyp npm install module-name
|
||||||
```
|
```
|
||||||
|
|
|
@ -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
377
filenames.gypi
Normal 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"
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,15 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "atom-shell",
|
"name": "atom-shell",
|
||||||
"version": "0.22.3",
|
|
||||||
"licenses": [
|
|
||||||
{
|
|
||||||
"type": "MIT",
|
|
||||||
"url": "http://github.com/atom/atom-shell/raw/master/LICENSE.md"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"asar": "0.2.2",
|
"asar": "0.2.2",
|
||||||
"atom-package-manager": "0.144.0",
|
|
||||||
"coffee-script": "~1.7.1",
|
"coffee-script": "~1.7.1",
|
||||||
"coffeelint": "~1.3.0",
|
"coffeelint": "~1.3.0",
|
||||||
"request": "*",
|
"request": "*",
|
||||||
|
|
|
@ -4,9 +4,9 @@ import argparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, \
|
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, PLATFORM, \
|
||||||
enable_verbose_mode, is_verbose_mode
|
enable_verbose_mode, is_verbose_mode, get_target_arch
|
||||||
from lib.util import execute_stdout, scoped_cwd
|
from lib.util import execute_stdout, get_atom_shell_version, scoped_cwd
|
||||||
|
|
||||||
|
|
||||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
|
@ -19,8 +19,7 @@ def main():
|
||||||
os.chdir(SOURCE_ROOT)
|
os.chdir(SOURCE_ROOT)
|
||||||
|
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
if (args.yes is False and
|
if not args.yes and PLATFORM != 'win32':
|
||||||
sys.platform not in ('win32', 'cygwin')):
|
|
||||||
check_root()
|
check_root()
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
enable_verbose_mode()
|
enable_verbose_mode()
|
||||||
|
@ -28,12 +27,12 @@ def main():
|
||||||
update_win32_python()
|
update_win32_python()
|
||||||
update_submodules()
|
update_submodules()
|
||||||
update_node_modules('.')
|
update_node_modules('.')
|
||||||
bootstrap_brightray(args.url)
|
bootstrap_brightray(args.dev, args.url, args.target_arch)
|
||||||
|
|
||||||
create_chrome_version_h()
|
create_chrome_version_h()
|
||||||
touch_config_gypi()
|
touch_config_gypi()
|
||||||
update_atom_shell()
|
update_atom_shell()
|
||||||
update_atom_modules('spec')
|
update_atom_modules('spec', args.target_arch)
|
||||||
|
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
|
@ -47,12 +46,17 @@ def parse_args():
|
||||||
parser.add_argument('-v', '--verbose',
|
parser.add_argument('-v', '--verbose',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help='Prints the output of the subprocesses')
|
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',
|
parser.add_argument('-y', '--yes', '--assume-yes',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help='Run non-interactively by assuming "yes" to all ' \
|
help='Run non-interactively by assuming "yes" to all ' \
|
||||||
'prompts.')
|
'prompts.')
|
||||||
|
parser.add_argument('--target_arch', default=get_target_arch(),
|
||||||
|
help='Manually specify the arch to build for')
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
def check_root():
|
def check_root():
|
||||||
if os.geteuid() == 0:
|
if os.geteuid() == 0:
|
||||||
print "We suggest not running this as root, unless you're really sure."
|
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'])
|
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')
|
bootstrap = os.path.join(VENDOR_DIR, 'brightray', 'script', 'bootstrap')
|
||||||
execute_stdout([sys.executable, bootstrap, '--commit',
|
args = [
|
||||||
LIBCHROMIUMCONTENT_COMMIT, url])
|
'--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):
|
with scoped_cwd(dirname):
|
||||||
if is_verbose_mode():
|
if is_verbose_mode():
|
||||||
execute_stdout([NPM, 'install', '--verbose'])
|
execute_stdout([NPM, 'install', '--verbose'], env)
|
||||||
else:
|
else:
|
||||||
execute_stdout([NPM, 'install'])
|
execute_stdout([NPM, 'install'], env)
|
||||||
|
|
||||||
|
|
||||||
def update_atom_modules(dirname):
|
def update_atom_modules(dirname, target_arch):
|
||||||
with scoped_cwd(dirname):
|
env = os.environ.copy()
|
||||||
apm = os.path.join(SOURCE_ROOT, 'node_modules', '.bin', 'apm')
|
env['npm_config_arch'] = target_arch
|
||||||
if sys.platform in ['win32', 'cygwin']:
|
env['npm_config_target'] = get_atom_shell_version()
|
||||||
apm = os.path.join(SOURCE_ROOT, 'node_modules', 'atom-package-manager',
|
env['npm_config_disturl'] = 'https://atom.io/download/atom-shell'
|
||||||
'bin', 'apm.cmd')
|
update_node_modules(dirname, env)
|
||||||
execute_stdout([apm, 'install'])
|
|
||||||
|
|
||||||
|
|
||||||
def update_win32_python():
|
def update_win32_python():
|
||||||
|
|
|
@ -19,7 +19,7 @@ def main():
|
||||||
|
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
for config in args.configuration:
|
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])
|
ret = subprocess.call([ninja, '-C', build_path, args.target])
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
sys.exit(ret)
|
sys.exit(ret)
|
||||||
|
|
|
@ -27,12 +27,11 @@ def main():
|
||||||
version = '.'.join(versions[:3])
|
version = '.'.join(versions[:3])
|
||||||
|
|
||||||
with scoped_cwd(SOURCE_ROOT):
|
with scoped_cwd(SOURCE_ROOT):
|
||||||
update_package_json(version)
|
update_atom_gyp(version)
|
||||||
update_win_rc(version, versions)
|
update_win_rc(version, versions)
|
||||||
update_version_h(versions)
|
update_version_h(versions)
|
||||||
update_info_plist(version)
|
update_info_plist(version)
|
||||||
tag_version(version)
|
tag_version(version)
|
||||||
git_push()
|
|
||||||
|
|
||||||
|
|
||||||
def increase_version(versions, index):
|
def increase_version(versions, index):
|
||||||
|
@ -42,15 +41,15 @@ def increase_version(versions, index):
|
||||||
return versions
|
return versions
|
||||||
|
|
||||||
|
|
||||||
def update_package_json(version):
|
def update_atom_gyp(version):
|
||||||
pattern = re.compile(' *"version" *: *"[0-9.]+"')
|
pattern = re.compile(" *'version%' *: *'[0-9.]+'")
|
||||||
with open('package.json', 'r') as f:
|
with open('atom.gyp', 'r') as f:
|
||||||
lines = f.readlines()
|
lines = f.readlines()
|
||||||
|
|
||||||
for i in range(0, len(lines)):
|
for i in range(0, len(lines)):
|
||||||
if pattern.match(lines[i]):
|
if pattern.match(lines[i]):
|
||||||
lines[i] = ' "version": "{0}",\n'.format(version)
|
lines[i] = " 'version%': '{0}',\n".format(version)
|
||||||
with open('package.json', 'w') as f:
|
with open('atom.gyp', 'w') as f:
|
||||||
f.write(''.join(lines))
|
f.write(''.join(lines))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -118,10 +117,5 @@ def tag_version(version):
|
||||||
execute(['git', 'tag', 'v{0}'.format(version)])
|
execute(['git', 'tag', 'v{0}'.format(version)])
|
||||||
|
|
||||||
|
|
||||||
def git_push():
|
|
||||||
execute(['git', 'push'])
|
|
||||||
execute(['git', 'push', '--tags'])
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|
|
@ -43,10 +43,10 @@ def main():
|
||||||
if is_travis and sys.platform == 'linux2':
|
if is_travis and sys.platform == 'linux2':
|
||||||
with scoped_env('CXX', 'g++'):
|
with scoped_env('CXX', 'g++'):
|
||||||
with scoped_env('CC', 'gcc'):
|
with scoped_env('CC', 'gcc'):
|
||||||
run_script('bootstrap.py')
|
run_script('bootstrap.py', ['--dev'])
|
||||||
run_script('update.py')
|
run_script('update.py')
|
||||||
else:
|
else:
|
||||||
run_script('bootstrap.py')
|
run_script('bootstrap.py', ['--dev'])
|
||||||
|
|
||||||
run_script('cpplint.py')
|
run_script('cpplint.py')
|
||||||
if sys.platform != 'win32':
|
if sys.platform != 'win32':
|
||||||
|
|
20
script/clean.py
Executable file
20
script/clean.py
Executable 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())
|
|
@ -1,14 +1,14 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import argparse
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import stat
|
||||||
|
|
||||||
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, TARGET_PLATFORM, \
|
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, PLATFORM, \
|
||||||
DIST_ARCH
|
get_target_arch
|
||||||
from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \
|
from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \
|
||||||
execute, get_chromedriver_version
|
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__)))
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
|
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
|
||||||
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'Release')
|
OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
|
||||||
|
CHROMIUM_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor',
|
||||||
SYMBOL_NAME = {
|
'download', 'libchromiumcontent', 'static_library')
|
||||||
'darwin': 'libchromiumcontent.dylib.dSYM',
|
|
||||||
'linux': 'libchromiumcontent.so.dbg',
|
|
||||||
'win32': 'chromiumcontent.dll.pdb',
|
|
||||||
}[TARGET_PLATFORM]
|
|
||||||
|
|
||||||
TARGET_BINARIES = {
|
TARGET_BINARIES = {
|
||||||
'darwin': [
|
'darwin': [
|
||||||
],
|
],
|
||||||
'win32': [
|
'win32': [
|
||||||
'atom.exe',
|
'atom.exe',
|
||||||
'chromiumcontent.dll',
|
|
||||||
'content_shell.pak',
|
'content_shell.pak',
|
||||||
'd3dcompiler_47.dll',
|
'd3dcompiler_47.dll',
|
||||||
'node.dll',
|
|
||||||
'ffmpegsumo.dll',
|
'ffmpegsumo.dll',
|
||||||
'icudtl.dat',
|
'icudtl.dat',
|
||||||
'libEGL.dll',
|
'libEGL.dll',
|
||||||
'libGLESv2.dll',
|
'libGLESv2.dll',
|
||||||
'msvcp120.dll',
|
'node.dll',
|
||||||
'msvcr120.dll',
|
|
||||||
'content_resources_200_percent.pak',
|
'content_resources_200_percent.pak',
|
||||||
'ui_resources_200_percent.pak',
|
'ui_resources_200_percent.pak',
|
||||||
'vccorlib120.dll',
|
|
||||||
'xinput1_3.dll',
|
'xinput1_3.dll',
|
||||||
'natives_blob.bin',
|
'natives_blob.bin',
|
||||||
'snapshot_blob.bin',
|
'snapshot_blob.bin',
|
||||||
|
@ -50,10 +42,9 @@ TARGET_BINARIES = {
|
||||||
'linux': [
|
'linux': [
|
||||||
'atom',
|
'atom',
|
||||||
'content_shell.pak',
|
'content_shell.pak',
|
||||||
'libnode.so',
|
|
||||||
'icudtl.dat',
|
'icudtl.dat',
|
||||||
'libchromiumcontent.so',
|
|
||||||
'libffmpegsumo.so',
|
'libffmpegsumo.so',
|
||||||
|
'libnode.so',
|
||||||
'natives_blob.bin',
|
'natives_blob.bin',
|
||||||
'snapshot_blob.bin',
|
'snapshot_blob.bin',
|
||||||
],
|
],
|
||||||
|
@ -82,16 +73,14 @@ def main():
|
||||||
rm_rf(DIST_DIR)
|
rm_rf(DIST_DIR)
|
||||||
os.makedirs(DIST_DIR)
|
os.makedirs(DIST_DIR)
|
||||||
|
|
||||||
args = parse_args()
|
|
||||||
|
|
||||||
force_build()
|
force_build()
|
||||||
download_libchromiumcontent_symbols(args.url)
|
|
||||||
create_symbols()
|
create_symbols()
|
||||||
copy_binaries()
|
copy_binaries()
|
||||||
copy_chromedriver()
|
copy_chromedriver()
|
||||||
copy_license()
|
copy_license()
|
||||||
|
|
||||||
if TARGET_PLATFORM == 'linux':
|
if PLATFORM == 'linux':
|
||||||
|
strip_binaries()
|
||||||
copy_system_libraries()
|
copy_system_libraries()
|
||||||
|
|
||||||
create_version()
|
create_version()
|
||||||
|
@ -100,45 +89,44 @@ def main():
|
||||||
create_symbols_zip()
|
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():
|
def force_build():
|
||||||
build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
|
build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
|
||||||
execute([sys.executable, build, '-c', 'Release'])
|
execute([sys.executable, build, '-c', 'Release'])
|
||||||
|
|
||||||
|
|
||||||
def copy_binaries():
|
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)
|
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),
|
shutil.copytree(os.path.join(OUT_DIR, directory),
|
||||||
os.path.join(DIST_DIR, directory),
|
os.path.join(DIST_DIR, directory),
|
||||||
symlinks=True)
|
symlinks=True)
|
||||||
|
|
||||||
|
|
||||||
def copy_chromedriver():
|
def copy_chromedriver():
|
||||||
build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
|
if PLATFORM == 'win32':
|
||||||
execute([sys.executable, build, '-c', 'Release', '-t', 'copy_chromedriver'])
|
chromedriver = 'chromedriver.exe'
|
||||||
binary = 'chromedriver'
|
else:
|
||||||
if TARGET_PLATFORM == 'win32':
|
chromedriver = 'chromedriver'
|
||||||
binary += '.exe'
|
src = os.path.join(CHROMIUM_DIR, chromedriver)
|
||||||
shutil.copy2(os.path.join(OUT_DIR, binary), DIST_DIR)
|
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():
|
def copy_license():
|
||||||
shutil.copy2(os.path.join(SOURCE_ROOT, 'LICENSE'), DIST_DIR)
|
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():
|
def copy_system_libraries():
|
||||||
ldd = execute(['ldd', os.path.join(OUT_DIR, 'atom')])
|
ldd = execute(['ldd', os.path.join(OUT_DIR, 'atom')])
|
||||||
lib_re = re.compile('\t(.*) => (.+) \(.*\)$')
|
lib_re = re.compile('\t(.*) => (.+) \(.*\)$')
|
||||||
|
@ -159,53 +147,33 @@ def create_version():
|
||||||
version_file.write(ATOM_SHELL_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():
|
def create_symbols():
|
||||||
directory = 'Atom-Shell.breakpad.syms'
|
destination = os.path.join(DIST_DIR, 'Atom-Shell.breakpad.syms')
|
||||||
rm_rf(os.path.join(OUT_DIR, directory))
|
dump_symbols = os.path.join(SOURCE_ROOT, 'script', 'dump-symbols.py')
|
||||||
|
execute([sys.executable, dump_symbols, destination])
|
||||||
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)
|
|
||||||
|
|
||||||
|
|
||||||
def create_dist_zip():
|
def create_dist_zip():
|
||||||
dist_name = 'atom-shell-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
|
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)
|
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
||||||
|
|
||||||
with scoped_cwd(DIST_DIR):
|
with scoped_cwd(DIST_DIR):
|
||||||
files = TARGET_BINARIES[TARGET_PLATFORM] + ['LICENSE', 'version']
|
files = TARGET_BINARIES[PLATFORM] + ['LICENSE', 'version']
|
||||||
if TARGET_PLATFORM == 'linux':
|
if PLATFORM == 'linux':
|
||||||
files += [lib for lib in SYSTEM_LIBRARIES if os.path.exists(lib)]
|
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)
|
make_zip(zip_file, files, dirs)
|
||||||
|
|
||||||
|
|
||||||
def create_chromedriver_zip():
|
def create_chromedriver_zip():
|
||||||
dist_name = 'chromedriver-{0}-{1}-{2}.zip'.format(get_chromedriver_version(),
|
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)
|
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
||||||
|
|
||||||
with scoped_cwd(DIST_DIR):
|
with scoped_cwd(DIST_DIR):
|
||||||
files = ['LICENSE']
|
files = ['LICENSE']
|
||||||
if TARGET_PLATFORM == 'win32':
|
if PLATFORM == 'win32':
|
||||||
files += ['chromedriver.exe']
|
files += ['chromedriver.exe']
|
||||||
else:
|
else:
|
||||||
files += ['chromedriver']
|
files += ['chromedriver']
|
||||||
|
@ -214,8 +182,8 @@ def create_chromedriver_zip():
|
||||||
|
|
||||||
def create_symbols_zip():
|
def create_symbols_zip():
|
||||||
dist_name = 'atom-shell-{0}-{1}-{2}-symbols.zip'.format(ATOM_SHELL_VERSION,
|
dist_name = 'atom-shell-{0}-{1}-{2}-symbols.zip'.format(ATOM_SHELL_VERSION,
|
||||||
TARGET_PLATFORM,
|
PLATFORM,
|
||||||
DIST_ARCH)
|
get_target_arch())
|
||||||
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
||||||
|
|
||||||
with scoped_cwd(DIST_DIR):
|
with scoped_cwd(DIST_DIR):
|
||||||
|
|
68
script/dump-symbols.py
Executable file
68
script/dump-symbols.py
Executable 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]))
|
|
@ -1,23 +1,15 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import errno
|
||||||
|
import os
|
||||||
import platform
|
import platform
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
|
BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
|
||||||
LIBCHROMIUMCONTENT_COMMIT = 'c01b10faf0d478e48f537210ec263fabd551578d'
|
LIBCHROMIUMCONTENT_COMMIT = 'f1ad1412461ba3345a27cfe935ffc872dba0ac5b'
|
||||||
|
|
||||||
ARCH = {
|
PLATFORM = {
|
||||||
'cygwin': '32bit',
|
|
||||||
'darwin': '64bit',
|
|
||||||
'linux2': platform.architecture()[0],
|
|
||||||
'win32': '32bit',
|
|
||||||
}[sys.platform]
|
|
||||||
DIST_ARCH = {
|
|
||||||
'32bit': 'ia32',
|
|
||||||
'64bit': 'x64',
|
|
||||||
}[ARCH]
|
|
||||||
|
|
||||||
TARGET_PLATFORM = {
|
|
||||||
'cygwin': 'win32',
|
'cygwin': 'win32',
|
||||||
'darwin': 'darwin',
|
'darwin': 'darwin',
|
||||||
'linux2': 'linux',
|
'linux2': 'linux',
|
||||||
|
@ -26,10 +18,51 @@ TARGET_PLATFORM = {
|
||||||
|
|
||||||
verbose_mode = False
|
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():
|
def enable_verbose_mode():
|
||||||
print 'Running in verbose mode'
|
print 'Running in verbose mode'
|
||||||
global verbose_mode
|
global verbose_mode
|
||||||
verbose_mode = True
|
verbose_mode = True
|
||||||
|
|
||||||
|
|
||||||
def is_verbose_mode():
|
def is_verbose_mode():
|
||||||
return verbose_mode
|
return verbose_mode
|
||||||
|
|
|
@ -129,11 +129,11 @@ def safe_mkdir(path):
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
def execute(argv):
|
def execute(argv, env=os.environ):
|
||||||
if is_verbose_mode():
|
if is_verbose_mode():
|
||||||
print ' '.join(argv)
|
print ' '.join(argv)
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output(argv, stderr=subprocess.STDOUT)
|
output = subprocess.check_output(argv, stderr=subprocess.STDOUT, env=env)
|
||||||
if is_verbose_mode():
|
if is_verbose_mode():
|
||||||
print output
|
print output
|
||||||
return output
|
return output
|
||||||
|
@ -142,27 +142,35 @@ def execute(argv):
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
|
||||||
def execute_stdout(argv):
|
def execute_stdout(argv, env=os.environ):
|
||||||
if is_verbose_mode():
|
if is_verbose_mode():
|
||||||
print ' '.join(argv)
|
print ' '.join(argv)
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(argv)
|
subprocess.check_call(argv, env=env)
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
print e.output
|
print e.output
|
||||||
raise e
|
raise e
|
||||||
else:
|
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():
|
def get_atom_shell_version():
|
||||||
return subprocess.check_output(['git', 'describe', '--tags']).strip()
|
return 'v' + atom_gyp()['version%']
|
||||||
|
|
||||||
|
|
||||||
def get_chromedriver_version():
|
def get_chromedriver_version():
|
||||||
SOURCE_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
|
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()
|
output = subprocess.check_output([chromedriver, '-v']).strip()
|
||||||
return 'v' + output[13:]
|
return 'v' + output[13:output.rfind(' ')]
|
||||||
|
|
||||||
|
|
||||||
def parse_version(version):
|
def parse_version(version):
|
||||||
|
@ -176,17 +184,6 @@ def parse_version(version):
|
||||||
return vs + ['0'] * (4 - len(vs))
|
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):
|
def s3put(bucket, access_key, secret_key, prefix, key_prefix, files):
|
||||||
args = [
|
args = [
|
||||||
's3put',
|
's3put',
|
||||||
|
|
|
@ -11,13 +11,17 @@ SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
def main():
|
def main():
|
||||||
os.chdir(SOURCE_ROOT)
|
os.chdir(SOURCE_ROOT)
|
||||||
|
|
||||||
|
config = 'D'
|
||||||
|
if len(sys.argv) == 2 and sys.argv[1] == '-R':
|
||||||
|
config = 'R'
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
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')
|
'Contents', 'MacOS', 'Atom')
|
||||||
elif sys.platform == 'win32':
|
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:
|
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:])
|
subprocess.check_call([atom_shell, 'spec'] + sys.argv[1:])
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ def main():
|
||||||
download_and_unzip('Squirrel')
|
download_and_unzip('Squirrel')
|
||||||
elif sys.platform in ['cygwin', 'win32']:
|
elif sys.platform in ['cygwin', 'win32']:
|
||||||
download_and_unzip('directxsdk')
|
download_and_unzip('directxsdk')
|
||||||
download_and_unzip('vs2012_crt')
|
|
||||||
|
|
||||||
with open(version_file, 'w') as f:
|
with open(version_file, 'w') as f:
|
||||||
f.write(VERSION)
|
f.write(VERSION)
|
||||||
|
|
|
@ -4,7 +4,7 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
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__)))
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
|
@ -14,7 +14,7 @@ def main():
|
||||||
os.chdir(SOURCE_ROOT)
|
os.chdir(SOURCE_ROOT)
|
||||||
|
|
||||||
update_external_binaries()
|
update_external_binaries()
|
||||||
update_gyp()
|
return update_gyp()
|
||||||
|
|
||||||
|
|
||||||
def update_external_binaries():
|
def update_external_binaries():
|
||||||
|
@ -23,28 +23,30 @@ def update_external_binaries():
|
||||||
|
|
||||||
|
|
||||||
def update_gyp():
|
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
|
python = sys.executable
|
||||||
arch = DIST_ARCH
|
if sys.platform == 'cygwin':
|
||||||
if sys.platform == 'darwin':
|
# Force using win32 python on cygwin.
|
||||||
# Only have 64bit build on OS X.
|
python = os.path.join('vendor', 'python_26', 'python.exe')
|
||||||
arch = 'x64'
|
gyp = os.path.join('vendor', 'brightray', 'vendor', 'gyp', 'gyp_main.py')
|
||||||
elif sys.platform in ['cygwin', 'win32']:
|
defines = [
|
||||||
# Only have 32bit build on Windows.
|
'-Dlibchromiumcontent_component={0}'.format(component),
|
||||||
arch = 'ia32'
|
'-Dtarget_arch={0}'.format(target_arch),
|
||||||
if sys.platform == 'cygwin':
|
'-Dlibrary=static_library',
|
||||||
# Force using win32 python on cygwin.
|
]
|
||||||
python = os.path.join('vendor', 'python_26', 'python.exe')
|
return subprocess.call([python, gyp, '-f', 'ninja', '--depth', '.',
|
||||||
|
'atom.gyp', '-Icommon.gypi'] + defines)
|
||||||
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 __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|
|
@ -5,7 +5,8 @@ import hashlib
|
||||||
import os
|
import os
|
||||||
import tempfile
|
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/'
|
DIST_URL = 'https://atom.io/download/atom-shell/'
|
||||||
|
|
31
script/upload-index-json.py
Executable file
31
script/upload-index-json.py
Executable 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())
|
|
@ -7,14 +7,14 @@ import shutil
|
||||||
import sys
|
import sys
|
||||||
import tarfile
|
import tarfile
|
||||||
|
|
||||||
from lib.config import TARGET_PLATFORM
|
from lib.config import PLATFORM, get_target_arch, s3_config
|
||||||
from lib.util import execute, safe_mkdir, scoped_cwd, s3_config, s3put
|
from lib.util import execute, safe_mkdir, scoped_cwd, s3put
|
||||||
|
|
||||||
|
|
||||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
|
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
|
||||||
NODE_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'node')
|
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 = [
|
HEADERS_SUFFIX = [
|
||||||
'.h',
|
'.h',
|
||||||
|
@ -47,11 +47,6 @@ def main():
|
||||||
bucket, access_key, secret_key = s3_config()
|
bucket, access_key, secret_key = s3_config()
|
||||||
upload_node(bucket, access_key, secret_key, args.version)
|
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():
|
def parse_args():
|
||||||
parser = argparse.ArgumentParser(description='upload sumsha file')
|
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,
|
s3put(bucket, access_key, secret_key, DIST_DIR,
|
||||||
'atom-shell/dist/{0}'.format(version), glob.glob('node-*.tar.gz'))
|
'atom-shell/dist/{0}'.format(version), glob.glob('node-*.tar.gz'))
|
||||||
|
|
||||||
if TARGET_PLATFORM == 'win32':
|
if PLATFORM == 'win32':
|
||||||
# Generate the node.lib.
|
if get_target_arch() == 'ia32':
|
||||||
build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
|
node_lib = os.path.join(DIST_DIR, 'node.lib')
|
||||||
execute([sys.executable, build, '-c', 'Release', '-t', 'generate_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.
|
# Copy atom.lib to node.lib
|
||||||
node_lib = os.path.join(OUT_DIR, 'node.lib')
|
atom_lib = os.path.join(OUT_DIR, 'node.dll.lib')
|
||||||
s3put(bucket, access_key, secret_key, OUT_DIR,
|
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])
|
'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__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|
|
@ -3,15 +3,16 @@
|
||||||
import os
|
import os
|
||||||
import glob
|
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__)))
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
SYMBOLS_DIR = 'dist\\symbols'
|
SYMBOLS_DIR = 'dist\\symbols'
|
||||||
DOWNLOAD_DIR = 'vendor\\brightray\\vendor\\download\\libchromiumcontent'
|
DOWNLOAD_DIR = 'vendor\\brightray\\vendor\\download\\libchromiumcontent'
|
||||||
PDB_LIST = [
|
PDB_LIST = [
|
||||||
'out\\Release\\atom.exe.pdb',
|
'out\\R\\atom.exe.pdb',
|
||||||
DOWNLOAD_DIR + '\\Release\\chromiumcontent.dll.pdb',
|
'out\\R\\node.dll.pdb',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
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, \
|
from lib.util import execute, get_atom_shell_version, parse_version, \
|
||||||
get_chromedriver_version, scoped_cwd
|
get_chromedriver_version, scoped_cwd
|
||||||
from lib.github import GitHub
|
from lib.github import GitHub
|
||||||
|
@ -18,17 +18,17 @@ ATOM_SHELL_VERSION = get_atom_shell_version()
|
||||||
CHROMEDRIVER_VERSION = get_chromedriver_version()
|
CHROMEDRIVER_VERSION = get_chromedriver_version()
|
||||||
|
|
||||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
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_DIR = os.path.join(SOURCE_ROOT, 'dist')
|
||||||
DIST_NAME = 'atom-shell-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
|
DIST_NAME = 'atom-shell-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
|
||||||
TARGET_PLATFORM,
|
PLATFORM,
|
||||||
DIST_ARCH)
|
get_target_arch())
|
||||||
SYMBOLS_NAME = 'atom-shell-{0}-{1}-{2}-symbols.zip'.format(ATOM_SHELL_VERSION,
|
SYMBOLS_NAME = 'atom-shell-{0}-{1}-{2}-symbols.zip'.format(ATOM_SHELL_VERSION,
|
||||||
TARGET_PLATFORM,
|
PLATFORM,
|
||||||
DIST_ARCH)
|
get_target_arch())
|
||||||
CHROMEDRIVER_NAME = 'chromedriver-{0}-{1}-{2}.zip'.format(CHROMEDRIVER_VERSION,
|
CHROMEDRIVER_NAME = 'chromedriver-{0}-{1}-{2}.zip'.format(CHROMEDRIVER_VERSION,
|
||||||
TARGET_PLATFORM,
|
PLATFORM,
|
||||||
DIST_ARCH)
|
get_target_arch())
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -46,9 +46,26 @@ def main():
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
# Upload atom-shell with GitHub Releases API.
|
|
||||||
github = GitHub(auth_token())
|
github = GitHub(auth_token())
|
||||||
release_id = create_or_get_release_draft(github, args.version)
|
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, DIST_NAME))
|
||||||
upload_atom_shell(github, release_id, os.path.join(DIST_DIR, SYMBOLS_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,
|
upload_atom_shell(github, release_id,
|
||||||
os.path.join(DIST_DIR, CHROMEDRIVER_NAME))
|
os.path.join(DIST_DIR, CHROMEDRIVER_NAME))
|
||||||
|
|
||||||
if args.publish_release:
|
if PLATFORM == 'win32':
|
||||||
if TARGET_PLATFORM == 'win32':
|
# Upload PDBs to Windows symbol server.
|
||||||
# Upload PDBs to Windows symbol server.
|
execute([sys.executable,
|
||||||
execute([sys.executable,
|
os.path.join(SOURCE_ROOT, 'script', 'upload-windows-pdb.py')])
|
||||||
os.path.join(SOURCE_ROOT, 'script', 'upload-windows-pdb.py')])
|
|
||||||
|
|
||||||
# Upload node headers.
|
# Upload node headers.
|
||||||
execute([sys.executable,
|
execute([sys.executable,
|
||||||
os.path.join(SOURCE_ROOT, 'script', 'upload-node-headers.py'),
|
os.path.join(SOURCE_ROOT, 'script', 'upload-node-headers.py'),
|
||||||
'-v', ATOM_SHELL_VERSION])
|
'-v', ATOM_SHELL_VERSION])
|
||||||
|
|
||||||
# Press the publish button.
|
|
||||||
publish_release(github, release_id)
|
|
||||||
|
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
|
@ -83,13 +96,13 @@ def parse_args():
|
||||||
|
|
||||||
|
|
||||||
def get_atom_shell_build_version():
|
def get_atom_shell_build_version():
|
||||||
if TARGET_PLATFORM == 'darwin':
|
if PLATFORM == 'darwin':
|
||||||
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'Release', 'Atom.app',
|
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'R', 'Atom.app',
|
||||||
'Contents', 'MacOS', 'Atom')
|
'Contents', 'MacOS', 'Atom')
|
||||||
elif TARGET_PLATFORM == 'win32':
|
elif PLATFORM == 'win32':
|
||||||
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'Release', 'atom.exe')
|
atom_shell = os.path.join(SOURCE_ROOT, 'out', 'R', 'atom.exe')
|
||||||
else:
|
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()
|
return subprocess.check_output([atom_shell, '--version']).strip()
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,9 @@ describe 'crash-reporter module', ->
|
||||||
beforeEach -> w = new BrowserWindow(show: false)
|
beforeEach -> w = new BrowserWindow(show: false)
|
||||||
afterEach -> w.destroy()
|
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) ->
|
it 'should send minidump when renderer crashes', (done) ->
|
||||||
@timeout 60000
|
@timeout 60000
|
||||||
server = http.createServer (req, res) ->
|
server = http.createServer (req, res) ->
|
||||||
|
|
|
@ -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)
|
|
|
@ -17,16 +17,10 @@ function getDate() {
|
||||||
return year + '-' + month + '-' + day;
|
return year + '-' + month + '-' + day;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getApmVersion() {
|
|
||||||
var package = require(path.resolve(__dirname, '..', 'package.json'));
|
|
||||||
return package.devDependencies['atom-package-manager'];
|
|
||||||
}
|
|
||||||
|
|
||||||
function getInfoForCurrentVersion() {
|
function getInfoForCurrentVersion() {
|
||||||
var json = {};
|
var json = {};
|
||||||
json.version = process.versions['atom-shell'];
|
json.version = process.versions['atom-shell'];
|
||||||
json.date = getDate();
|
json.date = getDate();
|
||||||
json.apm = getApmVersion();
|
|
||||||
|
|
||||||
var names = ['node', 'v8', 'uv', 'zlib', 'openssl', 'modules', 'chrome']
|
var names = ['node', 'v8', 'uv', 'zlib', 'openssl', 'modules', 'chrome']
|
||||||
for (var i in names) {
|
for (var i in names) {
|
||||||
|
@ -43,6 +37,8 @@ function getInfoForCurrentVersion() {
|
||||||
'linux-x64-symbols',
|
'linux-x64-symbols',
|
||||||
'win32-ia32',
|
'win32-ia32',
|
||||||
'win32-ia32-symbols',
|
'win32-ia32-symbols',
|
||||||
|
'win32-x64',
|
||||||
|
'win32-x64-symbols',
|
||||||
];
|
];
|
||||||
|
|
||||||
return json;
|
return json;
|
|
@ -61,8 +61,10 @@ def FindBundlePart(full_path):
|
||||||
|
|
||||||
def GetDSYMBundle(options, binary_path):
|
def GetDSYMBundle(options, binary_path):
|
||||||
"""Finds the .dSYM bundle to the binary."""
|
"""Finds the .dSYM bundle to the binary."""
|
||||||
if binary_path[0] == '/' or binary_path == '':
|
if os.path.isabs(binary_path):
|
||||||
return binary_path
|
dsym_path = binary_path + '.dSYM'
|
||||||
|
if os.path.exists(dsym_path):
|
||||||
|
return dsym_path
|
||||||
|
|
||||||
filename = FindBundlePart(binary_path)
|
filename = FindBundlePart(binary_path)
|
||||||
search_dirs = [options.build_dir, options.libchromiumcontent_dir]
|
search_dirs = [options.build_dir, options.libchromiumcontent_dir]
|
||||||
|
|
6
tools/win/generate_breakpad_symbols.py
Normal file → Executable file
6
tools/win/generate_breakpad_symbols.py
Normal file → Executable file
|
@ -47,11 +47,6 @@ def mkdir_p(path):
|
||||||
else: raise
|
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):
|
def GenerateSymbols(options, binaries):
|
||||||
"""Dumps the symbols of binary and places them in the given directory."""
|
"""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, '*.exe.pdb'))
|
||||||
pdbs += glob.glob(os.path.join(directory, '*.dll.pdb'))
|
pdbs += glob.glob(os.path.join(directory, '*.dll.pdb'))
|
||||||
|
|
||||||
RegisterRequiredDll();
|
|
||||||
GenerateSymbols(options, pdbs)
|
GenerateSymbols(options, pdbs)
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
2
vendor/breakpad
vendored
2
vendor/breakpad
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 1e937567e92d2c3beed4556f3c68a4b0362b1e6d
|
Subproject commit 4427c1170387afe46eb3fad259436f1f9f5efa86
|
2
vendor/brightray
vendored
2
vendor/brightray
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit f71216bd73014199df70425a01dd269ba2dd0c6c
|
Subproject commit ec0a660b0b70e6ea5a4ee760a753b8fac31a5de2
|
2
vendor/node
vendored
2
vendor/node
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 790c4a3af36144fcdd5fe39d0cb6cd622f282434
|
Subproject commit da4d745446fcc63bfc205477703533712dd01e2c
|
Loading…
Reference in a new issue