浏览代码

typos

/siyaoH-1.17-PlatformMessage
Xingwei Zhu 4 年前
当前提交
00e2f708
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 14
      engine/README.md

14
engine/README.md


Different from other platforms, the engine is built as a static library on iOS. One drawback of this is that, there are potential library conflicts between our library and the Unity build-in library (libiPhone-lib.a). To address this issue, an additional prelink step is required. Since prelink is not supported by Bee yet (https://unity.slack.com/archives/C1RM0NBLY/p1617696912101700), currently we have to do it manually as follows:
Generate the symbols that need to be hidden from libtxt_lib.a:
Generate the symbols that need to be stripped from libtxt_lib.a:
Prelink our library with libtxt_lib.a :
Prelink our library with libtxt_lib.a and produce one single target file, namely libUIWidgets_d.o, inside engine folder:
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -r -arch arm64 -syslibroot $IOS_SDK_PATH -unexported_symbols_list third.symbol $TARGET_FILES $FLUTTER_ROOT/out/ios_debug_unopt/obj/flutter/third_party/txt/libtxt_lib.a -o "libUIWidgets_d.o" //disable bitcode
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -r -arch arm64 -syslibroot $IOS_SDK_PATH -unexported_symbols_list third.symbol $TARGET_FILES $FLUTTER_ROOT/out/ios_debug_unopt/obj/flutter/third_party/txt/libtxt_lib.a -o "libUIWidgets_d.o" //disable bitcode
where $IOS_SDK_PATH is the ios sdk path on your computer, which is usually inside "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/" and named like iPhoneOS*XX*.*YY*.sdk. $TARGET_FILES is all the target files (i.e., .o files) in our library. You can find a list of all target files in the file "artifacts/tundra.dag.json" by collecting all the file names with suffix ".o" from the **Action** of the **Annotation** "Lib_iOS_arm64 artifacts/libUIWidgets/debug_iOS_arm64/libUIWidgets_d.a".
where **$IOS_SDK_PATH** is the ios sdk path on your computer, which is usually inside "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/" and named like iPhoneOS*XX*.*YY*.sdk. **$TARGET_FILES** is a list of target files (i.e., .o files) in our library. You can find all the target files in the file "artifacts/tundra.dag.json" by collecting all the file names with suffix ".o" from the **Inputs** section under this **Annotation** "Lib_iOS_arm64 artifacts/libUIWidgets/debug_iOS_arm64/libUIWidgets_d.a".
Archive the target file into a static library:
Archive the generated target file into a static library:
Strip all the internal symbols inside libtxt_lib.a to avoid link conflict:
Strip all the internal symbols from libtxt_lib.a:
Copy the generated libUIWidgets_d.a inside the engine folder to the project (e.g., Samples/UIWidgetsSamples_2019_4/Assets/Plugins/iOS/) and replace the original libraries there (i.e., libtxt_lib.a and libUIWidgets_d.a)
Copy the generated libUIWidgets_d.a from the engine folder to the plugin folder of your target project (e.g., Samples/UIWidgetsSamples_2019_4/Assets/Plugins/iOS/) to replace the original libraries there (i.e., libtxt_lib.a and libUIWidgets_d.a)
正在加载...
取消
保存