Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8045)

Unified Diff: chrome/tools/build/win/create_installer_archive.py

Issue 10387140: Copy VS CRT DLLs in output directory before packaging component builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adjust to new component build CL Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16c13e85c3d49b414e293f7a5beb71c7a4416db0..1a3533ee61ad91c8ae980c9f4d8415a4f67cef11 100755
--- a/chrome/tools/build/win/create_installer_archive.py
+++ b/chrome/tools/build/win/create_installer_archive.py
@@ -346,6 +346,25 @@ def DoComponentBuildTasks(staging_dir, build_dir, current_version):
if not os.path.exists(installer_dir):
os.mkdir(installer_dir)
+ # Copy the relevant CRT DLLs to |build_dir|. We copy DLLs from all versions
+ # of VS installed to make sure we have the correct CRT version, unused DLLs
+ # should not conflict with the others anyways.
+ crt_dlls = []
+ if build_dir.endswith('Debug/'):
+ crt_dlls = glob.glob(
+ "C:/Program Files (x86)/Microsoft Visual Studio */VC/redist/"
+ "Debug_NonRedist/x86/Microsoft.*.DebugCRT/*.dll")
+ elif build_dir.endswith('Release/'):
+ crt_dlls = glob.glob(
+ "C:/Program Files (x86)/Microsoft Visual Studio */VC/redist/x86/"
+ "Microsoft.*.CRT/*.dll")
+ else:
+ print ("Warning: CRT DLLs not copied, could not determine build "
+ "configuration from output directory.")
+
+ for dll in crt_dlls:
+ shutil.copy(dll, build_dir)
+
# Copy all the DLLs in |build_dir| to the version directory. Simultaneously
# build a list of their names to mark them as dependencies of chrome.exe and
# setup.exe later.
@@ -513,6 +532,8 @@ def _ParseOptions():
options, args = parser.parse_args()
if not options.build_dir:
parser.error('You must provide a build dir.')
+ elif not options.build_dir.endswith('/'):
+ options.build_dir += '/'
if not options.staging_dir:
parser.error('You must provide a staging dir.')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698