|
|
|
|
|
|
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" |
|
|
|