GameVersionController
GameVersionController exposes installed and available game versions and drives installation and removal. It stays limited to DTO conversion and feature invocation.
- Methods: 5
- Referenced types: 4
Methods
InstallLocalVersion
InstallLocalVersion imports a game installation from a local archive or directory.
Go
InstallLocalVersion(request InstallVersionRequest) (OperationDTO, error)TypeScript
InstallLocalVersion(request: InstallVersionRequest): Promise<OperationDTO>Parameters
| Name | Type |
|---|---|
request | InstallVersionRequest |
Returns
| Go type | TypeScript type |
|---|---|
OperationDTO | OperationDTO |
Example
const installLocalVersion = await InstallLocalVersion({ id: "id", name: "Example", sourcePath: "/path/to/file", executableRelativePath: "/path/to/file", expectedSha256: "" })Source
internal/transport/wails/game_version_controller.go:94
InstallVersion
InstallVersion starts downloading and installing a selected game release. The call returns the queued OperationDTO immediately; later download and installation failures are reported through operation events and the OperationDTO error fields.
Go
InstallVersion(versionID string) (OperationDTO, error)TypeScript
InstallVersion(versionID: string): Promise<OperationDTO>Parameters
| Name | Type |
|---|---|
versionID | string |
Returns
| Go type | TypeScript type |
|---|---|
OperationDTO | OperationDTO |
Errors
validation_error: the version identifier is invalidversion_catalog_unavailable: the release catalog could not be reachedgame_version_already_installed: this release is already installedgame_version_not_found: the release is not available for this platforminsufficient_disk_space: not enough storage is availablefile_permission_denied: the installation could not be writtendata_folder_busy: a data-folder relocation is in progress
Example
const installVersion = await InstallVersion("version-id")Source
internal/transport/wails/game_version_controller.go:83
ListAvailableVersions
ListAvailableVersions returns downloadable releases compatible with the current platform.
Go
ListAvailableVersions() ([]AvailableGameVersionDTO, error)TypeScript
ListAvailableVersions(): Promise<AvailableGameVersionDTO[]>Returns
| Go type | TypeScript type |
|---|---|
[]AvailableGameVersionDTO | AvailableGameVersionDTO[] |
Example
const listAvailableVersions = await ListAvailableVersions()Source
internal/transport/wails/game_version_controller.go:58
ListInstalledVersions
ListInstalledVersions returns game versions installed and managed by the launcher.
Go
ListInstalledVersions() ([]GameVersionDTO, error)TypeScript
ListInstalledVersions(): Promise<GameVersionDTO[]>Returns
| Go type | TypeScript type |
|---|---|
[]GameVersionDTO | GameVersionDTO[] |
Example
const listInstalledVersions = await ListInstalledVersions()Source
internal/transport/wails/game_version_controller.go:45
RemoveVersion
RemoveVersion removes an installed game version when no managed instance requires it.
Go
RemoveVersion(id string, deleteFiles bool) errorTypeScript
RemoveVersion(id: string, deleteFiles: boolean): Promise<void>Parameters
| Name | Type |
|---|---|
id | string |
deleteFiles | bool |
Example
await RemoveVersion("id", false)Source
internal/transport/wails/game_version_controller.go:109