summaryrefslogtreecommitdiffstats
path: root/chrome/tools/build/win
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-10 17:33:42 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-10 17:33:42 +0000
commita1b4d8ca48a7172c0f5b4a7c22c1cddfaa65d9ba (patch)
treea38d2a11cf52e4a3b9af6a8c164f5fcc85af3678 /chrome/tools/build/win
parent7e4077d9ee19169eb5631277f860a03088fb0042 (diff)
downloadchromium_src-a1b4d8ca48a7172c0f5b4a7c22c1cddfaa65d9ba.zip
chromium_src-a1b4d8ca48a7172c0f5b4a7c22c1cddfaa65d9ba.tar.gz
chromium_src-a1b4d8ca48a7172c0f5b4a7c22c1cddfaa65d9ba.tar.bz2
Add exe servers to the list of binaries that may be packaged with the mini_installer. Does not cause them to be registered.
Review URL: http://codereview.chromium.org/202044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25871 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools/build/win')
-rw-r--r--chrome/tools/build/win/scan_server_dlls.py32
1 files changed, 22 insertions, 10 deletions
diff --git a/chrome/tools/build/win/scan_server_dlls.py b/chrome/tools/build/win/scan_server_dlls.py
index 084728d..2adf8d6 100644
--- a/chrome/tools/build/win/scan_server_dlls.py
+++ b/chrome/tools/build/win/scan_server_dlls.py
@@ -64,15 +64,24 @@ def CreateRegisteredDllIncludeFile(registered_dll_list, header_output_dir):
dll_array_string += ', '
dll_array_string += "L\"%s\"" % dll
- f = open(output_file, 'w')
+ if len(registered_dll_list) == 0:
+ contents = GENERATED_DLL_INCLUDE_FILE_CONTENTS % ("L\"\"", 0)
+ else:
+ contents = GENERATED_DLL_INCLUDE_FILE_CONTENTS % (dll_array_string,
+ len(registered_dll_list))
+
+ # Don't rewrite the header file if we don't need to.
try:
- if len(registered_dll_list) == 0:
- f.write(GENERATED_DLL_INCLUDE_FILE_CONTENTS % ("L\"\"", 0))
- else:
- f.write(GENERATED_DLL_INCLUDE_FILE_CONTENTS % (dll_array_string,
- len(registered_dll_list)))
- finally:
- f.close()
+ old_file = open(output_file, 'r')
+ except EnvironmentError:
+ old_contents = None
+ else:
+ old_contents = old_file.read()
+ old_file.close()
+
+ if contents != old_contents:
+ print 'Updating server dll header: ' + str(output_file)
+ open(output_file, 'w').write(contents)
def ScanServerDlls(config, distribution, output_dir):
@@ -81,6 +90,8 @@ def ScanServerDlls(config, distribution, output_dir):
filename components of the paths to all matching DLLs.
"""
+ print "Scanning for server DLLs in " + output_dir
+
registered_dll_list = []
ScanDllsInSection(config, 'GENERAL', output_dir, registered_dll_list)
if distribution:
@@ -107,8 +118,9 @@ def ScanDllsInSection(config, section, output_dir, registered_dll_list):
for file in glob.glob(os.path.join(output_dir, option)):
if option.startswith(SERVERS_DIR):
(x, file_name) = os.path.split(file)
- print "Found server DLL file: " + file_name
- registered_dll_list.append(file_name)
+ if file_name.lower().endswith('.dll'):
+ print "Found server DLL file: " + file_name
+ registered_dll_list.append(file_name)
def RunSystemCommand(cmd):