Flutter Desktop for Windows Release Mode and Deployment

812 views
Skip to first unread message

Travis James

unread,
Jan 29, 2020, 12:07:09 PM1/29/20
to Desktop Embedding for Flutter
Good morning/afternoon,

I am on of those that drank all the Kool-Aid and built a production Flutter Desktop app for a very large client.  The client LOVES the POC we put together, but now we need to deploy a release mode version onto several Windows 10 "podium" PC's and need to solve the following:
  • Flutter Desktop for Windows does not build a release mode build.  This makes us have to distribute debug versions MSVC runtime libraries, etc.  Do you have an idea of when release builds will be supported?
  • We need a way to package the application into a Windows installation, accounting for all dependencies (like MSVC, Flutter runtime DLL, etc.).  Is there a list published somewhere to make this easy to find?
The client cannot get any bigger--it's Deloitte, so if we can highlight the use of Flutter in production in their environment, that would be excellent for the Flutter team and us, of course.  Any help you can provide toward answering these and other questions that have come up (e.g., we seem to not be able to insert any code that works to allow for tabbing between text fields, so it makes field navigation hard for the user) would be greatly appreciated.


Stuart Morgan

unread,
Jan 29, 2020, 1:06:35 PM1/29/20
to Travis James, Desktop Embedding for Flutter
On Wed, Jan 29, 2020 at 9:07 AM Travis James <tra...@tribehealthsolutions.com> wrote:
I am on of those that drank all the Kool-Aid and built a production Flutter Desktop app for a very large client.  The client LOVES the POC we put together, but now we need to deploy a release mode version onto several Windows 10 "podium" PC's

I'm glad to hear that you were able to build something well received even at this not-yet-alpha stage! That said, it's worth reiterating that when it comes to building a production Windows application, the Kool-Aid currently comes with a very prominent warning label saying "Do not drink" :)

Flutter Desktop for Windows does not build a release mode build.
 
From a Flutter perspective it's building what Flutter calls debug mode; that means that it's using JIT rather than AOT, Dart assertions are enabled unless you've turned them off, the observatory is enabled unless you've turned it off (I hope you've turned it off if you're deploying builds to production machines, so that they aren't running what is in essence a local web server that will run arbitrary code for anything connecting to it). However:
 
This makes us have to distribute debug versions MSVC runtime libraries, etc.

The debug/release distinction exists in the Visual Studio project that builds the native runner code, so this should not be true. If you are using `flutter build` to make a "release" build, or building the Release configuration directly in the VS UI, your resulting application should not be linking the debug C++ runtime. If you're seeing something different, please file a bug with details.

Do you have an idea of when release builds will be supported?

It's something we've started looking at, and there are technical discussions in progress about some of the details, but we can't commit to a timeline at the moment. You can watch https://github.com/flutter/flutter/issues/38477 for updates; any concrete timeline would be added to the Milestone there as described at https://github.com/flutter/flutter/wiki/Issue-hygiene#when-will-my-bug-be-fixed.
 
We need a way to package the application into a Windows installation, accounting for all dependencies (like MSVC, Flutter runtime DLL, etc.).  Is there a list published somewhere to make this easy to find?

You need what's next to the exe (all the DLLs there, as well as the assets), as well as the relevant MSVC redistributables. I don't have the exact details for the latter offhand, since we haven't been focused on instructions for packaging and redistribution yet, but there's nothing Flutter-specific about that part. Alternately, you could switch your runner and any plugins you use to the static runtime, which would eliminate the need for the latter at the cost of extra size on disk (see discussion in https://github.com/google/flutter-desktop-embedding/issues/587).
 
Any help you can provide toward answering these and other questions that have come up (e.g., we seem to not be able to insert any code that works to allow for tabbing between text fields, so it makes field navigation hard for the user) would be greatly appreciated.

This list is a good place for other questions related to desktop. Tabbing, specifically, is still a work in progress, so you will likely see changes from week to week right now in Flutter.

-Stuar

Tom Verbeek

unread,
Feb 19, 2020, 4:49:25 AM2/19/20
to Desktop Embedding for Flutter
Travis, in case you were successful with building a "release" binary for Windows, please let us know. I would also be very interested in providing a Windows build for our Flutter app, which is currently in Beta stage.
 

Stuart Morgan

unread,
Feb 19, 2020, 12:56:19 PM2/19/20
to Tom Verbeek, Desktop Embedding for Flutter
On Wed, Feb 19, 2020 at 1:49 AM Tom Verbeek <techn...@gmail.com> wrote:
Travis, in case you were successful with building a "release" binary for Windows, please let us know.

When I said:
using `flutter build` to make a "release" build
all I meant is which build mode the 'flutter' tool was invoked with. The giant warning that 'flutter build windows' or 'flutter build windows --release' (which are identical, because that's the default mode for 'flutter build') gives you about not actually being a Flutter release build—as in, following the description at https://flutter.dev/docs/testing/build-modes—is accurate.

So successfully building that mode just means running 'flutter build windows' and not getting build errors, which should be the case for anyone who hasn't done something strange to break their project. But it's still a Flutter debug build (https://flutter.dev/docs/testing/build-modes#debug).

Currently the only difference between that and `flutter build windows --debug` is that the Runner project (and plugin projects) are compiled using the "Release" configuration in Visual Studio. In most respects that's irrelevant since the runner is a small amount of code whose compilation settings are unlikely to have any effect on performance, but it does change with dynamic C++ runtime it links against, which was relevant to one of Travis's specific concerns.

-Stuart

Tom Verbeek

unread,
Feb 21, 2020, 6:12:26 AM2/21/20
to Desktop Embedding for Flutter
Thanks for the clarification, Stuart.

Plans to support Flutter on the three Desktop platforms exist since April last year, or even longer. We greatly appreciate all efforts that have been done so far and the support for macOS shows how promising and revolutionary this framework will be for future cross-plafform development.
However as a company that chose Flutter as it's solitary frontend technique we need to get some more planning security about Windows, in order to continue with Flutter.

I know, that this is an Open Source Project and that Google is not throwing an army of developers onto this. And we are willing to help, however we are very short on Windows developers.
So I would appreciate answers to the following questions:

  1. Is there any date, to when we can expect that Windows reaches a similar maturity as macOS now? This would probably means fixing all the tasks from the Project Windows Preview
  2. Is there any way to speed up Windows development apart from contributing code?
Thanks!

Tom Verbeek

unread,
Feb 21, 2020, 8:12:59 AM2/21/20
to Desktop Embedding for Flutter

On Friday, February 21, 2020 at 12:12:26 PM UTC+1, Tom Verbeek wrote:
  1. Is there any date, to when we can expect that Windows reaches a similar maturity as macOS now? This would probably means fixing all the tasks from the Project Windows Preview
And I am not asking for an official statement by Google since I am sure, no-one is going to give one, but for an educated guess, you might be willing to give. Is it going to be a few months, half a year or more until Windows has reached Preview stage?

Chris Sells

unread,
Feb 21, 2020, 8:51:30 AM2/21/20
to Tom Verbeek, Desktop Embedding for Flutter
Windows is at tech preview right now. We're working to bring it to alpha alongside macOS as we speak. 

--
You received this message because you are subscribed to the Google Groups "Desktop Embedding for Flutter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-desktop-embe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-desktop-embedding-dev/e411d73f-5d30-47b5-86dc-5fa50d575140%40googlegroups.com.

Stuart Morgan

unread,
Feb 21, 2020, 6:51:50 PM2/21/20
to Tom Verbeek, Desktop Embedding for Flutter
On Fri, Feb 21, 2020 at 3:12 AM Tom Verbeek <techn...@gmail.com> wrote:
Plans to support Flutter on the three Desktop platforms exist since April last year, or even longer.

I'm certainly aware of the project's history; there wasn't a commitment to any specific timeline or milestones at that point though.
  1. Is there any date, to when we can expect that Windows reaches a similar maturity as macOS now? This would probably means fixing all the tasks from the Project Windows Preview
I don't have anything to add on the topic of timelines beyond what I said earlier in this thread, except to point to https://github.com/flutter/flutter/wiki/Roadmap#web-and-desktop as another source of official information about future plans.
  1. Is there any way to speed up Windows development apart from contributing code?
I can't think of anything offhand that would substantially advance progress that doesn't involve engineering work, but if you see anything on the list of issues where you feel that you could contribute something other than code please don't hesitate!

-Stuart

Tom Verbeek

unread,
Feb 24, 2020, 2:22:33 AM2/24/20
to Desktop Embedding for Flutter
Thank you. The updated 2020 Roadmap was what I was looking for.
Reply all
Reply to author
Forward
0 new messages