Class
HsCoreDescriptor
Description [src]
final class Hs.CoreDescriptor : GObject.Object
{
/* No available fields */
}
Represents a core descriptor file.
For Highscore to register the core, it must come with a core descriptor. A
core descriptor is a file in the GKeyFile format, containing
information about the core.
Usage
Create a HsCoreDescriptor object, then parse it using the
hs_core_descriptor_parse() method. If successful, all of the available
data will be filled and can be accessed through the created object.
Format
Core descriptors must have the .highscore extension and are installed into
the following directory: $LIBDIR/highscore/cores.
An example descriptor is as follows:
[Highscore]
Name=Example
Version=1.2.3
Commit=123456abc-dirty
Module=example-highscore.so
Authors=Jane Doe;
Copyright=Copyright (C) 2023 John Doe;Copyright (C) 2024 Jane Doe;
Website=https://example.org/
Donate=https://example.org/donate/
SourceCode=https://github.com/highscore-emu/example/
Issues=https://github.com/highscore-emu/example/issues/
License=GPL-2.0-or-later
# Alternatively: LicensePath=example.license
Platforms=MegaDrive;MegaCD;
StateVersion=1
[Environment]
EXAMPLE_USE_FALLBACK=1
[Firmware:FamicomDiskSystem]
japan=required
overseas=optional
europe=unused
Each descriptor must have a [Highscore] group, containing the following fields:
Name- human readable name of the core;Version- upstream version;Module- relative path to the core library file;Authors- list of core authors, separated with semicolons;Platforms- list of supported game platforms, separated with semicolons. Seehs_platform_get_name()for the list of known platform names.
It must also have one of the following fields: License or LicensePath.
License is an SPDX identifier. Supported licenses: GPL-2.0-only,
GPL-3.0-only, LGPL-3.0-only, LGPL-2.1-only, AGPL-3.0-only,
GPL-2.0-or-later, GPL-3.0-or-later, LGPL-2.1-or-later, LGPL-3.0-or-later,
AGPL-3.0-or-later, 0BSD, BSD-2-Clause, BSD-3-Clause, MIT,
Artistic-2.0, Apache-2.0, MPL-2.0.
For other licences, or multi-licensing, use LicensePath instead. Specify a
path, such as example.license, and put the license contents into that file.
If License is specified, the descriptor must also have the Copyright
field, containing a list of semicolon-separated copyright strings.
For LicensePath, copyright information may be omitted if the license text
specifies it. Otherwise, it must be specified as well.
Optionally, it can have the following keys:
Website- link to the upstream websiteDonate- link to the upstream donation pageSourceCode- link to the downstream source codeIssues- link to the downstream issue trackerCommit- git commit/svn revision/etc. If left empty, treated same as omitted. Can include-dirtyto indicate that it’s dirty;StateVersion- indicates savestate compatibility and should be incremented whenever it breaks. If not present, the version is assumed to be 0.
The optional [Environment] group allows to define one or more environment
variables, which will be set before the core is loaded.
For every defined platform, [Firmware:$PLATFORM] group can be specified.
It defines which firmware is used by the core. Firmware is specified by its
enum nick for the corresponding firmware enum, e.g. HsPlayStationFirmware
for HS_PLATFORM_PLAYSTATION. The values can be required, optional
or unused, corresponding to HsFirmwareRequirement values. If not
specified, firmware is considered unused.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.