Chromium Code Reviews| Index: chrome/tools/build/win/create_installer_archive.py |
| diff --git a/chrome/tools/build/win/create_installer_archive.py b/chrome/tools/build/win/create_installer_archive.py |
| index 2cbb2fbd44bce0b34f427ef52de059b15bf84afe..99afe93265b074ceb5697cb6fbafbdd656d65894 100755 |
| --- a/chrome/tools/build/win/create_installer_archive.py |
| +++ b/chrome/tools/build/win/create_installer_archive.py |
| @@ -463,7 +463,8 @@ def _read_configuration_from_gn(build_dir): |
| # run-time. |
| # This is meant for developer builds only and should never be used to package |
| # an official build. |
| -def DoComponentBuildTasks(staging_dir, build_dir, target_arch, current_version): |
| +def DoComponentBuildTasks(staging_dir, build_dir, target_arch, runtime_deps, |
| + current_version): |
| # Get the required directories for the upcoming operations. |
| chrome_dir = os.path.join(staging_dir, CHROME_DIR) |
| version_dir = os.path.join(chrome_dir, current_version) |
| @@ -510,7 +511,14 @@ def DoComponentBuildTasks(staging_dir, build_dir, target_arch, current_version): |
| # chrome.exe can find them at runtime). The component DLLs are considered to |
| # be all the DLLs which have not already been added to the |version_dir| by |
| # virtue of chrome.release. |
|
gab
2016/06/17 18:27:11
Update comment:
# Stage all the DLLs listed in |r
|
| - build_dlls = glob.glob(os.path.join(build_dir, '*.dll')) |
| + if runtime_deps: |
| + build_dlls = set() |
| + args = open(runtime_deps).read() |
| + for l in args.splitlines(): |
| + if os.path.splitext(l)[1] == ".dll": |
| + build_dlls.add(os.path.join(build_dir, l)) |
| + else: |
| + build_dlls = glob.glob(os.path.join(build_dir, '*.dll')) |
|
gab
2016/06/17 18:27:11
When would |runtime_deps| ever not be specified? W
jbauman
2016/06/17 19:51:24
Do we currently want to continue supporting gyp wi
|
| staged_dll_basenames = [os.path.basename(staged_dll) for staged_dll in \ |
| glob.glob(os.path.join(version_dir, '*.dll'))] |
| component_dll_filenames = [] |
| @@ -570,7 +578,8 @@ def main(options): |
| if options.component_build == '1': |
| DoComponentBuildTasks(staging_dir, options.build_dir, |
| - options.target_arch, current_version) |
| + options.target_arch, options.runtime_deps, |
| + current_version) |
| version_numbers = current_version.split('.') |
| current_build_number = version_numbers[2] + '.' + version_numbers[3] |
| @@ -633,6 +642,9 @@ def _ParseOptions(): |
| parser.add_option('--depfile', |
| help='Generate a depfile with the given name listing the implicit inputs ' |
| 'to the archive process that can be used with a build system.') |
| + parser.add_option('--runtime_deps', |
| + help='A file listing runtime dependencies. This will be used to get a ' |
| + 'list of component build DLLs to archive.') |
|
gab
2016/06/17 18:27:11
Make this a required option given comment above.
|
| parser.add_option('--target_arch', default='x86', |
| help='Specify the target architecture for installer - this is used ' |
| 'to determine which CRT runtime files to pull and package ' |