core

package
v1.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2026 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProfileVersion = "v1"
)

Variables

View Source
var ErrProfileLaunchBusy = errors.New("profile launch is already running")

Functions

This section is empty.

Types

type App

type App struct {
	Version            string
	ConfigDir          string
	Rest               rest.Client
	ProfileManager     *profile.Manager
	EpicSessionManager *aumgr.EpicSessionManager
	EpicApi            *aumgr.EpicApi
}

func New

func New(version string, restClient rest.Client) (*App, error)

func (*App) AcquireProfileLaunchLock added in v1.5.3

func (a *App) AcquireProfileLaunchLock(profileID uuid.UUID) (*ProfileLaunchLock, error)

func (*App) ClearModCache

func (a *App) ClearModCache() error

func (*App) DetectGamePath

func (a *App) DetectGamePath() (string, error)

func (*App) DetectLauncherType

func (a *App) DetectLauncherType(path string) aumgr.LauncherType

func (*App) ExecuteLaunch

func (a *App) ExecuteLaunch(gamePath string, dllDir string, joinInfo *LaunchJoinInfo, onStarted func(pid int) error) error

ExecuteLaunch launches the game and blocks until it exits.

func (*App) ExportProfile

func (a *App) ExportProfile(prof profile.Profile) (string, error)

func (*App) ExportProfileArchive added in v1.5.0

func (a *App) ExportProfileArchive(prof profile.Profile, iconPNG []byte) ([]byte, error)

func (*App) GetInstallationStatus

func (a *App) GetInstallationStatus(gamePath string, checkUpdates bool) *InstallationInfo

func (*App) GetLobbyInfoByPID added in v1.6.0

func (a *App) GetLobbyInfoByPID(pid int) (*IPCLobbyInfo, error)

func (*App) HandleSharedProfile

func (a *App) HandleSharedProfile(uri string) (*profile.SharedProfile, error)

func (*App) HandleSharedProfileArchive added in v1.5.0

func (a *App) HandleSharedProfileArchive(reader io.ReaderAt, size int64) (*profile.SharedProfile, []byte, error)

func (*App) HandleSharedProfileArchiveFile added in v1.5.0

func (a *App) HandleSharedProfileArchiveFile(path string) (*profile.SharedProfile, []byte, error)

func (*App) IsLobbyInfoAvailable added in v1.6.0

func (a *App) IsLobbyInfoAvailable() bool

func (*App) LoadRunningProfilesFromLocks added in v1.6.2

func (a *App) LoadRunningProfilesFromLocks() ([]RunningProfileInfo, error)

LoadRunningProfilesFromLocks scans the profile lock directory and returns information about profiles that are currently running (have valid lock files with active processes).

func (*App) ParseJoinGameURI added in v1.6.0

func (a *App) ParseJoinGameURI(uri string) (*JoinGameLink, error)

func (*App) PrepareLaunch

func (a *App) PrepareLaunch(gamePath string, profileID uuid.UUID) (string, func() error, error)

PrepareLaunch prepares the game for launch by preparing the profile directory.

func (*App) ResolveDependencies

func (a *App) ResolveDependencies(initialMods []modmgr.ModVersion) ([]modmgr.ModVersion, error)

func (*App) ResolveProfileDependencies

func (a *App) ResolveProfileDependencies(profileID uuid.UUID) ([]modmgr.ModVersion, error)

ResolveProfileDependencies resolves all required dependencies for the given profile.

func (*App) SendLobbyJoinByPID added in v1.6.0

func (a *App) SendLobbyJoinByPID(pid int, joinInfo LaunchJoinInfo) error

func (*App) StartLobbyInfoPolling added in v1.6.0

func (a *App) StartLobbyInfoPolling(pid int, interval time.Duration, onInfo func(*IPCLobbyInfo), onError func(error)) func()

func (*App) SyncProfile

func (a *App) SyncProfile(profileID uuid.UUID, binaryType aumgr.BinaryType, gameVersion string, progressListener progress.Progress) error

SyncProfile forces a re-sync of the profile directory by clearing it and re-installing mods.

func (*App) UninstallMod

func (a *App) UninstallMod(gamePath string, progressListener progress.Progress) error

type IPCLobbyInfo added in v1.6.0

type IPCLobbyInfo struct {
	HasClient   bool   `json:"HasClient"`
	IsConnected bool   `json:"IsConnected"`
	GameState   string `json:"GameState"`
	LobbyCode   string `json:"LobbyCode"`
	ServerIP    string `json:"ServerIp"`
	ServerPort  int    `json:"ServerPort"`
	IsHost      *bool  `json:"IsHost"`
	IsInGame    *bool  `json:"IsInGame"`
}

type InstallStatus

type InstallStatus int
const (
	StatusNotInstalled InstallStatus = iota
	StatusInstalled
	StatusBroken
	StatusIncompatible
)

type InstallationInfo

type InstallationInfo struct {
	Status               InstallStatus
	GameVersion          string
	InstalledGameVersion string
	InstalledMods        []modmgr.InstalledVersionInfo
	OutdatedMods         []OutdatedMod
	Error                error
}
type JoinGameLink struct {
	SessionID  string
	ServerBase string
	Error      string
}

type LaunchJoinInfo added in v1.6.0

type LaunchJoinInfo struct {
	LobbyCode  string
	ServerIP   string
	ServerPort uint16
}

type OutdatedMod

type OutdatedMod struct {
	ID             string
	CurrentVersion string
	LatestVersion  string
}

type ProfileLaunchLock added in v1.5.3

type ProfileLaunchLock struct {
	// contains filtered or unexported fields
}

func (*ProfileLaunchLock) Release added in v1.5.3

func (l *ProfileLaunchLock) Release() error

func (*ProfileLaunchLock) SetGamePID added in v1.5.3

func (l *ProfileLaunchLock) SetGamePID(gamePID int, startedAt time.Time, directJoinEnabled bool) error

type RunningProfileInfo added in v1.6.2

type RunningProfileInfo struct {
	ProfileID         uuid.UUID
	GamePID           int
	DirectJoinEnabled bool
	PlayStartedAt     time.Time
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL