OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Script to create Chrome Installer archive. | 6 """Script to create Chrome Installer archive. |
7 | 7 |
8 This script is used to create an archive of all the files required for a | 8 This script is used to create an archive of all the files required for a |
9 Chrome install in appropriate directory structure. It reads chrome.release | 9 Chrome install in appropriate directory structure. It reads chrome.release |
10 file as input, creates chrome.7z archive, compresses setup.exe and | 10 file as input, creates chrome.7z archive, compresses setup.exe and |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
346 modified_manifest_file = open( | 346 modified_manifest_file = open( |
347 os.path.join(output_dir, manifest_name), 'w') | 347 os.path.join(output_dir, manifest_name), 'w') |
348 modified_manifest_file.write(''.join(manifest_lines)) | 348 modified_manifest_file.write(''.join(manifest_lines)) |
349 modified_manifest_file.close() | 349 modified_manifest_file.close() |
350 | 350 |
351 | 351 |
352 # Copy the relevant CRT DLLs to |build_dir|. We copy DLLs from all versions | 352 # Copy the relevant CRT DLLs to |build_dir|. We copy DLLs from all versions |
353 # of VS installed to make sure we have the correct CRT version, unused DLLs | 353 # of VS installed to make sure we have the correct CRT version, unused DLLs |
354 # should not conflict with the others anyways. | 354 # should not conflict with the others anyways. |
355 def CopyVisualStudioRuntimeDLLs(build_dir): | 355 def CopyVisualStudioRuntimeDLLs(build_dir): |
356 is_debug = os.path.basename(build_dir) == 'Debug' | 356 is_debug = os.path.basename(build_dir).startswith('Debug') |
357 if not is_debug and os.path.basename(build_dir) != 'Release': | 357 if not is_debug and not os.path.basename(build_dir).startswith('Release'): |
358 print ("Warning: could not determine build configuration from " | 358 print ("Warning: could not determine build configuration from " |
359 "output directory, assuming Release build.") | 359 "output directory, assuming Release build.") |
360 | 360 |
361 crt_dlls = [] | 361 crt_dlls = [] |
362 if is_debug: | 362 if is_debug: |
363 crt_dlls = glob.glob( | 363 crt_dlls = glob.glob( |
364 "C:/Program Files (x86)/Microsoft Visual Studio */VC/redist/" | 364 "C:/Program Files (x86)/Microsoft Visual Studio */VC/redist/" |
365 "Debug_NonRedist/x86/Microsoft.*.DebugCRT/*.dll") | 365 "Debug_NonRedist/x86/Microsoft.*.DebugCRT/*.dll") |
grt (UTC plus 2)
2013/02/26 02:29:13
should "x86" here be "x64" for a 64-bit build?
| |
366 else: | 366 else: |
367 crt_dlls = glob.glob( | 367 crt_dlls = glob.glob( |
368 "C:/Program Files (x86)/Microsoft Visual Studio */VC/redist/x86/" | 368 "C:/Program Files (x86)/Microsoft Visual Studio */VC/redist/x86/" |
grt (UTC plus 2)
2013/02/26 02:29:13
same here (but only the 2nd x86)
| |
369 "Microsoft.*.CRT/*.dll") | 369 "Microsoft.*.CRT/*.dll") |
370 | 370 |
371 # Also handle the case where someone is building using only winsdk and | 371 # Also handle the case where someone is building using only winsdk and |
372 # doesn't have Visual Studio installed. | 372 # doesn't have Visual Studio installed. |
373 if not crt_dlls: | 373 if not crt_dlls: |
374 # On a 64-bit system, 32-bit dlls are in SysWOW64 (don't ask). | 374 # On a 64-bit system, 32-bit dlls are in SysWOW64 (don't ask). |
375 if os.access("C:/Windows/SysWOW64", os.F_OK): | 375 if os.access("C:/Windows/SysWOW64", os.F_OK): |
376 sys_dll_dir = "C:/Windows/SysWOW64" | 376 sys_dll_dir = "C:/Windows/SysWOW64" |
377 else: | 377 else: |
378 sys_dll_dir = "C:/Windows/System32" | 378 sys_dll_dir = "C:/Windows/System32" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
594 if not options.resource_file_path: | 594 if not options.resource_file_path: |
595 options.resource_file_path = os.path.join(options.build_dir, | 595 options.resource_file_path = os.path.join(options.build_dir, |
596 MINI_INSTALLER_INPUT_FILE) | 596 MINI_INSTALLER_INPUT_FILE) |
597 | 597 |
598 return options | 598 return options |
599 | 599 |
600 | 600 |
601 if '__main__' == __name__: | 601 if '__main__' == __name__: |
602 print sys.argv | 602 print sys.argv |
603 sys.exit(main(_ParseOptions())) | 603 sys.exit(main(_ParseOptions())) |
OLD | NEW |