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

Commit f4ba08e

Browse files
authored
Merge pull request #149 from Unity-Technologies/siyaoH/1.17/win
Siyao h/1.17/win
2 parents 6b14f2c + e6073af commit f4ba08e

File tree

2 files changed

+51
-44
lines changed

2 files changed

+51
-44
lines changed

engine/Build.bee.cs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ static NativeProgram SetupLibUIWidgets(UIWidgetsBuildTargetPlatform platform, ou
503503
"src/engine.cc",
504504
"src/platform_base.h",
505505
},
506-
OutputName = { c => $"libUIWidgets" },
506+
OutputName = { c => "libUIWidgets" },
507507
};
508508

509509
// include these files for test only
@@ -1144,6 +1144,10 @@ static void SetupDependency(NativeProgram np)
11441144
return new PrecompiledLibrary[]
11451145
{
11461146
new StaticLibrary(flutterRoot+"/out/host_debug_unopt/obj/flutter/third_party/txt/txt_lib.lib"),
1147+
new StaticLibrary(flutterRoot+"/out/host_debug_unopt/obj/third_party/angle/angle_lib.lib"),
1148+
new StaticLibrary(flutterRoot+"/out/host_debug_unopt/obj/third_party/angle/libEGL_static.lib"),
1149+
new StaticLibrary(flutterRoot+"/out/host_debug_unopt/obj/third_party/angle/libGLESv2_static.lib"),
1150+
new SystemLibrary("dxguid.lib"),
11471151
};
11481152
});
11491153

@@ -1154,29 +1158,22 @@ static void SetupDependency(NativeProgram np)
11541158
return new PrecompiledLibrary[]
11551159
{
11561160
new StaticLibrary(flutterRoot+"/out/host_release/obj/flutter/third_party/txt/txt_lib.lib"),
1161+
new StaticLibrary(flutterRoot+"/out/host_release/obj/third_party/angle/angle_lib.lib"),
1162+
new StaticLibrary(flutterRoot+"/out/host_release/obj/third_party/angle/libEGL_static.lib"),
1163+
new StaticLibrary(flutterRoot+"/out/host_release/obj/third_party/angle/libGLESv2_static.lib"),
11571164
};
11581165
});
11591166
np.Libraries.Add(IsWindows, c =>
11601167
{
11611168
return new PrecompiledLibrary[]
11621169
{
1163-
1164-
new StaticLibrary(windowsSkiaBuild+"/libEGL.dll.lib"),
1165-
new StaticLibrary(windowsSkiaBuild+"/libGLESv2.dll.lib"),
1166-
1167-
new SystemLibrary("Opengl32.lib"),
11681170
new SystemLibrary("User32.lib"),
11691171
new SystemLibrary("Rpcrt4.lib"),
1172+
new SystemLibrary("d3d9.lib"),
1173+
new SystemLibrary("gdi32.lib"),
11701174
};
11711175
});
11721176

1173-
np.SupportFiles.Add(c => IsWindows(c), new[] {
1174-
new DeployableFile(windowsSkiaBuild + "/libEGL.dll"),
1175-
new DeployableFile(windowsSkiaBuild + "/libEGL.dll.pdb"),
1176-
new DeployableFile(windowsSkiaBuild + "/libGLESv2.dll"),
1177-
new DeployableFile(windowsSkiaBuild + "/libGLESv2.dll.pdb"),
1178-
}
1179-
);
11801177
np.Libraries.Add(IsMac, c =>
11811178
{
11821179
if(c.CodeGen == CodeGen.Debug){

engine/README.md

Lines changed: 41 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ gclient sync -D
3131
```
3232

3333
Apply the following diff:
34+
modify flutter/third_party/txt/BUILD.gn
3435
```
3536
--- a/third_party/txt/BUILD.gn
3637
+++ b/third_party/txt/BUILD.gn
@@ -55,6 +56,44 @@ Apply the following diff:
5556
+}
5657
```
5758

59+
modify third_party/angnle/BUILD.gn
60+
```
61+
diff --git a/BUILD.gn b/BUILD.gn
62+
index 06bf3bbbe..b4289dfa7 100644
63+
--- a/BUILD.gn
64+
+++ b/BUILD.gn
65+
@@ -1252,3 +1252,17 @@ if (!is_component_build && is_android &&
66+
]
67+
}
68+
}
69+
+angle_static_library("angle_lib"){
70+
+ complete_static_lib = true
71+
+
72+
+ deps = [
73+
+ ":libANGLE",
74+
+ ":libANGLE_base",
75+
+ ":angle_system_utils",
76+
+ ":angle_version",
77+
+ ]
78+
+
79+
+ public_deps = [
80+
+ ":includes",
81+
+ ]
82+
+}
83+
diff --git a/src/libANGLE/renderer/d3d/d3d11/ExternalImageSiblingImpl11.cpp b/src/libANGLE/renderer/d3d/d3d11/ExternalImageSiblingImpl11.cpp
84+
index adeeb5aa1..c9677bd8d 100644
85+
--- a/src/libANGLE/renderer/d3d/d3d11/ExternalImageSiblingImpl11.cpp
86+
+++ b/src/libANGLE/renderer/d3d/d3d11/ExternalImageSiblingImpl11.cpp
87+
@@ -144,7 +144,7 @@ angle::Result ExternalImageSiblingImpl11::createRenderTarget(const gl::Context *
88+
89+
mRenderTarget = std::make_unique<TextureRenderTarget11>(
90+
std::move(rtv), mTexture, std::move(srv), std::move(blitSrv), formatInfo.internalFormat,
91+
- formatInfo, mSize.width, mSize.height, 1, 1);
92+
+ formatInfo, mSize.width, mSize.height, 1, mSamples);
93+
return angle::Result::Continue;
94+
}
95+
```
96+
5897

5998
update `out\host_debug_unopt\args.gn`
6099
```
@@ -82,39 +121,10 @@ set GYP_MSVS_OVERRIDE_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\C
82121
cd engine/src
83122
python ./flutter/tools/gn --unoptimized
84123
ninja -C out\host_debug_unopt flutter/third_party/txt:txt_lib
124+
ninja -C out\host_debug_unopt third_party/angle:angle_lib
125+
ninja -C out\host_debug_unopt third_party/angle:libEGL_static
85126
```
86127

87-
### Build Skia
88-
1. Install LLVM
89-
90-
https://clang.llvm.org/get_started.html
91-
92-
2. Build skia
93-
```
94-
cd $FLUTTER_ROOT/third_party/skia
95-
python2 tools/git-sync-deps
96-
bin/gn gen out/Debug
97-
```
98-
99-
Update out/Debug/args.gn with the following content:
100-
```
101-
clang_win = "C:\Program Files\LLVM/third_party/skia"
102-
win_vc = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC"
103-
cc = "clang"
104-
cxx = "clang++"
105-
is_debug = true
106-
skia_use_angle = true
107-
skia_use_egl = true
108-
extra_cflags = [
109-
"/MTd",
110-
"-I../../third_party/externals/angle2/include",
111-
]
112-
```
113-
```
114-
ninja -C out/Debug -k 0
115-
```
116-
Ignore this error: "lld-link: error: could not open 'EGL': no such file or directory"
117-
118128
convert icudtl.dat to object file in flutter
119129
```
120130
cd flutterRoot/third_party/icu/flutter/

0 commit comments

Comments
 (0)