@@ -54,55 +54,40 @@ config("branding") {
5454}
5555
5656npm_action (" atom_browserify_sandbox" ) {
57- deps = [
58- " :atom_js2c_copy" ,
59- ]
57+ script = " browserify"
6058
61- sandbox_args = [
62- " lib/sandboxed_renderer/init.js" ,
63- " -r" ,
64- " ./lib/sandboxed_renderer/api/exports/electron.js:electron" ,
65- " -t" ,
66- " aliasify" ,
59+ outputs = [
60+ " $target_gen_dir /js2c/preload_bundle.js" ,
6761 ]
6862
69- inputs = [
63+ args = [
7064 # FIXME(zcbenz): The dependencies of these files are not listed here, so
7165 # the generated file will be out-dated when dependencies are modified.
7266 # Use a script to generate all dependencies and put them here.
7367 " lib/sandboxed_renderer/init.js" ,
74- " lib/sandboxed_renderer/api/exports/electron.js" ,
75- ]
76- outputs = [
77- " $target_gen_dir /js2c/preload_bundle.js" ,
68+ " -r" ,
69+ " ./lib/sandboxed_renderer/api/exports/electron.js:electron" ,
70+ " -t" ,
71+ " aliasify" ,
72+ " -o" ,
73+ rebase_path (outputs [0 ]),
7874 ]
79-
80- script = " browserify"
81- args = sandbox_args + [
82- " -o" ,
83- rebase_path (outputs [0 ]),
84- ]
8575}
8676
8777npm_action (" atom_browserify_isolated" ) {
88- deps = [
89- " :atom_js2c_copy" ,
90- ]
78+ script = " browserify"
9179
92- inputs = [
93- " lib/isolated_renderer/init.js" ,
94- ]
9580 outputs = [
9681 " $target_gen_dir /js2c/isolated_bundle.js" ,
9782 ]
9883
99- script = " browserify "
100- args = inputs + [
101- " -t" ,
102- " aliasify" ,
103- " -o" ,
104- rebase_path (outputs [0 ]),
105- ]
84+ args = [
85+ " lib/isolated_renderer/init.js " ,
86+ " -t" ,
87+ " aliasify" ,
88+ " -o" ,
89+ rebase_path (outputs [0 ]),
90+ ]
10691}
10792
10893copy (" atom_js2c_copy" ) {
@@ -122,23 +107,24 @@ action("atom_js2c") {
122107 " :atom_js2c_copy" ,
123108 ]
124109
125- js2c_sources = filenames .js2 c_sources
126-
127110 browserify_sources = [
128111 " $target_gen_dir /js2c/isolated_bundle.js" ,
129112 " $target_gen_dir /js2c/preload_bundle.js" ,
130113 ]
131114
132- inputs = js2c_sources + browserify_sources
115+ sources = browserify_sources + [
116+ " $target_gen_dir /js2c/asar.js" ,
117+ " $target_gen_dir /js2c/asar_init.js" ,
118+ ]
133119
134120 outputs = [
135- " $target_gen_dir /atom_natives.h " ,
121+ " $root_gen_dir /atom_natives.cc " ,
136122 ]
137123
138124 script = " tools/js2c.py"
139125 args = [ rebase_path (" //third_party/electron_node" ) ] +
140126 rebase_path (outputs , root_build_dir ) +
141- [ rebase_path (" $target_gen_dir /js2c " , root_build_dir ) ]
127+ rebase_path (sources , root_build_dir )
142128}
143129
144130asar (" js2asar" ) {
@@ -337,8 +323,6 @@ static_library("electron_lib") {
337323 sources = filenames .lib_sources
338324 set_sources_assignment_filter (sources_assignment_filter )
339325
340- sources += [ " $target_gen_dir /atom_natives.h" ]
341-
342326 if (is_component_build ) {
343327 defines += [ " NODE_SHARED_MODE" ]
344328 }
0 commit comments