Git Product home page Git Product logo

Comments (8)

HidenoriMatsubayashi avatar HidenoriMatsubayashi commented on August 15, 2024 2

Custom devices in Flutter SDK works fine.

$ flutter config --enable-custom-devices
$ touch ~/.flutter_custom_devices.json

~/.flutter_custom_devices.json which is an example I've tried with my localhost.

{
  "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

from flutter-embedded-linux.

christopherfujino avatar christopherfujino commented on August 15, 2024 1

I suspect you'd still need to maintain your fork.

from flutter-embedded-linux.

HidenoriMatsubayashi avatar HidenoriMatsubayashi commented on August 15, 2024

It seems that the official custom devices support in Flutter SDK is useful for us.

from flutter-embedded-linux.

HidenoriMatsubayashi avatar HidenoriMatsubayashi commented on August 15, 2024

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. However, if we develop Android apps, iOS apps, Linux desktop apps, and Embedded Linux at the same time, we need to use two tools... Also, Extension for VSCode is an issue.

For the time being, we will go with making a new tool like flutter-tizen.

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.

from flutter-embedded-linux.

HidenoriMatsubayashi avatar HidenoriMatsubayashi commented on August 15, 2024

I'm creating a new tool for this embedder, which is flutter-tizen based. Also, I'm going to create a new repo.

from flutter-embedded-linux.

HidenoriMatsubayashi avatar HidenoriMatsubayashi commented on August 15, 2024

I published flutter-elinux.

from flutter-embedded-linux.

doesnotexist avatar doesnotexist commented on August 15, 2024

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?

from flutter-embedded-linux.

doesnotexist avatar doesnotexist commented on August 15, 2024

Ok, that makes sense. Since commands like flutter-elinux build support flags such as --target-backend-type
and that downloading artifacts are retrieved from https://github.com/sony/flutter-embedded-linux/releases (or an alternative specified url by an environment variable ELINUX_ENGINE_BASE_URL )

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 configureNativeProject and buildNativeProject. Would those keys or something very similar supplant the custom flags like --target-backend-type?

I'm not sure what other issues are solved by the fork. Perhaps VSCode Extension mentioned above?

"Also, Extension for VSCode is an issue."

from flutter-embedded-linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.