Skip to content

Commit 187bf58

Browse files
author
Bin Zhang
authored
Merge pull request #391 from natural-law/v3
Add option '--ap' for command gen-libs.
2 parents ee1dce6 + f3d1b44 commit 187bf58

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugins/plugin_generate/gen_libs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def parse_args(self, argv):
6363
group = parser.add_argument_group(MultiLanguage.get_string('GEN_LIBS_GROUP_ANDROID'))
6464
group.add_argument("--app-abi", dest="app_abi",
6565
help=MultiLanguage.get_string('GEN_LIBS_ARG_ABI'))
66+
group.add_argument("--ap", dest="android_platform",
67+
help=MultiLanguage.get_string('COMPILE_ARG_AP'))
6668

6769
(args, unknown) = parser.parse_known_args(argv)
6870
self.init(args)
@@ -129,6 +131,7 @@ def init(self, args):
129131
self.app_abi = 'armeabi'
130132
else:
131133
self.app_abi = args.app_abi
134+
self.android_platform = args.android_platform
132135

133136
self.lib_dir = os.path.normpath(os.path.join(self.repo_x, self.cfg_info[LibsCompiler.KEY_LIBS_OUTPUT]))
134137

@@ -361,6 +364,8 @@ def compile_android(self):
361364
# build the simulator project
362365
proj_path = os.path.join(engine_dir, 'tools/simulator')
363366
build_cmd = "%s compile -s %s -p android --ndk-mode %s --app-abi %s" % (cmd_path, proj_path, self.mode, self.app_abi)
367+
if self.android_platform is not None:
368+
build_cmd += ' --ap %s' % self.android_platform
364369
self._run_cmd(build_cmd)
365370

366371
# copy .a to prebuilt dir

0 commit comments

Comments
 (0)