Skip to content

Commit e453ffa

Browse files
author
minggo
committed
use inner class in correct way
1 parent ab7c6de commit e453ffa

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

plugins/plugin_compile/build_android.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -426,15 +426,15 @@ def _do_get_build_type(self, str):
426426
if build_64bit:
427427
if build_other_arch:
428428
print 'build 64bit and 32bit'
429-
return LuaBuildType.BUILD_32BIT_AND_64BIT
429+
return self.LuaBuildType.BUILD_32BIT_AND_64BIT
430430
else:
431431
print 'only build 64bit'
432-
return LuaBuildType.ONLY_BUILD_64BIT
432+
return self.LuaBuildType.ONLY_BUILD_64BIT
433433
else:
434434
print 'only build 32bit'
435-
return LuaBuildType.ONLY_BUILD_32BIT
435+
return self.LuaBuildType.ONLY_BUILD_32BIT
436436

437-
return LuaBuildType.UNKNOWN
437+
return self.LuaBuildType.UNKNOWN
438438

439439
# check if arm64-v8a is set in Application.mk
440440
def _get_build_type(self, param_of_appabi):
@@ -450,10 +450,10 @@ def _get_build_type(self, param_of_appabi):
450450
if line.find('APP_ABI') == -1:
451451
continue
452452
build_type = self._do_get_build_type(line)
453-
if build_type != LuaBuildType.UNKNOWN:
453+
if build_type != self.LuaBuildType.UNKNOWN:
454454
return build_type
455455

456-
return LuaBuildType.UNKNOWN
456+
return self.LuaBuildType.UNKNOWN
457457

458458
def do_build_apk(self, build_mode, no_apk, output_dir, custom_step_args, compile_obj):
459459
if self.use_studio:
@@ -493,27 +493,27 @@ def do_build_apk(self, build_mode, no_apk, output_dir, custom_step_args, compile
493493
build_type = self._get_build_type(compile_obj.app_abi)
494494

495495
# only build 64bit
496-
if build_type == LuaBuildType.ONLY_BUILD_64BIT:
496+
if build_type == self.LuaBuildType.ONLY_BUILD_64BIT:
497497
dst_dir = os.path.join(assets_dir, 'src/64bit')
498498
compile_obj.compile_lua_scripts(src_dir, dst_dir, True)
499499
# remove unneeded lua files
500500
compile_obj._remove_file_with_ext(src_dir, '.lua')
501501
shutil.rmtree(os.path.join(src_dir, 'cocos'))
502502

503503
# only build 32bit
504-
if build_type == LuaBuildType.ONLY_BUILD_32BIT:
504+
if build_type == self.LuaBuildType.ONLY_BUILD_32BIT:
505505
# build 32-bit bytecode
506506
compile_obj.compile_lua_scripts(src_dir, src_dir, False)
507507

508508
# build 32bit and 64bit
509-
if build_type == LuaBuildType.BUILD_32BIT_AND_64BIT:
509+
if build_type == self.LuaBuildType.BUILD_32BIT_AND_64BIT:
510510
# build 64-bit bytecode
511511
dst_dir = os.path.join(assets_dir, 'src/64bit')
512512
compile_obj.compile_lua_scripts(src_dir, dst_dir, True)
513513
# build 32-bit bytecode
514514
compile_obj.compile_lua_scripts(src_dir, src_dir, False)
515515

516-
if build_type == LuaBuildType.UNKNOWN:
516+
if build_type == self.LuaBuildType.UNKNOWN:
517517
# haven't set APP_ABI in parameter and Application.mk, default build 32bit
518518
compile_obj.compile_lua_scripts(src_dir, src_dir, False)
519519

0 commit comments

Comments
 (0)