Skip to main content
This page shows how to set up your launcher’s workflow to sync your repositories. You need at least one repository deployed and assigned to an environment. See Deploy a release and Create environments and promote releases. The examples use two repositories, hi-res-paintings and nasaimages, promoted to an environment named stage.
These examples use workflow.json. The current launcher template uses public/workflow.yaml; the tasks are the same in either format. See Use YAML configuration and workflow files.

Organize your macros

Split macros into general ones and a set per repository. The load task always runs first, so load the macros there. See Tasks.
workflow.json

Set the general macros

  • aliasUrl: the folder on your CDN where you deploy your repositories.
  • installRoot: where repositories are installed on the player’s machine.
  • environment: the environment you promoted the releases to.
Use an HTTPS URL for aliasUrl. The alias file is overwritten on the CDN every time you promote a release, and HTTPS stops ISPs from caching an old copy.

Set the repository macros

Each repository gets its own set. Copy the set for each additional repository.
  • repository: the repository name you used when deploying.
  • repositoryTitle: the name shown in the launcher while the repository syncs.
  • installDirectory: where this repository’s files go on the player’s machine, under installRoot.
  • repositoryName: the repository and environment names combined.
  • repositoryMetafile: the metafile name saved on the player’s machine. The launcher uses it like a version file to check for updates.
  • repositoryAliasUrl: the URL of this repository’s alias.json.
The rest of this page describes the tasks each repository needs. You only change them if you have three or more repositories.

Add every repository to the update task

The reserved update task runs at every update interval. Make it a progress task so the launcher shows one progress bar for all repositories, and list each repository’s check:
update and install are listed in taskChainParameter because the check tasks route to other tasks through them. See Tasks and Progress.

Check each repository

A repositoryCheck task compares the ID in the local metafile, if there is one, with the required ID in the alias file:
If a repository needs an update, the workflow goes to updateElevatedCheck, which checks whether the install folder needs administrator rights (for example C:\Program Files\). If it does, the launcher shows a User Account Control prompt.

Sync each repository

A repositorySync task downloads the files for a first install or an update:
Add a matching updateSyncTwo with the Two macros for the second repository.

Repair each repository

A repair task is a repositorySync task with "repair": true. The launcher scans the local files and syncs only those that don’t match.
The repair tasks run from the repair progress task, which checks for elevation first. In the launcher template, it runs when the player clicks Repair.

Test the workflow

Load the skin to test it. See Test a launcher skin with the CEF debugging console. You can also compile the launcher and run it.