fix for non-win32 platforms

This commit is contained in:
halx99 2020-10-22 17:33:18 +08:00
parent 0ed05e8479
commit 8e6db773b8
1 changed files with 6 additions and 5 deletions

View File

@ -60,11 +60,6 @@ except Exception:
pass
from optparse import OptionParser
if(sys.version_info.major >= 3):
import winreg as _winreg
else:
import _winreg
COCOS_RE_ROOT = 'COCOS_RE_ROOT'
COCOS_RE_CONSOLE_ROOT = 'COCOS_RE_CONSOLE_ROOT'
@ -688,6 +683,12 @@ if __name__ == '__main__':
# set environment variables
env = SetEnvVar()
if env._isWindows():
if(sys.version_info.major >= 3):
import winreg as _winreg
else:
import _winreg
env.set_environment_variables(
opts.ndk_root, opts.android_sdk_root, opts.quiet)