how to create .exe installer file of flutter windows application
how to create .exe installer file of flutter windows application

Hi Guys, Welcome to Proto Coders Point. In this Article will learn how to create .exe installation file of flutter windows application.

Now with Flutter 2.10 version & above is stable that support to build flutter windows application, therefore now you can easily build flutter apps for windows desktop just by using below command in flutter project terminal.

flutter build windows

When you run above build windows cmd, flutter will build windows application of your flutter project at location:-

<project>/..build/windows/runner/release/

There you have a Application file, clicking on exe file will run flutter windows application on windows OS.

How to create .exe installer of flu...
How to create .exe installer of flutter windows application - flutter build windows - inno setup

This is how flutter build windows app release folder will look like:

This Application file will make use of data folder & .dll file to execute flutter app successfully.

But the question is …! How to distribute flutter windows app throughout the world or to our client ?. & suppost if main .dll file or data folder got deleted or went missing then your flutter app will not work. So we need to create installer, Let’s do it.

Create .exe installer file of flutter app

So to distribute your flutter windows app you need to build & create .exe installer file for your flutter app, so that your client can easily click on installer executable file & install flutter app on windows operating system. In this flutter article, will learn how to create exe file of flutter windows application.

Inno setup to create installer .exe file

Will make use of Inno Setup software to create .exe installed of flutter windows build.

Download Inno Setup

Below are the steps How to use Inno Setup for creating .exe file.

1. Install Inno setup & open it, It look like as below.

inno setup software

In the first step, select the second option i.e “create a new script file using the script wizard” & click on OK button as shown in above screenshot.


2. Fill out information about flutter application in inno setup.

In the next step you will be asked to fill basic information about your application.

App info window
Installation folder windows ( your flutter will get installed basically in C:// Program Data)

3. Application files

Here Select Flutter Windows application file, folders and exe selections

This step is very much important, Here you need to select release flutter build windows files and folder.

Refer above screenshot

  1. Select Application main executable file i.e .exe
  2. Add files: Select 2 files i.e .dll and .exe
  3. Add folder: Select data folder.

After selecting data folder, select the selected path of folder & click on Edit Button.

inno setup
inno setup

Here in destination subfolder, you need to set a folder name, In our case it “data”, so enter data in it as shown & hit OK button.

then next.


4. Application file association

inno setup windows

Here we need to select if our flutter windows application has any other type of file extension, In our case we don’t support any other extension for now, so uncheck, associate a file type to the main executable and hit next.


5. Windows Application shortcuts


6. Setup Install Mode

Here select Administration Install Mode (Instakk for all users).


7. Compiler Settings

Here in Inno setup compiler setting windows page you need to:

  1. Choose / Browse final output folder.
  2. Final output file name Eg: protoInstaller.
  3. [Optional] Setup icon Image file. Should be in .ico extension.
  4. [Optional] Set Password for your installer setup.

Then click on Next, Until finish.


8. Create new inno Script

Then you will be prompt, asking for creating new compile script. click “YES”.

9. Flutter app windows exe installer is created

Flutter exe installer

After successfully compilation completes, you will see a installer setup been created in your selected folder as you can see above.

Conclusion

Now, We have successfully created .exe installer of our flutter windows app.

So now you can easily distribute your flutter windows application through out the world just by sharing .exe installer setup we created in above steps. Your flutter app user can now simply click on the installer setup to install flutter application on windows OS.