How self-update works
- The launcher skin’s self-update component runs the
statetask inselfupdate.yamlto check whether an update is needed. - If one is, the launcher shows an update button. Asking first tells the player that the update might need elevation, depending on the install folder. Set
autoSelfUpdate: trueinapp.yamlto skip the button. - When the player updates, the launcher downloads the new files, copies itself to a temporary folder and restarts from there.
- The restarted copy runs the
applytask, which copies the new files into the install folder and restarts the launcher again.
Requirements
- You can deploy releases and compile launchers with the sample scripts.
- Your launcher skin is set up for your game. See Launcher skin.
Configure selfupdate.yaml
app.yaml points to the self-update workflow with selfUpdateWorkflow:
app.yaml
load task of public/selfupdate.yaml, set the launcher repository’s location:
selfupdate.yaml
aliasUrl: the folder you deploy the launcher repository to.repository: the launcher repository name.{moduleDistribution}adds the platform, such aswin64,mac64ormacarm64, so each platform has its own repository.buildEnv(inapp.yaml): the environment to sync, such asqaorproduction.
--disable-selfupdate, or set allowSelfUpdate: false in app.yaml.
Build the launcher
Build and sign the launcher with builder.py. Keep these the same in every release:- On Windows, the launcher’s file name. Renaming the executable breaks self-update.
- On macOS,
launcher_product_name. Changing it puts a second launcher next to the old one instead of updating it.
If you sign the macOS app yourself instead of with
builder.py, use the same signing options every time, especially the designated requirement. Different values between versions can cause extra prompts if your launcher signs players in or saves to the keychain. See Sign a macOS launcher with codesign.Deploy the launcher
Deploy each platform’s launcher withrelease_deploy.py to the repository name selfupdate.yaml expects, for example launcher-win64.
- Windows: set
sourceto the folder with the compiled launcher and its libraries. - macOS: set
sourceto the.appfolder itself, not its parent, for example--source="/Users/<you>/builds/1.0.0/My Launcher.app/".
Keep execute permissions on macOS
A macOS launcher must keep its execute permissions, or it overwrites itself with files that can’t run. If you compiled on a Mac, the files already have execute permission. Turn onsync_attributes to keep it:
executable_files, relative to source. Replace ProductName with your product name:
Avoid elevation on macOS
Don’t run the launcher with elevated privileges on macOS. Files created or changed by the root user can cause permission errors. Launchers in the Applications folder can update themselves as the current user.Promote the launcher
Promote the release to the environment inbuildEnv:
Test the self-update
From scratch
- Copy the launcher to a new folder.
- Run it from the command line with
--debug --append.
From one release to the next
- Build a changed launcher. An easy change to spot is the window title: set
Hostinpublic/locale/en.json, for example"Host": "Self-Update Test 2". You can also change file properties such as the version. - Deploy it and promote the latest release.
- Run the existing launcher.
buildEnv for your next environment (for example stage), then build, deploy, promote and test there. You can automate all of these steps.

