Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit 60822c6

Browse files
committed
Update lib_build.py
1 parent 6acd9ed commit 60822c6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

engine/Scripts/lib_build.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import getopt
66
import shutil
77
import json
8+
import re
89

910
work_path=os.getcwd()
1011
engine_path=""
@@ -131,9 +132,9 @@ def set_env_verb():
131132
else:
132133
print("This environment variable has been set, skip")
133134
env_path = os.getenv('PATH')
134-
path_strings = env_path.split(';')
135+
path_strings = re.split("[;:]", env_path)
135136
for path in path_strings:
136-
if path.startswith(engine_path):
137+
if path.endswith("depot_tools"):
137138
print("This environment variable has been set, skip")
138139
return
139140
if platform == "windows":
@@ -150,7 +151,7 @@ def get_depot_tools():
150151
else:
151152
os.chdir(engine_path)
152153
os.system("git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git")
153-
os.system("gclient")
154+
os.system("gclient sync")
154155

155156
def get_flutter_engine():
156157
global engine_path
@@ -413,7 +414,8 @@ def prelinkfiles(tundra_file, runtime_mode, output_path, work_path, bitcode):
413414
xcode_path = get_xcode_path().strip()
414415
os.system('\"' + xcode_path + '/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -r -arch arm64 ' + bitcode + ' -syslibroot ' + xcode_path + '/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -unexported_symbols_list third.symbol ' + target_files + ' ' + flutter_root_path + '/out/' + output_path + '/obj/flutter/third_party/txt/libtxt_lib.a -o "libUIWidgets.o"')
415416
os.system('\"' + xcode_path + '/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool" -arch_only arm64 -static "libUIWidgets.o" -o "libUIWidgets.a"')
416-
os.system('\"' + xcode_path + '/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip" -x "libUIWidgets.a"')
417+
if runtime_mode == "release":
418+
os.system('\"' + xcode_path + '/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip" -x "libUIWidgets.a"')
417419
copy_file(Path(work_path + "/../libUIWidgets.a"), Path(work_path + "/../../com.unity.uiwidgets/Runtime/Plugins/ios/libUIWidgets.a"))
418420

419421
def get_rsp(tundra_file, runtime_mode):

0 commit comments

Comments
 (0)