Skip to content

Commit

Permalink
Solve the environment conflict with Cocos.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangbin committed Dec 11, 2014
1 parent 974c659 commit 6f4d61e
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,28 +483,6 @@ def set_console_root(self):

self._force_update_env(COCOS_CONSOLE_ROOT, cocos_consle_root)

def set_cocos_x_root(self):
print("->Check environment variable %s" % COCOS_X_ROOT)
cocos_x_root = self.current_absolute_path
old_dir = self._find_environment_variable(COCOS_X_ROOT)
if old_dir is None:
# add environment variable
if self._isWindows():
self.set_windows_path(cocos_x_root)

self._set_environment_variable(COCOS_X_ROOT, cocos_x_root)
else:
if old_dir == cocos_x_root:
# is same with before, nothing to do
return

# update the environment variable
if self._isWindows():
self.remove_dir_from_win_path(old_dir)
self.set_windows_path(cocos_x_root)

self._force_update_env(COCOS_X_ROOT, cocos_x_root)

def set_templates_root(self):
print("->Check environment variable %s" % COCOS_TEMPLATES_ROOT)
cocos_templates_root = os.path.join(self.current_absolute_path, 'templates')
Expand Down Expand Up @@ -685,7 +663,6 @@ def set_environment_variables(self, ndk_root, android_sdk_root, ant_root):
self.file_used_for_setup = self._get_filepath_for_setup()

self.set_console_root()
self.set_cocos_x_root()
self.set_templates_root()

if self._isWindows():
Expand Down

0 comments on commit 6f4d61e

Please sign in to comment.