Inno Bundle

pub package chocolatey version inno setup hahouari-inno-setup

CLI tool that simplifies bundling flutter apps into Windows installers using Inno Setup.

Guide

1. Install Inno Setup

The easiest way to install latest version of Inno Setup is using WinGet:

winget install -e --id JRSoftware.InnoSetup

If you do not have WinGet, here is how to install it, or find out other methods to install Inno Setup.

Note: This package is tested on Inno Setup version 6.3.3.

2. Install inno_bundle package into your project

dart pub add dev:inno_bundle

3. Generate App ID

Every application has its own unique GUID, here is how to generate one:

# generate id based upon a namespace (Recommended)
dart run inno_bundle:id --ns "www.example.com"

# or use this to generate a random GUID
dart run inno_bundle:id

The output id is going to be something similar to this:

f887d5f0-4690-1e07-8efc-d16ea7711bfb

Copy & Paste the output to your pubspec.yaml as shown in the next step.

4. Set up the Configuration

Add your configuration to your pubspec.yaml. example:

inno_bundle:
  id: f887d5f0-4690-1e07-8efc-d16ea7711bfb # <-- Put your app id here
  publisher: Your Name # Optional, but recommended.
  name: Demo App # Also optional, but recommended.

For more advanced configuration with examples, see Configuration Options.

5. Build the Installer

After setting up the configuration, all that is left to do is run the build command

dart run inno_bundle:build --release

If you need other use cases with our CLI tool, look up CLI Options.

More Options and Examples

You can find more detailed documentation on customizing inno_bundle, including examples, on the GitHub wiki pages.

Using GitHub Workflow?

To automate the process of building the installer with GitHub Actions, refer to this demo.

You can copy the build.yaml file into your project and make sure to update the push branch. This setup will build the installer and publish it to GitHub Releases with the appropriate versioning.

DLL Files Handling

inno_bundle handles including all necessary DLL files within the installer. For more info, refer to this page.

Reporting Issues

If you encounter any issues please report them here.

Libraries

builders/app_builder
This file contains the AppBuilder class, which is responsible for orchestrating the build process of the app using a provided configuration.
builders/installer_builder
This file contains the InstallerBuilder class, which is responsible for creating the installer for the application using Inno Setup.
builders/script_builder
This file contains the ScriptBuilder class, which is responsible for generating the Inno Setup Script (ISS) file for creating the installer of an application.
inno_bundle
inno_bundle is not designed to be imported as library within projects, Rather its a CLI tool with customized output based on pubspec.yaml configuration.
models/admin_mode
This file defines the AdminMode enum, which represents the different privilege modes that can be requested by the installer.
models/build_arch
This file defines the BuildArch enum, which specifies the CPU architectures that the app is designed to run on and, consequently, the architectures supported by the installer generated by inno_bundle.
models/build_type
Represents the different build types supported for the software.
models/config
This file contains the Config class, which represents the configuration for building a Windows installer using Inno Setup.
models/language
Represents the different languages supported by the Inno Setup installer.
models/sign_tool
A class that holds the properties related to the signing tool used by Inno Setup, based on the directives in the Setup section.
utils/cli_logger
Provides a CLI logging utility with various log levels and colored output.
utils/constants
Contains various constants and utility values used throughout the Inno Bundle package.
utils/functions
Utility functions for handling YAML, string manipulation, file operations, and system environment.
utils/installer_icon
File specific for the icon file name and a base64 encoded icon