Skip to content

Instantly share code, notes, and snippets.

@chinmaygarde
Created February 2, 2016 19:45
Show Gist options
  • Save chinmaygarde/ca1f994dfcecb3eda2e8 to your computer and use it in GitHub Desktop.
Save chinmaygarde/ca1f994dfcecb3eda2e8 to your computer and use it in GitHub Desktop.
Flutter Desktop Runner
  • You need to build the engine from source. Follow the steps at https://github.com/flutter/engine/blob/master/CONTRIBUTING.md#getting-the-code-and-configuring-your-environment
    • You can skip the forking step if you don’t think you will be contributing changes to the engine.
  • Once your environment is setup, build the engine in Release mode.
    • $ sky/tools/gn —release
    • $ ninja -C out/Release -j12
  • After the long build you will find a Mac application called SkyShell.app in out/Release. This is the generic Flutter application runner. It does not know anything about your dart project yet.
  • Create a sample dart project
    • $ flutter init -o mac_hello
  • From the command line, launch the SkyShell.app with command line flags telling it where your dart project resides and its package root. On my system I did this:
    • $ ./out/Release/SkyShell.app/Contents/MacOS/SkyShell PATH_TO_PROJECT/lib/main.dart --package-root=PATH_TO_PROJECT/packages
  • Run the last step again each time you update your Dart project to reload your changes.
@markmclaren2
Copy link

This page seems to be out of date - there is no "sky/tools/gn" after building the engine. Out of interest, what is "Flutter Desktop Runner"? Is it way to run the app in a desktop instead of a mobile device or simulated app?

@zoechi
Copy link

zoechi commented Dec 8, 2017

I think so. Running Flutter apps on the desktop was supported for a while but was discontinued. It might be revived eventually, but for now it doesn't seem to have priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment