gamelocator

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 2 Imported by: 0

README

go-gamelocator

Go


Finds games installed by PC stores and launchers on Linux, Windows, macOS (Steam) and Steam Deck, and reads and edits the Steam files a launcher needs. Package gamelocator, module github.com/Rethunk-Tech/go-gamelocator.

Every launcher keeps its own list of installed games in its own format. This module reads those lists and answers one question: where is this game, per store. It reads files, never launches anything, and never contacts a network.

Quick start

go get github.com/Rethunk-Tech/go-gamelocator

A worked example and the contracts: HUMANS.md.

Features

  • One package per store. steam, gog, heroic, epic, ea, xbox, lutris and bottles, each returning install folders, with the folders the player added searched first.
  • Steam in depth. Native and Flatpak installs, library folders, build ids, the signed-in account, cached art, screenshots, Proton builds and the compatibility tool a game uses.
  • Byte-preserving edits. SetLaunchOptions, AddShortcut and RemoveShortcuts change only what they mean to, and take a one-time backup you name with EditOptions. Steam must be closed while they run.
  • Bounded parsers. Both VDF readers refuse files nested deeper than any Steam writes (ErrTooDeep).
  • Linux, Windows and Steam Deck. Windows registry reads run on a Windows CI leg; Flatpak sandbox grants for Steam need the --talk-name=org.freedesktop.Flatpak permission in your own manifest.

Documentation

Doc Audience
HUMANS.md Running and using the package
AGENTS.md Internals, invariants, and why
CONTRIBUTING.md Process — commits, tests, docs
SECURITY.md Vulnerability disclosure
CHANGELOG.md Release notes

License

MIT — see LICENSE. © 2026 Rethunk.Tech, LLC.

Documentation

Overview

Package gamelocator finds games installed by PC stores and launchers on Linux, Windows and Steam Deck, and reads and edits the Steam files a launcher needs. This package holds what every store package shares; the stores are the steam, gog, heroic, epic, ea, xbox, lutris and bottles subpackages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GameDir

func GameDir(dir, marker string) string

GameDir is dir (which must be absolute: a relative one would be read against the process's working folder) when it holds marker (a slash path below dir, so "Game/Bin/x.exe" works), else its "game" subfolder when that does (GOG's offline layout), else "".

Types

This section is empty.

Directories

Path Synopsis
Package bottles finds the Wine bottles Bottles keeps on Linux and the game folders inside them.
Package bottles finds the Wine bottles Bottles keeps on Linux and the game folders inside them.
Package ea finds games installed by the EA App on Windows.
Package ea finds games installed by the EA App on Windows.
Package epic reads the install list the Epic Games Launcher keeps on Windows.
Package epic reads the install list the Epic Games Launcher keeps on Windows.
Package gog locates a game installed from GOG: by GOG Galaxy, the offline installer, Heroic or Minigalaxy.
Package gog locates a game installed from GOG: by GOG Galaxy, the offline installer, Heroic or Minigalaxy.
Package heroic reads the Heroic Games Launcher's config folder: where it is, the GOG and Epic (legendary) games it installed, and the Wine prefix it runs a game in.
Package heroic reads the Heroic Games Launcher's config folder: where it is, the GOG and Epic (legendary) games it installed, and the Wine prefix it runs a game in.
internal
readcap
Package readcap reads files a launcher or the player wrote, with a size bound and without opening a pipe or device.
Package readcap reads files a launcher or the player wrote, with a size bound and without opening a pipe or device.
wineprefix
Package wineprefix finds the folder of a Wine prefix that holds drive_c.
Package wineprefix finds the folder of a Wine prefix that holds drive_c.
winreg
Package winreg reads one string value from the Windows registry.
Package winreg reads one string value from the Windows registry.
winregtest
Package winregtest gives Windows tests a scratch registry tree under HKCU, so a reader that takes a root and a base path can be pointed at a layout the test wrote.
Package winregtest gives Windows tests a scratch registry tree under HKCU, so a reader that takes a root and a base path can be pointed at a layout the test wrote.
xdgtest
Package xdgtest clears the XDG variables a test package's locators would read.
Package xdgtest clears the XDG variables a test package's locators would read.
Package lutris finds a game's installs registered in Lutris on Linux.
Package lutris finds a game's installs registered in Lutris on Linux.
Package steam locates Steam (native or Flatpak), its libraries, installed apps, current account, Proton builds and compatibility tool choices, and edits the launch options and non-Steam shortcuts Steam keeps per account.
Package steam locates Steam (native or Flatpak), its libraries, installed apps, current account, Proton builds and compatibility tool choices, and edits the launch options and non-Steam shortcuts Steam keeps per account.
Package xbox finds games installed by the Xbox app on Windows.
Package xbox finds games installed by the Xbox app on Windows.

Jump to

Keyboard shortcuts

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