#[non_exhaustive]pub enum Key {
Show 18 variants
Exe,
Company,
Product,
OriginalFilename,
Dxgi,
D3d9,
Wined3d,
OpenGl,
DpiAware,
LargeAddressAware,
Gcmouse,
ForceNx,
MetalHud,
DllOverrides,
ArgumentsOverride,
Arguments,
DebugChannels,
Env,
}Expand description
The key of a field of a rule, which is also the name of the field on the wire.
Each variant says what the field does and what a process gets without
it; the getter of Rule it links to has the details. The text
compatdb.so logs for an unset setting is Key::upstream.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Exe
The image basename a rule matches, in any case, or * for every process.
exe, see Exe. Every rule has one.
Company
A text the company name of the image’s version resource must contain.
company, a substring of the version string CompanyName, compared
ASCII-case-insensitively (see Rule::company). Without it, any
company matches.
Product
A text the product name of the image’s version resource must contain.
product, a substring of the version string ProductName, compared
ASCII-case-insensitively (see Rule::product). Without it, any
product matches.
OriginalFilename
A text the original file name of the image’s version resource must contain.
original_filename, a substring of the version string
OriginalFilename, compared ASCII-case-insensitively (see
Rule::original_filename). Without it, any original filename
matches.
Dxgi
The implementation of D3D10 to D3D12 the process loads.
dxgi, a Dxgi (see Rule::dxgi). Unset: wined3d, as in
upstream Wine.
D3d9
The D3D9 implementation the process loads.
d3d9, a D3d9 (see Rule::d3d9). Unset: wined3d, as in
upstream Wine.
Wined3d
The renderer wined3d draws with in the process.
wined3d, a Wined3d for the whole process (see
Rule::wined3d). Unset: WINE_D3D_CONFIG or wined3d’s registry
settings decide, and without them OpenGL.
OpenGl
Which OpenGL the Mac driver gives the process.
opengl, an OpenGl (see Rule::opengl). Unset: Apple’s
OpenGL, as in upstream Wine.
DpiAware
Whether the process is DPI-aware.
dpi_aware (see Rule::dpi_aware). Unset: the registry and the
manifest decide, and without them the process is unaware.
LargeAddressAware
Whether a 32-bit process gets the 4 GB address space whatever its executable’s flag says.
large_address_aware (see Rule::large_address_aware). Unset:
the flag decides.
Gcmouse
Whether raw mouse movement comes from GameController instead of the cursor.
gcmouse (see Rule::gcmouse). Unset: from the cursor, as in
upstream Wine.
ForceNx
Whether no-execute stays on in a 32-bit process.
force_nx (see Rule::force_nx). Unset: Wine turns it off for an
image without NX_COMPAT.
MetalHud
Whether the Metal performance HUD shows.
metal_hud, through the variables of metal_hud_env (see
Rule::metal_hud). Unset: the process keeps the variables it was
started with.
DllOverrides
DLL load-order overrides, one WINEDLLOVERRIDES element each.
dll_overrides, repeatable (see Rule::dll_overrides). None:
WINEDLLOVERRIDES and the registry decide.
ArgumentsOverride
Arguments that replace those the rules folded before give the command line.
arguments_override, repeatable (see Rule::arguments_override).
None: the arguments of every rule append.
Arguments
Text appended to the command line, one argument string each.
arguments, repeatable (see Rule::arguments). None: the command
line stays as it was.
DebugChannels
WINEDEBUG channels for the process, one entry each.
debug_channels, repeatable (see Rule::debug_channels). Wine
reads WINEDEBUG before compatdb.so loads, so the library only
logs them; a launcher puts them into the variable (see
Table::winedebug). None: the WINEDEBUG the process was started
with.
Env
Environment variables the process gets; an empty value removes the variable.
env, one NAME=value entry each, repeatable (see Rule::env).
None: the environment the process was started with.
Implementations§
Source§impl Key
impl Key
Sourcepub const fn scalar(self) -> Option<Scalar>
pub const fn scalar(self) -> Option<Scalar>
The scalar setting this key names, or None for a matcher or a
list.
Sourcepub const fn label(self) -> &'static str
pub const fn label(self) -> &'static str
How a launcher names the field to a person, for example
DPI-aware.
Sourcepub const fn upstream(self) -> Option<&'static str>
pub const fn upstream(self) -> Option<&'static str>
What upstream Wine does for this setting when no rule sets it, as the
log of compatdb.so prints it, or None for a matcher.
arguments_override is a way of setting the arguments, so it shares
their text.
Sourcepub const fn values(self) -> &'static [&'static str]
pub const fn values(self) -> &'static [&'static str]
The spellings the value of a scalar setting can have, in lowercase,
default included; empty for any other key, whose values are user
data.
Sourcepub const fn summary(self) -> &'static str
pub const fn summary(self) -> &'static str
What the field does, in one line of plain text without markup, such
as a launcher’s template puts above the setting. It is the first
paragraph of the key’s doc, which Key::docs_url links to.
Sourcepub const fn example(self) -> &'static str
pub const fn example(self) -> &'static str
A value a launcher’s template can show for the field, as
Rule::set takes it: a matcher’s value, one of Key::values
other than default for a scalar setting, one entry for a list, and
NAME=value for env. A launcher that writes env as a table of
names splits it at the first =.
The exe is a program’s, not *, since arguments_override needs
one; every example is a value a rule for that program takes.
Source§impl Key
impl Key
Sourcepub fn from_setting(name: &str) -> Result<Self, FieldError>
pub fn from_setting(name: &str) -> Result<Self, FieldError>
The key a launcher’s setting called name names, compared
ASCII-case-insensitively as str::parse compares it, which this
is but for the keys that are no longer read.
dxgi and DXGI therefore name the same key: a launcher that hands
both to Rule::set gets the value of the last one for a matcher or
a scalar, and the entries of both for a list.
§Errors
FieldError::RetiredKey for a key that is no longer read, with
its severity: x87_sidecar is a warning, since it asks for nothing
this Wine could still do, and cmdline_append, which arguments
replaced, an error. FieldError::UnknownKey for any other name
that is no key.
Sourcepub const fn allowed_on_any(self) -> bool
pub const fn allowed_on_any(self) -> bool
Whether a rule for every process, one whose exe is *
(Exe::Any) with or without a fingerprint, may hold this setting.
It may hold every scalar setting, every list and env, but not
arguments_override: for every process that would take away the
arguments the built-in rules give single programs. A matcher is not a
setting, so this is false for one: exe decides whether the rule
is for every process at all, and a fingerprint narrows the processes
it matches, so neither belongs among the settings a launcher offers
for every process.
Rule::set and Rule::set_list refuse a setting for which this
is false in a * rule, and an exe of * in a rule that holds
one, with FieldError::ArgumentsOverrideOnAny.
Sourcepub const fn replaces_on_merge(self) -> bool
pub const fn replaces_on_merge(self) -> bool
Whether a later layer’s value for this key takes the place of an earlier layer’s, rather than adding to it, when a launcher builds one rule from several layers of its configuration, such as a file of defaults and a file per game laid over it.
- A matcher or a scalar setting holds one value, so the later layer’s
replaces it:
true. - A list adds the later layer’s entries after the earlier layer’s:
false. arguments_overrideis the exception among the lists:true. A rule has one override, the whole list that replaces the arguments of the rules folded before it (seeRule::arguments_override). The entries of two layers added together would be an override neither layer wrote, and an empty list in the later layer has to clear an earlier layer’s override, asarguments_override=alone clears the arguments on the wire.envadds the later layer’s entries:false. The entries fold in order, so a later entry for the same variable wins.
This is only about layers of one rule. Between rules nothing
replaces: every rule that matches a process applies, in the order
Table::resolve folds them.