class

Launcher::Store

Inherits Reference < Object

Constructors

from_json(json : String) : self
Source
load(path : String = Paths.store_path) : self
Source

Class methods

next_id(game_id : String) : String
Source

Instance methods

add_install(install : Install) : Nil
Source
custom_installs

Modified-game installs (any compatibility mode) — the "Modified game" sidebar entry lists these instead of the per-game pages.

Source
find_by_path(path : String) : Install | Nil
Source
for_game(game_id : String) : Array(Install)
Source
installs
Source
installs=(installs : Array(Install))
Source
locale
Source
locale=(locale : String | Nil)
Source
recent_engine
Source
recent_engine=(recent_engine : String | Nil)
Source
recent_sources
Source
recent_sources=(recent_sources : Hash(String, String))
Source
remove_install(path : String) : Nil
Source
save(path : String = Paths.store_path) : Nil

Atomic + non-clobbering write:

  • the temp file is per-PID — two processes saving at once never write into the same tmp (a shared tmp name let interleaved writes get renamed in as a corrupt config);
  • the previous config is kept as launcher.json.bak — even a buggy or stale writer leaves the last good list recoverable;
  • rename is atomic — a crash leaves either the old or the new file, never a truncated mix.
Source
to_json(json : JSON::Builder)
Source

Nested types