Skip to content

Commit 68b26c3

Browse files
author
minggo
authored
Merge pull request #393 from minggo/lua-64bit-fix
only remove lua files when building relase mode for arm64
2 parents 40c3218 + cb405ef commit 68b26c3

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

plugins/plugin_compile/build_android.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -497,11 +497,14 @@ def do_build_apk(self, build_mode, no_apk, output_dir, custom_step_args, compile
497497

498498
# only build 64bit
499499
if build_type == self.LuaBuildType.ONLY_BUILD_64BIT:
500-
dst_dir = os.path.join(assets_dir, 'src/64bit')
501-
compile_obj.compile_lua_scripts(src_dir, dst_dir, True)
502-
# remove unneeded lua files
503-
compile_obj._remove_file_with_ext(src_dir, '.lua')
504-
shutil.rmtree(os.path.join(src_dir, 'cocos'))
500+
if build_mode == 'release':
501+
dst_dir = os.path.join(assets_dir, 'src/64bit')
502+
compile_obj.compile_lua_scripts(src_dir, dst_dir, True)
503+
# remove unneeded lua files
504+
compile_obj._remove_file_with_ext(src_dir, '.lua')
505+
shutil.rmtree(os.path.join(src_dir, 'cocos'))
506+
else:
507+
compile_obj.compile_lua_scripts(src_dir, src_dir, False)
505508

506509
# only build 32bit
507510
if build_type == self.LuaBuildType.ONLY_BUILD_32BIT:

0 commit comments

Comments
 (0)