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

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

Issue 10407053: Copy VC CRT DLLs for component build even when VS is not installed. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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 eab9a20ec74dd2231ceecf8caa74cbc1d42fc211..a992c72d42abb070528f96950d5c1e54e5057944 100755
--- a/chrome/tools/build/win/create_installer_archive.py
+++ b/chrome/tools/build/win/create_installer_archive.py
@@ -366,6 +366,19 @@ def DoComponentBuildTasks(staging_dir, build_dir, current_version):
print ("Warning: CRT DLLs not copied, could not determine build "
"configuration from output directory.")
+ # Also handle the case where someone is building using only winsdk and
+ # doesn't have Visual Studio installed.
+ if not crt_dlls:
gab 2012/05/20 14:42:54 Now that this is getting bigger I would extract al
dmazzoni 2012/05/21 21:28:39 Done.
+ if os.access("C:/Windows/SysWOW64", os.F_OK):
+ sys_dll_dir = "C:/Windows/SysWOW64"
gab 2012/05/20 14:42:54 Aren't these the 64-bit DLLs? Chrome is always 32-
robertshield 2012/05/20 17:36:16 Wow64 means "Windows 32-bit on Windows 64 bit", so
dmazzoni 2012/05/21 21:28:39 Worth a comment; I certainly wouldn't have guessed
+ else:
+ sys_dll_dir = "C:/Windows/System32"
gab 2012/05/20 15:05:01 These DLLs are found all over the place. I'm not c
robertshield 2012/05/20 17:36:16 I don't know offhand which dlls are picked up when
dmazzoni 2012/05/21 21:28:39 FWIW, I searched my system and did not find them a
robertshield 2012/05/22 02:39:58 Ok, interesting. Since all that really matters is
+
+ if build_dir.endswith('Debug/'):
+ crt_dlls = glob.glob("%s/msvc*0d.dll" % sys_dll_dir)
gab 2012/05/20 14:42:54 I'd do this inside the "if build_dir.endswith('Deb
dmazzoni 2012/05/21 21:28:39 I'd argue that the "if os.access" is by far the mo
gab 2012/05/22 15:44:46 Yep.
+ elif build_dir.endswith('Release/'):
+ crt_dlls = glob.glob("%s/msvc*0.dll" % sys_dll_dir)
gab 2012/05/20 15:05:01 .format() has been preferred over % for string for
dmazzoni 2012/05/21 21:28:39 Actually in this case a simple string append might
gab 2012/05/22 15:44:46 Works for me.
+
for dll in crt_dlls:
shutil.copy(dll, build_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