Unity-Technologies / com.unity.uiwidgets

UIWidgets is a Unity Package which helps developers to create, debug and deploy efficient, cross-platform Apps.
https://unity.cn/uiwidgets
625 stars 78 forks source link

[WIP] Try to make the build engine scripts compatible with MacOS 12 SDKs #260

Closed zhuxingwei closed 2 years ago

zhuxingwei commented 3 years ago

This PR aims to fix the issue that after upgrading MacOS and XCode to the latest (i.e., MacOS 12 and IOS 15) the flutter engine cannot be correctly built.

The main reason is two-fold: (1) there are conflicts between the old-versioned header files in the buildtools and MacOS 12 SDK; (2) there are some breaking changes in the new MacOS SDK (e.g., this issue) that are not compatible with the codes in flutter 1.17.5

This PR is still in progress now since I haven't figured out a way to fix (2) yet. Since the root cause is that, flutter 1.17.5 is old enough that it may indeed be not compatible with the latest SDKs, maybe a complete solution is to either upgrade our flutter engine or downgrade MacOS and IOS SDK versions (MacOS to 11.0 should work, IOS issue has not been touched yet).

In this PR I also refined the build scripts in build.py a little so it can address the flutter_root_path configuration better

huidong-chen commented 3 years ago

I was also wondering how we keep up to date with flutter (which seems to be evolving steadily) and never got the chance to ask.

zhuxingwei commented 3 years ago

I was also wondering how we keep up to date with flutter (which seems to be evolving steadily) and never got the chance to ask.

yes, that is a tough issue. Our strategy is that: assume we are currently at flutter Y.Y and we want to upgrade to keep up with flutter X.X, we first build the corresponding flutter engine of the specific version. Then we manually merge the changes in flutter framework (dart code) between version Y.Y and X.X and convert them to C#.

Since the upgrade should be very time-consuming, so we won't do it frequently.