mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-27 10:03:31 +01:00
Download depot_tools as the first step in automate.py.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1395 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
4892da5d72
commit
4ca8905881
@ -228,6 +228,43 @@ if (options.noreleasebuild and (options.minimaldistrib or options.minimaldistrib
|
||||
# script directory
|
||||
script_dir = os.path.dirname(__file__)
|
||||
|
||||
download_dir = os.path.abspath(options.downloaddir)
|
||||
if not os.path.exists(download_dir):
|
||||
# create the download directory
|
||||
os.makedirs(download_dir)
|
||||
|
||||
# Test the operating system.
|
||||
platform = '';
|
||||
if sys.platform == 'win32':
|
||||
platform = 'windows'
|
||||
elif sys.platform == 'darwin':
|
||||
platform = 'macosx'
|
||||
elif sys.platform.startswith('linux'):
|
||||
platform = 'linux'
|
||||
|
||||
# set the expected script extension
|
||||
if platform == 'windows':
|
||||
script_ext = '.bat'
|
||||
else:
|
||||
script_ext = '.sh'
|
||||
|
||||
# check if the "depot_tools" directory exists
|
||||
if options.depottools != '':
|
||||
depot_tools_dir = os.path.abspath(options.depottools)
|
||||
else:
|
||||
depot_tools_dir = os.path.join(download_dir, 'depot_tools')
|
||||
if not os.path.exists(depot_tools_dir):
|
||||
if options.depottoolsarchive != '':
|
||||
# extract depot_tools from an archive file
|
||||
download_and_extract(options.depottoolsarchive, depot_tools_dir,
|
||||
'depot_tools/')
|
||||
else:
|
||||
# checkout depot_tools
|
||||
run('svn checkout '+depot_tools_url+' '+depot_tools_dir, download_dir)
|
||||
|
||||
# Add depot_tools to the system path
|
||||
sys.path.insert(1, depot_tools_dir)
|
||||
|
||||
if not options.url is None:
|
||||
# set the CEF URL
|
||||
cef_url = check_url(options.url)
|
||||
@ -276,43 +313,6 @@ except Exception, e:
|
||||
compat_url+"\n")
|
||||
raise
|
||||
|
||||
download_dir = os.path.abspath(options.downloaddir)
|
||||
if not os.path.exists(download_dir):
|
||||
# create the download directory
|
||||
os.makedirs(download_dir)
|
||||
|
||||
# Test the operating system.
|
||||
platform = '';
|
||||
if sys.platform == 'win32':
|
||||
platform = 'windows'
|
||||
elif sys.platform == 'darwin':
|
||||
platform = 'macosx'
|
||||
elif sys.platform.startswith('linux'):
|
||||
platform = 'linux'
|
||||
|
||||
# set the expected script extension
|
||||
if platform == 'windows':
|
||||
script_ext = '.bat'
|
||||
else:
|
||||
script_ext = '.sh'
|
||||
|
||||
# check if the "depot_tools" directory exists
|
||||
if options.depottools != '':
|
||||
depot_tools_dir = os.path.abspath(options.depottools)
|
||||
else:
|
||||
depot_tools_dir = os.path.join(download_dir, 'depot_tools')
|
||||
if not os.path.exists(depot_tools_dir):
|
||||
if options.depottoolsarchive != '':
|
||||
# extract depot_tools from an archive file
|
||||
download_and_extract(options.depottoolsarchive, depot_tools_dir,
|
||||
'depot_tools/')
|
||||
else:
|
||||
# checkout depot_tools
|
||||
run('svn checkout '+depot_tools_url+' '+depot_tools_dir, download_dir)
|
||||
|
||||
# Add depot_tools to the system path
|
||||
sys.path.insert(1, depot_tools_dir)
|
||||
|
||||
# check if the "chromium" directory exists
|
||||
chromium_dir = os.path.join(download_dir, 'chromium')
|
||||
if not os.path.exists(chromium_dir):
|
||||
|
Loading…
Reference in New Issue
Block a user