Add exe servers to the list of binaries that may be packaged with the...

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
parent 7e4077d9
...@@ -39,6 +39,7 @@ locales\*.dll: %(VersionDir)s\Locales ...@@ -39,6 +39,7 @@ locales\*.dll: %(VersionDir)s\Locales
Resources\Inspector\*.*: %(VersionDir)s\Resources\Inspector Resources\Inspector\*.*: %(VersionDir)s\Resources\Inspector
Resources\Inspector\Images\*.*: %(VersionDir)s\Resources\Inspector\Images Resources\Inspector\Images\*.*: %(VersionDir)s\Resources\Inspector\Images
servers\*.dll: %(VersionDir)s\ servers\*.dll: %(VersionDir)s\
servers\*.exe: %(VersionDir)s\
Extensions\*.*: %(VersionDir)s\Extensions\ Extensions\*.*: %(VersionDir)s\Extensions\
av*.dll: %(VersionDir)s\ av*.dll: %(VersionDir)s\
syncapi.dll: %(VersionDir)s\ syncapi.dll: %(VersionDir)s\
......
...@@ -64,15 +64,24 @@ def CreateRegisteredDllIncludeFile(registered_dll_list, header_output_dir): ...@@ -64,15 +64,24 @@ def CreateRegisteredDllIncludeFile(registered_dll_list, header_output_dir):
dll_array_string += ', ' dll_array_string += ', '
dll_array_string += "L\"%s\"" % dll 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: try:
if len(registered_dll_list) == 0: old_file = open(output_file, 'r')
f.write(GENERATED_DLL_INCLUDE_FILE_CONTENTS % ("L\"\"", 0)) except EnvironmentError:
else: old_contents = None
f.write(GENERATED_DLL_INCLUDE_FILE_CONTENTS % (dll_array_string, else:
len(registered_dll_list))) old_contents = old_file.read()
finally: old_file.close()
f.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): def ScanServerDlls(config, distribution, output_dir):
...@@ -81,6 +90,8 @@ 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. filename components of the paths to all matching DLLs.
""" """
print "Scanning for server DLLs in " + output_dir
registered_dll_list = [] registered_dll_list = []
ScanDllsInSection(config, 'GENERAL', output_dir, registered_dll_list) ScanDllsInSection(config, 'GENERAL', output_dir, registered_dll_list)
if distribution: if distribution:
...@@ -107,8 +118,9 @@ def ScanDllsInSection(config, section, output_dir, registered_dll_list): ...@@ -107,8 +118,9 @@ def ScanDllsInSection(config, section, output_dir, registered_dll_list):
for file in glob.glob(os.path.join(output_dir, option)): for file in glob.glob(os.path.join(output_dir, option)):
if option.startswith(SERVERS_DIR): if option.startswith(SERVERS_DIR):
(x, file_name) = os.path.split(file) (x, file_name) = os.path.split(file)
print "Found server DLL file: " + file_name if file_name.lower().endswith('.dll'):
registered_dll_list.append(file_name) print "Found server DLL file: " + file_name
registered_dll_list.append(file_name)
def RunSystemCommand(cmd): def RunSystemCommand(cmd):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment