Documentation ¶
Index ¶
- Constants
- Variables
- func GetLatestOf(local ccmodupdater.Package, remote ccmodupdater.Package) ccmodupdater.Package
- func GetRemotePackages() map[string]ccmodupdater.RemotePackage
- func Launch(base string) (*os.Process, error)
- func PackageIcon(pkg ccmodupdater.Package) design.IconID
- func WriteUpdaterConfig(cfg UpdaterConfig)
- type GameLocation
- type UpdaterConfig
- type Warning
- type WarningID
Constants ¶
const FakeError bool = false
FakeError should be enabled to prevent internet access by CCUpdaterUI.
const GameFinderVFSPathDefault = "computer://"
GameFinderVFSPathDefault is the path for the 'drives panel'. Should be virtual.
Variables ¶
var InternetConnectionWarning bool = true
InternetConnectionWarning is true if the last GetRemotePackages() call actually resulted in error.
Functions ¶
func GetLatestOf ¶
func GetLatestOf(local ccmodupdater.Package, remote ccmodupdater.Package) ccmodupdater.Package
GetLatestOf returns the latest of two possibly-nil packages (returning nil if both are nil)
func GetRemotePackages ¶
func GetRemotePackages() map[string]ccmodupdater.RemotePackage
GetRemotePackages retrieves remote packages from the server. (The CCUpdaterCLI-level cache semantics still apply.)
func PackageIcon ¶
PackageIcon returns the relevant icon ID for a package.
func WriteUpdaterConfig ¶
func WriteUpdaterConfig(cfg UpdaterConfig)
WriteUpdaterConfig saves a configuration as the current configuration.
Types ¶
type GameLocation ¶
type GameLocation struct { // True for CrossCode installs. This overrules everything else, including Drive. Valid bool Location string Version string // If not empty, this is a drive, and has a special overridden name Drive string }
GameLocation represents a location a copy of CrossCode may be in.
func AutodetectGameLocations ¶
func AutodetectGameLocations() []GameLocation
AutodetectGameLocations attempts to find game locations. This may take some time as it can spin the CD/DVD drive on Windows; run in a Goroutine!
func CheckGameLocation ¶
func CheckGameLocation(dir string) GameLocation
CheckGameLocation converts a path into a GameLocation, making sure to set Valid & Version correctly in the process.
func GameFinderVFSList ¶
func GameFinderVFSList(vfsPath string) []GameLocation
GameFinderVFSList lists potentially-virtual directories at each path.
type UpdaterConfig ¶
UpdaterConfig is the configuration structure for the application.
func ReadUpdaterConfig ¶
func ReadUpdaterConfig() UpdaterConfig
ReadUpdaterConfig returns the current configuration for the application.
type Warning ¶
Warning represents a warning to show the user on the primary view.
func FindWarnings ¶
func FindWarnings(game *ccmodupdater.GameInstance) []Warning
FindWarnings detects issues with the installation to show on the primary view.