浏览代码

update revert patch and bitcode setting

/zgh-build_scripts
guanghuispark 4 年前
当前提交
f931afd9
共有 5 个文件被更改,包括 54 次插入5 次删除
  1. 27
      engine/Build.bee.cs
  2. 2
      engine/Scripts/full_build.sh
  3. 7
      engine/Scripts/lib_build_ios.sh
  4. 2
      engine/Scripts/lib_build_win.py
  5. 21
      engine/Scripts/prelink.py

27
engine/Build.bee.cs


using Bee.Toolchain.GNU;
using Bee.Toolchain.IOS;
using System.Diagnostics;
using System.IO;
enum UIWidgetsBuildTargetPlatform
{
windows,

flutterRoot = Environment.GetEnvironmentVariable("USERPROFILE") + "/engine/src";
}
skiaRoot = flutterRoot + "/third_party/skia";
try
{
using (StreamReader sr = new StreamReader("Scripts/bitcode.conf"))
{
string line;
if ((line = sr.ReadLine()) != null)
{
if(line.Trim() == "true")
{
ios_bitcode_enabled = true;
}
else
{
ios_bitcode_enabled = false;
}
}
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
//available target platforms of Windows
if (BuildUtils.IsHostWindows())

2
engine/Scripts/full_build.sh


;;
"mac") ./lib_build_mac.sh -m $runtime_mode -r $engine_path
;;
"windows") echo 'You select windows'
"windows") python3 lib_build_win.py -m $runtime_mode -r $engine_path
;;
*) echo "unknown platform, only support \"android\",\"ios\",\"mac\",\"windows\""
;;

7
engine/Scripts/lib_build_ios.sh


mkdir $engine_path
fi
if [ "$bitcode" == "-bitcode_bundle -bitcode_verify" ];
then
echo "true" > bitcode.conf
else
echo "false" > bitcode.conf
fi
if [ "$runtime_mode" == "release" ];
then
optimize=""

2
engine/Scripts/lib_build_win.py


os.system("patch -R < BUILD.gn.patch")
os.chdir(flutter_root_path + "/third_party/angle")
os.system("patch -R < BUILD.gn.patch -N")
os.system("patch -R < BUILD.gn.patch")
os.chdir(flutter_root_path + "/third_party/angle/src/libANGLE/renderer/d3d/d3d11/")
os.system("patch -R < cpp.patch")

21
engine/Scripts/prelink.py


os.system('\"' + xcode_path + '/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip" -x "libUIWidgets.a"')
os.system('cp -r libUIWidgets.a ' + '../com.unity.uiwidgets/Runtime/Plugins/ios/libUIWidgets.a')
def revert_patches(work_path):
print("\nRevert patches...")
flutter_root_path = os.environ['FLUTTER_ROOT_PATH']
os.chdir(flutter_root_path + "/flutter/third_party/txt")
os.system("patch -R < BUILD.gn.patch")
os.chdir(flutter_root_path + "/build/mac")
os.system("patch -R < find_sdk.patch")
os.chdir(work_path)
if os.path.exists(work_path + "/bitcode.conf"):
os.remove("bitcode.conf")
work_path = sys.argv[4]
prelinkfiles(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5])
prelinkfiles(sys.argv[1], sys.argv[2], sys.argv[3], work_path, sys.argv[5])
prelinkfiles(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], "")
prelinkfiles(sys.argv[1], sys.argv[2], sys.argv[3], work_path, "")
revert_patches(work_path)
正在加载...
取消
保存