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: 17
  • 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:136

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:84

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:127

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:141

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:102

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:167

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:152

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:90

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:117

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:122

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:157

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:162

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:147

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:78

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, richPresenceEnabled: false, automaticSafetySnapshots: false, automaticSnapshotRetention: 0, librarySort: "", uiScale: 0, closeToTray: false })

Source ​

internal/transport/wails/settings_controller.go:60

ValidateDataFolderTarget ​

ValidateDataFolderTarget checks whether a target can be used as the launcher data folder, including write access, without starting a relocation. It lets the frontend warn the user before the move is confirmed.

Go ​

go
ValidateDataFolderTarget(target string) error

TypeScript ​

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

Parameters ​

NameType
targetstring

Errors ​

  • file_permission_denied: the launcher cannot create or write in the target

Example ​

ts
await ValidateDataFolderTarget("")

Source ​

internal/transport/wails/settings_controller.go:112