flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.75k stars 27.63k forks source link

Provide embedder sample project inside engine repo #41948

Open gaaclarke opened 5 years ago

gaaclarke commented 5 years ago

Chinmay has a gist for embedding flutter using glfw: https://gist.github.com/chinmaygarde/8abf44921f7d87f6da7bf026267c4792

We should move that into flutter/engine and get a LUCI script that builds it to make sure that it is always up to date and compiling. We could create a CMake build file to make it easy for people to build and run locally without building the engine.

gaaclarke commented 5 years ago

Hey @godofredoc, I've checked in sample code for the embedder here: https://github.com/flutter/engine/tree/master/examples/glfw

It would be nice to get this compiling as part of presubmit for the engine. It has a couple dependencies I've listed on the README, glfw and cmake. We'll probably need them incorporated in the build machine image.

I also have a script that shows how to build and run it: https://github.com/flutter/engine/blob/master/examples/glfw/run.sh

One issue we might run into is that it is looking for the engine at ${CMAKE_SOURCE_DIR}/../../../out/host_debug_unopt: https://github.com/flutter/engine/blob/e96c740410b18ae8e06ebcaab051e3c649b175c3/examples/glfw/CMakeLists.txt#L24 So it would be easier to run this in the same workspace that built the engine. That can be customized on the commandline if we need.

Let me know how I can help =)

chinmaygarde commented 5 years ago

@gaaclarke Can we close this now?

gaaclarke commented 5 years ago

@chinmaygarde Not yet, we need to get CI going on this. I'll check in with @godofredoc tomorrow.

zanderso commented 3 years ago

@gaaclarke @godofredoc Was there every any follow-up on this?

gaaclarke commented 3 years ago

If someone from the infra team could outline their recommendation and the steps to get this integrated into builds so someone else with the time could implement it, that would be helpful. For example, it's probably better left as post-submit check unlike what I said 2 years ago. Hopefully the example hasn't atrophied.

godofredoc commented 3 years ago

I believe glfw is already included in the image and cmake can be included as a cipd dependency. A few questions to help determine the path forward to include it:

godofredoc commented 3 years ago

@gaaclarke it would be great if you can join one of the flutter infra office hours to discuss the details. The details about the infra office hours can be found here: go/flutter-infra-office-hours