whatamithinking-bundler 1.2.0
package python apps for deployment on different platforms
Requires Python: >=3.11
Keywords: bundler, installer, packager, windows

# WhatAmIThinking-Bundler

Package python apps for deployment on different platforms

## Table of Contents

- [WhatAmIThinking-Bundler](#whatamithinking-bundler)
  - [Table of Contents](#table-of-contents)
  - [Requirements](#requirements)
    - [Requirements - Windows](#requirements---windows)
  - [Known Issues](#known-issues)
    - [Known Issues - Windows](#known-issues---windows)
  - [Use Cases](#use-cases)
    - [Use Cases - Making an App Which Creates More Apps](#use-cases---making-an-app-which-creates-more-apps)
    - [Use Cases - Making an App Which Creates More Apps - Parent App Setup](#use-cases---making-an-app-which-creates-more-apps---parent-app-setup)
    - [Use Cases - Making an App Which Creates More Apps - Child App Setup](#use-cases---making-an-app-which-creates-more-apps---child-app-setup)

## Requirements

### Requirements - Windows

Inno Setup is used on windows to build the installer. A `.iss` script is generated by this package, but that must be compiled and built into an inno setup installer and that requires the compiler be installed on your build system.

-   [Download Inno Setup](https://jrsoftware.org/download.php/is.exe)

You may also need to add the program folder to your environment `Path` so the `iscc` program can be accessed from the shell.

## Known Issues

### Known Issues - Windows

Antivirus seems to sometimes lock up PE (exe) files, preventing them from being written to. If you do not have the power to exclude your build folder from the antivirus scans, the next best solutions are as follow:

-   Try using another machine or VM which is not running antivirus
-   Just let the program continue its attempts until it finally works. Increase the timeout, if needed, to give more time for attempts

## Use Cases

### Use Cases - Making an App Which Creates More Apps

Lets say you want to make a python app which allows users to generate their own apps using this package to build them.

-   `Parent App`: App which will generate the `Child Apps`
-   `Child App`: App being generated by the `Parent App`

### Use Cases - Making an App Which Creates More Apps - Parent App Setup

To support this, the `Parent App` must set `embed_python=True` in `BundleConfig` when it is being built so all the necessary files are present when it tries to build apps itself. This is VERY slow, taking several minutes to complete the following:

-   Copies the current full python install from the system
-   Copies all site-packages from the current venv, if running in a venv

It is recommended to set `bundle_mode="folder"` for the `Parent App` due to the large resulting size as a result of embedding a full python interpreter and packages (several hundred megabytes).

It is also recommended to get a clean install of your system python prior to building the `Parent App` and to only install what you need into the venv for your project, if using one, or else into that system python, because everything will get copied into the `Parent App`.

### Use Cases - Making an App Which Creates More Apps - Child App Setup

Nothing special needs to be done for the child app. Its build does not require any special flags or setup beyond what you would normally do if building directly from your DEV machine.