exe
Build your Flutter app as a Windows EXE installer using Inno Setup. This creates a traditional Windows setup executable that guides users through the installation process, including creating desktop shortcuts and Start menu entries.
Requirements
- Windows system
Inno Setup 6— a free installer builder for Windows programs
Usage
Add make_config.yaml to your project windows/packaging/exe directory.
# The value of AppId uniquely identifies this application.
# Do not use the same AppId value in installers for other applications.
app_id: 5B599538-42B1-4826-A479-AF079F21A65D
publisher: LeanFlutter
publisher_url: https://github.com/leanflutter/fastforge
display_name: Hello 世界
create_desktop_icon: true
# See: https://jrsoftware.org/ishelp/index.php?topic=setup_defaultdirname
# install_dir_name: "D:\\HELLO-WORLD"
# This path is relative to the root directory of your project; The format of icon file must be ico, can not be png or others
# setup_icon_file: windows\runner\resources\app_icon.ico
locales:
- en
- zhRun:
fastforge package --platform windows --targets exeAdvanced Usage
Custom Inno Setup Installation Path
By default, fastforge looks for Inno Setup at the default installation path (C:\Program Files (x86)\Inno Setup 6). If you installed Inno Setup in a custom location (e.g., via Scoop or a portable version), you can specify the path using the INNO_SETUP_PATH environment variable.
# PowerShell
$env:INNO_SETUP_PATH = "D:\Tools\Inno Setup 6"
fastforge package --platform windows --targets exe
# CMD
set INNO_SETUP_PATH=D:\Tools\Inno Setup 6
fastforge package --platform windows --targets exeIf INNO_SETUP_PATH is not set, fastforge will check the default path first, then fall back to looking for iscc in your system PATH (which is useful when Inno Setup is installed via Scoop or added to PATH manually).
Custom Inno Setup Template
By default, fastforge will generate an Inno Setup configuration (.iss) based on an internal template on build time, and populate it with the values provided in make_config.yaml. If you need more control over the Inno Setup configuration, you can provide a custom template using the script_template option.
For example:
- Add
script_template: inno_setup.issto yourmake_config.yaml - Create the
inno_setup.issin the same directory - Copy the original template from the source code and adjust it.
