Skip to main content

Python package for compiling projects with Nuitka and creating Windows installers with Wix Toolset

Project description

Installer Creator

Python package for compiling projects with Nuitka and creating Windows installers with Wix Toolset.

Features

  • One-click builds - Compile Python to EXE and create installers with a single command
  • Graphical Config Editor - Intuitive UI for managing build configurations
  • Python Path Selection - Manually specify Python executable or auto-detect virtual environments
  • File Browser Integration - Easily add files and resources with a file dialog
  • Real-time Progress - View build output and cancel long-running operations
  • Upgrade Code Management - Generate consistent UUIDs for product upgrades
  • Flexible Configuration - Support for complex build scenarios and dependencies

Installation

pip install installer-creator

Prerequisites

  1. Wix Toolset (required for installer creation):

    dotnet tool install --global wix
    

    The package will automatically install the Wix UI extension if missing

  2. Nuitka (will be installed automatically)

Quick Start

  1. Create a basic configuration:
    installer-creator config-editor
    
  2. Build your application:
    installer-creator build-exe
    
  3. Create an installer:
    installer-creator build-installer
    

Configuration Editor GUI

The graphical interface provides:

  • Visual Editing of all configuration options
  • Live Preview of installer appearance
  • One-click Builds directly from the interface
  • Validation of configuration values
  • Progress Monitoring with cancel option

Launch the GUI with:

installer-creator config-editor

Command Line Usage

# Generate deterministic UUID for upgrade codes
installer-creator generate-uuid -s "MyAppName"

# Build executable with custom config
installer-creator build-exe -c custom_config.yaml --verbose

# Build with specific Python executable
installer-creator build-exe --python-path "C:\\path\\to\\python.exe"

# Create installer with debug output
installer-creator build-installer -c custom_config.yaml --debug

Troubleshooting

Common Issues:

  • Missing Wix Toolset: Ensure wix is installed globally
  • Permission Errors: Run commands as administrator when needed
  • Build Failures: Check paths and file permissions in configuration

For detailed debugging:

installer-creator build-exe --debug

Testing

The project includes comprehensive tests covering:

  • Build process validation
  • Installer creation
  • Configuration handling
  • Edge case scenarios

Run tests with:

pytest tests/

Configuration

Create a build_config.yaml file:

# Nuitka build configuration
project:
  name: "MyApp"  # Application name
  version: "1.0.0"
  description: "My Application Description"
  company: ""
  icon: "app_icon.ico"  # Optional icon file
  main_file: "main.py"  # Entry point file
  python_path: ""  # Optional path to Python executable (auto-detected if empty)

build:
  output:
    directory: "dist"
    filename: "my_app.exe"  # Output executable name
  options:
    standalone: true
    onefile: true
    splash_screen: ""
    remove_output: true
  include:
    packages:
      - ""
    plugins:
      - ""
    data_dirs:
      - source: "resources"
        target: "resources"
    external_data:
      - "*.dll"
    files:
      - "requirements.txt"
      - "readme.md"
      - "*.json"  # Example wildcard pattern
  copy_beside:
    - "resources"

installer:
  enabled: true
  output:
    directory: "dist"
    filename: "my_app_installer.msi"
  metadata:
    manufacturer: "Your Company"
    product_name: "My Application"
    upgrade_code: ""  # Generate with installer-creator generate-uuid
  ui:
    banner_image: "banner.bmp"
    dialog_image: "dialog.bmp"
  license_file: "license.rtf"
  shortcuts:
    desktop: true
    start_menu: true

debug:
  enabled: false
  console:
    mode: "disabled"
    stdout: null
    stderr: null

exclude:
  - "__pycache__"
  - "*.pyc"
  - "*.pyo"
  - "*.pyd"
  - "build"
  - "dist"

Resource Paths

The installer supports flexible resource locations:

  • UI images (banner/dialog) can be anywhere
  • License file can be anywhere
  • Paths can be absolute or relative to config file

GUI Features

The configuration editor provides a graphical interface for:

  • Editing all aspects of the build configuration
  • Managing project details, build settings, and installer options
  • Previewing configuration changes
  • Building executables and installers directly from the GUI
  • Viewing real-time build output
  • Canceling builds in progress
  • Specifying a custom Python executable path
  • Browsing and selecting files with a native file dialog

To launch the GUI, simply run:

installer-creator config-editor

The GUI will automatically create a default configuration file if none exists.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

installer_creator-0.2.0.tar.gz (119.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

installer_creator-0.2.0-py3-none-any.whl (115.0 kB view details)

Uploaded Python 3

File details

Details for the file installer_creator-0.2.0.tar.gz.

File metadata

  • Download URL: installer_creator-0.2.0.tar.gz
  • Upload date:
  • Size: 119.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for installer_creator-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8a7cef3301cbe09505683ad863d0ccf25a78445cf4a2b6eca04467049ab1e451
MD5 743a16a978b714cf916fae975805ca1d
BLAKE2b-256 cd06082021b019a6aec26da894c6eda2be4bfe8925f07baaa88d8cb2ea5f378c

See more details on using hashes here.

File details

Details for the file installer_creator-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for installer_creator-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45393c79c33605e4cfbbe9c1375bfc46216981ff6ed0f0158a2b4f7cd9d243f0
MD5 c60621cb6dcb8b1b0a3e7ec550ee7392
BLAKE2b-256 8af94e4901e60d177de3c302c81f713b028b214def33b99624fc428bdd4cc962

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page