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

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

Issue 8680018: Fix python scripts in src/chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 1 month 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 | « chrome/tools/build/win/make_policy_zip.py ('k') | chrome/tools/build/win/sln_deps.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/build/win/scan_server_dlls.py
diff --git a/chrome/tools/build/win/scan_server_dlls.py b/chrome/tools/build/win/scan_server_dlls.py
old mode 100644
new mode 100755
index 2adf8d672ce323af1238fc285242388514a01b82..68ebb93d2c0e77fbdd04e4277960c6d821afe658
--- a/chrome/tools/build/win/scan_server_dlls.py
+++ b/chrome/tools/build/win/scan_server_dlls.py
@@ -1,12 +1,11 @@
-#!/usr/bin/python
-# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+#!/usr/bin/env python
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Script used to scan for server DLLs at build time and build a header
included by setup.exe. This header contains an array of the names of
the DLLs that need registering at install time.
-
"""
import ConfigParser
@@ -128,19 +127,11 @@ def RunSystemCommand(cmd):
raise "Error while running cmd: %s" % cmd
-def main(options):
+def main():
"""Main method that reads input file, scans <build_output>\servers for
matches to files described in the input file. A header file for the
setup project is then generated.
"""
- config = Readconfig(options.output_dir, options.input_file)
- registered_dll_list = ScanServerDlls(config, options.distribution,
- options.output_dir)
- CreateRegisteredDllIncludeFile(registered_dll_list,
- options.header_output_dir)
-
-
-if '__main__' == __name__:
option_parser = optparse.OptionParser()
option_parser.add_option('-o', '--output_dir', help='Build Output directory')
option_parser.add_option('-x', '--header_output_dir',
@@ -150,4 +141,13 @@ if '__main__' == __name__:
help='Name of Chromium Distribution. Optional.')
options, args = option_parser.parse_args()
- sys.exit(main(options))
+ config = Readconfig(options.output_dir, options.input_file)
+ registered_dll_list = ScanServerDlls(config, options.distribution,
+ options.output_dir)
+ CreateRegisteredDllIncludeFile(registered_dll_list,
+ options.header_output_dir)
+ return 0
+
+
+if '__main__' == __name__:
+ sys.exit(main())
« no previous file with comments | « chrome/tools/build/win/make_policy_zip.py ('k') | chrome/tools/build/win/sln_deps.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698