Remove the old signature of NotificationManager::closePersistent().
[chromium-blink-merge.git] / chrome / installer / mini_installer.gyp
blob9c3716ae9d6463f7abde1b75f88d144a591b0e75
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' is set in the 'conditions' section at the bottom.
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           'target_name': 'mini_installer',
43           'type': 'executable',
45           'dependencies': [
46             '../chrome.gyp:chrome',
47             '../chrome.gyp:chrome_nacl_win64',
48             '../chrome.gyp:chrome_dll',
49             '../chrome.gyp:default_extensions',
50             '../chrome.gyp:setup',
51             'test_installer_sentinel',
52           ],
53           'include_dirs': [
54             '../..',
55             '<(INTERMEDIATE_DIR)',
56             '<(SHARED_INTERMEDIATE_DIR)/chrome',
57           ],
58           'sources': [
59             '<(INTERMEDIATE_DIR)/packed_files.rc',
60             'mini_installer/appid.h',
61             'mini_installer/chrome.release',
62             'mini_installer/chrome_appid.cc',
63             'mini_installer/configuration.cc',
64             'mini_installer/configuration.h',
65             'mini_installer/decompress.cc',
66             'mini_installer/decompress.h',
67             'mini_installer/exit_code.h',
68             'mini_installer/mini_installer.cc',
69             'mini_installer/mini_installer.ico',
70             'mini_installer/mini_installer.rc',
71             'mini_installer/mini_installer_constants.cc',
72             'mini_installer/mini_installer_constants.h',
73             'mini_installer/mini_installer_exe_version.rc.version',
74             'mini_installer/mini_installer_resource.h',
75             'mini_installer/mini_string.cc',
76             'mini_installer/mini_string.h',
77             'mini_installer/pe_resource.cc',
78             'mini_installer/pe_resource.h',
79           ],
80           'msvs_settings': {
81             'VCCLCompilerTool': {
82               'EnableIntrinsicFunctions': 'true',
83               'BufferSecurityCheck': 'false',
84               'BasicRuntimeChecks': '0',
85               'ExceptionHandling': '0',
86             },
87             'VCLinkerTool': {
88               'RandomizedBaseAddress': '1',
89               'DataExecutionPrevention': '0',
90               'AdditionalLibraryDirectories': [
91                 '<(PRODUCT_DIR)/lib'
92               ],
93               'DelayLoadDLLs': [],
94               'EntryPointSymbol': 'MainEntryPoint',
95               'IgnoreAllDefaultLibraries': 'true',
96               'OptimizeForWindows98': '1',
97               'SubSystem': '2',     # Set /SUBSYSTEM:WINDOWS
98               'AdditionalDependencies': [
99                 'shlwapi.lib',
100                 'setupapi.lib',
101               ],
102             },
103             'VCManifestTool': {
104               'AdditionalManifestFiles': [
105                 '$(ProjectDir)\\mini_installer\\mini_installer.exe.manifest',
106               ],
107             },
108           },
109           'configurations': {
110             'Debug_Base': {
111               'msvs_settings': {
112                 'VCCLCompilerTool': {
113                   'BasicRuntimeChecks': '0',
114                   'BufferSecurityCheck': 'false',
115                   'ExceptionHandling': '0',
116                 },
117                 'VCLinkerTool': {
118                   'SubSystem': '2',     # Set /SUBSYSTEM:WINDOWS
119                   'AdditionalOptions': [
120                     '/safeseh:no',
121                     '/dynamicbase:no',
122                     '/ignore:4199',
123                     '/ignore:4221',
124                     '/nxcompat',
125                   ],
126                 },
127               },
128             },
129             'Release_Base': {
130               'includes': ['../../build/internal/release_defaults.gypi'],
131               'msvs_settings': {
132                 'VCCLCompilerTool': {
133                   'EnableIntrinsicFunctions': 'true',
134                   'BasicRuntimeChecks': '0',
135                   'BufferSecurityCheck': 'false',
136                   'ExceptionHandling': '0',
137                 },
138                 'VCLinkerTool': {
139                   'SubSystem': '2',     # Set /SUBSYSTEM:WINDOWS
140                   'Profile': 'false',   # Conflicts with /FIXED
141                   'AdditionalOptions': [
142                     '/SAFESEH:NO',
143                     '/NXCOMPAT',
144                     '/DYNAMICBASE:NO',
145                     '/FIXED',
146                   ],
147                 },
148               },
149             },
150           },
152           # Disable precompiled headers for this project, to avoid
153           # linker errors when building with VS 2008.
154           'msvs_precompiled_header': '',
155           'msvs_precompiled_source': '',
157           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
158           'msvs_disabled_warnings': [ 4267, ],
160           'variables': {
161             # Opt out the common compatibility manifest to work around
162             # crbug.com/272660.
163             # TODO(yukawa): Enable the common compatibility manifest again.
164             'win_exe_compatibility_manifest': '',
165           },
166           'rules': [
167             {
168               'rule_name': 'mini_installer_version',
169               'extension': 'version',
170               'variables': {
171                 'template_input_path': 'mini_installer/mini_installer_exe_version.rc.version',
172               },
173               'inputs': [
174                 '<(template_input_path)',
175                 '<(version_path)',
176                 '<(lastchange_path)',
177                 '<(branding_dir)/BRANDING',
178               ],
179               'outputs': [
180                 '<(PRODUCT_DIR)/mini_installer_exe_version.rc',
181               ],
182               'action': [
183                 'python', '<(version_py)',
184                 '-f', '<(version_path)',
185                 '-f', '<(lastchange_path)',
186                 '-f', '<(branding_dir)/BRANDING',
187                 '<(template_input_path)',
188                 '<@(_outputs)',
189               ],
190               'process_outputs_as_sources': 1,
191               'message': 'Generating version information'
192             },
193           ],
194           'actions': [
195             {
196               'action_name': 'installer_archive',
197               'variables': {
198                 'create_installer_archive_py_path':
199                   '../tools/build/win/create_installer_archive.py',
200               },
201               'conditions': [
202                 ['enable_hidpi == 1', {
203                   'variables': {
204                     'enable_hidpi_flag': '--enable_hidpi=1',
205                   },
206                 }, {
207                   'variables': {
208                     'enable_hidpi_flag': '',
209                   },
210                 }],
211                 ['component == "shared_library"', {
212                   'variables': {
213                     'component_build_flag': '--component_build=1',
214                   },
215                 }, {
216                   'variables': {
217                     'component_build_flag': '',
218                   },
219                   'outputs': [
220                     '<(PRODUCT_DIR)/chrome.packed.7z',
221                   ],
222                 }],
223                 ['disable_nacl==1', {
224                   'inputs!': [
225                     '<(PRODUCT_DIR)/nacl64.exe',
226                     '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
227                     '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
228                   ],
229                 }],
230                 ['target_arch=="x64"', {
231                   'inputs!': [
232                     '<(PRODUCT_DIR)/nacl64.exe',
233                     '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
234                   ],
235                   'variables': {
236                     'target_arch_flag': '--target_arch=x64',
237                   },
238                 }, {
239                   'variables': {
240                     'target_arch_flag': '--target_arch=x86',
241                   },
242                 }],
243                 ['icu_use_data_file_flag == 0', {
244                   'inputs': [
245                     '<(PRODUCT_DIR)/icudt.dll',
246                   ],
247                 }, { # else icu_use_data_file_flag != 0
248                   'inputs': [
249                     '<(PRODUCT_DIR)/icudtl.dat',
250                   ],
251                 }],
252                 ['v8_use_external_startup_data == 1', {
253                   'inputs': [
254                     '<(PRODUCT_DIR)/natives_blob.bin',
255                     '<(PRODUCT_DIR)/snapshot_blob.bin',
256                   ],
257                 }],
258               ],
259               'inputs': [
260                 '<(create_installer_archive_py_path)',
261                 '<(PRODUCT_DIR)/chrome.exe',
262                 '<(PRODUCT_DIR)/chrome.dll',
263                 '<(PRODUCT_DIR)/nacl64.exe',
264                 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
265                 '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
266                 '<(PRODUCT_DIR)/locales/en-US.pak',
267                 '<(PRODUCT_DIR)/setup.exe',
268                 'mini_installer/chrome.release',
269               ],
270               'outputs': [
271                 # Also note that chrome.packed.7z is defined as an output in a
272                 # conditional above.
273                 '<(PRODUCT_DIR)/chrome.7z',
274                 '<(PRODUCT_DIR)/setup.ex_',
275                 '<(INTERMEDIATE_DIR)/packed_files.rc',
276               ],
277               'depfile': '<(INTERMEDIATE_DIR)/installer_archive.d',
278               'action': [
279                 'python',
280                 '<(create_installer_archive_py_path)',
281                 '--build_dir', '<(PRODUCT_DIR)',
282                 '--staging_dir', '<(INTERMEDIATE_DIR)',
283                 '--input_file', 'mini_installer/chrome.release',
284                 '--resource_file_path', '<(INTERMEDIATE_DIR)/packed_files.rc',
285                 '--depfile', '<(INTERMEDIATE_DIR)/installer_archive.d',
286                 '<(enable_hidpi_flag)',
287                 '<(component_build_flag)',
288                 '<(target_arch_flag)',
289                 # TODO(sgk):  may just use environment variables
290                 #'--distribution=$(CHROMIUM_BUILD)',
291                 '--distribution=_google_chrome',
292                 # Optional arguments to generate diff installer
293                 #'--last_chrome_installer=C:/Temp/base',
294                 #'--setup_exe_format=DIFF',
295                 #'--diff_algorithm=COURGETTE',
296               ],
297               'message': 'Create installer archive',
298             },
299           ],
300           # TODO(mark):  <(branding_dir) should be defined by the
301           # global condition block at the bottom of the file, but
302           # this doesn't work due to the following issue:
303           #
304           #   http://code.google.com/p/gyp/issues/detail?id=22
305           #
306           # Remove this block once the above issue is fixed.
307           'conditions': [
308             [ 'branding == "Chrome"', {
309               'variables': {
310                  'branding_dir': '../app/theme/google_chrome',
311               },
312             }, { # else branding!="Chrome"
313               'variables': {
314                  'branding_dir': '../app/theme/chromium',
315               },
316             }],
317           ],
318         },
319       ],
320       'conditions': [
321         ['test_isolation_mode != "noop"', {
322           'targets': [
323             {
324               'target_name': 'mini_installer_tests_run',
325               'type': 'none',
326               'dependencies': [
327                 'mini_installer',
328               ],
329               'includes': [
330                 '../../build/isolate.gypi',
331               ],
332               'sources': [
333                 'mini_installer_tests.isolate',
334               ],
335             },
336           ],
337         }],
338       ],
339     }],
340     [ 'branding == "Chrome"', {
341       'variables': {
342          'branding_dir': '../app/theme/google_chrome',
343       },
344     }, { # else branding!="Chrome"
345       'variables': {
346          'branding_dir': '../app/theme/chromium',
347       },
348     }],
349   ],