30
30
https://github.com/cocos2d/cocos2d-console
31
31
* NDK_ROOT: used to build android native codes
32
32
* ANDROID_SDK_ROOT: used to generate applicatoin on Android through commands
33
- * ANT_ROOT: used to generate applicatoin on Android through commands
34
33
* COCOS_X_ROOT: path where cocos2d-x is installed
35
34
* COCOS_TEMPLATES_ROOT: path where cocos2d-x's templates are installed
36
35
61
60
COCOS_TEMPLATES_ROOT = 'COCOS_TEMPLATES_ROOT'
62
61
NDK_ROOT = 'NDK_ROOT'
63
62
ANDROID_SDK_ROOT = 'ANDROID_SDK_ROOT'
64
- ANT_ROOT = 'ANT_ROOT'
65
63
66
64
67
65
def _check_python_version ():
@@ -341,8 +339,6 @@ def _check_valid(self, var_name, value):
341
339
ret = self ._is_ndk_root_valid (value )
342
340
elif var_name == ANDROID_SDK_ROOT :
343
341
ret = self ._is_android_sdk_root_valid (value )
344
- elif var_name == ANT_ROOT :
345
- ret = self ._is_ant_root_valid (value )
346
342
else :
347
343
ret = False
348
344
@@ -380,19 +376,6 @@ def _is_android_sdk_root_valid(self, android_sdk_root):
380
376
else :
381
377
return False
382
378
383
- def _is_ant_root_valid (self , ant_root ):
384
-
385
- ant_path = ''
386
- if self ._isWindows ():
387
- ant_path = os .path .join (ant_root , 'ant.bat' )
388
- else :
389
- ant_path = os .path .join (ant_root , 'ant' )
390
-
391
- if os .path .isfile (ant_path ):
392
- return True
393
- else :
394
- return False
395
-
396
379
def remove_dir_from_win_path (self , remove_dir ):
397
380
import _winreg
398
381
try :
@@ -591,9 +574,6 @@ def _force_update_env(self, var_name, value):
591
574
ret = self ._force_update_unix_env (var_name , value )
592
575
return ret
593
576
594
- def _get_ant_path (self ):
595
- return self ._get_sdkpath_for_cmd ("ant" , False )
596
-
597
577
def _get_androidsdk_path (self ):
598
578
return self ._get_sdkpath_for_cmd ("android" )
599
579
@@ -620,9 +600,7 @@ def _get_sdkpath_for_cmd(self, cmd, has_bin_folder=True):
620
600
return ret
621
601
622
602
def _find_value_from_sys (self , var_name ):
623
- if var_name == ANT_ROOT :
624
- return self ._get_ant_path ()
625
- elif var_name == NDK_ROOT :
603
+ if var_name == NDK_ROOT :
626
604
return self ._get_ndkbuild_path ()
627
605
elif var_name == ANDROID_SDK_ROOT :
628
606
return self ._get_androidsdk_path ()
@@ -680,7 +658,7 @@ def set_variable(self, var_name, value):
680
658
else :
681
659
return SetEnvVar .RESULT_DO_NOTHING
682
660
683
- def set_environment_variables (self , ndk_root , android_sdk_root , ant_root , quiet ):
661
+ def set_environment_variables (self , ndk_root , android_sdk_root , quiet ):
684
662
685
663
print ('\n Setting up cocos2d-x...' )
686
664
@@ -699,7 +677,6 @@ def set_environment_variables(self, ndk_root, android_sdk_root, ant_root, quiet)
699
677
if (quiet ) :
700
678
ndk_ret = self .set_variable (NDK_ROOT , ndk_root )
701
679
sdk_ret = self .set_variable (ANDROID_SDK_ROOT , android_sdk_root )
702
- ant_ret = self .set_variable (ANT_ROOT , ant_root )
703
680
704
681
# tip the backup file
705
682
if (self .backup_file is not None ) and (os .path .exists (self .backup_file )):
@@ -723,16 +700,13 @@ def set_environment_variables(self, ndk_root, android_sdk_root, ant_root, quiet)
723
700
parser .add_option ('-a' , '--androidsdkroot' ,
724
701
dest = 'android_sdk_root' , help = 'directory of android sdk root' )
725
702
parser .add_option (
726
- '-t' , '--antroot' , dest = 'ant_root' , help = 'directory that contains ant/ant.bat' )
727
-
728
- parser .add_option (
729
- '-q' , '--quiet' , dest = 'quiet' ,action = "store_false" , default = True , help = 'setup without setting NDK,SDK,ANT' )
703
+ '-q' , '--quiet' , dest = 'quiet' ,action = "store_false" , default = True , help = 'setup without setting NDK,SDK' )
730
704
opts , args = parser .parse_args ()
731
705
732
706
# set environment variables
733
707
env = SetEnvVar ()
734
708
env .set_environment_variables (
735
- opts .ndk_root , opts .android_sdk_root , opts .ant_root , opts . quiet )
709
+ opts .ndk_root , opts .android_sdk_root , opts .quiet )
736
710
737
711
if env ._isWindows ():
738
712
import ctypes
0 commit comments