Take a sneak peak of our new documentation Read More
Last Updated: 5/4/2023, 1:09:08 AM

# App Distribution

# Overview

The App Distribution service combines BuildInfo, BuildUtil, and Differ tools to enable you to distribute your game. Each of these three services is described below.

# BuildInfo

BuildInfo manages your game’s build version. This system stores every detail of a game’s build version in a build manifest. BuildInfo is comprised of two components:

  • BuildInfo Service This service handles all functions related to the build process. All communication between the BuildInfo system and third-party services is managed by this service.
  • BuildInfo CLI This component is a command line tool which consumes the BuildInfo service. This program is used to automate game deployment and should be put in CI/CD tools.

# BuildUtil

BuildUtil is used to upload your game binary to the cloud for distribution. While the binary is uploading, BuildUtil provides the meta information recorded by BuildInfo.

# Differ

Differ compares different uploaded versions of a game. This allows your players to update their game to a new version without completely re-downloading the game files.

# Tutorial

In this tutorial, you will learn how to perform the required setup to upload your game using BuildUtil. This tutorial assumes you have a basic familiarity with Namespaces (opens new window).

# Creating BuildUtil Client Credentials

Before you upload your game, you must first create client credentials for BuildUtil. This will ensure that BuilUtil will be able to upload your game. To create client credentials, follow IAM Clients (opens new window) documentation and create client credential using the following permissions:

  • Allow admins to access BuildInfo in whatever client they’re logged into.

    Resource: ADMIN:NAMESPACE:{namespace}:BUILDINFO

    Action: Create, Read, Update, Delete.

  • Allow admins to access data related to Roles (opens new window).

    Resource: ROLE

    Action: Create, Read, Update, Delete.

# Creating Game Client Credentials

You’ll need to create client credentials for your game in order to connect it with our services. The procedure to create Game Client Credentials is similar to BuildUtil Client Credentials. Follow IAM Clients (opens new window) documentation and create client credential using the following permission:

# Configuring BuildUtil

If this is your first time uploading a game, you’ll need to configure BuildUtil using the credentials you just created. You can skip this step if you’ve configured BuildUtil before.

  1. Download the latest BuildUtil.exe (opens new window) and save the file in your directory.

  2. Open your terminal or command line to run the latest BuildUtil using the following command:

    NOTE

    If you use Linux and you can’t locate the BuildUtil executable file you just downloaded, use chmod +x ./justice-build-util-3.13.0-linux_amd64 to change the access level for BuildUtil so that it can be executed in Linux.

  3. Once completed, a new line in your terminal or command line will appear: Insert IAM URL. Input your IAM URL (e.g., https://demo.accelbyte.io/iam/) and click Enter.

  4. A new line will appear: Insert Uploader’s Client ID. Input the BuildUtil Client ID you previously created and click Enter.

  5. A new line will appear: Insert Uploader’s Client Secret. Input the BuildUtil Client Secret you previously created and click Enter.

  6. A new line will appear: Insert Log level (OPTIONAL). The log level determines how detailed the log files will be. You can leave this line empty if you choose, so that no extra information is added to the log. Once completed, click Enter.

  7. When you’re finished, your terminal should look like this:

    Linux:

    game-uploading-guide

    Windows:

    game-uploading-guide

    You can also use the following command to configure BuildUtil if you’re already familiar with the above procedure:

# Uploading a Game using BuildUtil

Once you have created the client credentials both for BuildUtil and the Game Client, you can begin to upload the game into your publishing platform. In doing so, you need to make sure that you have the game binary of the game you want to publish already prepared. You can upload the game using BuildUtil with the upload command. If this is the first time you’re uploading a game, you will need to configure BuildUtil by following steps in the previous section.

  1. Set up the Game SDK configuration. Below is an example of the Unity SDK configuration.

  2. Run the upload command. Refer to the table below for information about each command.

    Command Description
    --url (-u) Base URL to the service. For example: ./justice-build-util-v3.3.1-linux_amd64
    --namespace (-n) The publisher namespace. This is the default namespace in the Admin Portal.
    --appID (-a) The app id of the game to upload. The app id should be unique for each game.
    --dir (-d) The absolute path of the directory containing the file to be uploaded.
    --entrypoint (-e) Entrypoint/executable game relative path in the build folder. Please note that this is relative to the game directory (--dir).

    For example, if the entrypoint is /home/dev/GameA/executable/Game.exe and the specified directory is /home/dev/GameA, then the entrypoint value should be executable/Game.exe.

    --version (-v) A version of the game to upload. For example: 1.0.0, 1.0-alpha, etc.
    --platformid (-p) The target platform identifier where the uploaded game will run. Pick one of these values: win32, win64, windows, darwin, linux-ia32, linux-amd64, linux-generic. For example, you’re targeting Windows 32-bit, choose win32.
    --sdkconfig (-f) Absolute path to the SDK config file.
    --ignore (-g) Optional. Absolute path to the ignore file. If you’re going to ignore certain files, create an ignore file with the same pattern with git ignore file and save it somewhere. You can also place the file named .ignoreconfig inside the directory of the game to be uploaded and skip this flag. In this case, BuildUtil will automatically read your file.
    --type (-t) The type of game to be uploaded. The two options are GAME or DLC.

    Here is the syntax of the upload command:

    For example:

    Here is what the upload looks like in the terminal:

    Linux:

    game-uploading-guide

    Windows:

    game-uploading-guide

# Set Up the Current Version Through the Admin Portal

After you upload your game using BuildUtil, you can check it in the Admin Portal under App Distributions. Follow these steps to view your game and set it as the current build.

  1. In the Admin Portal, click the Platform Configurations dropdown menu and select App Distributions.

    set-up-the-current-version-through-the-admin-portal

  2. Find the game you uploaded from the list. Click View to see its details.

    set-up-the-current-version-through-the-admin-portal

  3. Select the Build List tab to access the Builds panel.

    set-up-the-current-version-through-the-admin-portal

  4. In the Builds panel, click the ellipsis button beside the build you want to set as current, then choose Set as current.

    set-up-the-current-version-through-the-admin-portal

  5. In the confirmation message that appears, click Yes.

    set-up-the-current-version-through-the-admin-portal

# Setting Up the Current Version from BuildUtil

You can also set up a game version as current using BuildUtil through the command prompt or terminal. The result is identical to setting a game version as current from the Admin Portal.

In order to set up the current version using BuildUtil, run the setcurrent command with the following parameters.

Command Description
--url (-u) Base URL to the service.
--appID (-a) AppId for the game which will be updated.
--namespace (-n) The publisher namespace, which is the default namespace in the Admin Portal.
--platformid (-p) The target platform identifier where the uploaded game will run. Pick one of these values: win32, win64, windows, darwin, linux-ia32, linux-amd64, linux-generic. For example, if you’re targeting Windows 32-bit, choose win32.
--version (-v) The version of the game to be set as the current version. For example: 1.0.0, 1.0-alpha, etc.

Here is the example of the updated command:

./justice-build-util-3.13.0-linux_amd64 setcurrent --url https://demo.accelbyte.io -a lightfantasticwindows -n accelbyte -v 0.0.19 -p win64

Here is an example of how this command will look in the terminal:

Linux:

game-uploading-guide

Windows:

game-uploading-guide

# Add a Launch Argument through the Admin Portal

Follow the steps below to add or update a launch argument for your builds through the Admin Portal.

  1. In the Admin Portal, click the Platform Configurations dropdown and open the App Distributions menu.

    add-a-launch-argument-through-the-admin-portal

  2. Find the game you want to edit and click the View button.

    add-a-launch-argument-through-the-admin-portal

  3. Select the Build List tab to display the Builds panel.

    add-a-launch-argument-through-the-admin-portal

  4. From the list in the Builds panel, select a build that you want to edit, click the ellipsis button, and choose Edit Launch Argument.

    add-a-launch-argument-through-the-admin-portal

  5. Enter the Launch Argument you want to use in the Edit Launch Argument dialog that appears, then click Save.

    add-a-launch-argument-through-the-admin-portal

    • If there is a build that cannot run using VGA, you can input --novga as the launch argument to run it without using the GPU, as long as that build supports the argument.

    WARNING

    When you update the launch arguments, the system rewrites the previous ones.

  6. Here's what updated launch arguments look like:

    add-a-launch-argument-through-the-admin-portal

# Filter Game Builds Through the Admin Portal

Follow these steps to filter your uploaded build.

  1. In the Admin Portal, click the Platform Configurations dropdown menu and select App Distributions.

    filter-game-builds-through-the-admin-portal

  2. Find the game you want to edit and click the View button.

    filter-game-builds-through-the-admin-portal

  3. Select the Build List tab to expose the Builds panel.

    filter-game-builds-through-the-admin-portal

  4. Select your desired filter, either Build ID, Platform version, or Status, or a combination.

    filter-game-builds-through-the-admin-portal

  5. Here's an example of what the filtered Build List looks like.

    filter-game-builds-through-the-admin-portal

# Delete a Game Build Using the Admin Portal

You can delete any unused game builds in the Admin Portal to free up your storage. By default, there is a grace period of 30 days before the system actually deletes the build, allowing you to cancel the deletion. You can change the duration of this grace period by configuring the BUILDINFO_CLEANER_TIME variable in the config map of the helm deployment.

Once you mark a game build for deletion, you won't be able to edit its launch argument or set it as current via the Admin Portal or BuildUtil. To delete a game build, follow these steps.

NOTE

You can't delete the current game build unless you first set a different build as current.

  1. In the Admin Portal, click the Platform Configurations dropdown and open the App Distributions menu.

    delete-a-game-build-using-the-admin-portal

  2. Click the View button next to the App ID of the game whose build you want to delete.

    delete-a-game-build-using-the-admin-portal

  3. Select the Build List tab to display the Builds panel.

    delete-a-game-build-using-the-admin-portal

  4. Click the ellipsis button to the right of the game build you want to delete and select Delete Build.

    delete-a-game-build-using-the-admin-portal

  5. The Delete Build confirmation window appears. Type DELETE in the text box, then click Delete.

    delete-a-game-build-using-the-admin-portal

  6. You can also perform deletions in bulk by enabling the build checkbox located on the left side of Build ID, then clicking Delete Build.

    delete-a-game-build-using-the-admin-portal

  7. The Delete Build confirmation window appears. Type DELETE in the text box, then click Delete.

    delete-a-game-build-using-the-admin-portal

    NOTE

    To cancel some of the builds you chose, disable them in the Bulk Delete Build confirmation window.

  8. Select the Deletion Request tab to display the Deletion Request panel.

    delete-a-game-build-using-the-admin-portal

  9. The system moves the previous, deleted game build to the Deletion Request section and changes its status to Requested.

    delete-a-game-build-using-the-admin-portal

  10. Once the system deletes the build, its status changes to Deleted.

    delete-a-game-build-using-the-admin-portal

# Cancel a Game Build Deletion Request Using the Admin Portal

You can cancel a game build delete request as long as the build's status is still Requested. To cancel a game build deletion request, follow these steps.

  1. In the Admin Portal, click the Platform Configurations dropdown and select App Distributions.

    cancel-a-game-build-deletion-request-using-the-admin-portal

  2. Click View beside the App ID for the game whose build you requested deletion.

    cancel-a-game-build-deletion-request-using-the-admin-portal

  3. Switch to the Deletion Request tab to expose the deletion request panel.

    cancel-a-game-build-deletion-request-using-the-admin-portal

  4. You can see the list of game builds awaiting deletion in the Deletion Request panel.

    cancel-a-game-build-deletion-request-using-the-admin-portal

  5. You can filter the list of builds by Filter, Build ID, Platform, Deletion Status, or Date.

    cancel-a-game-build-deletion-request-using-the-admin-portal

  6. Click Cancel to the right of the game build whose deletion you want to cancel.

    cancel-a-game-build-deletion-request-using-the-admin-portal

  7. The Cancel Deletion confirmation dialog appears. Click OK.

    cancel-a-game-build-deletion-request-using-the-admin-portal

  8. The system removes the game build from the Deletion Request section and moves it back to the Build List panel.

    cancel-a-game-build-deletion-request-using-the-admin-portal

# Downloading a Game Using BuildUtil

You can download the game using BuildUtil for debugging purposes.

NOTE

Actual player downloads should only happen in Launcher. This procedure is for debugging purposes only.

To download a game, run the download command with the following parameters:

Command Description
--url (-u) Base URL to the service.
--namespace (-n) The publisher namespace. This is the default namespace in the Admin Portal.
--dir (-d) The directory where the game will be downloaded.
--sourceID (-b) The Build ID of the game.
--buildInfoVersion (-r) The BuildInfo version to be used. If you’re uploading the game and specifying the -r flag as 1, then fill this parameter with value 1. If no -r value is supplied during the upload, then fill this parameter with value 2. Any values other than 1 or 2 are invalid.

Here is an example of the updated command:

Here is how the command will look in the terminal:

Linux:

game-uploading-guide

Windows:

game-uploading-guide

Once you are finished, you can find the downloaded file in the directory that you previously specified.