Foundry.Config¶
- Subclasses:
None
Methods¶
- Inherited:
Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r |
|||
r |
|||
r |
|||
[ |
r |
||
r/w/en |
|||
r/w/en |
|||
r |
|||
r |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Foundry.Config(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
An abstract base class for build configurations.
- can_default()¶
- change_sdk(sdk)¶
- Parameters:
sdk (
Foundry.Sdk) – a [class`Foundry`.Sdk]- Returns:
a [class`Dex`.Future] that resolves to any value or rejects with error.
- Return type:
Change the SDK for the config and write the config to disk.
New in version 1.1.
- dup_build_system()¶
-
The build system the configuration specifies to be used.
- dup_builddir(pipeline)¶
- Parameters:
pipeline (
Foundry.BuildPipeline) – the [class`Foundry`.BuildPipeline] which will perform the build- Returns:
the directory where the build should occur
- Return type:
Determines where the project build should occur.
- dup_config_opts()¶
-
The config options.
This is generally passed to something like
meson setuporcmakewhen configuring the project for a build.
- dup_default_command()¶
- Returns:
a [class`Foundry`.Config] or
None.- Return type:
Gets the default command for the config, if any.
- dup_environ(locality)¶
- Parameters:
locality (
Foundry.Locality) –- Returns:
an array of UTF-8 encoded strings or
Noneto use the default environment.- Return type:
Gets the environment variables to use for a particular locality.
- dup_name()¶
- Returns:
a newly allocated string
- Return type:
Gets the user-visible name for the configuration.
- dup_provider()¶
- Return type:
Gets the provider which provides this config.
New in version 1.1.
- resolve_sdk(device)¶
- Parameters:
device (
Foundry.Device) – a [class`Foundry`.Device]- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.Sdk] or rejects with error.
- Return type:
Tries to locate the preferred SDK for a configuration and device.
This might be used to locate an SDK which is not yet installed but would need to be installed to properly setup a build pipeline.
- save()¶
- Returns:
a [class`Dex`.Future] that resolves to any value or rejects with error.
- Return type:
Requests the config save back to disk.
New in version 1.1.
- set_id(id)¶
- Parameters:
id (
str) – the unique identifier for the config
Sets the identifier of the config.
This should only be called by [class`Foundry`.ConfigProvider] on their [class`Foundry`.Config] before they have been registered.
- set_name(name)¶
- Parameters:
name (
str) –
Set the user-visible name of the config.
This should only be called by implementations of
Foundry.ConfigProvider.
- supports_sdk(sdk)¶
- Parameters:
sdk (
Foundry.Sdk) – a [class`Foundry`.Sdk]- Returns:
- Return type:
Checks if the configuration supports the given SDK.
This allows configurations to restrict which SDKs they can use. By default, all configurations support all SDKs, but subclasses can override this behavior.
New in version 1.1.
- do_can_default() virtual¶
- do_change_sdk(sdk) virtual¶
- Parameters:
sdk (
Foundry.Sdk) – a [class`Foundry`.Sdk]- Returns:
a [class`Dex`.Future] that resolves to any value or rejects with error.
- Return type:
Change the SDK for the config and write the config to disk.
New in version 1.1.
- do_dup_build_system() virtual¶
-
The build system the configuration specifies to be used.
- do_dup_builddir(pipeline) virtual¶
- Parameters:
pipeline (
Foundry.BuildPipeline) – the [class`Foundry`.BuildPipeline] which will perform the build- Returns:
the directory where the build should occur
- Return type:
Determines where the project build should occur.
- do_dup_config_opts() virtual¶
-
The config options.
This is generally passed to something like
meson setuporcmakewhen configuring the project for a build.
- do_dup_default_command() virtual¶
- Returns:
a [class`Foundry`.Config] or
None.- Return type:
Gets the default command for the config, if any.
- do_dup_environ(locality) virtual¶
- Parameters:
locality (
Foundry.Locality) –- Returns:
an array of UTF-8 encoded strings or
Noneto use the default environment.- Return type:
Gets the environment variables to use for a particular locality.
- do_resolve_sdk(device) virtual¶
- Parameters:
device (
Foundry.Device) – a [class`Foundry`.Device]- Returns:
a [class`Dex`.Future] that resolves to a [class`Foundry`.Sdk] or rejects with error.
- Return type:
Tries to locate the preferred SDK for a configuration and device.
This might be used to locate an SDK which is not yet installed but would need to be installed to properly setup a build pipeline.
- do_save() virtual¶
- Returns:
a [class`Dex`.Future] that resolves to any value or rejects with error.
- Return type:
Requests the config save back to disk.
New in version 1.1.
- do_supports_sdk(sdk) virtual¶
- Parameters:
sdk (
Foundry.Sdk) – a [class`Foundry`.Sdk]- Returns:
- Return type:
Checks if the configuration supports the given SDK.
This allows configurations to restrict which SDKs they can use. By default, all configurations support all SDKs, but subclasses can override this behavior.
New in version 1.1.
Property Details¶
- Foundry.Config.props.id¶
- Name:
id- Type:
- Default Value:
- Flags:
- Foundry.Config.props.name¶
- Name:
name- Type:
- Default Value:
- Flags:
- Foundry.Config.props.provider¶
- Name:
provider- Type:
- Default Value:
- Flags: