浏览代码

add visual studio path param '-v'

/zgh-build_scripts
guanghuispark 3 年前
当前提交
e6789f97
共有 1 个文件被更改,包括 12 次插入2 次删除
  1. 14
      engine/Scripts/lib_build_win.py

14
engine/Scripts/lib_build_win.py


runtime_mode=""
bitcode=""
flutter_root_path=""
visual_studio_path=""
def get_opts():
# get intput agrs

global bitcode
global visual_studio_path
options, args = getopt.getopt(sys.argv[1:], 'r:p:m:eo')
options, args = getopt.getopt(sys.argv[1:], 'r:p:m:v:eo')
for opt, arg in options:
if opt == '-r':
engine_path = arg # set engine_path, depot_tools and flutter engine folder will be put into this path

runtime_mode = arg
gn_params += gn_params + " --runtime-mode=" + runtime_mode # set runtime mode release/debug
elif opt == '-v':
visual_studio_path = arg
def engine_path_check():
global engine_path

print("setting environment variable and other params...")
visual_studio_path_env = os.getenv('GYP_MSVS_OVERRIDE_PATH', 'null')
if visual_studio_path == "":
if visual_studio_path_env == 'null':
assert False, "In func set_params(), visual_studio_path is not exist, please set the path by using \"-v\" param to set a engine path."
else:
os.environ["GYP_MSVS_OVERRIDE_PATH"] = visual_studio_path
if runtime_mode == "release":
optimize=""
output_path="host_release"

正在加载...
取消
保存