浏览代码

add patch revert

/main
siyao 3 年前
当前提交
dbd2e9d1
共有 3 个文件被更改,包括 7 次插入4 次删除
  1. 11
      engine/Scripts/lib_build.py

11
engine/Scripts/lib_build.py


print("\nSCompiling engine...")
os.chdir(Path(flutter_root_path + "/third_party/skia/"))
copy_file(Path(work_path + "/patches/skia.patch"), Path(flutter_root_path + "/third_party/skia"))
os.system("patch -p1 < skia.patch -N")
if platform == "ios" or platform == "mac":
os.chdir(Path(flutter_root_path + "/flutter/third_party/txt"))
copy_file(Path(work_path + "/patches/BUILD.gn.patch"), Path(flutter_root_path + "/flutter/third_party/txt"))

os.chdir(Path(flutter_root_path + "/third_party/skia/"))
copy_file(Path(work_path + "/patches/windows/BUILD_2.gn.patch"), Path(flutter_root_path + "/third_party/skia"))
os.system("patch < BUILD_2.gn.patch -N")
os.chdir(Path(flutter_root_path + "/third_party/skia/"))
copy_file(Path(work_path + "/patches/skia.patch"), Path(flutter_root_path + "/third_party/skia"))
os.system("git apply skia.patch")
os.chdir(Path(flutter_root_path))
os.system("python ./flutter/tools/gn " + gn_params)

def revert_patches():
global flutter_root_path
print("\nRevert patches...")
os.chdir(Path(flutter_root_path + "/third_party/skia/"))
os.system("patch -p1 -R < skia.patch")
os.chdir(Path(flutter_root_path + "/flutter/third_party/txt"))
os.system("patch -R < BUILD.gn.patch")

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存