mirror of https://github.com/axmolengine/axmol.git
add quiet option for Cocos Toolkit
This commit is contained in:
parent
bce8c6845b
commit
fe5314d927
15
setup.py
15
setup.py
|
@ -676,7 +676,7 @@ class SetEnvVar(object):
|
||||||
else:
|
else:
|
||||||
return SetEnvVar.RESULT_DO_NOTHING
|
return SetEnvVar.RESULT_DO_NOTHING
|
||||||
|
|
||||||
def set_environment_variables(self, ndk_root, android_sdk_root, ant_root):
|
def set_environment_variables(self, ndk_root, android_sdk_root, ant_root, quiet):
|
||||||
|
|
||||||
print('\nSetting up cocos2d-x...')
|
print('\nSetting up cocos2d-x...')
|
||||||
|
|
||||||
|
@ -692,10 +692,10 @@ class SetEnvVar(object):
|
||||||
else:
|
else:
|
||||||
print('->Configuration for Android platform only, you can also skip and manually edit "%s"\n' %
|
print('->Configuration for Android platform only, you can also skip and manually edit "%s"\n' %
|
||||||
self.file_used_for_setup)
|
self.file_used_for_setup)
|
||||||
|
if(quiet) :
|
||||||
ndk_ret = self.set_variable(NDK_ROOT, ndk_root)
|
ndk_ret = self.set_variable(NDK_ROOT, ndk_root)
|
||||||
sdk_ret = self.set_variable(ANDROID_SDK_ROOT, android_sdk_root)
|
sdk_ret = self.set_variable(ANDROID_SDK_ROOT, android_sdk_root)
|
||||||
ant_ret = self.set_variable(ANT_ROOT, ant_root)
|
ant_ret = self.set_variable(ANT_ROOT, ant_root)
|
||||||
|
|
||||||
# tip the backup file
|
# tip the backup file
|
||||||
if (self.backup_file is not None) and (os.path.exists(self.backup_file)):
|
if (self.backup_file is not None) and (os.path.exists(self.backup_file)):
|
||||||
|
@ -720,12 +720,15 @@ if __name__ == '__main__':
|
||||||
dest='android_sdk_root', help='directory of android sdk root')
|
dest='android_sdk_root', help='directory of android sdk root')
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
'-t', '--antroot', dest='ant_root', help='directory that contains ant/ant.bat')
|
'-t', '--antroot', dest='ant_root', help='directory that contains ant/ant.bat')
|
||||||
|
|
||||||
|
parser.add_option(
|
||||||
|
'-q', '--quiet', dest='quiet',action="store_false", default = True, help='setup without setting NDK,SDK,ANT')
|
||||||
opts, args = parser.parse_args()
|
opts, args = parser.parse_args()
|
||||||
|
|
||||||
# set environment variables
|
# set environment variables
|
||||||
env = SetEnvVar()
|
env = SetEnvVar()
|
||||||
env.set_environment_variables(
|
env.set_environment_variables(
|
||||||
opts.ndk_root, opts.android_sdk_root, opts.ant_root)
|
opts.ndk_root, opts.android_sdk_root, opts.ant_root, opts.quiet)
|
||||||
|
|
||||||
if env._isWindows():
|
if env._isWindows():
|
||||||
import ctypes
|
import ctypes
|
||||||
|
|
Loading…
Reference in New Issue