Skip to content

Instantly share code, notes, and snippets.

@putraxor
Forked from chinmaygarde/Desktop.md
Created August 27, 2017 23:52
Show Gist options
  • Save putraxor/143065e5877ef942a16df20132f61698 to your computer and use it in GitHub Desktop.
Save putraxor/143065e5877ef942a16df20132f61698 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment