Difference between revisions of "Config"
(Created page with "FEX-Emu has a relatively complex configuration system. This is due to the fact that it is an overlay based configuration system and also it is technically two configuration sy...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
=== Loadable layers === | === Loadable layers === | ||
+ | From highest priority to lowest priority. Higher priority layers can override options in lower-priority layers. | ||
+ | |||
* Meta layer (Top most) | * Meta layer (Top most) | ||
** This layer is the final merging of all the layers under it. | ** This layer is the final merging of all the layers under it. | ||
Line 22: | Line 24: | ||
=== Environment variables === | === Environment variables === | ||
These come from environment variables prefixed with '''FEX_'''. Check the man page for FEX to know what environment variables correspond to which options. | These come from environment variables prefixed with '''FEX_'''. Check the man page for FEX to know what environment variables correspond to which options. | ||
+ | |||
=== FEXLoader arguments === | === FEXLoader arguments === | ||
This isn't usually set since FEXLoader is mostly a developer tool. FEXInterpreter is used instead. | This isn't usually set since FEXLoader is mostly a developer tool. FEXInterpreter is used instead. | ||
Line 30: | Line 33: | ||
This can be loaded from multiple paths highest priority to lowest priority | This can be loaded from multiple paths highest priority to lowest priority | ||
− | * $XDG_CONFIG_HOME/.fex-emu/AppConfig/<AppName>.json | + | * '''$FEX_APP_CONFIG''' |
+ | ** Usually not set. Direct JSON filepath | ||
+ | * '''$XDG_CONFIG_HOME/.fex-emu/AppConfig/<AppName>.json''' | ||
** Depends on environment, not always set on all distributions | ** Depends on environment, not always set on all distributions | ||
− | * $FEX_APP_CONFIG_LOCATION/AppConfig/<AppName>.json | + | * '''$FEX_APP_CONFIG_LOCATION/AppConfig/<AppName>.json''' |
** Usually not set | ** Usually not set | ||
− | * $HOME/.fex-emu/AppConfig/<AppName>.json | + | * '''$HOME/.fex-emu/AppConfig/<AppName>.json''' |
** The regular config location | ** The regular config location | ||
Line 42: | Line 47: | ||
This can be loaded from multiple paths highest priority to lowest priority | This can be loaded from multiple paths highest priority to lowest priority | ||
− | * $XDG_CONFIG_HOME/.fex-emu/AppConfig/Steam_$SteamAppId_<AppName>.json | + | * '''$XDG_CONFIG_HOME/.fex-emu/AppConfig/Steam_$SteamAppId_<AppName>.json''' |
** Depends on environment, not always set on all distributions | ** Depends on environment, not always set on all distributions | ||
− | * $FEX_APP_CONFIG_LOCATION/AppConfig/Steam_$SteamAppId_<AppName>.json | + | * '''$FEX_APP_CONFIG_LOCATION/AppConfig/Steam_$SteamAppId_<AppName>.json''' |
** Usually not set | ** Usually not set | ||
− | * $HOME/.fex-emu/AppConfig/Steam_$SteamAppId_<AppName>.json | + | * '''$HOME/.fex-emu/AppConfig/Steam_$SteamAppId_<AppName>.json''' |
** The regular config location | ** The regular config location | ||
Line 65: | Line 70: | ||
Will not fallback to loading later configs in the list if one fails. | Will not fallback to loading later configs in the list if one fails. | ||
− | * | + | * '''$XDG_CONFIG_HOME/.fex-emu/Config.json''' |
− | |||
− | |||
** Depends on environment, not always set on all distributions | ** Depends on environment, not always set on all distributions | ||
− | * $FEX_APP_CONFIG_LOCATION/Config.json | + | * '''$FEX_APP_CONFIG_LOCATION/Config.json''' |
** Usually not set | ** Usually not set | ||
− | * $HOME/.fex-emu/Config.json | + | * '''$HOME/.fex-emu/Config.json''' |
** The regular config location | ** The regular config location | ||
Line 93: | Line 96: | ||
* Global main config | * Global main config | ||
− | === User-writable installed app config == | + | === User-writable installed app config === |
* Exactly the same as the above user-writable installed app config | * Exactly the same as the above user-writable installed app config | ||
Line 99: | Line 102: | ||
* Exactly the same as the above user-writable installed steam app config | * Exactly the same as the above user-writable installed steam app config | ||
− | === Global installed app config == | + | === Global installed app config === |
* Exactly the same as the above global installed app config | * Exactly the same as the above global installed app config | ||
Line 107: | Line 110: | ||
=== FEX ThunkConfig Option path === | === FEX ThunkConfig Option path === | ||
'''ThunkConfig''' is an option in FEX's '''Config''' section. If this filepath exists then it is loaded. | '''ThunkConfig''' is an option in FEX's '''Config''' section. If this filepath exists then it is loaded. | ||
+ | * This means it can be overridden with '''FEX_THUNKCONFIG''' environment variable, which is handy. | ||
=== User-writable main config === | === User-writable main config === |
Latest revision as of 08:50, 1 May 2024
FEX-Emu has a relatively complex configuration system. This is due to the fact that it is an overlay based configuration system and also it is technically two configuration systems in one.
Main application configuration
This is the primary configuration that is the bulk of the implementation. This falls under the "Config" section of the json configuration files.
Overlay system
This configuration system is based on layers that either override or merge with the layer under it.
Loadable layers
From highest priority to lowest priority. Higher priority layers can override options in lower-priority layers.
- Meta layer (Top most)
- This layer is the final merging of all the layers under it.
- Environment variables
- This layer loads options from the environment variable prefixed with FEX_
- Arguments
- This is for the options passed through FEXLoader. Mostly unused
- User-writable app config
- User-writable steam app id
- Global installed app config
- Global installed Steam App config
- User-writable main config
- Global main config
Environment variables
These come from environment variables prefixed with FEX_. Check the man page for FEX to know what environment variables correspond to which options.
FEXLoader arguments
This isn't usually set since FEXLoader is mostly a developer tool. FEXInterpreter is used instead.
User-writable app config
Just like the global app config file, this takes the form of <AppName>.json
This can be loaded from multiple paths highest priority to lowest priority
- $FEX_APP_CONFIG
- Usually not set. Direct JSON filepath
- $XDG_CONFIG_HOME/.fex-emu/AppConfig/<AppName>.json
- Depends on environment, not always set on all distributions
- $FEX_APP_CONFIG_LOCATION/AppConfig/<AppName>.json
- Usually not set
- $HOME/.fex-emu/AppConfig/<AppName>.json
- The regular config location
User-writable steam app id
Just like the global steam app config file, this takes the form of Steam_$SteamAppId_<AppName>.json
This can be loaded from multiple paths highest priority to lowest priority
- $XDG_CONFIG_HOME/.fex-emu/AppConfig/Steam_$SteamAppId_<AppName>.json
- Depends on environment, not always set on all distributions
- $FEX_APP_CONFIG_LOCATION/AppConfig/Steam_$SteamAppId_<AppName>.json
- Usually not set
- $HOME/.fex-emu/AppConfig/Steam_$SteamAppId_<AppName>.json
- The regular config location
Global installed app config
This file is loaded from /usr/share/fex-emu/AppConfig/<AppName>.json
- Usually doesn't exist
- FEX-Emu ships a handful of these
Global steam app config
This file is loaded from /usr/share/fex-emu/AppConfig/Steam_$SteamAppId_<AppName>.json
- Usually doesn't exist
User-writable main config
This can come from a couple locations. From highest priority to lowest.
Will not fallback to loading later configs in the list if one fails.
- $XDG_CONFIG_HOME/.fex-emu/Config.json
- Depends on environment, not always set on all distributions
- $FEX_APP_CONFIG_LOCATION/Config.json
- Usually not set
- $HOME/.fex-emu/Config.json
- The regular config location
Global main config
This file is loaded from /usr/share/fex-emu/Config.json
- Usually doesn't exist
Thunks configuration system
This system is disjoint from the other configuration system, but overlaps slightly as we will see. This system loads the ThunksDB section of the json configuration files.
This system is disjoint from the other configuration system because it only affects thunking configuration options.
Loadable Layers
The layers from highest priority to lowest priority. Higher priority layers can enable or disable options from the lower priority layers.
- User-writable app config
- User-writable steam app config
- Global installed app config
- Global installed Steam App config
- FEX ThunkConfig option path
- User-writable main config
- Global main config
User-writable installed app config
- Exactly the same as the above user-writable installed app config
User-writable steam app config
- Exactly the same as the above user-writable installed steam app config
Global installed app config
- Exactly the same as the above global installed app config
Global installed Steam App config
- Exactly the same as the above global installed steam app config
FEX ThunkConfig Option path
ThunkConfig is an option in FEX's Config section. If this filepath exists then it is loaded.
- This means it can be overridden with FEX_THUNKCONFIG environment variable, which is handy.
User-writable main config
- Exactly the same as the above user-writable main config
Global main config
- Exactly the same as the above Global main config