Documentation
¶
Overview ¶
Package devmount owns the package a development session mounts in a Deadlock installation: its directory, its block in gameinfo.gi, and the lock that tells a live session from one that ended without unmounting. Each package lives in its own subdirectory named for its content, since a running game holds the package it loaded open and Windows refuses to replace it; a changed package goes beside the held one, and the next session prunes the ones no game holds. Another program that mounts content in the same game, such as a game client that refuses to start beside conflicting packages, clears a stale mount through ClearStale instead of asking the player to edit gameinfo.gi.
Index ¶
Constants ¶
const ( // Name names the session's block in gameinfo.gi. Name = "MODLOCK DEV" // Dir is the game-relative directory of the session's packages. Dir = "citadel/modlock_dev" )
Variables ¶
var ErrRunning = errors.New("a Modlock development session is running in this game")
ErrRunning reports that a live development session holds the mount.
Functions ¶
func ClearStale ¶
ClearStale unmounts a block that no live session holds, and returns ErrRunning when one does. A block without a lock file came from a version before the lock and counts as stale.
func Hold ¶
Hold marks a session live in the installation at gameDir until the returned file closes or the process exits, however it exits. Hold before mounting and close after unmounting. Several sessions may hold at once.
func Mount ¶
Mount adds the session's block for the package named key to the installation's gameinfo.gi, replacing a block a session left that did not end cleanly or that names an older package.
func PackagePath ¶ added in v0.1.33
PackagePath returns the directory of the package named key in the installation at gameDir.
Types ¶
This section is empty.