Update broken references to image assets
[chromium-blink-merge.git] / chrome / installer / mini_installer.gyp
blob161ca4e03d39ce29d37f18d4210fa3d67d240f28
2   'variables': {
3     'version_py': '<(DEPTH)/build/util/version.py',
4     'version_path': '../../chrome/VERSION',
5     'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
6     'branding_dir': '../app/theme/<(branding_path_component)',
7     'msvs_use_common_release': 0,
8     'msvs_use_common_linker_extras': 0,
9     'mini_installer_internal_deps%': 0,
10     'mini_installer_official_deps%': 0,
11   },
12   'includes': [
13     '../../build/win_precompile.gypi',
14   ],
15   'conditions': [
16     ['OS=="win"', {
17       'includes': [
18         '../test/mini_installer/test_installer.gypi',
19       ],
20       'targets': [
21         {
22           # A target that is outdated if any of the mini_installer test sources
23           # are modified.
24           'target_name': 'test_installer_sentinel',
25           'type': 'none',
26           'actions': [
27             {
28               'action_name': 'touch_sentinel',
29               'variables': {
30                 'touch_sentinel_py': '../tools/build/win/touch_sentinel.py',
31               },
32               'inputs': [
33                 '<@(test_installer_sources)',  # from test_installer.gypi
34                 '<(touch_sentinel_py)',
35               ],
36               'outputs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/installer/test_installer_sentinel'],
37               'action': ['python', '<(touch_sentinel_py)', '<@(_outputs)'],
38             },
39           ],
40         },
41         {
42           # GN version: //chrome/installer/mini_installer
43           'target_name': 'mini_installer',
44           'type': 'executable',
46           'dependencies': [
47             '../chrome.gyp:chrome',
48             '../chrome.gyp:chrome_nacl_win64',
49             '../chrome.gyp:chrome_dll',
50             '../chrome.gyp:default_extensions',
51             '../chrome.gyp:setup',
52             'test_installer_sentinel',
53           ],
54           'include_dirs': [
55             '../..',
56             '<(INTERMEDIATE_DIR)',
57             '<(SHARED_INTERMEDIATE_DIR)/chrome',
58           ],
59           'sources': [
60             '<(INTERMEDIATE_DIR)/packed_files.rc',
61             'mini_installer/appid.h',
62             'mini_installer/chrome.release',
63             'mini_installer/chrome_appid.cc',
64             'mini_installer/configuration.cc',
65             'mini_installer/configuration.h',
66             'mini_installer/decompress.cc',
67             'mini_installer/decompress.h',
68             'mini_installer/exit_code.h',
69             'mini_installer/mini_installer.cc',
70             'mini_installer/mini_installer.ico',
71             'mini_installer/mini_installer.rc',
72             'mini_installer/mini_installer_constants.cc',
73             'mini_installer/mini_installer_constants.h',
74             'mini_installer/mini_installer_exe_version.rc.version',
75             'mini_installer/mini_installer_resource.h',
76             'mini_installer/mini_string.cc',
77             'mini_installer/mini_string.h',
78             'mini_installer/pe_resource.cc',
79             'mini_installer/pe_resource.h',
80             'mini_installer/regkey.cc',
81             'mini_installer/regkey.h',
82           ],
83           'msvs_settings': {
84             'VCCLCompilerTool': {
85               'EnableIntrinsicFunctions': 'true',
86               'BufferSecurityCheck': 'false',
87               'BasicRuntimeChecks': '0',
88               'ExceptionHandling': '0',
89             },
90             'VCLinkerTool': {
91               'RandomizedBaseAddress': '1',
92               'DataExecutionPrevention': '0',
93               'AdditionalLibraryDirectories': [
94                 '<(PRODUCT_DIR)/lib'
95               ],
96               'DelayLoadDLLs': [],
97               'EntryPointSymbol': 'MainEntryPoint',
98               'IgnoreAllDefaultLibraries': 'true',
99               'OptimizeForWindows98': '1',
100               'SubSystem': '2',     # Set /SUBSYSTEM:WINDOWS
101               'AdditionalDependencies': [
102                 'shlwapi.lib',
103                 'setupapi.lib',
104               ],
105             },
106             'VCManifestTool': {
107               'AdditionalManifestFiles': [
108                 '$(ProjectDir)\\mini_installer\\mini_installer.exe.manifest',
109               ],
110             },
111           },
112           'configurations': {
113             'Debug_Base': {
114               'msvs_settings': {
115                 'VCCLCompilerTool': {
116                   'BasicRuntimeChecks': '0',
117                   'BufferSecurityCheck': 'false',
118                   'ExceptionHandling': '0',
119                 },
120                 'VCLinkerTool': {
121                   'SubSystem': '2',     # Set /SUBSYSTEM:WINDOWS
122                   'AdditionalOptions': [
123                     '/safeseh:no',
124                     '/dynamicbase:no',
125                     '/ignore:4199',
126                     '/ignore:4221',
127                     '/nxcompat',
128                   ],
129                 },
130               },
131             },
132             'Release_Base': {
133               'includes': ['../../build/internal/release_defaults.gypi'],
134               'msvs_settings': {
135                 'VCCLCompilerTool': {
136                   'EnableIntrinsicFunctions': 'true',
137                   'BasicRuntimeChecks': '0',
138                   'BufferSecurityCheck': 'false',
139                   'ExceptionHandling': '0',
140                   'WholeProgramOptimization': 'false',
141                 },
142                 'VCLinkerTool': {
143                   'SubSystem': '2',     # Set /SUBSYSTEM:WINDOWS
144                   'Profile': 'false',   # Conflicts with /FIXED
145                   'AdditionalOptions': [
146                     '/SAFESEH:NO',
147                     '/NXCOMPAT',
148                     '/DYNAMICBASE:NO',
149                     '/FIXED',
150                   ],
151                 },
152               },
153             },
154           },
156           # Disable precompiled headers for this project, to avoid
157           # linker errors when building with VS 2008.
158           'msvs_precompiled_header': '',
159           'msvs_precompiled_source': '',
161           'variables': {
162             # Opt out the common compatibility manifest to work around
163             # crbug.com/272660.
164             # TODO(yukawa): Enable the common compatibility manifest again.
165             'win_exe_compatibility_manifest': '',
166           },
167           'rules': [
168             {
169               'rule_name': 'mini_installer_version',
170               'extension': 'version',
171               'variables': {
172                 'template_input_path': 'mini_installer/mini_installer_exe_version.rc.version',
173               },
174               'inputs': [
175                 '<(template_input_path)',
176                 '<(version_path)',
177                 '<(lastchange_path)',
178                 '<(branding_dir)/BRANDING',
179               ],
180               'outputs': [
181                 '<(PRODUCT_DIR)/mini_installer_exe_version.rc',
182               ],
183               'action': [
184                 'python', '<(version_py)',
185                 '-f', '<(version_path)',
186                 '-f', '<(lastchange_path)',
187                 '-f', '<(branding_dir)/BRANDING',
188                 '<(template_input_path)',
189                 '<@(_outputs)',
190               ],
191               'process_outputs_as_sources': 1,
192               'message': 'Generating version information'
193             },
194           ],
195           'actions': [
196             {
197               # GN version: //chrome/installer/mini_installer:archive
198               'action_name': 'installer_archive',
199               'variables': {
200                 'create_installer_archive_py_path':
201                   '../tools/build/win/create_installer_archive.py',
202               },
203               'conditions': [
204                 ['enable_hidpi == 1', {
205                   'variables': {
206                     'enable_hidpi_flag': '--enable_hidpi=1',
207                   },
208                 }, {
209                   'variables': {
210                     'enable_hidpi_flag': '',
211                   },
212                 }],
213                 ['component == "shared_library"', {
214                   'variables': {
215                     'component_build_flag': '--component_build=1',
216                   },
217                 }, {
218                   'variables': {
219                     'component_build_flag': '',
220                   },
221                   'outputs': [
222                     '<(PRODUCT_DIR)/chrome.packed.7z',
223                   ],
224                 }],
225                 ['disable_nacl==1', {
226                   'inputs!': [
227                     '<(PRODUCT_DIR)/nacl64.exe',
228                     '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
229                     '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
230                   ],
231                 }],
232                 ['target_arch=="x64"', {
233                   'inputs!': [
234                     '<(PRODUCT_DIR)/nacl64.exe',
235                     '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
236                   ],
237                   'variables': {
238                     'target_arch_flag': '--target_arch=x64',
239                   },
240                 }, {
241                   'variables': {
242                     'target_arch_flag': '--target_arch=x86',
243                   },
244                 }],
245                 ['icu_use_data_file_flag == 0', {
246                   'inputs': [
247                     '<(PRODUCT_DIR)/icudt.dll',
248                   ],
249                 }, { # else icu_use_data_file_flag != 0
250                   'inputs': [
251                     '<(PRODUCT_DIR)/icudtl.dat',
252                   ],
253                 }],
254                 ['v8_use_external_startup_data == 1', {
255                   'inputs': [
256                     '<(PRODUCT_DIR)/natives_blob.bin',
257                     '<(PRODUCT_DIR)/snapshot_blob.bin',
258                   ],
259                 }],
260               ],
261               'inputs': [
262                 '<(create_installer_archive_py_path)',
263                 '<(PRODUCT_DIR)/chrome.exe',
264                 '<(PRODUCT_DIR)/chrome.dll',
265                 '<(PRODUCT_DIR)/nacl64.exe',
266                 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
267                 '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
268                 '<(PRODUCT_DIR)/locales/en-US.pak',
269                 '<(PRODUCT_DIR)/setup.exe',
270                 'mini_installer/chrome.release',
271               ],
272               'outputs': [
273                 # Also note that chrome.packed.7z is defined as an output in a
274                 # conditional above.
275                 '<(PRODUCT_DIR)/chrome.7z',
276                 '<(PRODUCT_DIR)/setup.ex_',
277                 '<(INTERMEDIATE_DIR)/packed_files.rc',
278               ],
279               'depfile': '<(INTERMEDIATE_DIR)/installer_archive.d',
280               'action': [
281                 'python',
282                 '<(create_installer_archive_py_path)',
283                 '--build_dir', '<(PRODUCT_DIR)',
284                 '--staging_dir', '<(INTERMEDIATE_DIR)',
285                 '--input_file', 'mini_installer/chrome.release',
286                 '--resource_file_path', '<(INTERMEDIATE_DIR)/packed_files.rc',
287                 '--depfile', '<(INTERMEDIATE_DIR)/installer_archive.d',
288                 '<(enable_hidpi_flag)',
289                 '<(component_build_flag)',
290                 '<(target_arch_flag)',
291                 # TODO(sgk):  may just use environment variables
292                 #'--distribution=$(CHROMIUM_BUILD)',
293                 '--distribution=_google_chrome',
294                 # Optional arguments to generate diff installer
295                 #'--last_chrome_installer=C:/Temp/base',
296                 #'--setup_exe_format=DIFF',
297                 #'--diff_algorithm=COURGETTE',
298               ],
299               'message': 'Create installer archive',
300             },
301           ],
302         },
303       ],
304       'conditions': [
305         ['test_isolation_mode != "noop"', {
306           'targets': [
307             {
308               'target_name': 'mini_installer_tests_run',
309               'type': 'none',
310               'dependencies': [
311                 'mini_installer',
312               ],
313               'includes': [
314                 '../../build/isolate.gypi',
315               ],
316               'sources': [
317                 'mini_installer_tests.isolate',
318               ],
319             },
320           ],
321         }],
322       ],
323     }],
324   ],