15

in flutter-desktop-embedding , I am a windows environment, I can run it, but I don't know how to build an exe file. I want to know what to do.

da fa
  • 197
  • 1
  • 1
  • 8

5 Answers5

10

If you flutter build or flutter run a desktop project, you're already building a .exe; that's what's being launched by flutter run. You can find it in the build directory of the project (e.g., build\windows\x64\Debug\Runner\Flutter Desktop Example.exe for the FDE example app).

smorgan
  • 20,228
  • 3
  • 47
  • 55
  • But this is the debug file, and there will be a command line when running. – da fa Jul 16 '19 at 02:21
  • 2
    I was answering the question you asked, which didn't mention either of those things. For those, see https://github.com/flutter/flutter/issues/30672 and https://github.com/flutter/flutter/issues/31268. It's also not suitable for deployment or production use at this point, as the project README prominently states, so it's not clear why you want a release build. – smorgan Jul 16 '19 at 12:52
  • 3
    I want to use it myself, but every time I have a command line, it’s not good to watch. – da fa Jul 17 '19 at 12:03
9

First check the build options with flutter build -h

Then run flutter build windows

Then you can find the build in the following path \build\windows\x64\Release\Runner

Although it is created in the release folder it is still just a debug build.

Brad
  • 1,143
  • 9
  • 17
Ankit Bhatt
  • 91
  • 1
  • 2
4

You can find the release version of your App after running flutter build windows in \build\windows\runner\Release\

4

but for distribution or run on other pc you need three files of visual studio 2019 to add in folder where you have your .exe file files are msvcp140.dll vcruntime140.dll vcruntime140_1.dll

path for these file is C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE

Khurram
  • 173
  • 7
0

Just run flutter build windows After it is done compiling and making the executable file you will find in build\windows\runner\Release\ your .exe file type should be listed.

Ketan
  • 33
  • 1
  • 1
  • 11