Launchers Lifecycle
On this page, you will learn about the basics concepts of the launchers and how they manage to download and run your applications. If you wish to learn more about the launchers in general, see Launchers Overview page.
Basic Concepts
The Runner
Some launchers may require a runner application. The runner is a bootstrapping application that has two purposes:
- Download the target launcher and keep it up to date
- Run the launcher
You know that you’re dealing with the runner if you see an executable file (usually called Launcher.exe
) along with the launcher.dat
file. These files are called launcher
not to confuse the end-user.
When the runner is started, it will create a patcher
or launcher
directory with the target launcher inside it.
patcher
for historical reasons. It may change in future releases.
Not all launchers require the runner. Electron-based launchers have the ability to use built-in Electron auto-updater, which is much elegant way to install and update the launcher, but less flexible. Therefore by default, we provide launchers with the runner application.
The Launcher (Formerly Patcher)
The launcher is the application that downloads, updates, and starts your game/app.
All launchers on PatchKit are auto-updateable. This means that you can release a new launcher version, and it will be delivered to all your users on the next run. The auto-update system is also fail-safe. If you publish a broken launcher, simply release a new fixed version to get it upgraded again. This is possible thanks to the runner executed before the launcher.
Lifecycle
The Runner
- The runner reads the launcher.dat file and decodes the application secret.
- It communicates with the PatchKit API for launcher’s secret.
- It fetches launcher’s download URLs of the latest version.
- It fetches the launcher ZIP file.
- It unpacks the launcher.
- It reads
patcher.manifest
file for the launcher executable path. - It starts the launcher passing the game/app secret as a parameter.
If the launcher is already installed, the steps are pretty much the same, but previous launcher files are removed before the unpacking.
The Launcher
- The launcher reads and decodes the game/app secret from the argument line.
- It communicates with the PatchKit API for game/app details.
- It fetches game/app download URLs.
- It fetches the content file.
- It fetches the decryption key from the API.
- It unpacks the content.
- It starts the game/app.
If the game/app is already installed:
- The launcher communicates with the PatchKit API for game/app latest version ID.
- If the latest version ID is higher than the current one, it fetches diff file URLs.
- It fetches the diff file.
- It fetches the decryption key from the API.
- It unpacks the diff.
- It applies the diff.
- It starts the game/app.
Debugging
In case of any troubles, please see our debugging page.