Build Windows exe file in Flutter

A guide to generating the shareable executable file in Flutter.

Flutter Junction
CodeX
5 min readSep 15, 2022

--

Since the release of Flutter 2.10, the Windows desktop is flagged as stable. In this article, I am going to show you what needs to be done to build executables.

Step 1:

In your Flutter Application, run flutter build windows . This command builds the exe file which is located in yourprojectpath/your_project_build/windows/runner/Release .

Step 2:

First, download the Inno Setup Downloader from this link. Scroll down until you find the section as in the image below:

From the Download Sites click on any options and you shall have the Inno setup downloader downloaded. After that install it and open it.

Step 3:

After opening the Inno Setup Downloader you shall see the dialog open as in the image.

As you can see in the image above.

Click on Create a new script file using the Script Wizard and press OK.

Step 4:

After pressing OK from Step 2 you shall find the next dialog as in the image.

Click on Next.

Step 5:

In the dialog enter the information of your Windows application.

Step 6:

Here you don’t have to make changes.

Click on Next.

Step 7:

Go to your project root folder. Create the folder. Here we are going to save our generated exe file.

Step 8:

From Step 6 Next we shall find the dialog as follows:

In the Application main executable file, browse to the folder you have yourprojectpath/your_project_build/windows/runner/Release. Here you have the yourapplicationname.exe .Select it.

Then you need to add the dllfiles present in the Release folder.

Click on Add files. Select all the .dll files present.

After adding .dll you also need to add the folder named data. For that click on Add folder and then select the data folder.

After adding the data the dialog will look as follows:

As you see in the image above. I have selected the file in the image.

Find the yourprojectpath/your_project_build/windows/runner/Release/data/* and double click on it.

You shall see the next dialog opened. Find the Destination subfolder and enter the folder named as you have in the Runner folder. For me, it is the data.

Click on OK

Then Click on Next

Step 9:

Uncheck the Associate a file type to the main executable.

Click on Next

Step 10:

Click On Next

Step 11:

Enter the application documents of your applications.

Click on Next

Step 12:

Select the install mode as per your need and click on Next.

Step 13:

Select the language and click on Next.

Step 14:

In the output folder, the folder where you want to save the generated exe needs to be selected. As we have created a folder in Step 7 select the folder.

And then enter the file name.

Add the icon or logo of the application.

Set up a password if needed.

Then click on Next.

Step 15:

Click on Next until the following dialog is opened.

Click on Yes.

Finally, you shall have your exe file in the folder you created in Step7.

Let’s get connected

We can be friends. Find on Facebook, Linkedin, Github, Youtube, BuyMeACoffee, and Instagram.

Visit: Flutter Junction

Contribute: BuyMeACoffee

Conclusion

I hope this article is helpful to you and you learned new things. I have used various things in this article that might be new for some of you.

If you learned something new or want to suggest something, please let me know in the comment.

If you loved the article click on the 👏 icon which provides motivation on delivering to you all the new things.

Also, follow to get updated on exciting articles and projects.

Learning by sharing gives a great impact on the learning process and makes the community bigger and bigger.

Sharing is a magnet that attracts other enthusiasts toward you.

Hence, let’s take a small step toward making our learning community bigger.

Share this article with your friends or tweet about the article if you loved it.

--

--

Flutter Junction
CodeX

Flutter Junction is a comprehensive learning platform offering a wealth of resources for developers of all experience levels.