mirror of https://github.com/axmolengine/axmol.git
Merge pull request #5670 from minggo/develop
ask to set ANT_ROOT, and add more redeable information
This commit is contained in:
commit
4f621e71ca
27
setup.py
27
setup.py
|
@ -277,26 +277,6 @@ class SetEnvVar(object):
|
|||
else:
|
||||
return False
|
||||
|
||||
def _is_ant_exists(self):
|
||||
|
||||
try:
|
||||
os.environ[ANT_ROOT]
|
||||
return True
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
ant_found = False
|
||||
commands = ['ant', '-version']
|
||||
child = subprocess.Popen(commands, stdout=subprocess.PIPE)
|
||||
for line in child.stdout:
|
||||
if 'Ant' in line:
|
||||
ant_found = True
|
||||
break
|
||||
|
||||
child.wait()
|
||||
|
||||
return ant_found
|
||||
|
||||
def _is_ant_root_valid(self, ant_root):
|
||||
|
||||
ant_path = ''
|
||||
|
@ -391,7 +371,7 @@ class SetEnvVar(object):
|
|||
print ""
|
||||
print '-> Looking for ANT_ROOT envrironment variable...',
|
||||
ant_root_added = False
|
||||
ant_found = self._is_ant_exists()
|
||||
ant_found = self._find_environment_variable(ANT_ROOT)
|
||||
|
||||
if not ant_root and not ant_found:
|
||||
print 'NOT FOUND'
|
||||
|
@ -429,6 +409,11 @@ class SetEnvVar(object):
|
|||
else:
|
||||
print '\nCOCOS_CONSOLE_ROOT was already added. Edit "%s" for manual changes' % target
|
||||
|
||||
if self._isWindows():
|
||||
print '\nPlease restart the terminal to make added system variables take effect'
|
||||
else:
|
||||
print '\nPlease execute command: "source %s" to make added system variables take effect' % target
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = OptionParser()
|
||||
parser.add_option('-n', '--ndkroot', dest='ndk_root', help='directory of ndk root')
|
||||
|
|
Loading…
Reference in New Issue