Commit 73599543 by Jamie Madill Committed by Commit Bot

Update update_canary_angle script.

Make it search in any output directory. Bug: None Change-Id: I4ea3ee70bbf051e534e97a972fcb6bbcb5ceeecc Reviewed-on: https://chromium-review.googlesource.com/1208512Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 4ab19079
...@@ -11,17 +11,13 @@ ...@@ -11,17 +11,13 @@
# search paths, and copies that into the most recent Canary # search paths, and copies that into the most recent Canary
# binary folder. Only works on Windows. # binary folder. Only works on Windows.
import sys, os, shutil import glob, sys, os, shutil
# Set of search paths. # Set of search paths.
source_paths = [
os.path.join('..', 'out', 'Debug'),
os.path.join('..', 'out', 'Debug_x64'),
os.path.join('..', 'out', 'Release'),
os.path.join('..', 'out', 'Release_x64'),
]
script_dir = os.path.dirname(sys.argv[0]) script_dir = os.path.dirname(sys.argv[0])
os.chdir(os.path.join(script_dir, ".."))
source_paths = glob.glob('out/*')
# Default Canary installation path. # Default Canary installation path.
chrome_folder = os.path.join(os.environ['LOCALAPPDATA'], 'Google', 'Chrome SxS', 'Application') chrome_folder = os.path.join(os.environ['LOCALAPPDATA'], 'Google', 'Chrome SxS', 'Application')
...@@ -31,11 +27,11 @@ binary_name = 'libGLESv2.dll' ...@@ -31,11 +27,11 @@ binary_name = 'libGLESv2.dll'
newest_folder = None newest_folder = None
newest_mtime = None newest_mtime = None
for path in source_paths: for path in source_paths:
binary_path = os.path.join(script_dir, path, binary_name) binary_path = os.path.join(path, binary_name)
if os.path.exists(binary_path): if os.path.exists(binary_path):
binary_mtime = os.path.getmtime(binary_path) binary_mtime = os.path.getmtime(binary_path)
if (newest_folder is None) or (binary_mtime > newest_mtime): if (newest_folder is None) or (binary_mtime > newest_mtime):
newest_folder = os.path.join(script_dir, path) newest_folder = path
newest_mtime = binary_mtime newest_mtime = binary_mtime
if newest_folder is None: if newest_folder is None:
......
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