blob: 3d16d3e08eece7c77273591995711272a8b12872 [file] [log] [blame]
[email protected]186f5602008-09-16 18:24:301# 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
3# found in the LICENSE file.
4
[email protected]172914a2008-09-25 17:09:265# Notes:
[email protected]04d34f22008-12-01 19:50:236# This is the main Gears SConscript file. From here, we include sub-scripts
7# that handle building various targets (third party libs, common exes, the
8# browser plugins themselves, and installers). Some sub-scripts return a
9# dictionary of variables to be appended to the environment, so other
10# sub-scripts can use them.
11#
12# To check out the Gears sources, you need to make sure this directory is in
13# your .gclient file, so its DEPS get processed. Example:
14# { "name" : "src/gears",
15# "url" : "svn://chrome-svn/chrome/trunk/src/gears",
16# },
[email protected]172914a2008-09-25 17:09:2617#
18# This is a work-in-progress conversion of the current Gears set of Makefiles.
19# A lot of the stuff doesn't translate to SCons-land well, and I'm not sure
20# how faithful we want to be to the original.
21#
22# Questions:
23# Should we flatten the output directory into
24# Hammer/gears/platform/browser/*.obj like Gears does now? If so, how?
25
[email protected]c1a37472008-10-08 00:05:2626# Notes to self:
27# - os.path.abspath('.') (the CWD) is variant_dir if it exists, else it's the
28# toplevel_dir (which contains the SConstruct).
29# - env.Entry('.') is the entry representing the variant_dir.
30# - env.Entry('#') is the entry representing the toplevel_dir.
31# - str(entry) gives the path relative to variant_dir, or abspath if the entry
32# is outside the variant_dir.
33# - entry.path gives the path relative to toplevel_dir.
34# - entry.abspath gives the absolute path.
35
[email protected]172914a2008-09-25 17:09:2636import os
37
[email protected]186f5602008-09-16 18:24:3038Import('env')
39
40env = env.Clone(
[email protected]b92ed9d22008-10-23 19:40:0841 OPEN_DIR = "gears",
[email protected]f3f568b2008-11-19 22:38:4642 PRIVATE_DIR = "gears_internal",
[email protected]b92ed9d22008-10-23 19:40:0843 THIRD_PARTY_DIR = "third_party",
44 PRIVATE_THIRD_PARTY_DIR = "third_party_internal",
[email protected]186f5602008-09-16 18:24:3045)
46
[email protected]dff2b53ed2008-10-08 22:59:5347if not os.path.exists(env.Dir('#/$OPEN_DIR').abspath):
48 print 'Skipping Gears build: no perforce tree checked out.'
49 Return()
50
[email protected]186f5602008-09-16 18:24:3051# Argument switches
[email protected]777c7bf2008-09-30 20:01:2452
53# TODO: how do we detect linux vs osx?
54os_guess = env['PLATFORM']
55if os_guess == 'posix':
56 os_guess = 'linux'
57elif os_guess == 'darwin':
58 os_guess = 'osx'
59
[email protected]c1a37472008-10-08 00:05:2660# Map of OS -> valid browser targets for that OS.
61os_browsers_map = {
62 'win32': ['IE', 'FF2', 'FF3', 'NPAPI'],
63 'wince': ['IE'],
64 'linux': ['FF2', 'FF3'],
[email protected]b0faad62008-10-21 23:59:0365 'osx': ['SF', 'FF2', 'FF3'],
[email protected]c1a37472008-10-08 00:05:2666 'android': ['NPAPI'],
[email protected]17ee3a072008-11-06 22:45:5067 'symbian': ['NPAPI'],
[email protected]c1a37472008-10-08 00:05:2668}
69
[email protected]186f5602008-09-16 18:24:3070vars = Variables(None, ARGUMENTS)
71vars.AddVariables(
[email protected]c1a37472008-10-08 00:05:2672 EnumVariable('OS',
73 'Which OS is the target', os_guess, os_browsers_map.keys()),
74 EnumVariable('MODE',
75 'Type of binary to generate', 'dbg', ['dbg', 'opt']),
76 BoolVariable('OFFICIAL_BUILD',
[email protected]efb07432009-01-16 22:58:5277 'Create a binary suitable for public release', 0),
78 BoolVariable('GEARS_STATIC_LIB',
79 'Create a static library for linking with Chrome', 0),
[email protected]186f5602008-09-16 18:24:3080)
81vars.Update(env)
82
[email protected]c1a37472008-10-08 00:05:2683env['VALID_BROWSERS'] = os_browsers_map[env['OS']]
84
85# Add BROWSER last, since its valid inputs depend on $OS.
86vars.Add(
87 EnumVariable('BROWSER',
88 'Which browser we want to build the plugin for. "all" builds all '
89 'browsers for this OS.',
90 'all', env['VALID_BROWSERS'] + ['all']))
91vars.Update(env)
92
[email protected]777c7bf2008-09-30 20:01:2493env.Replace(
[email protected]186f5602008-09-16 18:24:3094 USING_CCTESTS = (env['MODE'] == 'dbg' or not env['OFFICIAL_BUILD'])
95)
96
97# Version
[email protected]777c7bf2008-09-30 20:01:2498env.Replace(
[email protected]186f5602008-09-16 18:24:3099 MAJOR = '0',
[email protected]9d7bc25c2008-12-04 19:46:09100 MINOR = '5',
[email protected]61d362a02009-01-07 23:30:01101 BUILD = '7',
102 PATCH = '0',
[email protected]186f5602008-09-16 18:24:30103 VERSION = '${MAJOR}.${MINOR}.${BUILD}.${PATCH}',
104
[email protected]172914a2008-09-25 17:09:26105 FRIENDLY_NAME = 'Google Gears',
[email protected]186f5602008-09-16 18:24:30106 SHORT_NAME = 'gears',
107)
108
109# Platform
[email protected]b0faad62008-10-21 23:59:03110# TODO: Symbian builds will override this value.
[email protected]25ab0c62008-10-14 00:28:34111# For other platforms we set just one value.
112if env['OS'] in ['wince', 'android']:
113 env.Replace(ARCH = 'arm')
114elif env['OS'] == 'osx':
115 # On OSX we build a fat binary.
116 env.Replace(ARCH = 'i386+ppc')
117else:
118 env.Replace(ARCH = 'i386')
[email protected]186f5602008-09-16 18:24:30119
[email protected]c1a37472008-10-08 00:05:26120# Output dirs
121env.Replace(
[email protected]25ab0c62008-10-14 00:28:34122 BASE_OUTDIR = '$GEARS_DIR/$OS-$ARCH-$MODE',
[email protected]c1a37472008-10-08 00:05:26123 COMMON_OUTDIR = '$BASE_OUTDIR/common',
[email protected]6b3531282008-10-10 00:01:37124 BROWSER_OUTDIR = '$BASE_OUTDIR/${BROWSER.lower()}',
[email protected]c1a37472008-10-08 00:05:26125 IE_OUTDIR = '$BASE_OUTDIR/ie',
126 FF2_OUTDIR = '$BASE_OUTDIR/ff2',
127 FF3_OUTDIR = '$BASE_OUTDIR/ff3',
128 NPAPI_OUTDIR = '$BASE_OUTDIR/npapi',
129 SF_OUTDIR = '$BASE_OUTDIR/sf',
[email protected]6b3531282008-10-10 00:01:37130
131 GENFILES_DIR = "$BROWSER_OUTDIR/genfiles",
132 COMMON_GENFILES_DIR = "$COMMON_OUTDIR/genfiles",
[email protected]f3f568b2008-11-19 22:38:46133
[email protected]04d34f22008-12-01 19:50:23134 INSTALLER_OUTDIR = '$BASE_OUTDIR/installers',
135)
136
137# Outputs
138env.Replace(
[email protected]f3f568b2008-11-19 22:38:46139 INSTALLER_BASENAME = 'gears-${OS}-${MODE}-${VERSION}',
[email protected]04d34f22008-12-01 19:50:23140
141 FF_XPI = '$INSTALLER_OUTDIR/${INSTALLER_BASENAME}.xpi',
142 WIN32_INSTALLER_MSI = '$INSTALLER_OUTDIR/${INSTALLER_BASENAME}.msi',
143 WINCE_INSTALLER_CAB = '$INSTALLER_OUTDIR/${INSTALLER_BASENAME}.cab',
[email protected]9da4a5ae2008-12-03 23:03:41144 # Keyston SF Metapackage installer, bundled with Keystone as part of a
145 # DMG.
146 SF_KEYSTONE_INSTALLER_DMG = '$INSTALLER_OUTDIR/${INSTALLER_BASENAME}.dmg',
147 SF_KEYSTONE_INSTALLER_MPKG = '$INSTALLER_OUTDIR/Safari/${FRIENDLY_NAME}.mpkg',
[email protected]04d34f22008-12-01 19:50:23148
149 SF_INSTALLER_PLUGIN_BUNDLE = '$INSTALLER_OUTDIR/Safari/StatsPane.bundle',
150 SF_PLUGIN_BUNDLE = '$INSTALLER_OUTDIR/Safari/Gears.bundle',
151 SF_PLUGIN_PROXY_BUNDLE = '$INSTALLER_OUTDIR/Safari/Gears.plugin',
152 SF_INPUTMANAGER_BUNDLE = '$INSTALLER_OUTDIR/Safari/GearsEnabler',
153 SF_INSTALLER_PKG = '$INSTALLER_OUTDIR/Safari/Gears.pkg',
[email protected]c1a37472008-10-08 00:05:26154)
155
[email protected]b0faad62008-10-21 23:59:03156# Library flags
157env.Replace(
158 MOZJS_INCLUDE_PATHS = [
159 '$MOZJS_DIR',
160 '$THIRD_PARTY_DIR/spidermonkey/nspr/pr/include',
161 '$THIRD_PARTY_DIR/spidermonkey/nspr/pr/include/private',
162 '$THIRD_PARTY_DIR/spidermonkey/nspr/pr/include/obsolete',
163 '$OSX_SDK_ROOT/Developer/Headers/FlatCarbon/',
164 ],
165 MOZJS_DIR = '$THIRD_PARTY_DIR/spidermonkey',
166)
167
[email protected]5514903c2008-10-08 21:24:55168# Add our tools to the PATH.
[email protected]4509f39a2008-10-29 18:35:46169if env['OS'] in ['win32', 'wince']:
170 if os.path.exists(env.Dir('#/$PRIVATE_THIRD_PARTY_DIR').abspath):
171 # Clear out our environment so we don't accidentally use the system's
172 # libs.
[email protected]bfb2cf72008-10-21 20:42:29173 env['ENV']['PATH'] = ''
174 env['ENV']['LIB'] = ''
175 env['ENV']['INCLUDE'] = ''
[email protected]25ab0c62008-10-14 00:28:34176
[email protected]4509f39a2008-10-29 18:35:46177 paths = []
178
[email protected]bfb2cf72008-10-21 20:42:29179 # Keep system32 for 'xcopy'.
180 paths += [env.subst('${ENV["SYSTEMROOT"]}/system32')]
181 if env['OS'] == 'win32':
182 env.Append(
183 VC80 = env.Dir('#/$PRIVATE_THIRD_PARTY_DIR/vc_80/files').abspath)
184 paths += [
185 env.subst('$VC80/common7/ide'),
186 env.subst('$VC80/vc/bin'),
187 env.subst('$VC80/common7/tools'),
188 env.subst('$VC80/common7/tools/bin'),
189 env.subst('$VC80/team_tools/performance_tools'),
190 ]
191 else: # wince
192 env.Append(
193 VC80 = env.Dir('#/$PRIVATE_THIRD_PARTY_DIR/vc_80ce/files').abspath)
194 paths += [
195 env.subst('$VC80/bin/x86_arm'),
196 env.subst('$VC80/common7/ide'),
197 env.subst('$VC80/common7/tools'),
198 env.subst('$VC80/common7/tools/bin'),
199 env.subst('$VC80/vc/bin'),
200 env.subst('$VC80/smartdevices/sdktools'),
201 ]
[email protected]25ab0c62008-10-14 00:28:34202
[email protected]4509f39a2008-10-29 18:35:46203 paths += [
204 env.Dir('#/$PRIVATE_THIRD_PARTY_DIR/wix/v3_0_2925/files').abspath]
[email protected]25ab0c62008-10-14 00:28:34205
[email protected]4509f39a2008-10-29 18:35:46206 paths += [env.Dir('#/$PRIVATE_THIRD_PARTY_DIR/gnu/files').abspath]
207 paths += [env.Dir('#/$PRIVATE_THIRD_PARTY_DIR/python_24').abspath]
[email protected]25ab0c62008-10-14 00:28:34208
[email protected]4509f39a2008-10-29 18:35:46209 # Prepend them so our tools come first.
210 for each in reversed(paths):
211 env.PrependENVPath('PATH', each)
212 else:
213 # If we don't have a private third_party dir, we expect the system
214 # environment to be set up correctly to point to tool paths.
215 env['ENV']['PATH'] = os.environ['PATH']
216 env['ENV']['LIB'] = os.environ['LIB']
217 env['ENV']['INCLUDE'] = os.environ['INCLUDE']
[email protected]bfb2cf72008-10-21 20:42:29218
[email protected]4f3c5bb2008-12-08 21:45:23219 mtcom = 'echo Manifest creation disabled, since it breaks a lot.'
220 env['MANIFEST_COM'] = mtcom
221 env['SHMANIFEST_COM'] = mtcom
[email protected]172914a2008-09-25 17:09:26222
[email protected]6b3531282008-10-10 00:01:37223# Building M4 files
[email protected]172914a2008-09-25 17:09:26224env.Tool('m4')
225
[email protected]6b3531282008-10-10 00:01:37226env.Append(
227 M4ARCH = (env['ARCH'] == 'i386' and 'x86' or '$ARCH'),
228 M4FLAGS = [
229 '--prefix-builtins',
230 '-DPRODUCT_VERSION=$VERSION',
231 '-DPRODUCT_VERSION_MAJOR=$MAJOR',
232 '-DPRODUCT_VERSION_MINOR=$MINOR',
233 '-DPRODUCT_VERSION_BUILD=$BUILD',
234 '-DPRODUCT_VERSION_PATCH=$PATCH',
235 '-DPRODUCT_OS=$OS',
236 '-DPRODUCT_ARCH="$M4ARCH"',
237 '-DPRODUCT_GCC_VERSION="gcc3"',
238 '-DPRODUCT_MAINTAINER="google"',
239 '-DPRODUCT_FRIENDLY_NAME_UQ="$FRIENDLY_NAME"',
240 '-DPRODUCT_SHORT_NAME_UQ="$SHORT_NAME"',
241 '-DI18N_LANGUAGES="(${",".join(I18N_LANGS)})"',
242 ],
243 M4PATH = [
244 '$OPEN_DIR',
245 '.',
246 ],
247)
248
249# SCons magic to make M4PATH work.
250env.Replace(
251 M4INCPREFIX = '-I',
252 M4INCSUFFIX = '',
253 _M4INCFLAGS = ('${_concat(M4INCPREFIX, M4PATH, M4INCSUFFIX, '
254 '__env__, RDirs, TARGET, SOURCE)}'),
255 M4COM = '$M4 $M4FLAGS ${_M4INCFLAGS} $SOURCE > $TARGET',
256)
257
258# TODO: Dependency scanner for m4 files - doesn't work. It can't detect files
259# that don't exist!
260#m4_include_re = re.compile(r'm4_include\((.*)\)', re.M)
261#def m4_scan(node, env, path):
262# contents = node.get_contents()
263# includes = m4_include_re.findall(contents)
264# ret_includes = []
265# for include in includes:
266# for dir in path:
267# file = os.path.join(dir, include)
268# if os.path.exists(file):
269# ret_includes.append(file)
270# break
271# return ret_includes
272#
273#m4_scanner = Scanner(function = m4_scan, skeys = ['.m4', '.html_m4'])
274#env.Append(SCANNERS = m4_scanner)
275
276
[email protected]09c767b2008-11-24 23:00:00277# OS X Iceberg package builder
278
279env.Replace(ICEBERG = '/usr/local/bin/freeze')
280if env.WhereIs('$ICEBERG'):
281 env.Replace(ICEBERGCOM = '"$ICEBERG" -v $SOURCE')
282else:
283 env.Replace(ICEBERGCOM =
284 'echo To create a Safari installer for Gears, you must install Iceberg'
285 ' from http://s.sudre.free.fr/Software/Iceberg.html. You can install'
286 ' the Safari version manually by running the'
287 ' $OPEN_DIR/tools/osx/install_gears.sh script.')
288
289iceberg_builder = Builder(action = '$ICEBERGCOM',
290 suffix = '.pkg', src_suffix = '.packproj')
291env.Append(BUILDERS = {'Iceberg': iceberg_builder})
292
293
[email protected]7ef840ff2008-09-22 21:15:54294# C++ build flags.
[email protected]186f5602008-09-16 18:24:30295
[email protected]172914a2008-09-25 17:09:26296# Clear out the inherited defines from Chrome's build. I want to match Gears'
297# current build as closely as possible until we switch everyone to SCons, then
298# gradually integrate.
[email protected]7ef840ff2008-09-22 21:15:54299env.Replace(
[email protected]186f5602008-09-16 18:24:30300 CPPPATH = [
301 '$OPEN_DIR',
302 '$OPEN_DIR/..',
303 '$THIRD_PARTY_DIR',
[email protected]186f5602008-09-16 18:24:30304 '$THIRD_PARTY_DIR/googleurl',
305 '$THIRD_PARTY_DIR/npapi',
306 '$THIRD_PARTY_DIR/zlib',
307 '$THIRD_PARTY_DIR/v8/bindings_local',
[email protected]c1a37472008-10-08 00:05:26308 '.',
[email protected]6b3531282008-10-10 00:01:37309 '$COMMON_OUTDIR',
[email protected]172914a2008-09-25 17:09:26310 ],
[email protected]b0faad62008-10-21 23:59:03311 CFLAGS = [],
[email protected]7ef840ff2008-09-22 21:15:54312 CCFLAGS = [],
[email protected]b0faad62008-10-21 23:59:03313 CXXFLAGS = [],
[email protected]4509f39a2008-10-29 18:35:46314 CCPDBFLAGS = [],
[email protected]b0faad62008-10-21 23:59:03315 CPPDEFINES = [
316 # SpiderMonkey (the Firefox JS engine)'s JS_GET_CLASS macro in jsapi.h needs
317 # this defined to work with the gecko SDK that we've built.
318 # The definition of JS_THREADSAFE must be kept in sync with MOZJS_CPPFLAGS.
319 'JS_THREADSAFE'
320 ],
321 FRAMEWORKPATH = [],
322 FRAMEWORKS = [],
[email protected]172914a2008-09-25 17:09:26323 LIBS = [],
[email protected]5affc152008-10-31 23:55:17324 LIBPATH = ['$COMPONENT_LIBRARY_DIR'],
[email protected]4f3c5bb2008-12-08 21:45:23325 COMMON_LINKFLAGS = [], # for both executables and shared libs
326 LINKFLAGS = ['$COMMON_LINKFLAGS'], # for executables
327 SHLINKFLAGS = ['$COMMON_LINKFLAGS'], # for shared libs
[email protected]5affc152008-10-31 23:55:17328 COMPONENT_LIBRARY_DIR = '$COMMON_OUTDIR/lib',
[email protected]186f5602008-09-16 18:24:30329)
330
[email protected]7ef840ff2008-09-22 21:15:54331if env['MODE'] == 'dbg':
[email protected]172914a2008-09-25 17:09:26332 env.Append(
[email protected]f9ef79b2008-09-25 17:19:21333 CPPDEFINES = [
334 'DEBUG=1',
335 '_DEBUG=1',
336 ],
[email protected]172914a2008-09-25 17:09:26337 M4FLAGS = '-DDEBUG=1',
338 )
339else:
340 env.Append(
341 CPPDEFINES = 'NDEBUG=1',
342 M4FLAGS = '-DNDEBUG=1',
343 )
[email protected]7ef840ff2008-09-22 21:15:54344if env['USING_CCTESTS']:
[email protected]172914a2008-09-25 17:09:26345 env.Append(
346 CPPDEFINES = 'USING_CCTESTS=1',
347 M4FLAGS = '-DUSING_CCTESTS=1',
348 )
[email protected]7ef840ff2008-09-22 21:15:54349if env['OFFICIAL_BUILD']:
[email protected]172914a2008-09-25 17:09:26350 env.Append(
351 CPPDEFINES = 'OFFICIAL_BUILD=1',
352 M4FLAGS = '-DOFFICIAL_BUILD=1',
353 )
[email protected]efb07432009-01-16 22:58:52354if env['GEARS_STATIC_LIB']:
355 env.Append(
356 CPPDEFINES = 'GEARS_STATIC_LIB=1',
357 )
[email protected]186f5602008-09-16 18:24:30358
[email protected]61d362a02009-01-07 23:30:01359# TODO: if USING_LIBPNG
360env.Append(
361 CPPDEFINES = [
362 'PNG_USER_CONFIG',
363 'CHROME_PNG_WRITE_SUPPORT',
[email protected]61d362a02009-01-07 23:30:01364 ]
365)
[email protected]efb07432009-01-16 22:58:52366if not env['GEARS_STATIC_LIB']:
367 # If we're not linking with Chrome, don't prefix all the symbols with
368 # webkit_.
369 env.Append(CPPDEFINES = ['GEARS_PNG_BUILD'])
370
371
[email protected]172914a2008-09-25 17:09:26372# TODO: if USING_ZLIB
[email protected]186f5602008-09-16 18:24:30373env.Append(
374 CPPDEFINES = [
[email protected]172914a2008-09-25 17:09:26375 'NO_GZIP',
376 'NO_GZCOMPRESS',
377 ]
[email protected]186f5602008-09-16 18:24:30378)
[email protected]25ab0c62008-10-14 00:28:34379if env['OS'] == 'wince':
380 env.Append(CPPDEFINES = 'NO_ERRNO_H')
[email protected]186f5602008-09-16 18:24:30381
[email protected]5514903c2008-10-08 21:24:55382# Languages
383
384env['I18N_LANGS'] = [
385 'en-US',
386 'ar',
387 'bg',
388 'ca',
389 'cs',
390 'da',
391 'de',
392 'el',
393 'en-GB',
394 'es',
395 'et',
396 'fa',
397 'fi',
398 'fil',
399 'fr',
400 'he',
401 'hi',
402 'hr',
403 'hu',
404 'id',
405 'is',
406 'it',
407 'ja',
408 'ko',
409 'lt',
410 'lv',
411 'ms',
412 'nl',
413 'no',
414 'pl',
415 'pt-BR',
416 'pt-PT',
417 'ro',
418 'ru',
419 'sk',
420 'sl',
421 'sr',
422 'sv',
423 'th',
424 'tr',
425 'uk',
426 'ur',
427 'vi',
428 'zh-CN',
429 'zh-TW',
430 'ml',
431 'te',
432 'gu',
433 'kn',
434 'or',
435 'bn',
436 'ta',
437 'mr',
438]
439
[email protected]172914a2008-09-25 17:09:26440# Platform-specific flags follow.
441
[email protected]25ab0c62008-10-14 00:28:34442if env['OS'] in ['win32', 'wince']:
[email protected]94e61e42008-11-07 00:52:29443 env.Replace(ARFLAGS = [])
[email protected]172914a2008-09-25 17:09:26444 env.Append(
445 CPPDEFINES = [
446 'STRICT',
447 '_UNICODE',
448 'UNICODE',
449 '_USRDLL',
450 'WIN32',
451 '_WINDLL',
452 '_CRT_SECURE_NO_DEPRECATE',
453 'NOMINMAX',
454
[email protected]7ef840ff2008-09-22 21:15:54455# In VC8, the way to disable exceptions is to remove all /EH* flags, and to
456# define _HAS_EXCEPTIONS=0 (for C++ headers) and _ATL_NO_EXCEPTIONS (for ATL).
457 '_HAS_EXCEPTIONS=0',
458 '_ATL_NO_EXCEPTIONS',
459# Do not export UTF functions.
460 'U_STATIC_IMPLEMENTATION',
[email protected]186f5602008-09-16 18:24:30461 ],
[email protected]8f643b782008-10-20 18:49:49462# Static lib flags.
463 ARFLAGS = [
464 '/NOLOGO',
465 ],
466# Shared lib and exe flags.
[email protected]4f3c5bb2008-12-08 21:45:23467 COMMON_LINKFLAGS = [
[email protected]7ef840ff2008-09-22 21:15:54468 '/NOLOGO',
469 '/DEBUG',
470 '/RELEASE',
[email protected]25ab0c62008-10-14 00:28:34471 '/PDB:${TARGET.base}.pdb',
[email protected]4f3c5bb2008-12-08 21:45:23472 ],
473 SHLINKFLAGS = [
474 '/DLL',
[email protected]186f5602008-09-16 18:24:30475# Set the preferred base address. This value was chosen because (a) it's near
476# the top of the valid address range, and (b) it doesn't conflict with other
477# DLLs loaded by Chrome in either the browser or plugin process.
478 '/BASE:0x65000000',
[email protected]7ef840ff2008-09-22 21:15:54479 ],
480 CPPFLAGS = [
[email protected]25ab0c62008-10-14 00:28:34481 '/nologo',
[email protected]25ab0c62008-10-14 00:28:34482 '/c',
483 '/W3',
484 '/WX',
485 '/GR-',
[email protected]8f643b782008-10-20 18:49:49486 '/Fd"${TARGET.base}.pdb"',
[email protected]7ef840ff2008-09-22 21:15:54487 ],
488 CXXFLAGS = [
[email protected]25ab0c62008-10-14 00:28:34489 '/TP',
490 '/J',
[email protected]186f5602008-09-16 18:24:30491 ],
[email protected]777c7bf2008-09-30 20:01:24492 CPPPATH = [
[email protected]25ab0c62008-10-14 00:28:34493 '$VC80_CPPPATH',
[email protected]b0faad62008-10-21 23:59:03494 '$THIRD_PARTY_DIR/breakpad/src',
[email protected]25ab0c62008-10-14 00:28:34495 ],
[email protected]4509f39a2008-10-29 18:35:46496 CCPDBFLAGS = [
497 '/Zi', # TODO: Chrome defines /Z7, no idea what these are.
498 ],
[email protected]25ab0c62008-10-14 00:28:34499 LIBPATH = [
500 '$VC80_LIBPATH',
501 ],
502 )
503 if env['OS'] == 'win32':
504 env.Append(
505 CPPDEFINES = [
506# We require APPVER=5.0 for things like HWND_MESSAGE.
507# When APPVER=5.0, win32.mak in the Platform SDK sets:
508# C defines: WINVER=0x0500
509# _WIN32_WINNT=0x0500
510# _WIN32_IE=0x0500
511# _RICHEDIT_VER=0x0010
512# RC defines: WINVER=0x0500
513# MIDL flags: /target NT50
514# Note: _WIN32_WINDOWS was replaced by _WIN32_WINNT for post-Win95 builds.
515# Note: XP_WIN is only used by Firefox headers
516 '_WINDOWS',
517 'WINVER=0x0500',
518 '_WIN32_WINNT=0x0500',
519 '_WIN32_IE=0x0500',
520 '_RICHEDIT_VER=0x0010',
521 '_MERGE_PROXYSTUB',
522 'BREAKPAD_AVOID_STREAMS',
523 'XP_WIN',
524 ],
[email protected]8f643b782008-10-20 18:49:49525 ARFLAGS = [
526 '/MACHINE:X86',
527 ],
[email protected]4f3c5bb2008-12-08 21:45:23528 COMMON_LINKFLAGS = [
[email protected]25ab0c62008-10-14 00:28:34529 '/MACHINE:X86',
530 '/NODEFAULTLIB:msvcrt',
531# Flags for security hardening (only available for win32, not wince).
532 '/DYNAMICBASE',
533 '/SAFESEH',
[email protected]4f3c5bb2008-12-08 21:45:23534 ],
535 SHLINKFLAGS = [
[email protected]25ab0c62008-10-14 00:28:34536# We only use /SUBSYSTEM on DLLs. For EXEs we omit the flag, and
537# the presence of main() or WinMain() determines the subsystem.
538 '/SUBSYSTEM:WINDOWS',
539 ],
540 VC80_CPPPATH = [
[email protected]777c7bf2008-09-30 20:01:24541# TODO: switch over to Chrome's SDK.
542# Note: these must come after $THIRD_PARTY_DIR/npapi because we want our own
543# npapi.h to take precedence.
[email protected]25ab0c62008-10-14 00:28:34544 '$PRIVATE_THIRD_PARTY_DIR/atlmfc_vc80/files/include',
545 '$PRIVATE_THIRD_PARTY_DIR/platformsdk_vc80/files/include',
[email protected]b9e30c22008-10-15 21:25:06546 '$PRIVATE_THIRD_PARTY_DIR/vc_80/files/vc/include',
[email protected]25ab0c62008-10-14 00:28:34547 ],
548 VC80_LIBPATH = [
549 '$PRIVATE_THIRD_PARTY_DIR/atlmfc_vc80/files/lib',
550 '$PRIVATE_THIRD_PARTY_DIR/platformsdk_vc80/files/lib',
551 '$PRIVATE_THIRD_PARTY_DIR/vc_80/files/vc/lib',
552 ],
553 )
554 else: # OS=wince
555 env.Append(
556 CPPDEFINES = [
557# For Windows Mobile we need:
558# C defines: _WIN32_WCE=0x0501
559# _UNDER_CE=0x0501
560 '_WIN32_WCE=0x501',
561 'WINVER=_WIN32_WCE',
562 'UNDER_CE=0x501',
[email protected]5affc152008-10-31 23:55:17563 'OS_WINCE',
[email protected]25ab0c62008-10-14 00:28:34564 'WIN32_PLATFORM_PSPC',
565 'ARM',
566 '_ARM_',
567 'POCKETPC2003_UI_MODEL',
568 '_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA',
569 '_CE_CRT_ALLOW_WIN_MINMAX',
570 ],
[email protected]8f643b782008-10-20 18:49:49571 ARFLAGS = [
572 '/MACHINE:THUMB',
573 ],
[email protected]4f3c5bb2008-12-08 21:45:23574 COMMON_LINKFLAGS = [
[email protected]25ab0c62008-10-14 00:28:34575 '/MACHINE:THUMB',
576 '/NODEFAULTLIB:secchk.lib',
577 '/NODEFAULTLIB:oldnames.lib',
[email protected]4f3c5bb2008-12-08 21:45:23578 ],
579 SHLINKFLAGS = [
[email protected]25ab0c62008-10-14 00:28:34580 '/SUBSYSTEM:WINDOWSCE,5.01',
581 ],
582 VC80_CPPPATH = [
583 '$PRIVATE_THIRD_PARTY_DIR/atlmfc_vc80ce/files/include',
584 '$PRIVATE_THIRD_PARTY_DIR/vc_80ce/files/include',
585# Visual Studio must be setup before the PocketPC SDK.
586 '$PRIVATE_THIRD_PARTY_DIR/pocketpc_sdk_ce_50/files/include/armv4i',
587 ],
588 VC80_LIBPATH = [
589 '$PRIVATE_THIRD_PARTY_DIR/atlmfc_vc80ce/files/lib/armv4i',
590 '$PRIVATE_THIRD_PARTY_DIR/vc_80ce/files/lib/armv4i',
591 '$PRIVATE_THIRD_PARTY_DIR/pocketpc_sdk_ce_50/files/lib/armv4i',
592 ],
593 )
594
[email protected]172914a2008-09-25 17:09:26595 if env['MODE'] == 'dbg':
596 env.Append(
597 CPPFLAGS = [
598 '/MTd',
599 ],
600 )
601 else: # MODE=opt
602 env.Append(
603 CPPFLAGS = [
604 '/MT',
605 '/O2',
606 ],
[email protected]4f3c5bb2008-12-08 21:45:23607 COMMON_LINKFLAGS = [
[email protected]172914a2008-09-25 17:09:26608 '/INCREMENTAL:NO',
609 '/OPT:REF',
610 '/OPT:ICF',
611 ],
612 )
[email protected]efb07432009-01-16 22:58:52613 if not env['GEARS_STATIC_LIB']:
614 # Build with 2-byte wchar_t's only if we're building a DLL. To link with
615 # Chrome, we need 4-byte wchar_t.
616 env.Append(
617 CPPFLAGS = [
618 '/Zc:wchar_t-',
619 ],
620 )
621
[email protected]b0faad62008-10-21 23:59:03622#--------------------------- LINUX ---------------------------
[email protected]777c7bf2008-09-30 20:01:24623elif env['OS'] == 'linux':
624 env.Append(
625 CPPDEFINES = [
626 'LINUX',
627 ],
628 CPPPATH = [
629 '$THIRD_PARTY_DIR/gtk/include/gtk-2.0',
630 '$THIRD_PARTY_DIR/gtk/include/atk-1.0',
631 '$THIRD_PARTY_DIR/gtk/include/glib-2.0',
632 '$THIRD_PARTY_DIR/gtk/include/pango-1.0',
633 '$THIRD_PARTY_DIR/gtk/include/cairo',
634 '$THIRD_PARTY_DIR/gtk/lib/gtk-2.0/include',
635 '$THIRD_PARTY_DIR/gtk/lib/glib-2.0/include',
636 ],
637 CCFLAGS = [
638 '-fPIC',
639 '-fmessage-length=0',
640 '-Wall',
641 '-Werror',
642# NS_LITERAL_STRING does not work properly without this compiler option
643 '-fshort-wchar',
644# Additions to compile on hardy
645 '-Wno-unused-variable',
646 '-Wno-missing-braces',
647 '-Wno-address',
648 '-m32',
649 ],
650 CXXFLAGS = [
651 '-fno-exceptions',
652 '-fno-rtti',
653 '-Wno-non-virtual-dtor',
654 '-Wno-ctor-dtor-privacy',
655 '-funsigned-char',
656 '-Wno-char-subscripts',
657 ],
[email protected]4f3c5bb2008-12-08 21:45:23658 COMMON_LINKFLAGS = [
[email protected]777c7bf2008-09-30 20:01:24659 '-fPIC',
660 '-Bsymbolic',
661 '-pthread',
[email protected]4f3c5bb2008-12-08 21:45:23662 ],
663 SHLINKFLAGS = [
[email protected]777c7bf2008-09-30 20:01:24664 '-shared',
665 '-Wl,--version-script',
666 '-Wl,$OPEN_DIR/tools/xpcom-ld-script',
[email protected]777c7bf2008-09-30 20:01:24667# Additions to compile on hardy
668 '-m32',
669 ],
670 )
671 if env['MODE'] == 'dbg':
672 env.Append(
673 CPPFLAGS = [
674 '-g',
675 '-O0',
676 ],
677 )
678 else: # MODE=opt
679 env.Append(
680 CPPFLAGS = [
681 '-O2',
682 ],
683 )
[email protected]b0faad62008-10-21 23:59:03684#--------------------------- OSX ---------------------------
685elif env['OS'] == 'osx':
686# Gears uses the 10.4 SDK, so we need to build with g++-4.0.
687# Chrome uses g++-4.2 so we override this here.
688 env['CC'] = 'gcc-4.0'
689 env['CXX'] = 'g++-4.0'
690# Compile assembly files with the same command line as C files.
691 env['ASCOM'] = '$CCCOM'
692
693 env.Append(OSX_SDK_ROOT = '/Developer/SDKs/MacOSX10.4u.sdk')
[email protected]172914a2008-09-25 17:09:26694
[email protected]b0faad62008-10-21 23:59:03695 env.Append(
696 CPPDEFINES = [
697 'OSX',
698 'OS_MACOSX',
699# for breakpad
700 'USE_PROTECTED_ALLOCATIONS=1',
701 ],
702 CPPPATH = [
703# Breakpad assumes it is in the include path
704 '$THIRD_PARTY_DIR/breakpad_osx/src',
705 ],
706 CCFLAGS = [
[email protected]d924c4362008-11-14 20:23:01707 '-mmacosx-version-min=10.4',
[email protected]b0faad62008-10-21 23:59:03708 ('-arch', 'ppc'),
709 ('-arch', 'i386'),
710 '-fPIC',
711 '-fmessage-length=0',
712# TODO
713# '-Wall',
714# NS_LITERAL_STRING does not work properly without this compiler option
715 '-fshort-wchar',
716 '-fvisibility=hidden',
717# Breakpad on OSX needs debug symbols to use the STABS format, rather than the
718# default DWARF debug symbols format. Note that we enable gstabs for debug &
719# opt; we strip them later in opt.
720 '-gstabs+',
721 ],
722 CXXFLAGS = [
723 '-fvisibility-inlines-hidden',
724 '-fno-exceptions',
725 '-fno-rtti',
726 ('-Wall',
727 '-Wno-non-virtual-dtor',
728 '-Wno-ctor-dtor-privacy',
729 '-Wno-char-subscripts',
730# When a function is deprecated in gcc, it stupidly warns about all functions
731# and member functions that have the same name, regardless of signature.
732# Example: Standard osx headers deprecate 'SetPort', which causes a warning for
733# url_canon::Replacements::SetPort().
734 '-Wno-deprecated-declarations',
735 ),
736 '-funsigned-char',
737 ('-include', env.File('#/$OPEN_DIR/base/safari/prefix_header.h').abspath),
738 ('-isysroot', '$OSX_SDK_ROOT')
739 ],
[email protected]4f3c5bb2008-12-08 21:45:23740 COMMON_LINKFLAGS = [
[email protected]d924c4362008-11-14 20:23:01741 '-mmacosx-version-min=10.4',
742 '-fPIC',
[email protected]b0faad62008-10-21 23:59:03743 '-Bsymbolic',
[email protected]d924c4362008-11-14 20:23:01744 ('-arch', 'ppc'),
745 ('-arch', 'i386'),
746 ('-isysroot', '$OSX_SDK_ROOT'),
747 '-Wl,-dead_strip',
[email protected]4f3c5bb2008-12-08 21:45:23748 ],
749 SHLINKFLAGS = [
[email protected]f3f568b2008-11-19 22:38:46750 '-bundle', # DLLFLAGS
751 ],
752 FRAMEWORKS = [
753 'Carbon',
754 'CoreServices',
755 'Cocoa',
756 'WebKit',
[email protected]b0faad62008-10-21 23:59:03757 ],
[email protected]09c767b2008-11-24 23:00:00758 M4FLAGS = [
[email protected]04d34f22008-12-01 19:50:23759 '-DGEARS_ENABLER_PATH="$SF_INPUTMANAGER_BUNDLE"',
760 '-DGEARS_PLUGIN_PATH="$SF_PLUGIN_PROXY_BUNDLE"',
[email protected]09c767b2008-11-24 23:00:00761 '-DGEARS_INSTALLER_OUT_DIR="$INSTALLER_OUTDIR/Safari"',
[email protected]9da4a5ae2008-12-03 23:03:41762
763 # Keystone
764 '-DKEYSTONE_BASE_DIR="$MAIN_DIR/$PRIVATE_THIRD_PARTY_DIR/googlemac/Releases/Keystone/"',
765 '-DGEARS_INSTALLER_PACKAGE="$SF_INSTALLER_PKG"',
766 '-DGEARS_GENFILES_DIR="$SF_OUTDIR/genfiles"',
767 '-DGEARS_TOOLS_DIR="$MAIN_DIR/$PRIVATE_DIR/tools"',
[email protected]09c767b2008-11-24 23:00:00768 ],
[email protected]b0faad62008-10-21 23:59:03769 )
770 if env['MODE'] == 'dbg':
771 env.Append(
772 CPPFLAGS = [
773 '-g',
774 '-O0',
775 ],
776 )
777 else: # MODE=opt
778 env.Append(
779 CPPFLAGS = [
780 '-O2',
781 ],
782 )
[email protected]c0455892008-12-09 17:35:35783#--------------------------- ANDROID ---------------------------
784elif env['OS'] == 'android':
785 if not os.environ['ANDROID_BUILD_TOP']:
786 print ("Please set ANDROID_BUILD_TOP to the top"
787 " level of your Android source.")
788 Return()
789
790 if not os.environ['ANDROID_TOOLCHAIN']:
791 print ("Cannot determine location of the target toolchain."
792 " Please set ANDROID_TOOLCHAIN manually.")
793 Return()
794
795 env['ANDROID_BUILD_TOP'] = os.environ['ANDROID_BUILD_TOP']
796
797 # Figure out the cross-compile prefix by finding the *-gcc executable
798 # and taking the '*' as the prefix for the rest.
799 cross_prefix_command = os.popen(
800 r"ls %s/*-gcc | sed 's|\(.*/.*\-\)gcc|\1|g'" %
801 os.environ['ANDROID_TOOLCHAIN'])
802 cross_prefix = cross_prefix_command.read().strip()
803 if cross_prefix_command.close() != None:
804 Return()
805
806 # Find the output directory. Assume the only target output directory.
807 product_out_command = os.popen("ls %s/out/target/product/*" %
808 os.environ['ANDROID_BUILD_TOP'])
809 product_out = product_out_command.read().strip()
810 if product_out_command.close() != None:
811 Return()
812
813 env['CC'] = cross_prefix + 'gcc'
814 env['CXX'] = cross_prefix + 'g++'
815
816 env.Append(
817 CPPPATH = [
818 '$OPEN_DIR/base/android',
819 '$THIRD_PARTY_DIR/stlport/stlport',
820 '$THIRD_PARTY_DIR/stlport/stlport/stl',
821 '$THIRD_PARTY_DIR/stlport/stlport/stl/config',
822 '$THIRD_PARTY_DIR/spidermonkey/nspr/pr/include',
823 '$ANDROID_BUILD_TOP/include',
824 '$ANDROID_BUILD_TOP/include/nativehelper',
825 '$ANDROID_BUILD_TOP/system',
826 '$ANDROID_BUILD_TOP/system/bionic/include',
827 '$ANDROID_BUILD_TOP/system/bionic/arch-arm/include',
828 '$ANDROID_BUILD_TOP/system/kernel_headers',
829 '$ANDROID_BUILD_TOP/system/bionic/kernel/arch-arm',
830 '$ANDROID_BUILD_TOP/system/bionic/kernel/common',
831 '$ANDROID_BUILD_TOP/system/libm/include ',
832 '$ANDROID_BUILD_TOP/bionic',
833 '$ANDROID_BUILD_TOP/bionic/libc/include',
834 '$ANDROID_BUILD_TOP/bionic/libc/arch-arm',
835 '$ANDROID_BUILD_TOP/bionic/libc/arch-arm/include',
836 '$ANDROID_BUILD_TOP/bionic/libc/kernel/arch-arm',
837 '$ANDROID_BUILD_TOP/bionic/libc/kernel/common',
838 '$ANDROID_BUILD_TOP/bionic/libm/include',
839 '$ANDROID_BUILD_TOP/dalvik/libnativehelper/include',
840 '$ANDROID_BUILD_TOP/extlibs',
841 '$ANDROID_BUILD_TOP/extlibs/icu4c-3.8/common',
842 '$ANDROID_BUILD_TOP/extlibs/icu4c-3.8/i18n',
843 '$ANDROID_BUILD_TOP/extlibs/jpeg-6b',
844 '$ANDROID_BUILD_TOP/extlibs/sqlite',
845 '$ANDROID_BUILD_TOP/extlibs/zlib-1.2.3',
846 '$ANDROID_BUILD_TOP/external',
847 '$ANDROID_BUILD_TOP/external/icu4c/common',
848 '$ANDROID_BUILD_TOP/external/icu4c/i18n',
849 '$ANDROID_BUILD_TOP/external/jpeg',
850 '$ANDROID_BUILD_TOP/external/sqlite/dist',
851 '$ANDROID_BUILD_TOP/external/zlib',
852 '$ANDROID_BUILD_TOP/frameworks/base/include',
853 '$ANDROID_BUILD_TOP/system/core/include',
854 ],
855 CPPFLAGS = [
856 '-g',
857 '-c',
858 '-fPIC',
859 '-fmessage-length=0',
860 '-Wall',
861 '-fvisibility=hidden',
862# NS_LITERAL_STRING does not work properly without this compiler option
863 '-fshort-wchar',
864 '-funsigned-char',
865 '-march=armv5te',
866 '-mtune=xscale',
867 '-mthumb-interwork',
868 '-ffunction-sections',
869 '-fdata-sections',
870 '-fno-exceptions',
871 ],
872 CXXFLAGS = [
873 '-fno-rtti',
874 '-fvisibility-inlines-hidden',
875 '-Wno-non-virtual-dtor',
876 '-Wno-ctor-dtor-privacy',
877 ],
878 CPPDEFINES = [
879 'OS_ANDROID',
880 'ANDROID',
881 'TARGET_OS=android',
882 'BUILD_OSNAME=android',
883 'OSNAME=android',
884 'COMPILER_NAME=gcc',
885 '__SGI_STL_INTERNAL_PAIR_H',
886 '_CPP_UTILITY',
887 '_LITTLE_ENDIAN=1234',
888 '_BIG_ENDIAN=4321',
889 '_PDP_ENDIAN=3412',
890 '_BYTE_ORDER=_LITTLE_ENDIAN',
891 ],
892 COMMON_LINKFLAGS = [
893 '-g',
894 '-fPIC',
895 '-Bsymbolic',
896 '-nostdlib',
897 ],
898 SHLINKFLAGS = [
899 '-shared',
900 '-Wl,--gc-sections',
901 '-L$ANDROID_PRODUCT_OUT/system/lib',
902# Workaround for the Android C library not implementing
903# __aeabi_atexit, which is used to destruct static C++ objects. This
904# causes all calls to be rewritten by the linker to
905# __wrap___aeabi_atexit, which we then implement.
906 '-Wl,--wrap,__aeabi_atexit',
907 ],
908 )
909 if env['MODE'] == 'dbg':
910 env.Append(
911 CPPFLAGS = [
912 '-g',
913 '-O',
914 '-funwind-tables',
915 '-mapcs-frame',
916 ],
917 )
918 else: # MODE=opt
919 env.Append(
920 CPPFLAGS = [
921 '-O2',
922 '-mthumb',
923 '-fomit-frame-pointer',
924 ],
925 )
[email protected]b92ed9d22008-10-23 19:40:08926
[email protected]17ee3a072008-11-06 22:45:50927# Custom builder to work around a scons and/or hammer bug. ComponentLibrary
928# tries to install the library to COMPONENT_LIBRARY_DIR, but since we overrode
929# that value, scons gets confused. I'm not sure who is at fault here.
930# See http://code.google.com/p/chromium/issues/detail?id=4177.
931def GearsStaticLibrary(env, *args, **kw):
[email protected]de2c4cc2008-12-26 04:38:25932 lib = env.ChromeLibrary(*args, **kw)
[email protected]17ee3a072008-11-06 22:45:50933 env.Install('$COMPONENT_LIBRARY_DIR', lib[0])
934 return lib
935env.AddMethod(GearsStaticLibrary)
936
[email protected]7ef840ff2008-09-22 21:15:54937# Load all the components
[email protected]186f5602008-09-16 18:24:30938
939sconscripts = [
[email protected]7ef840ff2008-09-22 21:15:54940 'SConscript.googleurl',
[email protected]186f5602008-09-16 18:24:30941 'SConscript.libjpeg',
942 'SConscript.libpng',
[email protected]b0faad62008-10-21 23:59:03943 'SConscript.libmozjs',
[email protected]186f5602008-09-16 18:24:30944 'SConscript.sqlite',
945 'SConscript.zlib',
[email protected]6799ef02008-11-13 20:32:25946 'SConscript.libbreakpad_osx',
947 'SConscript.libgd',
[email protected]186f5602008-09-16 18:24:30948]
949
[email protected]7ef840ff2008-09-22 21:15:54950for each in sconscripts:
951 env.SConscript(each,
952 exports=['env'],
[email protected]c1a37472008-10-08 00:05:26953 variant_dir='$COMMON_OUTDIR',
[email protected]7ef840ff2008-09-22 21:15:54954 duplicate=0)
[email protected]186f5602008-09-16 18:24:30955
[email protected]04d34f22008-12-01 19:50:23956# Order of execution is important here. Each sub-script adds to the
957# environment, for use by later scripts.
958env = env.SConscript('SConscript.inputs', exports=['env'])
959
960outputs = env.SConscript('SConscript.common',
[email protected]07c37212008-11-07 00:27:01961 exports=['env'],
962 variant_dir='$COMMON_OUTDIR',
963 duplicate=0)
[email protected]04d34f22008-12-01 19:50:23964env.Append(**outputs)
[email protected]6b3531282008-10-10 00:01:37965
[email protected]c1a37472008-10-08 00:05:26966browsers = [env['BROWSER']]
967if browsers[0] == 'all':
968 browsers = env['VALID_BROWSERS']
969print 'Building:', browsers
970
[email protected]04d34f22008-12-01 19:50:23971# We run the browser script once for each browser target we want to build.
972# Each script adds variables to the environment in the form of
973# '${BROWSER}_foo = bar' for use by the installers script.
[email protected]c1a37472008-10-08 00:05:26974for each in browsers:
[email protected]6b3531282008-10-10 00:01:37975 env.Replace(BROWSER = each)
[email protected]04d34f22008-12-01 19:50:23976 outputs = env.SConscript('SConscript.browser',
[email protected]c1a37472008-10-08 00:05:26977 exports=['env'],
978 variant_dir='$BROWSER_OUTDIR',
979 duplicate=0)
[email protected]04d34f22008-12-01 19:50:23980 browser_outputs = {}
981 for key, value in outputs.iteritems():
982 browser_outputs[each + '_' + key] = value
983 env.Append(**browser_outputs)
[email protected]c1a37472008-10-08 00:05:26984
[email protected]f3f568b2008-11-19 22:38:46985# Note: even though the installers write to $INSTALLER_OUTDIR, they need to
986# read files from other dirs, so we give them a variant_dir at the toplevel.
[email protected]c1a37472008-10-08 00:05:26987env.SConscript('SConscript.installers',
[email protected]7ef840ff2008-09-22 21:15:54988 exports=['env'],
[email protected]c1a37472008-10-08 00:05:26989 variant_dir='$BASE_OUTDIR',
[email protected]7ef840ff2008-09-22 21:15:54990 duplicate=0)
[email protected]2dedae302008-11-26 01:43:42991
992env.Alias('gears-installers', 'gears')