Scripting API
Scripting API
WindowsResources
Class in Abyss.Core, from Abyss.Core.
The resources a built game's Windows executable carries — its version information and its icon — as a compiled resource file, .res, which the linker takes as it takes an object.
public static class WindowsResourcesRemarks
Written here rather than by the resource compiler, whose input is a script in a language of its own: the file is a run of entries, each a header saying its type, its number and its size, then its bytes, every one on a four-byte boundary; the version information is a tree of blocks, each its length, its value's length, a key in UTF-16 and its value.
The icon a PNG at every size, which an icon may hold at any size since Windows Vista: one image resource a size, and the group naming them all as resource 1 — the one Explorer shows the executable by, and the one the game's window is given (World.SetWindowIconFromExecutable).
Methods
Write
public static void Write(string path, WindowsDetails details, IReadOnlyList<(int Size, byte[] Png)> icons)Writes the resources: the version information, and the icon at the sizes given, the largest first.
Parameters
path: The.resfile, its whole path.details: What the executable says of itself.icons: The icon at each size, as a PNG; none for an executable with no icon of its own.
Constants
IconGroup
public const int IconGroup = 1The number the icon group is written as, which Explorer and the game's window read.
