LEARN BY MAKING

Building an Executable

Package your Kraken Engine app as a distributable executable with PyInstaller.

After your Kraken app runs from Python, you can package it as an executable for distribution with the kraken build command.

The build command uses PyInstaller under the hood, so PyInstaller must be installed in the same Python environment as Kraken Engine before you build.

Install PyInstaller

pip install pyinstaller

If Kraken Engine is installed in a virtual environment, install PyInstaller there too. The build command needs both kraken-engine and pyinstaller available from the same environment.

Build Your App

From the folder that contains your main script, run:

kraken build main.py

This packages main.py into a distributable executable. After the build finishes, look for the generated output folder created by PyInstaller.

Once ready to distribute, you ONLY need the executable file and any necessary assets.

Naming the Executable

Use -n or --name to choose the executable name:

kraken build main.py --name MyGame

Adding an Icon

Use -i or --icon to provide an icon file:

kraken build main.py --icon assets/icon.ico

The icon path should point to an .ico file.

Showing Build Details

Use -v or --verbose when you need to see PyInstaller’s detailed output:

kraken build main.py --verbose

Verbose output is useful when a build fails because of a missing file, missing dependency, or packaging issue.

Distribution Checklist

Before sharing the executable, test it outside your editor from the generated output folder.

Make sure any assets your app loads, such as images, audio, fonts, or level files, are available where the executable expects them. If your app uses relative paths like assets/player.png, keep that asset folder with the packaged output unless your build process bundles it another way.

Find your next step

Start typing to search the manual.