Skip to content

SettingsController

SettingsController exposes launcher settings, data-folder relocation, and native file dialogs to the frontend. It stays limited to DTO conversion and feature invocation.

  • Methods: 16
  • Referenced types: 3

Methods

DetectOptimum

DetectOptimum searches standard locations for a usable Optimum installation.

Go

go
DetectOptimum() OptimumStatusDTO

TypeScript

ts
DetectOptimum(): Promise<OptimumStatusDTO>

Returns

Go typeTypeScript type
OptimumStatusDTOOptimumStatusDTO

Example

ts
const detectOptimum = await DetectOptimum()

Source

internal/transport/wails/settings_controller.go:123

GetDataFolder

GetDataFolder reports the active launcher data directory and its storage usage.

Go

go
GetDataFolder() (DataFolderDTO, error)

TypeScript

ts
GetDataFolder(): Promise<DataFolderDTO>

Returns

Go typeTypeScript type
DataFolderDTODataFolderDTO

Example

ts
const getDataFolder = await GetDataFolder()

Source

internal/transport/wails/settings_controller.go:81

GetOptimumStatus

GetOptimumStatus reports the configured Optimum runtime and whether it is usable.

Go

go
GetOptimumStatus() (OptimumStatusDTO, error)

TypeScript

ts
GetOptimumStatus(): Promise<OptimumStatusDTO>

Returns

Go typeTypeScript type
OptimumStatusDTOOptimumStatusDTO

Example

ts
const getOptimumStatus = await GetOptimumStatus()

Source

internal/transport/wails/settings_controller.go:114

GetSettings

GetSettings returns the launcher's current user-configurable settings.

Go

go
GetSettings() (SettingsDTO, error)

TypeScript

ts
GetSettings(): Promise<SettingsDTO>

Returns

Go typeTypeScript type
SettingsDTOSettingsDTO

Example

ts
const getSettings = await GetSettings()

Source

internal/transport/wails/settings_controller.go:54

InspectOptimum

InspectOptimum validates a selected Optimum installation directory.

Go

go
InspectOptimum(path string) (OptimumStatusDTO, error)

TypeScript

ts
InspectOptimum(path: string): Promise<OptimumStatusDTO>

Parameters

NameType
pathstring

Returns

Go typeTypeScript type
OptimumStatusDTOOptimumStatusDTO

Example

ts
const inspectOptimum = await InspectOptimum("/path/to/file")

Source

internal/transport/wails/settings_controller.go:128

MoveDataFolder

MoveDataFolder validates and prepares the target, then starts relocation in the background. A nil return means the move was accepted, not completed; progress and failure are reported through data-folder events, and success relaunches the launcher.

Go

go
MoveDataFolder(target string) error

TypeScript

ts
MoveDataFolder(target: string): Promise<void>

Parameters

NameType
targetstring

Errors

  • data_folder_busy: another relocation or background work is active
  • instance_already_running: a game instance is currently running

Example

ts
await MoveDataFolder("")

Source

internal/transport/wails/settings_controller.go:99

OpenDirectory

OpenDirectory opens an approved local directory in the system file manager.

Go

go
OpenDirectory(path string) error

TypeScript

ts
OpenDirectory(path: string): Promise<void>

Parameters

NameType
pathstring

Example

ts
await OpenDirectory("/path/to/file")

Source

internal/transport/wails/settings_controller.go:154

OpenOptimumInstallationGuide

OpenOptimumInstallationGuide opens installation guidance for the optional Optimum runtime.

Go

go
OpenOptimumInstallationGuide()

TypeScript

ts
OpenOptimumInstallationGuide(): Promise<void>

Example

ts
await OpenOptimumInstallationGuide()

Source

internal/transport/wails/settings_controller.go:139

SelectDataFolder

SelectDataFolder prompts for a launcher data directory.

Go

go
SelectDataFolder() (string, error)

TypeScript

ts
SelectDataFolder(): Promise<string>

Returns

Go typeTypeScript type
stringstring

Example

ts
const selectDataFolder = await SelectDataFolder()

Source

internal/transport/wails/settings_controller.go:87

SelectGameArchive

SelectGameArchive prompts for a local game archive.

Go

go
SelectGameArchive() (string, error)

TypeScript

ts
SelectGameArchive(): Promise<string>

Returns

Go typeTypeScript type
stringstring

Example

ts
const selectGameArchive = await SelectGameArchive()

Source

internal/transport/wails/settings_controller.go:104

SelectGameDirectory

SelectGameDirectory prompts for an existing game installation directory.

Go

go
SelectGameDirectory() (string, error)

TypeScript

ts
SelectGameDirectory(): Promise<string>

Returns

Go typeTypeScript type
stringstring

Example

ts
const selectGameDirectory = await SelectGameDirectory()

Source

internal/transport/wails/settings_controller.go:109

SelectModFile

SelectModFile prompts for one local mod archive.

Go

go
SelectModFile() (string, error)

TypeScript

ts
SelectModFile(): Promise<string>

Returns

Go typeTypeScript type
stringstring

Example

ts
const selectModFile = await SelectModFile()

Source

internal/transport/wails/settings_controller.go:144

SelectModFiles

SelectModFiles prompts for multiple local mod archives.

Go

go
SelectModFiles() ([]string, error)

TypeScript

ts
SelectModFiles(): Promise<string[]>

Returns

Go typeTypeScript type
[]stringstring[]

Example

ts
const selectModFiles = await SelectModFiles()

Source

internal/transport/wails/settings_controller.go:149

SelectOptimumInstallation

SelectOptimumInstallation prompts for an Optimum installation to inspect.

Go

go
SelectOptimumInstallation() (string, error)

TypeScript

ts
SelectOptimumInstallation(): Promise<string>

Returns

Go typeTypeScript type
stringstring

Example

ts
const selectOptimumInstallation = await SelectOptimumInstallation()

Source

internal/transport/wails/settings_controller.go:134

SetLibrarySort

SetLibrarySort updates the ordering used by the instance library.

Go

go
SetLibrarySort(value string) (SettingsDTO, error)

TypeScript

ts
SetLibrarySort(value: string): Promise<SettingsDTO>

Parameters

NameType
valuestring

Returns

Go typeTypeScript type
SettingsDTOSettingsDTO

Example

ts
const setLibrarySort = await SetLibrarySort("")

Source

internal/transport/wails/settings_controller.go:75

UpdateSettings

UpdateSettings validates and persists the complete settings document.

Go

go
UpdateSettings(request SettingsDTO) (SettingsDTO, error)

TypeScript

ts
UpdateSettings(request: SettingsDTO): Promise<SettingsDTO>

Parameters

NameType
requestSettingsDTO

Returns

Go typeTypeScript type
SettingsDTOSettingsDTO

Example

ts
const updateSettings = await UpdateSettings({ language: "", downloadsParallel: 0, confirmDeletion: false, globalLaunchArguments: [], optimumPath: "/path/to/file", checkForUpdates: false, updateChannel: "", skippedUpdateVersion: "1.0.0", telemetryEnabled: false, automaticSafetySnapshots: false, automaticSnapshotRetention: 0, librarySort: "" })

Source

internal/transport/wails/settings_controller.go:60