From: Cheng Zhao Date: Mon, 6 Apr 2015 06:21:21 +0000 (+0800) Subject: win: Fix linking X-Git-Tag: v0.23.0~5^2~50 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=938069a389ea5f5cdb7ffc12418fc27b10d4a611;p=electron.git win: Fix linking --- diff --git a/atom.gyp b/atom.gyp index 3c672817..3e152660 100644 --- a/atom.gyp +++ b/atom.gyp @@ -124,7 +124,6 @@ { 'destination': '<(PRODUCT_DIR)', 'files': [ - '<(libchromiumcontent_dir)/chromiumcontent.dll', '<(libchromiumcontent_dir)/ffmpegsumo.dll', '<(libchromiumcontent_dir)/libEGL.dll', '<(libchromiumcontent_dir)/libGLESv2.dll', @@ -232,6 +231,14 @@ ], }, '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/openssl/openssl.gyp:openssl', + 'vendor/node/deps/uv/uv.gyp:libuv', + 'vendor/node/deps/zlib/zlib.gyp:zlib', + # Build with breakpad support. 'vendor/breakpad/breakpad.gyp:breakpad_handler', 'vendor/breakpad/breakpad.gyp:breakpad_sender', ], @@ -621,8 +628,7 @@ { 'action_name': 'Create node.lib', 'inputs': [ - '<(PRODUCT_DIR)/node.dll.lib', - '<(libchromiumcontent_dir)/chromiumcontent.dll.lib', + '<(PRODUCT_DIR)/<(project_name).lib', ], 'outputs': [ '<(PRODUCT_DIR)/node.lib', diff --git a/atom/common/node_bindings.cc b/atom/common/node_bindings.cc index 1ff9c168..05cdbe3c 100644 --- a/atom/common/node_bindings.cc +++ b/atom/common/node_bindings.cc @@ -27,6 +27,32 @@ using content::BrowserThread; #define REFERENCE_MODULE(name) \ extern "C" void _register_ ## name(void); \ void (*fp_register_ ## name)(void) = _register_ ## name +#if defined(OS_WIN) +// On Windows Node is built as static_library so we need to reference Node's +// builtin modules. +REFERENCE_MODULE(cares_wrap); +REFERENCE_MODULE(fs_event_wrap); +REFERENCE_MODULE(buffer); +REFERENCE_MODULE(contextify); +REFERENCE_MODULE(crypto); +REFERENCE_MODULE(fs); +REFERENCE_MODULE(http_parser); +REFERENCE_MODULE(os); +REFERENCE_MODULE(v8); +REFERENCE_MODULE(zlib); +REFERENCE_MODULE(pipe_wrap); +REFERENCE_MODULE(process_wrap); +REFERENCE_MODULE(signal_wrap); +REFERENCE_MODULE(smalloc); +REFERENCE_MODULE(spawn_sync); +REFERENCE_MODULE(tcp_wrap); +REFERENCE_MODULE(timer_wrap); +REFERENCE_MODULE(tls_wrap); +REFERENCE_MODULE(tty_wrap); +REFERENCE_MODULE(udp_wrap); +REFERENCE_MODULE(uv); +REFERENCE_MODULE(js_stream); +#endif // defined(OS_WIN) // Atom Shell's builtin modules. REFERENCE_MODULE(atom_browser_app); REFERENCE_MODULE(atom_browser_auto_updater); diff --git a/atom/common/node_includes.h b/atom/common/node_includes.h index 0c4189b2..80567cbd 100644 --- a/atom/common/node_includes.h +++ b/atom/common/node_includes.h @@ -7,8 +7,6 @@ // Include common headers for using node APIs. -#define BUILDING_NODE_EXTENSION - #undef ASSERT #undef CHECK #undef CHECK_EQ diff --git a/common.gypi b/common.gypi index 7e573013..c63bcd84 100644 --- a/common.gypi +++ b/common.gypi @@ -115,9 +115,7 @@ }, }], ['OS=="win"', { - 'libraries': [ - '<(libchromiumcontent_root_dir)/shared_library/v8.dll.lib', - ], + 'type': 'static_library', }], ['OS=="linux"', { 'cflags': [ '-fPIC' ], diff --git a/vendor/brightray b/vendor/brightray index 5c114133..cd70f45a 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit 5c1141338e1a6abee87583f708e61236ac2a9c35 +Subproject commit cd70f45a19dcb73b15d9e9567ee082330a168a85