How to build release version of windows app?

Viewed 10585

How to build release version of windows app in flutter and where to find the build file ?

Actually I have build the windows app using flutter build windows but am not able to locate the file which could to installed to other desktops and could be used further on .

Flutter doctor output :-

H:\window app flutter\windowsapp>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 1.22.0-2.0.pre.36, on Microsoft Windows [Version 10.0.18363.1082], locale en-IN)
 
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.5)
[√] Android Studio (version 4.0)
[√] VS Code (version 1.50.0)
[√] Connected device (4 available)

• No issues found!

Please help

3 Answers

Flutter 2.10 arrives with stable support for building Windows app.

You can use flutter build windows and it will do the build for you. Make sure to install Desktop development with C++.

enter image description here

The build .exe file can be found on ...\projectName\build\windows\runner\Release\


You can use msix package for build. To build using msix you need to enable developer mode on Windows.

Type start ms-settings:developers and it will open the setting and enable it.

enter image description here

Open Command prompt (as Administrator if you needed) and navigate to your project directory and type these command

  • flutter build windows
  • flutter pub run msix:create

You will get an .msix app that will install the usual way windows does.

enter image description here

You can also configuring your installer.

For more details go to https://flutter.dev/desktop

  • The executable can be found in your project under build\windows\runner<build mode>. In addition to that executable, you need the following:

From the same directory:
all the .dll files
the data directory
The Visual C++ redistributable
You can use any of the methods shown in the deployment example walkthroughs on the Microsoft site. If you use the application-local option, you need to copy:
msvcp140.dll
vcruntime140.dll
vcruntime140_1.dll
Place the DLL files in a directory next to the executable and the other DLLs, and bundle them together in a zip file.

Yes! So I found the release build in this folder after executing flutter build windows :-

windowsapp\build\windows\runner\Release

Here windowsapp is the main app directory

Note - For further distribution you'll need to zip the content present inside the Release folder and distribute the same zipped file.

Related