浏览代码

Merge pull request #149 from Unity-Technologies/siyaoH/1.17/win

Siyao h/1.17/win
/main
GitHub 3 年前
当前提交
64167acc
共有 2 个文件被更改,包括 51 次插入44 次删除
  1. 23
      engine/Build.bee.cs
  2. 72
      engine/README.md

23
engine/Build.bee.cs


"src/engine.cc",
"src/platform_base.h",
},
OutputName = { c => $"libUIWidgets" },
OutputName = { c => "libUIWidgets" },
};
// include these files for test only

return new PrecompiledLibrary[]
{
new StaticLibrary(flutterRoot+"/out/host_debug_unopt/obj/flutter/third_party/txt/txt_lib.lib"),
new StaticLibrary(flutterRoot+"/out/host_debug_unopt/obj/third_party/angle/angle_lib.lib"),
new StaticLibrary(flutterRoot+"/out/host_debug_unopt/obj/third_party/angle/libEGL_static.lib"),
new StaticLibrary(flutterRoot+"/out/host_debug_unopt/obj/third_party/angle/libGLESv2_static.lib"),
new SystemLibrary("dxguid.lib"),
};
});

return new PrecompiledLibrary[]
{
new StaticLibrary(flutterRoot+"/out/host_release/obj/flutter/third_party/txt/txt_lib.lib"),
new StaticLibrary(flutterRoot+"/out/host_release/obj/third_party/angle/angle_lib.lib"),
new StaticLibrary(flutterRoot+"/out/host_release/obj/third_party/angle/libEGL_static.lib"),
new StaticLibrary(flutterRoot+"/out/host_release/obj/third_party/angle/libGLESv2_static.lib"),
};
});
np.Libraries.Add(IsWindows, c =>

new StaticLibrary(windowsSkiaBuild+"/libEGL.dll.lib"),
new StaticLibrary(windowsSkiaBuild+"/libGLESv2.dll.lib"),
new SystemLibrary("Opengl32.lib"),
new SystemLibrary("d3d9.lib"),
new SystemLibrary("gdi32.lib"),
np.SupportFiles.Add(c => IsWindows(c), new[] {
new DeployableFile(windowsSkiaBuild + "/libEGL.dll"),
new DeployableFile(windowsSkiaBuild + "/libEGL.dll.pdb"),
new DeployableFile(windowsSkiaBuild + "/libGLESv2.dll"),
new DeployableFile(windowsSkiaBuild + "/libGLESv2.dll.pdb"),
}
);
np.Libraries.Add(IsMac, c =>
{
if(c.CodeGen == CodeGen.Debug){

72
engine/README.md


```
Apply the following diff:
modify flutter/third_party/txt/BUILD.gn
```
--- a/third_party/txt/BUILD.gn
+++ b/third_party/txt/BUILD.gn

+}
```
modify third_party/angnle/BUILD.gn
```
diff --git a/BUILD.gn b/BUILD.gn
index 06bf3bbbe..b4289dfa7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1252,3 +1252,17 @@ if (!is_component_build && is_android &&
]
}
}
+angle_static_library("angle_lib"){
+ complete_static_lib = true
+
+ deps = [
+ ":libANGLE",
+ ":libANGLE_base",
+ ":angle_system_utils",
+ ":angle_version",
+ ]
+
+ public_deps = [
+ ":includes",
+ ]
+}
diff --git a/src/libANGLE/renderer/d3d/d3d11/ExternalImageSiblingImpl11.cpp b/src/libANGLE/renderer/d3d/d3d11/ExternalImageSiblingImpl11.cpp
index adeeb5aa1..c9677bd8d 100644
--- a/src/libANGLE/renderer/d3d/d3d11/ExternalImageSiblingImpl11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/ExternalImageSiblingImpl11.cpp
@@ -144,7 +144,7 @@ angle::Result ExternalImageSiblingImpl11::createRenderTarget(const gl::Context *
mRenderTarget = std::make_unique<TextureRenderTarget11>(
std::move(rtv), mTexture, std::move(srv), std::move(blitSrv), formatInfo.internalFormat,
- formatInfo, mSize.width, mSize.height, 1, 1);
+ formatInfo, mSize.width, mSize.height, 1, mSamples);
return angle::Result::Continue;
}
```
update `out\host_debug_unopt\args.gn`
```

cd engine/src
python ./flutter/tools/gn --unoptimized
ninja -C out\host_debug_unopt flutter/third_party/txt:txt_lib
```
### Build Skia
1. Install LLVM
https://clang.llvm.org/get_started.html
2. Build skia
```
cd $FLUTTER_ROOT/third_party/skia
python2 tools/git-sync-deps
bin/gn gen out/Debug
```
Update out/Debug/args.gn with the following content:
```
clang_win = "C:\Program Files\LLVM/third_party/skia"
win_vc = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC"
cc = "clang"
cxx = "clang++"
is_debug = true
skia_use_angle = true
skia_use_egl = true
extra_cflags = [
"/MTd",
"-I../../third_party/externals/angle2/include",
]
ninja -C out\host_debug_unopt third_party/angle:angle_lib
ninja -C out\host_debug_unopt third_party/angle:libEGL_static
```
ninja -C out/Debug -k 0
```
Ignore this error: "lld-link: error: could not open 'EGL': no such file or directory"
convert icudtl.dat to object file in flutter
```

正在加载...
取消
保存