Class DeploymentManager

The DeploymentManager provides API for convenient project deployments. It manages packaging of the project into executable form, including the necessary resources. This allows the Project to become a standalone application on both the web and on native platforms.

Constructors

Properties

buildResult: BuildResult

Information about the most-recent build.

frameworkPackageName = "rsxFramework.rpak"

The name of the framework package required to start the RSX runtime.

logCategoryDeployment: number

The log category of deployment information.-

onDeploymentLogAdded: ((logEntry: LogEntry) => void)

Invoked when a log was generated during a deployment operation.

Accessors

  • get activePlatform(): EnumValue<PlatformType, number>
  • Changes the active build platform. Might cause asset reimport.

    Returns EnumValue<PlatformType, number>

  • set activePlatform(value): void
  • Parameters

    Returns void

  • get activePlatformInformation(): PlatformInformation
  • Gets stored build setting for the active platform.

    Returns PlatformInformation

    Active build settings.

  • get settings(): DeploymentData
  • The current deploymment data.

    Returns DeploymentData

  • set settings(value): void
  • Parameters

    Returns void

Methods

  • Builds the executable and packages the game.

    Parameters

    • buildFolder: FilePath
    • targetPlatform: PlatformInformation
    • OptionalonProgressReport: ((progress: number) => void)
        • (progress): void
        • Parameters

          • progress: number

          Returns void

    • OptionalonFinalize: (() => void)
        • (): void
        • Returns void

    Returns Coroutine<string>

  • Builds the executable and packages the game.

    Parameters

    • buildFolder: FilePath
    • targetPlatform: PlatformInformation
    • OptionalonProgressReport: ((progress: number) => void)
        • (progress): void
        • Parameters

          • progress: number

          Returns void

    • OptionalonFinalize: (() => void)
        • (): void
        • Returns void

    Returns Coroutine<string>

  • Calculates the size of the resource on disk including potential streaming and preview data sizes.

    Parameters

    • uuid: UUID

      The resource UUID.

    • platformInformation: PlatformInformation

      Structure with information about default scene.

    Returns number

    The size or null if the size cannot be calculated for the resource.

  • Cleans the build folder.

    Parameters

    • targetPlatform: PlatformInformation
    • buildFolder: FilePath

    Returns void

  • Cooks one or more resources and it's dependencies and exports the packages to the outputFolder.

    Parameters

    • resourceUUIDs: UUID[]

      The resources to cook and export to outputFolder.

    • outputFolder: FilePath

      The place where all the packages will be created.

    • includeDependencies: boolean

      Determines if resource depenencies will be included.

    Returns boolean

    Returns true on success. If something fails, message is printed to log and false is returned.

  • Creates a runtime settings resource that contains necessary data for starting up the project (for example initial scene).

    Parameters

    • buildFolder: FilePath

      Root folder of the user build where the settings should go.

    • platformInformation: PlatformInformation

      The user build configuration.

    • cloudProject: CloudProject

      The cloud project used to imprint meta-data into the deployment.

    • OptionaldeploymentBaseURL: string

      If project is streaming, the deployment base URL.

    • OptionaldeploymentUUID: UUID

      If project is streaming, the deployment UUID.

    Returns void

  • Creates a new web deployment on the cloud server. This will upload the manifest to the server and create all resources necessary to run the deployed application on the web.

    Parameters

    • manifestJSON: JsonObject

      A JSON object that represents the deployment manifest. Call createWebDeploymentJSON to create a new manifest.

    • platformInformation: PlatformInformation

      The user build configuration.

    Returns UncertainAsyncOp<CloudProjectDeployment, string>

    An uncertain async op that will be resolved with the deployment UUID once everything is complete.

  • Creates a new web deployment JSON that can be sent to the server to create a new cloud deployment.

    Parameters

    • resources: UUID[]

      The resources to package. Call gatherResources to gather all required resources for the build.

    • platformInformation: PlatformInformation

      The user build configuration.

    • cloudProject: CloudProject

    Returns JsonObject

    A JsonObject that represents the deployment configuration to be sent to the server.

  • Compiles and deploys user code.

    Parameters

    • buildFolder: FilePath
    • platformInformation: PlatformInformation

    Returns boolean

  • Deploys the runtime data.

    Parameters

    • targetPlatform: PlatformInformation
    • buildFolder: FilePath

    Returns void

  • Deploys the runtime executable

    Parameters

    • targetPlatform: PlatformInformation
    • buildFolder: FilePath

    Returns void

  • Finalizes the active deployment.

    Parameters

    • buildFolder: FilePath
    • platformInformation: PlatformInformation

    Returns void

  • Finds all used resources by the build.

    Parameters

    • platformInformation: PlatformInformation

      Structure with information about default scene.

    Returns UUID[]

    Resources

  • Generate icon.icns file for a macOS bundle.

    Parameters

    • buildFolder: FilePath

      Root folder of the user build where the bundle is built.

    • platformInformation: PlatformInformation

      Structure with information about the icon that should be injected.

    Returns void

  • Generate info.plist file for a macOS bundle.

    Parameters

    • buildFolder: FilePath

      Root folder of the user build where the bundle is built.

    • platformInformation: PlatformInformation

      Structure with information about the icon that should be injected.

    Returns void

  • Folder where to output user build files for given platform.

    Parameters

    Returns FilePath

    Path to build root folder.

  • Returns a list of script defines for a specific platform.

    Parameters

    Returns string

    String with defines.

  • Returns given list of files that need to be copied, usually relative to some source and/or destination path.

    Parameters

    • fileList: EnumValue<DeploymentFileList, number>

      Enum describing, which file list to retrieve.

    • platformInformation: PlatformInformation

      Platform information to retrieve the data for.

    Returns FilePath[]

  • Gets stored build setting for a specific platform.

    Parameters

    Returns PlatformInformation

    Build settings for the platform.

  • Path to game executable binary that is used for user build.

    Parameters

    Returns FilePath

    Path to game executable file.

  • Injects icons specified in platformInformation into an executable at the specified filePath.

    Parameters

    • filePath: FilePath

      Path to the executable.

    • platformInformation: PlatformInformation

      Structure with information about the icon that should be injected.

    Returns void

  • Loads a previously stored list of build settings.

    Parameters

    • inFile: FilePath

      Path to the input file.

    Returns void

  • Packages all resources into an output folder.

    Parameters

    • buildFolder: FilePath

      Root folder of the user build where the resources should go.

    • resources: UUID[]

      The resources to package. Call gatherResources to gather all required resources for the build.

    • platformInformation: PlatformInformation

      Structure with information about default scene.

    Returns boolean

    Returns true on success. If something fails, message is printed to log and false is returned.

  • Resets the currently active build settings.

    Returns void

  • Stores build settings for all platforms in the specified file.

    Parameters

    • outFile: FilePath

      Path to the output file.

    Returns void

  • Sets the permissions for the executable.

    Parameters

    • executablePath: FilePath
    • platformInformation: PlatformInformation

    Returns void