Merge pull request #5763 from minggo/script-fix

find correct path on windows
This commit is contained in:
minggo 2014-03-13 16:07:22 +08:00
commit ffc541609d
1 changed files with 5 additions and 2 deletions

View File

@ -271,7 +271,10 @@ class SetEnvVar(object):
if not android_sdk_root: if not android_sdk_root:
return False return False
android_path = os.path.join(android_sdk_root, 'tools/android') if self._isWindows():
android_path = os.path.join(android_sdk_root, 'tools/android.bat')
else:
android_path = os.path.join(android_sdk_root, 'tools/android')
if os.path.isfile(android_path): if os.path.isfile(android_path):
return True return True
else: else:
@ -281,7 +284,7 @@ class SetEnvVar(object):
ant_path = '' ant_path = ''
if self._isWindows(): if self._isWindows():
ant_path = os.path.join(ant_root, 'ant.exe') ant_path = os.path.join(ant_root, 'ant.bat')
else: else:
ant_path = os.path.join(ant_root, 'ant') ant_path = os.path.join(ant_root, 'ant')