steam

package
v0.0.0-...-76887c0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GamePath is the path that is added to a steam path or library
	GamePath = "steamapps/common/team fortress 2/tf/"
)

Variables

View Source
var (
	// SteamConfigLibraryExp gets library's path inside steam's config
	SteamConfigLibraryExp = regexp.MustCompile(`"BaseInstallFolder_[\d+]"[\s]+"(.*)"`)

	// GameValidFiles is a list of things that every tf2 installation must have
	GameValidFiles = []string{
		"steamapps/common/team fortress 2/hl2.exe",
		"steamapps/common/team fortress 2/tf/",
		"steamapps/common/team fortress 2/tf/cfg/",
	}
)

Functions

func ContainsInvalidGamePath

func ContainsInvalidGamePath(list []string) (int, bool)

func FindGame

func FindGame() (string, error)

FindGame loops through steam libraries to check if the game is inside one of them, then it returns the valid one

func FindSteamLibrary

func FindSteamLibrary() ([]string, error)

FindSteamLibrary reads steam's config file from the path found at window's registry to get all steam libraries path

func FindSteamPath

func FindSteamPath() (string, error)

func GetModuleFileName

func GetModuleFileName(pid int) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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