-
Notifications
You must be signed in to change notification settings - Fork 141
Create Flutter tools for embedded Linux #59
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
Comments
It seems that the official custom devices support in Flutter SDK is useful for us. |
Custom devices in Flutter SDK works fine. $ flutter config --enable-custom-devices
$ touch ~/.flutter_custom_devices.json
{
"custom-devices": [
{
"id": "embedded-linux",
"label": "Embedded Linux Device",
"sdkNameAndVersion": "Target Embedded Linux Device",
"disabled": false,
"ping": [
"ping",
"-w",
"500",
"-c",
"1",
"localhost"
],
"pingSuccessRegex": "ttl=",
"postBuild": null,
"install": [
"scp",
"-r",
"${localPath}",
"user@localhost:/tmp/${appName}"
],
"uninstall": [
"ssh",
"user@localhost",
"rm -rf \"/tmp/${appName}\""
],
"runDebug": [
"ssh",
"user@localhost",
"<path>/flutter-client -b /tmp/${appName}"
],
"forwardPort": [
"ssh",
"-o",
"ExitOnForwardFailure=yes",
"-L",
"127.0.0.1:${hostPort}:127.0.0.1:${devicePort}",
"user@localhost"
],
"forwardPortSuccessRegex": "Linux",
"screenshot": [
"ssh",
"user@localhost",
"fbgrab /tmp/screenshot.png && cat /tmp/screenshot.png | base64 | tr -d ' \\n\\t'"
]
}
]
} $ flutter devices
3 connected devices:
Linux (desktop) • linux • linux-x64 • Ubuntu 20.04.2 LTS 5.4.0-66-generic
Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.82
Embedded Linux Device (mobile) • embedded-linux • linux-arm64 • Target Embedded Linux Device
$ flutter run -d embedded-linux --verbose |
At least now, I think flutter-tizen's approach is better than using custom devices in Flutter SDK. Because custom devices in Flutter SDK don't support building a custom embedder.
If we create a custom tool / flutter tool fork, it will be a pretty big maintenance burden. So, I'll consider to add some options into Flutter SDK. |
I'm creating a new tool for this embedder, which is flutter-tizen based. Also, I'm going to create a new repo. |
I published flutter-elinux. |
Would the fork of the flutter CLI tool that is maintained in flutter-elinux be deprecated if this PR flutter/flutter#90958 or something similar is merged? Or are there more differences in how the flutter-elinux fork functions compared to the official flutter CLI that would still be necessary even after that PR is merged? |
I suspect you'd still need to maintain your fork. |
Ok, that makes sense. Since commands like Though it does appear that providing specifying artifact urls was considered for custom-devices flutter/flutter#79406 (comment) I wonder if deprecating the fork is possible if custom-devices supported specifying artifact urls and something like the keys in the aformenetioned PR, namely I'm not sure what other issues are solved by the fork. Perhaps VSCode Extension mentioned above?
|
Currently, we need to build Flutter Engine to use this embedder ourselves. We also need to use a specific Flutter SDK to build Flutter apps. These tasks are bothered, so we will create a tool to support such as
flutter build embedded-linux
andflutter run -d embedded-linux
, etc.The text was updated successfully, but these errors were encountered: