Skip to content

Merge pull request from google/master #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jan 31, 2019
Merged

Conversation

cloudwebrtc
Copy link
Owner

No description provided.

jbg and others added 14 commits January 21, 2019 11:53
* Re-organize the example app

Instead of making the platform implementations peers of the example
Flutter application, make them subdirectories of it. This matches the
structure of a standard Flutter application's mobile implementations,
and provides a better example of how to use the project to add desktop
support to an existing Flutter app.

Since interest so far has been for that use case rather than adding
Flutter to an existing application (and the current Linux and Windows
implementations don't really support the hybrid use case anyway), this
should be more reflective of how it would actually be used.

* Move Linux build output under example/build/
Add error logging when starting the Flutter engine fails (on all
platforms), and on GLFW errors. Also exit early with error logging for
unrecoverable errors in the GLFW implementation.

Fixes #241.
- Clearly separates out and documents the variables that are most likely
  to need to change if copying the example app.
- Better differentiate between paths that are relative to the example
  and paths that are relative to the FDE repository, since apps using
  FDE would not be expected to be in the same directory the way the
  example is.
- Add a minimal "release" mode that enables that flag to disable Dart
  asserts, as on macOS and Windows.
- Remove the output directory override that puts the example app in the
  same output directory as the GN build (when building with GN).
  Combining them makes it less clear what's specific to the example,
  and what's part of building the library itself.
Adds documentation targetted at someone who has found the project hoping
to be able to run a command or two and have desktop support in their
existing Flutter application. Attempts to set expectations, but also
provide some more information about how someone could potentially get
started even without experience in desktop development.
Replaced URL to Flutter's repo from http to https.
* Add Flutter tree min version check

To minimize confusion, and reduce unnecessary issue reports, add a check
during builds that the Flutter tree being used is not older than the
last known point where there was a compatibility break. Instead of a
runtime error, or an unexplained build error, this will fail out during
the engine update step with a clear message to use a newer version of
Flutter.

Currently, this will ensure that people who aren't on Flutter master
will get an error message that's as clear as possible.

* Update CI to use sufficiently new versions of Flutter
Call out the requirement that the library and the Flutter application
must be build with the same version, since some people have
started distributing binary versions apparently without being aware
of this.
Avoids generating a UI that is too small in high resolution monitors.
Creates a simple C++ object as the primary interaction point for the
embedder calls. This provides a simpler API surface than embedder.h,
and folds in some common code (e.g., error logging).

This also serves to insulate clients from the embedder.h API layer,
so that future incremental changes done for #230 will cause less churn
for embedders.
Rather than exposing the GLFWwindow that is used, treat it as an
implementation detail and use an opaque pointer specific to this library
as the context object instead.

In practice the use of GLFW can't be entirely internal since the use of
GLFW in the library prevents its use by the embedder, but the details of
how it is used should not be exposed. This also gives greater control
over the API surface, as part of working toward a stable ABI (#230).

This does mean that the embedder cannot manipulate the GLFW window
directly, but rather than trust that doing so would be safe across DLL
boundaries, any functionality need by the simple embedder
use cases this library enables should be exposed via wrappers.
flutter/engine#7567 renamed the type of the
result for embedding API calls. Rather than force a Flutter upgrade by
using the new type name, temporarily use 'auto' for the type (with a
TODO to change it later, since auto is arguably less readable here).

This requires converting the file to ObjC++, which required a few
explicit casts in places that were previously being silently recast.
@cloudwebrtc cloudwebrtc merged commit 5f258ab into cloudwebrtc:master Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants