OLD | NEW |
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-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('env', 'env_res') | 5 Import('env', 'env_res') |
6 | 6 |
7 env = env.Clone() | 7 env = env.Clone() |
8 env_res = env_res.Clone() | |
9 | 8 |
| 9 env.ApplySConscript([ |
| 10 '$BASE_DIR/using_base.scons', |
| 11 '$BSPATCH_DIR/using_bspatch.scons', |
| 12 '$ICU38_DIR/using_icu38.scons', |
| 13 '$LZMA_SDK_DIR/using_lzma_sdk.scons', |
| 14 ]) |
10 | 15 |
11 env_res.Append( | 16 if env['PLATFORM'] == 'win32': |
12 CPPPATH = [ | 17 env_res = env_res.Clone() |
13 "$TARGET_ROOT", | |
14 ".", | |
15 "$CHROME_SRC_DIR", | |
16 ], | |
17 RCFLAGS = [ | |
18 ["/l", "0x409"], | |
19 ], | |
20 ) | |
21 | 18 |
| 19 env_res.Append( |
| 20 CPPPATH = [ |
| 21 "$TARGET_ROOT", |
| 22 ".", |
| 23 "$CHROME_SRC_DIR", |
| 24 ], |
| 25 RCFLAGS = [ |
| 26 ["/l", "0x409"], |
| 27 ], |
| 28 ) |
22 | 29 |
23 resources = [ | 30 resources = env_res.RES('setup.rc') |
24 env_res.RES('setup.rc'), | |
25 ] | |
26 | 31 |
27 | 32 |
28 env.Prepend( | 33 env.Prepend( |
29 CPPPATH = [ | 34 CPPPATH = [ |
30 '../util', | 35 '../util', |
31 '$TARGET_ROOT', | 36 '$TARGET_ROOT', |
32 '.', | 37 '.', |
33 '$CHROME_SRC_DIR', | 38 '$CHROME_SRC_DIR', |
34 ], | 39 ], |
35 LIBS = [ | 40 LIBS = [ |
36 'base', | |
37 'bspatch', | |
38 'common', | 41 'common', |
39 env['ICU_LIBS'], # TODO(sgk): '$ICU_LIBS' when scons is fixed | |
40 'lzma_sdk', | |
41 'util', | 42 'util', |
42 ], | 43 ], |
43 ) | 44 ) |
44 | 45 |
45 env.Prepend( | 46 if env['PLATFORM'] == 'win32': |
46 LINKFLAGS = [ | 47 env.Prepend( |
47 '/INCREMENTAL', | 48 LINKFLAGS = [ |
48 '/DEBUG', | 49 '/INCREMENTAL', |
| 50 '/DEBUG', |
49 | 51 |
50 '/DELAYLOAD:"dwmapi.dll"', | 52 '/DELAYLOAD:"dwmapi.dll"', |
51 '/DELAYLOAD:"uxtheme.dll"', | 53 '/DELAYLOAD:"uxtheme.dll"', |
52 | 54 |
53 '/OPT:NOWIN98', | 55 '/OPT:NOWIN98', |
54 '/SUBSYSTEM:WINDOWS', | 56 '/SUBSYSTEM:WINDOWS', |
55 '/MACHINE:X86', | 57 '/MACHINE:X86', |
56 '/FIXED:No', | 58 '/FIXED:No', |
57 | 59 |
58 '/safeseh', | 60 '/safeseh', |
59 '/dynamicbase', | 61 '/dynamicbase', |
60 '/ignore:4199', | 62 '/ignore:4199', |
61 '/nxcompat', | 63 '/nxcompat', |
62 | 64 |
63 '/PDB:${TARGETS[1]}', | 65 '/PDB:${TARGETS[1]}', |
64 ], | 66 ], |
65 LIBS = [ | 67 LIBS = [ |
66 'msi.lib', | 68 'msi', |
67 ], | 69 ], |
68 ) | 70 ) |
| 71 |
69 | 72 |
70 input_files = [ | 73 input_files = [ |
71 'install.cc', | 74 'install.cc', |
72 'main.cc', | 75 'main.cc', |
73 'setup.cc', | 76 'setup.cc', |
74 'setup_constants.cc', | 77 'setup_constants.cc', |
75 'uninstall.cc', | 78 'uninstall.cc', |
76 ] | 79 ] |
77 | 80 |
78 exe = env.ChromeProgram('setup', resources + input_files) | 81 env.ChromeProgram('setup', resources + input_files) |
79 i = env.Install('$TARGET_ROOT', exe) | |
80 | |
81 env.Alias('chrome', i) | |
82 | |
83 | 82 |
84 env.ChromeVersionRC('setup_exe_version.rc', | 83 env.ChromeVersionRC('setup_exe_version.rc', |
85 'setup_exe_version.rc.version', | 84 'setup_exe_version.rc.version', |
86 PWD = env.Dir('.')) | 85 PWD = env.Dir('.')) |
87 | |
OLD | NEW |