/UnrealPackager

Automate packaging Unreal Engine projects and plugins. It also supports multiple platforms (projects) and multiple engine versions (plugins)

Primary LanguagePythonThe UnlicenseUnlicense

Unreal Packager

Automate packaging Unreal Engine projects and plugins. It also supports multiple platforms (projects) and multiple multiple engine versions (plugins). The tool can also be used to deploy documentation using Mkdocs and upload new releases to GitHub

Requirements

Python 3 is required to run the tool. You can find more information on how to set it up here: https://www.python.org.

Unreal Packager relies on a few external packages. It will automatically check the dependencies when you run the script and offer to install the missing dependencies. Pip is required to install these packages. You can find more information on how to set it up here: https://pip.pypa.io/en/stable/installation/

Supported Unreal Engine Versions

Only Unreal Engine 5.0 and 5.1 is supported, but it should work on earlier versions (not tested)

Arguments

The following arguments can be specified to override the values specified in the config file:

Argument Optional Description Default Value
--help Yes Get a list of all available arguments
--version Yes Check the version number of Unreal Packager
--gh-version Yes Specify the version used on GitHub Extracted from project file
--gh-tag Yes Specify the tag used on GitHub Extracted from project file
--gh-commit Yes Specify the commit or branch used when creating the tag on GitHub Extracted from config file
--gh-prerelease Yes Should the release be marked as a pre-release on GitHub? True

Configuration

The configuration for the tool is stored in the unrealpackager.conf file. The following settings can be configured in this file:

Configuration Section Description
unreal_install_dir environment The directory where all Unreal Engine builds are installed
output environment The path where the packaged builds will be stored
path project The path to the uproject file
platforms project A comma-seperated list of all supported platforms (Win64, HoloLens, Mac, IOS, Android, Linux, LinuxArm64 and TVOS)
unreal_version project The version of Unreal Engine used to build the project
path plugin The path to the uplugin file
unreal_versions plugin A comma-seperated list of all Unreal Engine versions used to build the plugin
visual_studio plugin The version of Visual Studio used to compile the plugin (VS2019 is used by default)
path mkdocs The path to the directory where the mkdocs.yml file is stored
auto_deploy mkdocs Should the latest documentation automatically be deployed using the mkdocs gh-deploy command? (default is False)
include_pdf mkdocs Should the PDF documentation be included in the output directory? (default is False)
create_zip mkdocs Should the documentation also be added to a ZIP file? (default is False)
create_release github Should a new release automatically be created on GitHub (default is False)
owner github The account owner of the repo where the new release will be created (not case sensitive)
repo github The name of repository where the release will be created (not case sensitive)
token github The GitHub authorization token that will be used to create the new release
commit github Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA
release_notes github A path to the release notes used for the new release
pre tasks The relative path to a Python script that is executed before building the projects
post tasks The relative path to a Python script that is executed after deploying the projects

Github API Token

You need to create a new token before you can automate releases on GitHub. You can follow this guide: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token. It's important that the Contents repository permission is enabled, otherwise all releases will fail

Using the tool

  1. Download the latest release from GitHub or add the project as a submodule (git submodule add git@github.com:hfjooste/UnrealPackager.git)
  2. Update the unrealpackager.conf with your project details
  3. Run the tool: python unrealpackager.py

Support

If you have any questions, feel free to contact me through Twitter or Mastodon. You can also send me an email at henryjooste95@gmail.com