OLD | NEW |
| (Empty) |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 Import('env') | |
6 | |
7 env = env.Clone() | |
8 | |
9 env.ApplySConscript([ | |
10 '$GTEST_DIR/../using_gtest.scons', | |
11 ]) | |
12 | |
13 | |
14 # TODO(port): Don't be too fooled by the presence of all the | |
15 # if env.Bit('windows') tests in this file into thinking | |
16 # this is necessarily portable. They're just there to wall off the | |
17 # obviously windows-specific things | |
18 | |
19 if env.Bit('windows'): | |
20 env_res = env.Clone() | |
21 | |
22 env_res.Append( | |
23 CPPPATH = [ | |
24 "$DESTINATION_ROOT", | |
25 ".", | |
26 "$CHROME_SRC_DIR", | |
27 ], | |
28 RCFLAGS = [ | |
29 ["/l", "0x409"], | |
30 ], | |
31 ) | |
32 | |
33 resources = env_res.RES('mini_installer.rc') | |
34 | |
35 | |
36 env.Prepend( | |
37 CPPPATH = [ | |
38 '$CHROME_SRC_DIR', | |
39 ], | |
40 LIBS = [ | |
41 'chrome', | |
42 ], | |
43 ) | |
44 | |
45 if env.Bit('windows'): | |
46 env.FilterOut( | |
47 LIBS = ['DelayImp.lib'], | |
48 CCFLAGS = ['/RTC1'], | |
49 ) | |
50 | |
51 env.Prepend( | |
52 CCFLAGS = [ | |
53 '/TP', | |
54 '/GS-', # because we link with /NODEFAULTLIB | |
55 ], | |
56 LINKFLAGS = [ | |
57 '/INCREMENTAL', | |
58 '/NODEFAULTLIB', | |
59 '/DEBUG', | |
60 '/SUBSYSTEM:WINDOWS', | |
61 '/OPT:NOWIN98', | |
62 '/ENTRY:"MainEntryPoint"', | |
63 '/MACHINE:X86', | |
64 '/FIXED:No', | |
65 | |
66 '/SAFESEH:NO', | |
67 '/NXCOMPAT', | |
68 '/DYNAMICBASE:NO', | |
69 | |
70 '/PDB:${TARGETS[1]}', | |
71 #'/MAP:${TARGETS[2]}', | |
72 ], | |
73 LIBS = [ | |
74 'shlwapi', | |
75 ], | |
76 ) | |
77 | |
78 input_files = ChromeFileList([ | |
79 # TODO(sgk): violate standard indentation so we don't have to | |
80 # reindent too much when we remove the explicit MSVSFilter() calls | |
81 # in favor of generating the hierarchy to reflect the file system. | |
82 MSVSFilter('resources', [ | |
83 'mini_installer.ico', | |
84 'mini_installer.rc', | |
85 'mini_installer_exe_version.rc.version', | |
86 'mini_installer_resource.h', | |
87 ]), | |
88 'chrome.release', | |
89 'mini_installer.cc', | |
90 'mini_installer.h', | |
91 'pe_resource.cc', | |
92 'pe_resource.h', | |
93 ]) | |
94 | |
95 if env.Bit('windows'): | |
96 additional_dependencies = [ | |
97 "$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/memset.obj", | |
98 "$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/P4_memset.obj", | |
99 ] | |
100 | |
101 # TODO(port): | |
102 if env.Bit('windows'): | |
103 env.ChromeProgram('mini_installer', | |
104 input_files + additional_dependencies + resources) | |
105 | |
106 | |
107 env.AppendENVPath('PATH', r'C:\WINDOWS\system32') | |
108 | |
109 # TODO(port): | |
110 if env.Bit('windows'): | |
111 packed = env.Command('$DESTINATION_ROOT/packed_files.txt', | |
112 [('$CHROME_DIR/tools/' | |
113 + 'build/win/create_installer_archive.py'), | |
114 '$CHROME_DIR/installer/mini_installer/chrome.release'], | |
115 ('$PYTHON ${SOURCES[0]}' | |
116 ' --output_dir=${TARGET.dir}' | |
117 ' --input_file=${SOURCES[1]}')) | |
118 env.Depends(packed, '$DESTINATION_ROOT/setup.exe') | |
119 | |
120 # mini_installer.rc depends on the generated packed_files.txt | |
121 # TODO(sgk): implicit dependency should be picked up automatically | |
122 env.Depends(resources, packed) | |
123 | |
124 | |
125 # TODO(port): | |
126 if env.Bit('windows'): | |
127 exe_version_rc = env.ChromeVersionRC('mini_installer_exe_version.rc', | |
128 'mini_installer_exe_version.rc.version', | |
129 PWD=Dir('.')) | |
130 | |
131 # TODO(sgk): implicit dependency should be picked up automatically | |
132 env_res.Depends(resources, exe_version_rc) | |
133 | |
134 p = env.ChromeMSVSProject('mini_installer.vcproj', | |
135 dest=('$CHROME_SRC_DIR/chrome/installer/' | |
136 + 'mini_installer/mini_installer.vcproj'), | |
137 guid='{24A5AC7C-280B-4899-9153-6BA570A081E7}', | |
138 keyword='Win32Proj', | |
139 dependencies = [ | |
140 '$CHROME_DIR/app/locales/et.vcproj', | |
141 '$CHROME_DIR/app/locales/pt-PT.vcproj', | |
142 '$CHROME_DIR/app/locales/fr.vcproj', | |
143 '$CHROME_DIR/app/locales/uk.vcproj', | |
144 '$CHROME_DIR/installer/setup/setup.vcproj', | |
145 '$CHROME_DIR/app/locales/th.vcproj', | |
146 '$CHROME_DIR/app/locales/hi.vcproj', | |
147 '$CHROME_DIR/app/locales/gu.vcproj', | |
148 '$CHROME_DIR/app/locales/it.vcproj', | |
149 '$CHROME_DIR/app/locales/pt-BR.vcproj', | |
150 '$CHROME_DIR/app/locales/sr.vcproj', | |
151 '$CHROME_DIR/app/locales/ko.vcproj', | |
152 '$CHROME_DIR/app/locales/en-GB.vcproj', | |
153 '$CHROME_DIR/app/locales/fil.vcproj', | |
154 '$CHROME_DIR/app/locales/ar.vcproj', | |
155 '$CHROME_DIR/app/locales/kn.vcproj', | |
156 '$CHROME_DIR/app/locales/bn.vcproj', | |
157 '$CHROME_DIR/app/locales/es.vcproj', | |
158 '$CHROME_DIR/app/locales/bg.vcproj', | |
159 '$CHROME_DIR/app/locales/nl.vcproj', | |
160 '$CHROME_DIR/app/locales/fi.vcproj', | |
161 '$CHROME_DIR/app/locales/tr.vcproj', | |
162 '$CHROME_DIR/app/locales/ta.vcproj', | |
163 '$CHROME_DIR/app/chrome_exe.vcproj', | |
164 '$CHROME_DIR/app/locales/ru.vcproj', | |
165 '$CHROME_DIR/app/locales/cs.vcproj', | |
166 '$CHROME_DIR/app/locales/lt.vcproj', | |
167 '$CHROME_DIR/app/locales/sk.vcproj', | |
168 ('$CHROME_DIR/tools/crash_service/' + | |
169 'crash_service.vcproj'), | |
170 '$CHROME_DIR/app/locales/te.vcproj', | |
171 '$CHROME_DIR/app/locales/pl.vcproj', | |
172 '$ICU38_DIR/build/icudt.vcproj', | |
173 '$CHROME_DIR/app/locales/he.vcproj', | |
174 '$CHROME_DIR/app/locales/mr.vcproj', | |
175 '$CHROME_DIR/app/locales/da.vcproj', | |
176 '$CHROME_DIR/app/locales/lv.vcproj', | |
177 '$CHROME_DIR/app/locales/hu.vcproj', | |
178 '$CHROME_DIR/app/locales/sv.vcproj', | |
179 '$CHROME_DIR/app/locales/ja.vcproj', | |
180 '$CHROME_DIR/app/locales/nb.vcproj', | |
181 '$CHROME_DIR/app/locales/de.vcproj', | |
182 '$RLZ_DIR/rlz.vcproj', | |
183 '$CHROME_DIR/app/chrome_dll.vcproj', | |
184 '$CHROME_DIR/app/locales/zh-CN.vcproj', | |
185 '$CHROME_DIR/app/locales/sl.vcproj', | |
186 '$CHROME_DIR/app/locales/ro.vcproj', | |
187 '$CHROME_DIR/app/locales/ml.vcproj', | |
188 '$CHROME_DIR/app/locales/en-US.vcproj', | |
189 '$CHROME_DIR/app/locales/hr.vcproj', | |
190 '$CHROME_DIR/app/locales/el.vcproj', | |
191 '$CHROME_DIR/app/locales/vi.vcproj', | |
192 '$CHROME_DIR/app/locales/or.vcproj', | |
193 '$BSDIFF_DIR/bsdiff.vcproj', | |
194 '$CHROME_DIR/app/locales/id.vcproj', | |
195 '$CHROME_DIR/app/locales/zh-TW.vcproj', | |
196 '$CHROME_DIR/app/locales/ca.vcproj', | |
197 '$CHROME_DIR/app/locales/es-419.vcproj', | |
198 '$CHROME_DIR/app/theme/theme_dll.vcproj', | |
199 ], | |
200 # TODO(sgk): when we can intuit the hierarchy | |
201 # from the built targets. | |
202 #buildtargets=TODO, | |
203 files=input_files, | |
204 relative_path_prefix='./', | |
205 tools=[ | |
206 MSVSTool('create installer archive', | |
207 LastChromeInstaller='$(LAST_CHROME_INSTALLER)', | |
208 LastChromeVersion='$(LAST_CHROME_VERSION)', | |
209 SkipRebuildArchive='$(SKIP_REBUILD_CHROME_ARCHIVE)' | |
210 ), | |
211 'Version', | |
212 'VCCLCompilerTool', | |
213 'VCResourceCompilerTool', | |
214 'VCLinkerTool', | |
215 'VCManifestTool', | |
216 ], | |
217 ConfigurationType='1') | |
218 | |
219 p.AddToolFile('$CHROME_DIR/tools/build/win/release.rules') | |
220 p.AddToolFile('$CHROME_DIR/tools/build/win/version.rules') | |
221 | |
222 p.AddConfig('Debug|Win32', | |
223 InheritedPropertySheets=[ | |
224 './mini_installer_debug.vsprops', | |
225 '$(SolutionDir)../testing/using_gtest.vsprops', | |
226 ]) | |
227 | |
228 p.AddConfig('Release|Win32', | |
229 InheritedPropertySheets=[ | |
230 './mini_installer_release.vsprops', | |
231 '$(SolutionDir)../testing/using_gtest.vsprops', | |
232 ]) | |
OLD | NEW |