OLD | NEW |
| (Empty) |
1 # Copyright (c) 2012 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 # this file is meant to be included within a target dict to generate the | |
6 # mini_installer, the embedder must provide the following variables: | |
7 # - chrome_dll_project: The target generating the main chrome DLLs. | |
8 # - chrome_dll_path: The path to the version of chrome.dll to put in the | |
9 # mini_installer. | |
10 # - The output directory for mini_installer.exe. | |
11 { | |
12 'type': 'executable', | |
13 'dependencies': [ | |
14 '<@(chrome_dll_project)', | |
15 '../chrome.gyp:chrome', | |
16 '../chrome.gyp:chrome_nacl_win64', | |
17 '../chrome.gyp:default_extensions', | |
18 '../chrome.gyp:setup', | |
19 'installer_tools.gyp:test_installer_sentinel', | |
20 'mini_installer_version.gyp:mini_installer_version', | |
21 ], | |
22 'include_dirs': [ | |
23 '../..', | |
24 '<(INTERMEDIATE_DIR)', | |
25 '<(SHARED_INTERMEDIATE_DIR)/chrome', | |
26 ], | |
27 'sources': [ | |
28 '<(INTERMEDIATE_DIR)/packed_files.rc', | |
29 '<(PRODUCT_DIR)/mini_installer_exe_version.rc', | |
30 'mini_installer/appid.h', | |
31 'mini_installer/chrome.release', | |
32 'mini_installer/chrome_appid.cc', | |
33 'mini_installer/configuration.cc', | |
34 'mini_installer/configuration.h', | |
35 'mini_installer/decompress.cc', | |
36 'mini_installer/decompress.h', | |
37 'mini_installer/exit_code.h', | |
38 'mini_installer/mini_installer.cc', | |
39 'mini_installer/mini_installer.ico', | |
40 'mini_installer/mini_installer.rc', | |
41 'mini_installer/mini_installer_constants.cc', | |
42 'mini_installer/mini_installer_constants.h', | |
43 'mini_installer/mini_installer_exe_version.rc.version', | |
44 'mini_installer/mini_installer_resource.h', | |
45 'mini_installer/mini_string.cc', | |
46 'mini_installer/mini_string.h', | |
47 'mini_installer/pe_resource.cc', | |
48 'mini_installer/pe_resource.h', | |
49 'mini_installer/regkey.cc', | |
50 'mini_installer/regkey.h', | |
51 ], | |
52 'msvs_settings': { | |
53 'VCCLCompilerTool': { | |
54 'EnableIntrinsicFunctions': 'true', | |
55 'BufferSecurityCheck': 'false', | |
56 'BasicRuntimeChecks': '0', | |
57 'ExceptionHandling': '0', | |
58 }, | |
59 'VCLinkerTool': { | |
60 'OutputFile': '<(output_dir)/mini_installer.exe', | |
61 'RandomizedBaseAddress': '1', | |
62 'DataExecutionPrevention': '0', | |
63 'AdditionalLibraryDirectories': [ | |
64 '<(PRODUCT_DIR)/lib' | |
65 ], | |
66 'DelayLoadDLLs': [], | |
67 'EntryPointSymbol': 'MainEntryPoint', | |
68 'IgnoreAllDefaultLibraries': 'true', | |
69 'OptimizeForWindows98': '1', | |
70 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS | |
71 'AdditionalDependencies': [ | |
72 'shlwapi.lib', | |
73 'setupapi.lib', | |
74 ], | |
75 }, | |
76 'VCManifestTool': { | |
77 'AdditionalManifestFiles': [ | |
78 '$(ProjectDir)\\mini_installer\\mini_installer.exe.manifest', | |
79 ], | |
80 }, | |
81 }, | |
82 'configurations': { | |
83 'Debug_Base': { | |
84 'msvs_settings': { | |
85 'VCCLCompilerTool': { | |
86 'BasicRuntimeChecks': '0', | |
87 'BufferSecurityCheck': 'false', | |
88 'ExceptionHandling': '0', | |
89 }, | |
90 'VCLinkerTool': { | |
91 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS | |
92 'AdditionalOptions': [ | |
93 '/safeseh:no', | |
94 '/dynamicbase:no', | |
95 '/ignore:4199', | |
96 '/ignore:4221', | |
97 '/nxcompat', | |
98 ], | |
99 }, | |
100 }, | |
101 }, | |
102 'Release_Base': { | |
103 'includes': ['../../build/internal/release_defaults.gypi'], | |
104 'msvs_settings': { | |
105 'VCCLCompilerTool': { | |
106 'EnableIntrinsicFunctions': 'true', | |
107 'BasicRuntimeChecks': '0', | |
108 'BufferSecurityCheck': 'false', | |
109 'ExceptionHandling': '0', | |
110 'WholeProgramOptimization': 'false', | |
111 }, | |
112 'VCLinkerTool': { | |
113 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS | |
114 'Profile': 'false', # Conflicts with /FIXED | |
115 'AdditionalOptions': [ | |
116 '/SAFESEH:NO', | |
117 '/NXCOMPAT', | |
118 '/DYNAMICBASE:NO', | |
119 '/FIXED', | |
120 ], | |
121 }, | |
122 }, | |
123 }, | |
124 }, | |
125 | |
126 # Disable precompiled headers for this project, to avoid | |
127 # linker errors when building with VS 2008. | |
128 'msvs_precompiled_header': '', | |
129 'msvs_precompiled_source': '', | |
130 | |
131 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | |
132 'msvs_disabled_warnings': [ 4267, ], | |
133 | |
134 'variables': { | |
135 # Opt out the common compatibility manifest to work around | |
136 # crbug.com/272660. | |
137 # TODO(yukawa): Enable the common compatibility manifest again. | |
138 'win_exe_compatibility_manifest': '', | |
139 }, | |
140 'actions': [ | |
141 { | |
142 'action_name': 'installer_archive', | |
143 'variables': { | |
144 'create_installer_archive_py_path': | |
145 '../tools/build/win/create_installer_archive.py', | |
146 }, | |
147 'conditions': [ | |
148 ['enable_hidpi == 1', { | |
149 'variables': { | |
150 'enable_hidpi_flag': '--enable_hidpi=1', | |
151 }, | |
152 }, { | |
153 'variables': { | |
154 'enable_hidpi_flag': '', | |
155 }, | |
156 }], | |
157 ['component == "shared_library"', { | |
158 'variables': { | |
159 'component_build_flag': '--component_build=1', | |
160 }, | |
161 }, { | |
162 'variables': { | |
163 'component_build_flag': '', | |
164 }, | |
165 'outputs': [ | |
166 '<(output_dir)/chrome.packed.7z', | |
167 ], | |
168 }], | |
169 ['disable_nacl==1', { | |
170 'inputs!': [ | |
171 '<(PRODUCT_DIR)/nacl64.exe', | |
172 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', | |
173 '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', | |
174 ], | |
175 }], | |
176 ['target_arch=="x64"', { | |
177 'inputs!': [ | |
178 '<(PRODUCT_DIR)/nacl64.exe', | |
179 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', | |
180 ], | |
181 'variables': { | |
182 'target_arch_flag': '--target_arch=x64', | |
183 }, | |
184 }, { | |
185 'variables': { | |
186 'target_arch_flag': '--target_arch=x86', | |
187 }, | |
188 }], | |
189 ['icu_use_data_file_flag == 0', { | |
190 'inputs': [ | |
191 '<(PRODUCT_DIR)/icudt.dll', | |
192 ], | |
193 }, { # else icu_use_data_file_flag != 0 | |
194 'inputs': [ | |
195 '<(PRODUCT_DIR)/icudtl.dat', | |
196 ], | |
197 }], | |
198 ['v8_use_external_startup_data == 1', { | |
199 'inputs': [ | |
200 '<(PRODUCT_DIR)/natives_blob.bin', | |
201 '<(PRODUCT_DIR)/snapshot_blob.bin', | |
202 ], | |
203 }], | |
204 ], | |
205 'inputs': [ | |
206 '<(create_installer_archive_py_path)', | |
207 '<(PRODUCT_DIR)/chrome.exe', | |
208 '<@(chrome_dll_path)', | |
209 '<(PRODUCT_DIR)/nacl64.exe', | |
210 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', | |
211 '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', | |
212 '<(PRODUCT_DIR)/locales/en-US.pak', | |
213 '<(PRODUCT_DIR)/setup.exe', | |
214 'mini_installer/chrome.release', | |
215 ], | |
216 'outputs': [ | |
217 # Also note that chrome.packed.7z is defined as an output in a | |
218 # conditional above. | |
219 '<(output_dir)/chrome.7z', | |
220 '<(output_dir)/setup.ex_', | |
221 '<(INTERMEDIATE_DIR)/packed_files.rc', | |
222 ], | |
223 'depfile': '<(INTERMEDIATE_DIR)/installer_archive.d', | |
224 'action': [ | |
225 'python', | |
226 '<(create_installer_archive_py_path)', | |
227 '--build_dir=<(PRODUCT_DIR)', | |
228 '--output_dir=<(output_dir)', | |
229 '--staging_dir=<(INTERMEDIATE_DIR)', | |
230 '--input_file=mini_installer/chrome.release', | |
231 '--resource_file_path=<(INTERMEDIATE_DIR)/packed_files.rc', | |
232 '--depfile=<(INTERMEDIATE_DIR)/installer_archive.d', | |
233 '<(enable_hidpi_flag)', | |
234 '<(component_build_flag)', | |
235 '<(target_arch_flag)', | |
236 # TODO(sgk): may just use environment variables | |
237 #'--distribution=$(CHROMIUM_BUILD)', | |
238 '--distribution=_google_chrome', | |
239 # Optional arguments to generate diff installer | |
240 #'--last_chrome_installer=C:/Temp/base', | |
241 #'--setup_exe_format=DIFF', | |
242 #'--diff_algorithm=COURGETTE', | |
243 # Optional argument for verbose archiving output. | |
244 #'--verbose', | |
245 ], | |
246 'message': 'Create installer archive', | |
247 }, | |
248 ], | |
249 'conditions': [ | |
250 ['OS=="win" and buildtype=="Official"', { | |
251 # Optimize for size when doing an official build. | |
252 'optimize' :'size', | |
253 }], | |
254 ], | |
255 } | |
OLD | NEW |