OLD | NEW |
1 # Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2008 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import os | |
6 import re | |
7 | |
8 Import('env') | 5 Import('env') |
9 | 6 |
10 env = env.Clone( | 7 env = env.Clone( |
| 8 GEARS_DIR = ".", |
11 OPEN_DIR = "$GEARS_DIR/googleclient/gears/opensource/gears", | 9 OPEN_DIR = "$GEARS_DIR/googleclient/gears/opensource/gears", |
12 THIRD_PARTY_DIR = "$GEARS_DIR/googleclient/gears/opensource/third_party", | 10 THIRD_PARTY_DIR = "$GEARS_DIR/googleclient/gears/opensource/third_party", |
13 GENFILES_DIR = "$GEARS_DIR/genfiles", | 11 GENFILES_DIR = "$GEARS_DIR/genfiles", |
14 PRIVATE_THIRD_PARTY_DIR = "$GEARS_DIR/googleclient/third_party", | 12 PRIVATE_THIRD_PARTY_DIR = "$GEARS_DIR/googleclient/third_party", |
15 ) | 13 ) |
16 | 14 |
17 # Notes: | |
18 # This assumes you have a working gears checkout from p4 in the current dir. | |
19 # Steps for this: | |
20 # > echo %USER%-chromegears > p4config | |
21 # > g4 client -p //depot/googleclient/gears/p4_depot_paths | |
22 # > g4 sync | |
23 # | |
24 # This is a work-in-progress conversion of the current Gears set of Makefiles. | |
25 # A lot of the stuff doesn't translate to SCons-land well, and I'm not sure | |
26 # how faithful we want to be to the original. | |
27 # | |
28 # Questions: | |
29 # Should we flatten the output directory into | |
30 # Hammer/gears/platform/browser/*.obj like Gears does now? If so, how? | |
31 # | |
32 # TODO: split into env_common, env_browser, etc? | |
33 # common_* stuff will be built once, and object reused for all browser builds. | |
34 # browser_* stuff will be rebuilt for each different type of BROWSER define. | |
35 # - How do we do this? We want browser_ stuff under a different dir so | |
36 # BROWSER=NPAPI doesn't overwrite BROWSER=FF3's object files. | |
37 # Maybe put all the browser stuff in a separate .lib, and use variant_dir | |
38 # on a SConscript.browser? | |
39 | |
40 # Argument switches | 15 # Argument switches |
41 vars = Variables(None, ARGUMENTS) | 16 vars = Variables(None, ARGUMENTS) |
42 vars.AddVariables( | 17 vars.AddVariables( |
43 EnumVariable('BROWSER', | 18 EnumVariable('BROWSER', |
44 'Which browser we want to build the plugin for', | 19 'Which browser we want to build the plugin for', |
45 'NPAPI', ['IE', 'FF2', 'FF3', 'SF', 'NPAPI']), | 20 'NPAPI', ['IE', 'FF2', 'FF3', 'SF', 'NPAPI']), |
46 EnumVariable('MODE', | 21 EnumVariable('MODE', |
47 'Type of binary to generate', | 22 'Type of binary to generate', |
48 'dbg', ['dbg', 'opt']), | 23 'dbg', ['dbg', 'opt']), |
49 BoolVariable('OFFICIAL_BUILD', | 24 BoolVariable('OFFICIAL_BUILD', |
50 'Create a binary suitable for public release', 0) | 25 'Create a binary suitable for public release', 0) |
51 ) | 26 ) |
52 vars.Update(env) | 27 vars.Update(env) |
53 | 28 |
54 env.Prepend( | 29 env.Append( |
55 USING_CCTESTS = (env['MODE'] == 'dbg' or not env['OFFICIAL_BUILD']) | 30 USING_CCTESTS = (env['MODE'] == 'dbg' or not env['OFFICIAL_BUILD']) |
56 ) | 31 ) |
57 | 32 |
58 # Version | 33 # Version |
59 env.Prepend( | 34 env.Append( |
60 MAJOR = '0', | 35 MAJOR = '0', |
61 MINOR = '4', | 36 MINOR = '4', |
62 BUILD = '17', | 37 BUILD = '17', |
63 PATCH = '0', | 38 PATCH = '0', |
64 VERSION = '${MAJOR}.${MINOR}.${BUILD}.${PATCH}', | 39 VERSION = '${MAJOR}.${MINOR}.${BUILD}.${PATCH}', |
65 | 40 |
66 FRIENDLY_NAME = 'Gears', | 41 FRIENDLY_NAME = 'Gears', |
67 SHORT_NAME = 'gears', | 42 SHORT_NAME = 'gears', |
68 ) | 43 ) |
69 | 44 |
70 # Platform | 45 # Platform |
71 env.Prepend( | 46 env.Append( |
72 OS = '$PLATFORM', | 47 OS = '$PLATFORM', |
73 ARCH = 'i386', | 48 ARCH = 'i386', |
74 ) | 49 ) |
75 | 50 |
76 | 51 # C++ build flags. |
77 # Building M4 files | |
78 | |
79 env.Tool('m4') | |
80 | |
81 # Add GNU tools to the PATH. | |
82 # TODO: Figure out the right way to do this. On first invocation, PATH | |
83 # is relative to '.'. On repeated invocations (when Hammer/gears exists), | |
84 # PATH is relative to './Hammer/gears'. | |
85 # TODO: Also it would be nice to use $THIRD_PARTY_DIR instead of hardcoding | |
86 # it here. | |
87 env.PrependENVPath('PATH', os.path.abspath( | |
88 'googleclient/third_party/gnu/files')) | |
89 env.PrependENVPath('PATH', os.path.abspath( | |
90 '../../googleclient/third_party/gnu/files')) | |
91 env.PrependENVPath('PATH', os.path.abspath( | |
92 'googleclient/third_party/python_24')) | |
93 env.PrependENVPath('PATH', os.path.abspath( | |
94 '../../googleclient/third_party/python_24')) | |
95 | |
96 i18n_langs = [ | |
97 'en-US', | |
98 'ar', | |
99 'bg', | |
100 'ca', | |
101 'cs', | |
102 'da', | |
103 'de', | |
104 'el', | |
105 'en-GB', | |
106 'es', | |
107 'et', | |
108 'fa', | |
109 'fi', | |
110 'fil', | |
111 'fr', | |
112 'he', | |
113 'hi', | |
114 'hr', | |
115 'hu', | |
116 'id', | |
117 'is', | |
118 'it', | |
119 'ja', | |
120 'ko', | |
121 'lt', | |
122 'lv', | |
123 'ms', | |
124 'nl', | |
125 'no', | |
126 'pl', | |
127 'pt-BR', | |
128 'pt-PT', | |
129 'ro', | |
130 'ru', | |
131 'sk', | |
132 'sl', | |
133 'sr', | |
134 'sv', | |
135 'th', | |
136 'tr', | |
137 'uk', | |
138 'ur', | |
139 'vi', | |
140 'zh-CN', | |
141 'zh-TW', | |
142 'ml', | |
143 'te', | |
144 'gu', | |
145 'kn', | |
146 'or', | |
147 'bn', | |
148 'ta', | |
149 'mr', | |
150 ] | |
151 | |
152 # TODO: switch over to Chrome's SDK. | |
153 env.Replace( | |
154 CPPPATH = [ | |
155 '$PRIVATE_THIRD_PARTY_DIR/platformsdk_vc80/files/include', | |
156 '$PRIVATE_THIRD_PARTY_DIR/atlmfc_vc80/files/include', | |
157 ], | |
158 ) | |
159 | |
160 # TODO: DEBUG, OFFICIAL_BUILD, CCTESTS, I18N_LANGUAGES | |
161 env.Prepend( | |
162 M4FLAGS = [ | |
163 '--prefix-builtins', | |
164 '-DDEBUG=1', | |
165 '-DPRODUCT_VERSION=$VERSION', | |
166 '-DPRODUCT_VERSION_MAJOR=$MAJOR', | |
167 '-DPRODUCT_VERSION_MINOR=$MINOR', | |
168 '-DPRODUCT_VERSION_BUILD=$BUILD', | |
169 '-DPRODUCT_VERSION_PATCH=$PATCH', | |
170 '-DPRODUCT_OS=$OS', | |
171 '-DPRODUCT_ARCH=$ARCH', | |
172 '-DPRODUCT_GCC_VERSION="gcc3"', | |
173 '-DPRODUCT_MAINTAINER="google"', | |
174 '-DPRODUCT_FRIENDLY_NAME_UQ="$FRIENDLY_NAME"', | |
175 '-DPRODUCT_SHORT_NAME_UQ="$SHORT_NAME"', | |
176 '-DI18N_LANGUAGES=' + ','.join(i18n_langs), | |
177 ], | |
178 M4PATH = [ | |
179 '$OPEN_DIR', | |
180 '$GEARS_DIR', | |
181 ], | |
182 ) | |
183 | |
184 # SCons magic to make M4PATH work. | |
185 env['M4INCPREFIX'] = '-I' | |
186 env['M4INCSUFFIX'] = '' | |
187 env['_M4INCFLAGS'] = ('${_concat(M4INCPREFIX, M4PATH, M4INCSUFFIX, ' + | |
188 '__env__, RDirs, TARGET, SOURCE)}') | |
189 env['M4COM'] = '$M4 $M4FLAGS ${_M4INCFLAGS} $SOURCE > $TARGET' | |
190 | |
191 # TODO: Dependency scanner for m4 files - doesn't work. | |
192 #m4_include_re = re.compile(r'm4_include\((.*)\)', re.M) | |
193 #def m4_scan(node, env, path): | |
194 # contents = node.get_contents() | |
195 # includes = m4_include_re.findall(contents) | |
196 # ret_includes = [] | |
197 # for include in includes: | |
198 # for dir in path: | |
199 # file = os.path.join(dir, include) | |
200 # if os.path.exists(file): | |
201 # ret_includes.append(file) | |
202 # break | |
203 # return ret_includes | |
204 # | |
205 #m4_scanner = Scanner(function = m4_scan, skeys = ['.m4', '.html_m4']) | |
206 #env.Append(SCANNERS = m4_scanner) | |
207 | |
208 | |
209 # Building .stab files, using M4FLAGS. | |
210 | |
211 # TODO: I want to just use $OPEN_DIR/tools/parse_stab.py. I need a way to | |
212 # convert from build dir to src dir. ${OPEN_DIR.srcdir} doesn't work. | |
213 env['STAB'] = 'python googleclient/gears/opensource/gears/tools/parse_stab.py' | |
214 env['STRIPPED_GEARS_DIR'] = env.Dir('$GEARS_DIR') | |
215 env['I18N_INPUTS_BASEDIR'] = '$STRIPPED_GEARS_DIR/ui/generated' | |
216 env['STABCOM'] = \ | |
217 '$STAB $M4FLAGS ${_M4INCFLAGS} $TARGET $SOURCE $I18N_INPUTS_BASEDIR' | |
218 stab_builder = Builder(action = '$STABCOM', src_suffix = '.stab') | |
219 env.Append(BUILDERS = {'Stab': stab_builder}) | |
220 | |
221 # Building .from_bin.cc files. | |
222 | |
223 # Must be run from within the gears dir. | |
224 # TODO: ${SOURCE[36:]} - is this the best way to strip off the dir I cd'ed to? | |
225 env['BIN2CPP'] = \ | |
226 'cd googleclient/gears/opensource/gears && python tools/bin2cpp.py' | |
227 env['BIN2CPPCOM'] = '$BIN2CPP ${str(SOURCE)[36:]} > ${TARGET.abspath}' | |
228 bin2cpp_builder = Builder(action = '$BIN2CPPCOM') | |
229 env.Append(BUILDERS = {'Bin2cpp': bin2cpp_builder}) | |
230 | |
231 | |
232 # Building .idl files. | |
233 # This is a total mess. MIDL needs to be run from $OPEN_DIR because it's too | |
234 # stupid to apply its include paths to a relative path like "ui/ie/bla.idl" | |
235 # (it only looks in the current dir). So we have to jump through hoops to fix | |
236 # up our relative include paths and output files. | |
237 | |
238 env['IDLOUTPUTDIR'] = env.Dir('$GENFILES_DIR') | |
239 env['IDLINCPREFIX'] = '/I../../../../' | |
240 env['IDLINCSUFFIX'] = '' | |
241 env['_IDLINCFLAGS'] = ('${_concat(IDLINCPREFIX, CPPPATH, IDLINCSUFFIX, ' + | |
242 '__env__, RDirs, TARGET, SOURCE)}') | |
243 env['MIDLCOM'] = ( | |
244 'cd googleclient/gears/opensource/gears && $MIDL $CPPFLAGS ' + | |
245 '${_IDLINCFLAGS} -env win32 -Oicf ' + | |
246 '/tlb ../../../../$IDLOUTPUTDIR/${TARGET.filebase}.tlb ' + | |
247 '/h ../../../../$IDLOUTPUTDIR/${TARGET.filebase}.h ' + | |
248 '/iid ../../../../$IDLOUTPUTDIR/${TARGET.filebase}_i.c ' + | |
249 '/proxy ../../../../$IDLOUTPUTDIR/${TARGET.filebase}_p.c ' + | |
250 '/dlldata ../../../../$IDLOUTPUTDIR/${TARGET.filebase}_data.c ' + | |
251 '../../../../$SOURCE' | |
252 ) | |
253 | |
254 # Here's a quick hack to remove the .tlb file from the list of targets. Some | |
255 # of our IDL compiles don't generate one, so we don't a false dependency. | |
256 # TODO(sgk): clean up this mess! | |
257 import SCons.Builder | |
258 def MyIdlEmitter(target, source, env): | |
259 # HACK to remove .tlb file unilaterally - note that some IDLs generate a | |
260 # .tlb file, but not all. | |
261 t = target[1:] | |
262 # Write the output to the right directory. This is mostly because | |
263 # the generated html_dialog_host.h conflicts with the real | |
264 # html_dialog_host.h in the same directory (otherwise we could just use | |
265 # Install()). | |
266 t = [os.path.join(str(env.Dir('$IDLOUTPUTDIR')), os.path.basename(x)) | |
267 for x in t] | |
268 return (t, source) | |
269 b = env['BUILDERS']['TypeLibrary'] | |
270 emitter_list = [b.emitter, MyIdlEmitter] | |
271 b.emitter = SCons.Builder.ListEmitter(emitter_list) | |
272 | |
273 # C++ defines | |
274 | 52 |
275 # TODO: fix Gears to not require this removal. | 53 # TODO: fix Gears to not require this removal. |
276 env['CPPDEFINES'].remove('WIN32_LEAN_AND_MEAN') | 54 env['CPPDEFINES'].remove('WIN32_LEAN_AND_MEAN') |
277 | 55 |
278 env.Prepend( | 56 env.Replace( |
279 CPPPATH = [ | 57 CPPPATH = [ |
280 '$OPEN_DIR', | 58 '$OPEN_DIR', |
281 '$OPEN_DIR/..', | 59 '$OPEN_DIR/..', |
282 '$THIRD_PARTY_DIR', | 60 '$THIRD_PARTY_DIR', |
283 '$THIRD_PARTY_DIR/breakpad/src', | 61 '$THIRD_PARTY_DIR/breakpad/src', |
284 '$THIRD_PARTY_DIR/googleurl', | 62 '$THIRD_PARTY_DIR/googleurl', |
285 '$THIRD_PARTY_DIR/npapi', | 63 '$THIRD_PARTY_DIR/npapi', |
286 '$THIRD_PARTY_DIR/zlib', | 64 '$THIRD_PARTY_DIR/zlib', |
287 '$THIRD_PARTY_DIR/v8/bindings_local', | 65 '$THIRD_PARTY_DIR/v8/bindings_local', |
288 '$GEARS_DIR', | 66 '$GEARS_DIR', |
289 ], | 67 |
| 68 # TODO: switch over to Chrome's SDK. |
| 69 # Note: these must come last because we want our own npapi.h to take |
| 70 # precedence. |
| 71 '$PRIVATE_THIRD_PARTY_DIR/platformsdk_vc80/files/include', |
| 72 '$PRIVATE_THIRD_PARTY_DIR/atlmfc_vc80/files/include', |
| 73 ] |
290 ) | 74 ) |
291 | 75 |
292 env.Append( | 76 if env['MODE'] == 'dbg': |
293 CPPDEFINES = [ | 77 env['CPPDEFINES'] += ['DEBUG=1'] |
294 'DEBUG=1', | 78 env['CPPDEFINES'] += ['_DEBUG=1'] |
295 '_DEBUG=1', | 79 if env['USING_CCTESTS']: |
296 'USING_CCTESTS=1', | 80 env['CPPDEFINES'] += ['USING_CCTESTS=1'] |
297 ], | 81 if env['OFFICIAL_BUILD']: |
298 | 82 env['CPPDEFINES'] += ['OFFICIAL_BUILD=1'] |
299 ) | |
300 | 83 |
301 # TODO: if USING_PNG | 84 # TODO: if USING_PNG |
302 env.Append( | 85 env.Append( |
303 CPPDEFINES = [ | 86 CPPDEFINES = [ |
304 'PNG_USER_CONFIG', | 87 'PNG_USER_CONFIG', |
305 ], | 88 ], |
306 ) | 89 ) |
307 | 90 |
308 # TODO: is this needed? | 91 # TODO: is this needed? |
309 if env['PLATFORM'] == 'win32': | 92 if env['PLATFORM'] == 'win32': |
(...skipping 21 matching lines...) Expand all Loading... |
331 'XP_WIN', | 114 'XP_WIN', |
332 ], | 115 ], |
333 LINKFLAGS = [ | 116 LINKFLAGS = [ |
334 # Set the preferred base address. This value was chosen because (a) it's near | 117 # Set the preferred base address. This value was chosen because (a) it's near |
335 # the top of the valid address range, and (b) it doesn't conflict with other | 118 # the top of the valid address range, and (b) it doesn't conflict with other |
336 # DLLs loaded by Chrome in either the browser or plugin process. | 119 # DLLs loaded by Chrome in either the browser or plugin process. |
337 '/BASE:0x65000000', | 120 '/BASE:0x65000000', |
338 ], | 121 ], |
339 ) | 122 ) |
340 | 123 |
341 env.Append( | 124 # Load all the components |
342 CPPFLAGS = [ | |
343 '/wd4018' | |
344 ] | |
345 ) | |
346 | |
347 env_common = env.Clone() | |
348 env_common.Prepend( | |
349 ) | |
350 | |
351 env_browser = env.Clone() | |
352 env_browser.Prepend( | |
353 CPPDEFINES = [ | |
354 'BROWSER_${BROWSER}=1', | |
355 ], | |
356 ) | |
357 | |
358 env_browser.Append( | |
359 CPPPATH = [ | |
360 # '$LIBPNG_DIR', | |
361 # '$SKIA_DIR/include', | |
362 # '$SKIA_DIR/include/corecg', | |
363 # '$SKIA_DIR/platform', | |
364 ], | |
365 LIBS = [ | |
366 'base', | |
367 'gd', | |
368 'googleurl', | |
369 'icuuc', | |
370 'jpeg', | |
371 'modp_b64', | |
372 'png', | |
373 'portaudio', | |
374 'sqlite-gears', | |
375 # 'skia', | |
376 'zlib-gears', | |
377 ], | |
378 ) | |
379 | |
380 if env['BROWSER'] == 'IE': | |
381 env_browser.Append( | |
382 LIBS = [ | |
383 'kernel32.lib', | |
384 'user32.lib', | |
385 'gdi32.lib', | |
386 'uuid.lib', | |
387 'sensapi.lib', | |
388 'shlwapi.lib', | |
389 'shell32.lib', | |
390 'advapi32.lib', | |
391 'wininet.lib', | |
392 'comdlg32.lib', | |
393 'user32.lib', | |
394 ], | |
395 ) | |
396 | |
397 # Building resources. | |
398 env_res = env_browser.Clone() | |
399 env_res.Append( | |
400 CPPDEFINES = [ | |
401 'DEBUG=1', | |
402 '_UNICODE', | |
403 'UNICODE', | |
404 ], | |
405 CPPPATH = [ | |
406 '$GENFILES_DIR', | |
407 ], | |
408 ) | |
409 | |
410 if env['PLATFORM'] == 'win32': | |
411 env.Append( | |
412 RCFLAGS = [ | |
413 ['/l', '0x409'], | |
414 ], | |
415 ) | |
416 | |
417 | |
418 # Input file lists | |
419 | |
420 def NewInputs(): | |
421 """Returns a new dictionary of input file lists. | |
422 | |
423 Browser-specific inputs are referenced by the browser name. All browsers | |
424 include inputs from the 'all' list. 'common' inputs are built using | |
425 env_common.""" | |
426 | |
427 return { | |
428 'all': [], | |
429 'common': [], | |
430 'IE': [], | |
431 'FF2': [], | |
432 'FF3': [], | |
433 'NPAPI': [], | |
434 'SAFARI': [], | |
435 } | |
436 | |
437 srcs = NewInputs() | |
438 m4srcs = NewInputs() | |
439 html_m4srcs = NewInputs() | |
440 stabsrcs = NewInputs() | |
441 idlsrcs = NewInputs() | |
442 binsrcs = NewInputs() | |
443 | |
444 #----------------------------------------------------------------------------- | |
445 # third_party/breakpad | |
446 | |
447 srcs['NPAPI'] += [ | |
448 '$THIRD_PARTY_DIR/breakpad/src/client/exception_handler_stub.cc', | |
449 ] | |
450 | |
451 srcs['IE'] += [ | |
452 '$THIRD_PARTY_DIR/breakpad/src/client/windows/handler/exception_handler.cc', | |
453 '$THIRD_PARTY_DIR/breakpad/src/common/windows/guid_string.cc', | |
454 '$OPEN_DIR/base/common/exception_handler_win32.cc', | |
455 ] | |
456 | |
457 #----------------------------------------------------------------------------- | |
458 # third_party/v8/bindings | |
459 | |
460 srcs['NPAPI'] += [ | |
461 '$THIRD_PARTY_DIR/v8/bindings_local/npruntime.cc', | |
462 '$THIRD_PARTY_DIR/v8/bindings_local/np_v8object.cc', | |
463 '$THIRD_PARTY_DIR/v8/bindings_local/v8_helpers.cc', | |
464 '$THIRD_PARTY_DIR/v8/bindings_local/v8_np_utils.cc', | |
465 '$THIRD_PARTY_DIR/v8/bindings_local/v8_npobject.cc', | |
466 ] | |
467 | |
468 #----------------------------------------------------------------------------- | |
469 # third_party/convert_utf | |
470 | |
471 srcs['all'] += [ | |
472 '$THIRD_PARTY_DIR/convert_utf/ConvertUTF.c' | |
473 ] | |
474 | |
475 #----------------------------------------------------------------------------- | |
476 # third_party/jsoncpp | |
477 | |
478 srcs['all'] += [ | |
479 '$THIRD_PARTY_DIR/jsoncpp/json_reader.cc', | |
480 '$THIRD_PARTY_DIR/jsoncpp/json_value.cc', | |
481 '$THIRD_PARTY_DIR/jsoncpp/json_writer.cc', | |
482 ] | |
483 | |
484 #----------------------------------------------------------------------------- | |
485 # third_party/modp_b64 | |
486 | |
487 # We're using Chrome's version. Uncomment if that doesn't work. | |
488 srcs['all'] += [ | |
489 # '$THIRD_PARTY_DIR/modp_b64/modp_b64.cc', | |
490 ] | |
491 | |
492 #----------------------------------------------------------------------------- | |
493 # base/common | |
494 | |
495 m4srcs['common'] = [ | |
496 '$OPEN_DIR/base/common/product_constants.h.m4', | |
497 ] | |
498 | |
499 m4srcs['all'] = [ | |
500 '$OPEN_DIR/base/common/product_version.rc.m4' | |
501 ] | |
502 | |
503 srcs['all'] += [ | |
504 '$OPEN_DIR/base/common/async_router.cc', | |
505 '$OPEN_DIR/base/common/base_class.cc', | |
506 '$OPEN_DIR/base/common/base64.cc', | |
507 '$OPEN_DIR/base/common/byte_store.cc', | |
508 '$OPEN_DIR/base/common/byte_store_test.cc', | |
509 '$OPEN_DIR/base/common/circular_buffer_test.cc', | |
510 '$OPEN_DIR/base/common/database_name_table.cc', | |
511 '$OPEN_DIR/base/common/event.cc', | |
512 '$OPEN_DIR/base/common/event_test.cc', | |
513 '$OPEN_DIR/base/common/file.cc', | |
514 '$OPEN_DIR/base/common/file_test.cc', | |
515 '$OPEN_DIR/base/common/html_event_monitor.cc', | |
516 '$OPEN_DIR/base/common/http_utils.cc', | |
517 '$OPEN_DIR/base/common/js_dom_element.cc', | |
518 '$OPEN_DIR/base/common/js_marshal.cc', | |
519 '$OPEN_DIR/base/common/js_runner_utils.cc', | |
520 '$OPEN_DIR/base/common/js_types.cc', | |
521 '$OPEN_DIR/base/common/leak_counter.cc', | |
522 '$OPEN_DIR/base/common/memory_buffer.cc', | |
523 '$OPEN_DIR/base/common/memory_buffer_test.cc', | |
524 '$OPEN_DIR/base/common/message_queue.cc', | |
525 '$OPEN_DIR/base/common/message_service.cc', | |
526 '$OPEN_DIR/base/common/message_service_test.cc', | |
527 '$OPEN_DIR/base/common/mime_detect.cc', | |
528 '$OPEN_DIR/base/common/mutex.cc', | |
529 '$OPEN_DIR/base/common/mutex_posix.cc', | |
530 '$OPEN_DIR/base/common/mutex_test.cc', | |
531 '$OPEN_DIR/base/common/mutex_win32.cc', | |
532 '$OPEN_DIR/base/common/name_value_table.cc', | |
533 '$OPEN_DIR/base/common/name_value_table_test.cc', | |
534 '$OPEN_DIR/base/common/paths.cc', | |
535 '$OPEN_DIR/base/common/permissions_db.cc', | |
536 '$OPEN_DIR/base/common/permissions_db_test.cc', | |
537 '$OPEN_DIR/base/common/permissions_manager.cc', | |
538 '$OPEN_DIR/base/common/position_table.cc', | |
539 '$OPEN_DIR/base/common/process_utils_win32.cc', | |
540 '$OPEN_DIR/base/common/png_utils.cc', | |
541 '$OPEN_DIR/base/common/scoped_refptr_test.cc', | |
542 '$OPEN_DIR/base/common/security_model.cc', | |
543 '$OPEN_DIR/base/common/security_model_test.cc', | |
544 '$OPEN_DIR/base/common/serialization.cc', | |
545 '$OPEN_DIR/base/common/serialization_test.cc', | |
546 '$OPEN_DIR/base/common/shortcut_table.cc', | |
547 '$OPEN_DIR/base/common/sqlite_wrapper.cc', | |
548 '$OPEN_DIR/base/common/sqlite_wrapper_test.cc', | |
549 '$OPEN_DIR/base/common/stopwatch.cc', | |
550 '$OPEN_DIR/base/common/stopwatch_posix.cc', | |
551 '$OPEN_DIR/base/common/stopwatch_win32.cc', | |
552 '$OPEN_DIR/base/common/string16.cc', | |
553 '$OPEN_DIR/base/common/string_utils.cc', | |
554 '$OPEN_DIR/base/common/string_utils_osx.cc', | |
555 '$OPEN_DIR/base/common/string_utils_test.cc', | |
556 '$OPEN_DIR/base/common/thread.cc', | |
557 '$OPEN_DIR/base/common/thread_locals.cc', | |
558 '$OPEN_DIR/base/common/thread_posix.cc', | |
559 '$OPEN_DIR/base/common/thread_win32.cc', | |
560 '$OPEN_DIR/base/common/timed_call.cc', | |
561 '$OPEN_DIR/base/common/timed_call_test.cc', | |
562 '$OPEN_DIR/base/common/url_utils.cc', | |
563 '$OPEN_DIR/base/common/url_utils_test.cc', | |
564 ] | |
565 | |
566 #----------------------------------------------------------------------------- | |
567 # base/ie | |
568 | |
569 m4srcs['IE'] += [ | |
570 '$OPEN_DIR/base/ie/bho.rgs.m4', | |
571 '$OPEN_DIR/base/ie/interfaces.idl.m4', | |
572 '$OPEN_DIR/base/ie/module.rgs.m4', | |
573 ] | |
574 | |
575 idlsrcs['IE'] += [ | |
576 '$OPEN_DIR/base/ie/interfaces.idl', | |
577 ] | |
578 | |
579 srcs['IE'] += [ | |
580 '$OPEN_DIR/base/ie/activex_utils.cc', | |
581 '$OPEN_DIR/base/ie/bho.cc', | |
582 '$OPEN_DIR/base/common/detect_version_collision_win32.cc', | |
583 '$OPEN_DIR/base/ie/dispatcher_to_idispatch.cc', | |
584 '$OPEN_DIR/base/common/ipc_message_queue_null.cc', | |
585 '$OPEN_DIR/base/common/ipc_message_queue_test.cc', | |
586 '$OPEN_DIR/base/common/ipc_message_queue_test_win32.cc', | |
587 '$OPEN_DIR/base/common/ipc_message_queue_win32.cc', | |
588 '$OPEN_DIR/base/common/js_runner_ie.cc', | |
589 '$OPEN_DIR/base/common/message_queue_ie.cc', | |
590 '$OPEN_DIR/base/ie/module.cc', | |
591 '$OPEN_DIR/base/ie/module_wrapper.cc', | |
592 '$OPEN_DIR/base/common/paths_ie.cc', | |
593 '$OPEN_DIR/base/common/time_utils_win32.cc', | |
594 '$OPEN_DIR/base/common/vista_utils.cc', | |
595 ] | |
596 | |
597 if env['PLATFORM'] == 'win32': | |
598 srcs['IE'] += [ | |
599 '$OPEN_DIR/base/common/file_win32.cc', | |
600 '$OPEN_DIR/base/common/html_event_monitor_ie.cc', | |
601 '$OPEN_DIR/base/ie/ie_version.cc', | |
602 ] | |
603 elif env['PLATFORM'] == 'wince': | |
604 srcs['IE'] += [ | |
605 '$OPEN_DIR/base/common/common_ie.cc', | |
606 '$OPEN_DIR/base/common/file_wince.cc', | |
607 '$OPEN_DIR/base/common/wince_compatibility.cc', | |
608 ] | |
609 | |
610 | |
611 #----------------------------------------------------------------------------- | |
612 # base/chrome + npapi | |
613 | |
614 srcs['NPAPI'] += [ | |
615 '$OPEN_DIR/base/chrome/module_cr.cc', | |
616 '$OPEN_DIR/base/common/js_runner_cr.cc', | |
617 '$OPEN_DIR/base/common/html_event_monitor_np.cc', | |
618 '$OPEN_DIR/base/common/ipc_message_queue_linux.cc', | |
619 '$OPEN_DIR/base/common/ipc_message_queue_null.cc', | |
620 '$OPEN_DIR/base/common/ipc_message_queue_test.cc', | |
621 '$OPEN_DIR/base/common/ipc_message_queue_test_linux.cc', | |
622 '$OPEN_DIR/base/common/ipc_message_queue_test_win32.cc', | |
623 '$OPEN_DIR/base/common/ipc_message_queue_win32.cc', | |
624 '$OPEN_DIR/base/common/paths_cr.cc', | |
625 '$OPEN_DIR/base/npapi/browser_utils.cc', | |
626 '$OPEN_DIR/base/npapi/module.cc', | |
627 '$OPEN_DIR/base/npapi/np_utils.cc', | |
628 '$OPEN_DIR/base/npapi/npn_bindings.cc', | |
629 '$OPEN_DIR/base/npapi/npp_bindings.cc', | |
630 '$OPEN_DIR/base/npapi/plugin.cc', | |
631 ] | |
632 | |
633 if env['PLATFORM'] == 'win32': | |
634 srcs['NPAPI'] += [ | |
635 '$OPEN_DIR/base/common/detect_version_collision_win32.cc', | |
636 '$OPEN_DIR/base/common/file_win32.cc', | |
637 '$OPEN_DIR/base/common/message_queue_ie.cc', | |
638 '$OPEN_DIR/base/common/time_utils_win32.cc', | |
639 '$OPEN_DIR/base/common/vista_utils.cc', | |
640 '$OPEN_DIR/base/ie/ie_version.cc', | |
641 ] | |
642 | |
643 #----------------------------------------------------------------------------- | |
644 # console | |
645 | |
646 srcs['all'] += [ | |
647 '$OPEN_DIR/console/console.cc', | |
648 '$OPEN_DIR/console/js_callback_logging_backend.cc', | |
649 ] | |
650 | |
651 #----------------------------------------------------------------------------- | |
652 # canvas | |
653 | |
654 # The Canvas API is not yet enabled in official builds. | |
655 if not env['OFFICIAL_BUILD'] and env['PLATFORM'] in ['win32', 'osx']: | |
656 srcs['all'] += [ | |
657 '$OPEN_DIR/canvas/blob_backed_skia_input_stream.cc', | |
658 '$OPEN_DIR/canvas/blob_backed_skia_output_stream.cc', | |
659 '$OPEN_DIR/canvas/canvas.cc', | |
660 '$OPEN_DIR/canvas/canvas_rendering_context_2d.cc', | |
661 ] | |
662 | |
663 #----------------------------------------------------------------------------- | |
664 # database | |
665 | |
666 srcs['all'] += [ | |
667 '$OPEN_DIR/database/database.cc', | |
668 '$OPEN_DIR/database/database_utils.cc', | |
669 '$OPEN_DIR/database/database_utils_test.cc', | |
670 '$OPEN_DIR/database/result_set.cc', | |
671 ] | |
672 | |
673 #----------------------------------------------------------------------------- | |
674 # database2 | |
675 | |
676 srcs['all'] += [ | |
677 '$OPEN_DIR/database2/connection.cc', | |
678 '$OPEN_DIR/database2/commands.cc', | |
679 '$OPEN_DIR/database2/database2.cc', | |
680 '$OPEN_DIR/database2/database2_common.cc', | |
681 '$OPEN_DIR/database2/database2_metadata.cc', | |
682 '$OPEN_DIR/database2/interpreter.cc', | |
683 '$OPEN_DIR/database2/manager.cc', | |
684 '$OPEN_DIR/database2/result_set2.cc', | |
685 '$OPEN_DIR/database2/statement.cc', | |
686 '$OPEN_DIR/database2/transaction.cc', | |
687 ] | |
688 | |
689 #----------------------------------------------------------------------------- | |
690 # desktop | |
691 | |
692 srcs['all'] += [ | |
693 '$OPEN_DIR/desktop/desktop.cc', | |
694 '$OPEN_DIR/desktop/desktop_linux.cc', | |
695 '$OPEN_DIR/desktop/desktop_osx.cc', | |
696 '$OPEN_DIR/desktop/desktop_test.cc', | |
697 '$OPEN_DIR/desktop/desktop_win32.cc', | |
698 '$OPEN_DIR/desktop/dll_data_wince.cc', | |
699 '$OPEN_DIR/desktop/drag_and_drop_registry.cc', | |
700 '$OPEN_DIR/desktop/notification_message_orderer.cc', | |
701 '$OPEN_DIR/desktop/shortcut_utils_win32.cc', | |
702 ] | |
703 | |
704 srcs['NPAPI'] += [ | |
705 '$OPEN_DIR/desktop/desktop_cr.cc', | |
706 ] | |
707 | |
708 srcs['all'] += [ | |
709 '$OPEN_DIR/desktop/file_dialog.cc', | |
710 '$OPEN_DIR/desktop/file_dialog_gtk.cc', | |
711 '$OPEN_DIR/desktop/file_dialog_osx.cc', | |
712 '$OPEN_DIR/desktop/file_dialog_win32.cc', | |
713 ] | |
714 | |
715 # The browser module also needs these files, to communicate with the notifier. | |
716 srcs['all'] += [ | |
717 '$OPEN_DIR/notifier/const_notifier.cc', | |
718 '$OPEN_DIR/notifier/notifier_process_linux.cc', | |
719 '$OPEN_DIR/notifier/notifier_process_posix.cc', | |
720 '$OPEN_DIR/notifier/notifier_process_win32.cc', | |
721 '$OPEN_DIR/notifier/notifier_proxy.cc', | |
722 '$OPEN_DIR/notifier/notifier_utils_win32.cc', | |
723 '$OPEN_DIR/notifier/notification.cc', | |
724 ] | |
725 | |
726 srcs['FF3'] += [ | |
727 '$OPEN_DIR/desktop/drop_target_ff.cc', | |
728 ] | |
729 | |
730 srcs['IE'] += [ | |
731 '$OPEN_DIR/desktop/drop_target_ie.cc', | |
732 ] | |
733 | |
734 #----------------------------------------------------------------------------- | |
735 # localserver/common | |
736 | |
737 srcs['all'] += [ | |
738 '$OPEN_DIR/localserver/common/blob_store.cc', | |
739 '$OPEN_DIR/localserver/common/capture_task.cc', | |
740 '$OPEN_DIR/localserver/common/file_store.cc', | |
741 '$OPEN_DIR/localserver/common/http_constants.cc', | |
742 '$OPEN_DIR/localserver/common/localserver.cc', | |
743 '$OPEN_DIR/localserver/common/localserver_db.cc', | |
744 '$OPEN_DIR/localserver/common/localserver_perf_test.cc', | |
745 '$OPEN_DIR/localserver/common/managed_resource_store.cc', | |
746 '$OPEN_DIR/localserver/common/manifest.cc', | |
747 '$OPEN_DIR/localserver/common/resource_store.cc', | |
748 '$OPEN_DIR/localserver/common/update_task.cc', | |
749 '$OPEN_DIR/localserver/file_submitter.cc', | |
750 '$OPEN_DIR/localserver/localserver_module.cc', | |
751 '$OPEN_DIR/localserver/managed_resource_store_module.cc', | |
752 '$OPEN_DIR/localserver/resource_store_module.cc', | |
753 ] | |
754 | |
755 srcs['IE'] += [ | |
756 '$OPEN_DIR/localserver/common/http_cookies.cc', | |
757 ] | |
758 | |
759 #----------------------------------------------------------------------------- | |
760 # localserver/chrome + npapi | |
761 # TODO: ie/ff/safari | |
762 | |
763 srcs['NPAPI'] += [ | |
764 '$OPEN_DIR/localserver/chrome/gears_protocol_handler.cc', | |
765 '$OPEN_DIR/localserver/chrome/network_intercept_cr.cc', | |
766 '$OPEN_DIR/localserver/chrome/http_cookies_cr.cc', | |
767 '$OPEN_DIR/localserver/chrome/http_request_cr.cc', | |
768 '$OPEN_DIR/localserver/chrome/update_task_cr.cc', | |
769 '$OPEN_DIR/localserver/common/safe_http_request.cc', | |
770 '$OPEN_DIR/localserver/npapi/async_task_np.cc', | |
771 ] | |
772 | |
773 #----------------------------------------------------------------------------- | |
774 # localserver/ie | |
775 | |
776 srcs['IE'] += [ | |
777 '$OPEN_DIR/localserver/ie/async_task_ie.cc', | |
778 '$OPEN_DIR/localserver/ie/file_submit_behavior.cc', | |
779 '$OPEN_DIR/localserver/ie/http_handler_ie.cc', | |
780 '$OPEN_DIR/localserver/ie/http_request_ie.cc', | |
781 '$OPEN_DIR/localserver/common/progress_event.cc', | |
782 '$OPEN_DIR/localserver/ie/progress_input_stream.cc', | |
783 '$OPEN_DIR/localserver/ie/update_task_ie.cc', | |
784 '$OPEN_DIR/localserver/ie/urlmon_utils.cc', | |
785 ] | |
786 | |
787 #----------------------------------------------------------------------------- | |
788 # ui/chrome | |
789 | |
790 srcs['NPAPI'] += [ | |
791 '$OPEN_DIR/ui/chrome/settings_dialog_cr.cc', | |
792 '$OPEN_DIR/ui/chrome/html_dialog_cr.cc', | |
793 ] | |
794 | |
795 #----------------------------------------------------------------------------- | |
796 # installer | |
797 | |
798 m4srcs['common'] += [ | |
799 '$OPEN_DIR/installer/npapi_msi.wxs.m4', | |
800 ] | |
801 | |
802 #----------------------------------------------------------------------------- | |
803 # dummy_module | |
804 | |
805 srcs['all'] += [ | |
806 '$OPEN_DIR/dummy/dummy_module.cc', | |
807 ] | |
808 | |
809 | |
810 #----------------------------------------------------------------------------- | |
811 # test | |
812 | |
813 srcs['all'] += [ | |
814 '$OPEN_DIR/cctests/test.cc', | |
815 ] | |
816 | |
817 #----------------------------------------------------------------------------- | |
818 # ui/generated | |
819 # | |
820 # Anything with the _I18N suffix will be expanded for each language in | |
821 # I18N_LANGS | |
822 | |
823 html_m4srcs['all'] += [ | |
824 '$OPEN_DIR/ui/common/permissions_dialog.html_m4', | |
825 '$OPEN_DIR/ui/common/settings_dialog.html_m4', | |
826 '$OPEN_DIR/ui/common/shortcuts_dialog.html_m4', | |
827 ] | |
828 | |
829 #TODO: $(IE_OUTDIR)/string_table.res | |
830 | |
831 #----------------------------------------------------------------------------- | |
832 # ui/common (built for all browsers) | |
833 | |
834 srcs['all'] += [ | |
835 '$OPEN_DIR/ui/common/html_dialog.cc', | |
836 '$OPEN_DIR/ui/common/i18n_strings.cc', | |
837 '$OPEN_DIR/ui/common/permissions_dialog.cc', | |
838 '$OPEN_DIR/ui/common/window_utils.cc', | |
839 ] | |
840 | |
841 srcs['IE'] += [ | |
842 '$OPEN_DIR/ui/common/settings_dialog.cc', | |
843 ] | |
844 | |
845 stabsrcs['all'] = [ | |
846 '$OPEN_DIR/ui/common/permissions_dialog.js.stab', | |
847 '$OPEN_DIR/ui/common/settings_dialog.js.stab', | |
848 '$OPEN_DIR/ui/common/shortcuts_dialog.js.stab', | |
849 ] | |
850 | |
851 #----------------------------------------------------------------------------- | |
852 # ui/npapi | |
853 # TODO: ie/ff/safari | |
854 | |
855 m4srcs['all'] += [ | |
856 '$OPEN_DIR/ui/ie/ui_resources.rc.m4', | |
857 ] | |
858 | |
859 #----------------------------------------------------------------------------- | |
860 # ui/ie | |
861 | |
862 m4srcs['IE'] += [ | |
863 '$OPEN_DIR/ui/ie/tools_menu_item.rgs.m4', | |
864 '$OPEN_DIR/ui/ie/ui_resources.rc.m4', | |
865 ] | |
866 | |
867 idlsrcs['IE'] += [ | |
868 '$OPEN_DIR/ui/ie/html_dialog_host.idl', | |
869 ] | |
870 | |
871 srcs['IE'] += [ | |
872 '$OPEN_DIR/ui/ie/html_dialog_ie.cc', | |
873 '$OPEN_DIR/ui/ie/tools_menu_item.cc', | |
874 ] | |
875 | |
876 stabsrcs['IE'] += [ | |
877 '$OPEN_DIR/ui/ie/string_table.rc.stab', | |
878 ] | |
879 | |
880 # Additional files specific to Win32 or WinCE. | |
881 if env['PLATFORM'] == 'win32': | |
882 srcs['IE'] += [ | |
883 '$OPEN_DIR/ui/ie/html_dialog_host.cc', | |
884 ] | |
885 elif env['PLATFORM'] == 'wince': | |
886 m4srcs['IE'] += [ | |
887 '$OPEN_DIR/ui/ie/html_dialog_bridge_iemobile.rgs.m4', | |
888 ] | |
889 | |
890 idlsrcs['IE'] += [ | |
891 '$OPEN_DIR/ui/ie/html_dialog_host_iemobile.idl', | |
892 '$OPEN_DIR/ui/ie/html_dialog_bridge_iemobile.idl', | |
893 ] | |
894 | |
895 srcs['IE'] += [ | |
896 '$OPEN_DIR/ui/ie/html_dialog_host_iemobile.cc', | |
897 '$OPEN_DIR/ui/ie/html_dialog_bridge_iemobile.cc', | |
898 ] | |
899 | |
900 #----------------------------------------------------------------------------- | |
901 # workerpool/npapi | |
902 # TODO: ff/safari | |
903 | |
904 srcs['NPAPI'] += [ | |
905 '$OPEN_DIR/workerpool/common/workerpool_utils.cc', | |
906 '$OPEN_DIR/workerpool/npapi/pool_threads_manager.cc', | |
907 '$OPEN_DIR/workerpool/workerpool.cc', | |
908 ] | |
909 | |
910 #----------------------------------------------------------------------------- | |
911 # workerpool/ie | |
912 # TODO: ie/ff/safari | |
913 | |
914 srcs['IE'] += [ | |
915 '$OPEN_DIR/workerpool/common/workerpool_utils.cc', | |
916 '$OPEN_DIR/workerpool/ie/pool_threads_manager.cc', | |
917 '$OPEN_DIR/workerpool/workerpool.cc', | |
918 ] | |
919 | |
920 #----------------------------------------------------------------------------- | |
921 # timer | |
922 | |
923 srcs['all'] += [ | |
924 '$OPEN_DIR/timer/timer.cc', | |
925 ] | |
926 | |
927 #----------------------------------------------------------------------------- | |
928 # httprequest | |
929 | |
930 srcs['all'] += [ | |
931 '$OPEN_DIR/httprequest/httprequest.cc', | |
932 '$OPEN_DIR/httprequest/httprequest_upload.cc', | |
933 ] | |
934 | |
935 #----------------------------------------------------------------------------- | |
936 # blob | |
937 | |
938 srcs['all'] += [ | |
939 '$OPEN_DIR/blob/blob.cc', | |
940 '$OPEN_DIR/blob/blob_builder.cc', | |
941 '$OPEN_DIR/blob/blob_builder_module.cc', | |
942 '$OPEN_DIR/blob/blob_interface.cc', | |
943 '$OPEN_DIR/blob/blob_test.cc', | |
944 '$OPEN_DIR/blob/blob_utils.cc', | |
945 '$OPEN_DIR/blob/buffer_blob.cc', | |
946 '$OPEN_DIR/blob/fail_blob.cc', | |
947 '$OPEN_DIR/blob/file_blob.cc', | |
948 '$OPEN_DIR/blob/join_blob.cc', | |
949 '$OPEN_DIR/blob/slice_blob.cc', | |
950 ] | |
951 | |
952 # TODO(bpm): Make this cross-browser, not Firefox- or Safari-specific. | |
953 #srcs['all'] += [ | |
954 # '$OPEN_DIR/blob/blob_input_stream_ff.cc', | |
955 # '$OPEN_DIR/blob/blob_input_stream_ff_test.cc', | |
956 #] | |
957 # | |
958 #srcs['all'] += [ | |
959 # '$OPEN_DIR/blob/blob_input_stream_sf.mm', | |
960 # '$OPEN_DIR/blob/blob_input_stream_sf_test.mm', | |
961 #] | |
962 | |
963 #----------------------------------------------------------------------------- | |
964 # TODO: inspector | |
965 | |
966 if not env['OFFICIAL_BUILD']: | |
967 srcs['all'] += [ | |
968 '$OPEN_DIR/inspector/inspector_resources.cc', | |
969 ] | |
970 | |
971 binsrcs['common'] += [ | |
972 '$OPEN_DIR/inspector/console.html', | |
973 '$OPEN_DIR/inspector/database.html', | |
974 '$OPEN_DIR/inspector/index.html', | |
975 '$OPEN_DIR/inspector/localserver.html', | |
976 '$OPEN_DIR/inspector/common/alert-35.png', | |
977 '$OPEN_DIR/inspector/common/database.gif', | |
978 '$OPEN_DIR/inspector/common/error-35.png', | |
979 '$OPEN_DIR/inspector/common/ie6hacks.css', | |
980 '$OPEN_DIR/inspector/common/inspector_links.js', | |
981 '$OPEN_DIR/inspector/common/lightbulb-35.png', | |
982 '$OPEN_DIR/inspector/common/localserver.gif', | |
983 '$OPEN_DIR/inspector/common/question-35.png', | |
984 '$OPEN_DIR/inspector/common/styles.css', | |
985 '$OPEN_DIR/inspector/common/workerpool.gif', | |
986 '$OPEN_DIR/sdk/gears_init.js', | |
987 '$OPEN_DIR/ui/common/base.js', | |
988 '$OPEN_DIR/ui/common/dom.js', | |
989 '$OPEN_DIR/ui/common/icon_32x32.png', | |
990 ] | |
991 | |
992 #----------------------------------------------------------------------------- | |
993 # image | |
994 | |
995 # The Image API is not yet enabled in official builds. | |
996 if not env['OFFICIAL_BUILD'] and env['PLATFORM'] != 'wince': | |
997 srcs['all'] += [ | |
998 '$OPEN_DIR/image/backing_image.cc', | |
999 '$OPEN_DIR/image/image.cc', | |
1000 '$OPEN_DIR/image/image_loader.cc', | |
1001 ] | |
1002 | |
1003 #----------------------------------------------------------------------------- | |
1004 # factory/npapi | |
1005 # TODO: ff | |
1006 | |
1007 srcs['NPAPI'] += [ | |
1008 '$OPEN_DIR/factory/factory_impl.cc', | |
1009 '$OPEN_DIR/factory/factory_np.cc', | |
1010 '$OPEN_DIR/factory/factory_utils.cc', | |
1011 ] | |
1012 | |
1013 #----------------------------------------------------------------------------- | |
1014 # factory/ie | |
1015 | |
1016 m4srcs['IE'] += [ | |
1017 '$OPEN_DIR/factory/factory_ie.rgs.m4', | |
1018 ] | |
1019 | |
1020 srcs['IE'] += [ | |
1021 '$OPEN_DIR/factory/factory_impl.cc', | |
1022 '$OPEN_DIR/factory/factory_ie.cc', | |
1023 '$OPEN_DIR/factory/factory_utils.cc', | |
1024 ] | |
1025 | |
1026 #----------------------------------------------------------------------------- | |
1027 # geolocation | |
1028 | |
1029 srcs['all'] += [ | |
1030 '$OPEN_DIR/geolocation/empty_device_data_provider.cc', | |
1031 '$OPEN_DIR/geolocation/geolocation.cc', | |
1032 '$OPEN_DIR/geolocation/geolocation_db.cc', | |
1033 '$OPEN_DIR/geolocation/geolocation_db_test.cc', | |
1034 '$OPEN_DIR/geolocation/geolocation_test.cc', | |
1035 '$OPEN_DIR/geolocation/gps_location_provider_wince.cc', | |
1036 '$OPEN_DIR/geolocation/location_provider.cc', | |
1037 '$OPEN_DIR/geolocation/location_provider_pool.cc', | |
1038 '$OPEN_DIR/geolocation/network_location_provider.cc', | |
1039 '$OPEN_DIR/geolocation/network_location_request.cc', | |
1040 '$OPEN_DIR/geolocation/radio_data_provider_wince.cc', | |
1041 '$OPEN_DIR/geolocation/timed_callback.cc', | |
1042 '$OPEN_DIR/geolocation/wifi_data_provider_android.cc', | |
1043 '$OPEN_DIR/geolocation/wifi_data_provider_common.cc', | |
1044 '$OPEN_DIR/geolocation/wifi_data_provider_linux.cc', | |
1045 '$OPEN_DIR/geolocation/wifi_data_provider_osx.cc', | |
1046 '$OPEN_DIR/geolocation/wifi_data_provider_win32.cc', | |
1047 '$OPEN_DIR/geolocation/wifi_data_provider_wince.cc', | |
1048 '$OPEN_DIR/geolocation/wifi_data_provider_windows_common.cc', | |
1049 ] | |
1050 | |
1051 #----------------------------------------------------------------------------- | |
1052 # media | |
1053 | |
1054 # The Audio API has not been finalized for official builds. | |
1055 if not env['OFFICIAL_BUILD']: | |
1056 srcs['all'] += [ | |
1057 '$OPEN_DIR/media/audio.cc', | |
1058 '$OPEN_DIR/media/audio_recorder.cc', | |
1059 '$OPEN_DIR/media/audio_recorder_test.cc', | |
1060 '$OPEN_DIR/media/base_audio_recorder.cc', | |
1061 '$OPEN_DIR/media/media.cc', | |
1062 '$OPEN_DIR/media/media_data.cc', | |
1063 '$OPEN_DIR/media/mock_audio_recorder.cc', | |
1064 '$OPEN_DIR/media/pa_audio_recorder.cc', | |
1065 '$OPEN_DIR/media/time_ranges.cc', | |
1066 ] | |
1067 | |
1068 #----------------------------------------------------------------------------- | |
1069 # resources | |
1070 | |
1071 dll_resources = [ | |
1072 env_res.RES('$GENFILES_DIR/ui_resources.rc'), | |
1073 ] | |
1074 | |
1075 if env['BROWSER'] == 'NPAPI': | |
1076 dll_resources += [env_res.RES('$OPEN_DIR/base/npapi/module.rc'),] | |
1077 elif env['BROWSER'] == 'IE': | |
1078 dll_resources += [env_res.RES('$OPEN_DIR/base/ie/module.rc'),] | |
1079 | |
1080 stabsrcs['all'] += [ | |
1081 '$OPEN_DIR/ui/common/permissions_dialog.js.stab', | |
1082 '$OPEN_DIR/ui/common/settings_dialog.js.stab', | |
1083 '$OPEN_DIR/ui/common/shortcuts_dialog.js.stab', | |
1084 ] | |
1085 | |
1086 #----------------------------------------------------------------------------- | |
1087 # libs | |
1088 | |
1089 libs = [ | |
1090 '$THIRD_PARTY_DIR/v8/bin-dbg/libv8core.lib', | |
1091 '$THIRD_PARTY_DIR/v8/bin-dbg/no_snapshotv8.lib', | |
1092 '$THIRD_PARTY_DIR/v8/bin-dbg/libjscre.lib', | |
1093 '$THIRD_PARTY_DIR/skia/skia-dbg-win32-i386.lib', | |
1094 ] | |
1095 | |
1096 if env['BROWSER'] == 'NPAPI': | |
1097 libs += ['$OPEN_DIR/base/chrome/module.def',] | |
1098 elif env['BROWSER'] == 'IE': | |
1099 libs += ['$OPEN_DIR/tools/mscom.def',] | |
1100 | 125 |
1101 sconscripts = [ | 126 sconscripts = [ |
1102 'SConscript.libgd', | 127 'SConscript.libgd', |
1103 'SConscript.libjpeg', | 128 'SConscript.libjpeg', |
1104 'SConscript.libpng', | 129 'SConscript.libpng', |
1105 'SConscript.portaudio', | 130 'SConscript.portaudio', |
1106 'SConscript.sqlite', | 131 'SConscript.sqlite', |
1107 'SConscript.zlib', | 132 'SConscript.zlib', |
1108 ] | 133 ] |
1109 | 134 |
1110 # TODO: all the other ports, including third-party libs | 135 for each in sconscripts: |
1111 # - IE, FF[23], SAFARI, android, symbian | 136 env.SConscript(each, |
1112 # - breakpad[_osx] | 137 exports=['env'], |
1113 # - glint | 138 variant_dir=env.subst('$MODE/common').lower(), |
1114 # - growl | 139 duplicate=0) |
1115 # - spidermonkey | |
1116 # - libspeex | |
1117 # - libtremor | |
1118 # - vista broker | |
1119 # TODO: other targets | |
1120 # - installer | |
1121 # - notifier | |
1122 # - ipc_tests | |
1123 | 140 |
1124 | 141 env.SConscript('SConscript.dll', |
1125 # Now build the dependency tree. | 142 exports=['env'], |
1126 | 143 variant_dir=env.subst('$MODE/$BROWSER').lower(), |
1127 # Add the target browser's inputs to the list files to build. | 144 duplicate=0) |
1128 srcs['all'] += srcs[env['BROWSER']] | |
1129 m4srcs['all'] += m4srcs[env['BROWSER']] | |
1130 html_m4srcs['all'] += html_m4srcs[env['BROWSER']] | |
1131 stabsrcs['all'] += stabsrcs[env['BROWSER']] | |
1132 idlsrcs['all'] += idlsrcs[env['BROWSER']] | |
1133 binsrcs['all'] += binsrcs[env['BROWSER']] | |
1134 | |
1135 # TODO: Is there a better way than this to do a make-style rule like | |
1136 # genfiles/%.html: %.html_m4 | |
1137 m4s = [] | |
1138 m4s += [env_common.M4(src) for src in m4srcs['common']] | |
1139 m4s += [env_browser.M4(src) for src in m4srcs['all']] | |
1140 installed_m4s = env_browser.Install('$GENFILES_DIR', m4s) | |
1141 | |
1142 html_m4s = [env_browser.M4(os.path.splitext(src)[0] + '.html', src) | |
1143 for src in html_m4srcs['all']] | |
1144 installed_html_m4s = env_browser.Install('$GENFILES_DIR', html_m4s) | |
1145 | |
1146 # genfiles/%.js: %.js.stab | |
1147 stabs = [env_browser.Stab(src) for src in stabsrcs['all']] | |
1148 installed_stabs = env_browser.Install('$GENFILES_DIR', stabs) | |
1149 | |
1150 # TODO: What's an elegant way to say "FOO.html_m4 depends on FOO.js" ? | |
1151 def IsSameBasename(a, b): | |
1152 return (os.path.basename(os.path.splitext(a)[0]) == | |
1153 os.path.basename(os.path.splitext(b)[0])) | |
1154 | |
1155 for html_m4 in html_m4s: | |
1156 for stab in installed_stabs: | |
1157 if IsSameBasename(str(stab), str(html_m4[0])): | |
1158 env_browser.Depends(html_m4, stab) | |
1159 | |
1160 # genfiles/%.from_bin.cc: % | |
1161 bins = [env_common.Bin2cpp(src + '.from_bin.cc', src) | |
1162 for src in binsrcs['common']] | |
1163 installed_bins = env_common.Install('$GENFILES_DIR', bins) | |
1164 srcs['all'] += installed_bins | |
1165 | |
1166 # genfiles/%.h: %.idl | |
1167 # Note: the emitter fixes the targets to be put in genfiles. | |
1168 if idlsrcs['all']: | |
1169 idls = [env_browser.TypeLibrary(src) | |
1170 for src in idlsrcs['all']] | |
1171 installed_idls = idls | |
1172 srcs['all'] += [x for x in installed_idls[0] if str(x).endswith('_i.c')] | |
1173 | |
1174 # TODO: figure out why the .rc scanner doesn't notice these dependencies. | |
1175 env_browser.Depends(dll_resources[0], installed_html_m4s) | |
1176 env_browser.Depends(dll_resources[1], installed_m4s) | |
1177 | |
1178 env_browser.SConscript(sconscripts, exports=['env']) | |
1179 | |
1180 lib = env_browser.ChromeSharedLibrary('gears', | |
1181 srcs['all'] + libs + dll_resources) | |
1182 env_browser.Alias('gears', lib) | |
OLD | NEW |