Skip to content

Commit ca49279

Browse files
author
zhangbin
committed
Remove the option --no-native in cocos new.
1 parent 39b70e2 commit ca49279

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

plugins/plugin_new/project_new.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,13 @@ def parse_args(self, argv):
120120
help=MultiLanguage.get_string('NEW_ARG_ENGINE_PATH'))
121121
parser.add_argument("--portrait", action="store_true", dest="portrait",
122122
help=MultiLanguage.get_string('NEW_ARG_PORTRAIT'))
123-
group = parser.add_argument_group(MultiLanguage.get_string('NEW_ARG_GROUP_SCRIPT'))
124-
group.add_argument(
125-
"--no-native", action="store_true", dest="no_native",
126-
help=MultiLanguage.get_string('NEW_ARG_NO_NATIVE'))
123+
124+
# REMOVE the option --no-native. Because it's added for Cocos Code IDE.
125+
# It will cause confusion: https://github.com/cocos2d/cocos2d-console/issues/401
126+
# group = parser.add_argument_group(MultiLanguage.get_string('NEW_ARG_GROUP_SCRIPT'))
127+
# group.add_argument(
128+
# "--no-native", action="store_true", dest="no_native",
129+
# help=MultiLanguage.get_string('NEW_ARG_NO_NATIVE'))
127130

128131
# -l | --list-templates
129132
group = parser.add_mutually_exclusive_group(required=True)
@@ -234,11 +237,15 @@ def _create_from_cmd(self):
234237

235238
# script project may add native support
236239
if self._lang in (cocos_project.Project.LUA, cocos_project.Project.JS):
237-
if not self._other_opts.no_native:
238-
creator.do_other_step('do_add_native_support')
239-
data[cocos_project.Project.KEY_HAS_NATIVE] = True
240-
else:
241-
data[cocos_project.Project.KEY_HAS_NATIVE] = False
240+
# REMOVE the option --no-native. Because it's added for Cocos Code IDE.
241+
# It will cause confusion: https://github.com/cocos2d/cocos2d-console/issues/401
242+
# if self._other_opts.no_native is not self._other_opts.no_native:
243+
# creator.do_other_step('do_add_native_support')
244+
# data[cocos_project.Project.KEY_HAS_NATIVE] = True
245+
# else:
246+
# data[cocos_project.Project.KEY_HAS_NATIVE] = False
247+
creator.do_other_step('do_add_native_support')
248+
data[cocos_project.Project.KEY_HAS_NATIVE] = True
242249

243250
# record the engine version if not predefined
244251
if not data.has_key(cocos_project.Project.KEY_ENGINE_VERSION):

0 commit comments

Comments
 (0)