Top | ![]() |
![]() |
![]() |
![]() |
void | diagnostic | Run Last |
void | finished | Run Last |
void | launcher-created | Run Last |
void | loaded | Run Last |
void | started | Run Last |
#define | IDE_TYPE_PIPELINE |
#define | IDE_PIPELINE_PHASE_MASK |
#define | IDE_PIPELINE_PHASE_WHENCE_MASK |
#define | IDE_BUILD_ERROR |
enum | IdePipelinePhase |
enum | IdeBuildError |
IdePipeline |
GEnum ╰── IdeBuildError GFlags ╰── IdePipelinePhase GObject ╰── IdeObject ╰── IdePipeline
gboolean
ide_pipeline_is_native (IdePipeline *self
);
This is a helper to check if the triplet that we are compiling for matches the host system. That allows some plugins to do less work by avoiding some cross-compiling work.
Since: 3.32
gboolean
ide_pipeline_is_ready (IdePipeline *self
);
Checks to see if the pipeline has been loaded. Loading may be delayed due to various initialization routines that need to complete.
Since: 3.32
IdeConfig *
ide_pipeline_get_config (IdePipeline *self
);
Gets the IdeConfig to use for the pipeline.
Since: 3.32
IdeDevice *
ide_pipeline_get_device (IdePipeline *self
);
Gets the device that the pipeline is building for.
Since: 3.32
IdeDeviceInfo *
ide_pipeline_get_device_info (IdePipeline *self
);
Gets the device info for the current device.
Since: 3.32
IdeTriplet *
ide_pipeline_get_host_triplet (IdePipeline *self
);
Gets the "host" triplet which specifies where the build results will run.
This is a convenience wrapper around getting the triplet from the device set for the build pipeline.
Since: 3.32
IdeRuntime *
ide_pipeline_get_runtime (IdePipeline *self
);
A convenience function to get the runtime for a build pipeline.
Since: 3.32
IdeToolchain *
ide_pipeline_get_toolchain (IdePipeline *self
);
A convenience function to get the toolchain for a build pipeline.
Since: 3.32
IdeToolchain *
ide_pipeline_ref_toolchain (IdePipeline *self
);
Thread-safe variant of ide_pipeline_get_toolchain()
.
Since: 3.32
const gchar *
ide_pipeline_get_builddir (IdePipeline *self
);
Gets the "builddir" to be used for the build process. This is generally the location that build systems will use for out-of-tree builds.
Since: 3.32
const gchar *
ide_pipeline_get_srcdir (IdePipeline *self
);
Gets the "srcdir" of the project. This is equivalent to the IdeVcs:working-directory property as a string.
Since: 3.32
gchar *
ide_pipeline_get_message (IdePipeline *self
);
Gets the current message for the build pipeline. This can be shown to users in UI elements to signify progress in the build.
Since: 3.32
IdePipelinePhase
ide_pipeline_get_phase (IdePipeline *self
);
Gets the current phase that is executing. This is only useful during execution of the pipeline.
Since: 3.32
gboolean
ide_pipeline_get_can_export (IdePipeline *self
);
This function is useful to discover if there are any pipeline addins which implement the export phase. UI or GAction implementations may want to use this value to set the enabled state of the action or sensitivity of a button.
Since: 3.32
VtePty *
ide_pipeline_get_pty (IdePipeline *self
);
Gets the VtePty for the pipeline, if set.
This will not be set until the pipeline has been initialized. That is not guaranteed to happen at object creation time.
Since: 3.32
IdeSubprocessLauncher * ide_pipeline_create_launcher (IdePipeline *self
,GError **error
);
This is a convenience function to create a new IdeSubprocessLauncher using the configuration and runtime associated with the pipeline.
Since: 3.32
gchar * ide_pipeline_build_srcdir_path (IdePipeline *self
,const gchar *first_part
,...
);
This is a convenience function to create a new path that starts with the source directory of the project.
This is functionally equivalent to calling g_build_filename()
with the
working directory of the source tree.
Since: 3.32
gchar * ide_pipeline_build_builddir_path (IdePipeline *self
,const gchar *first_part
,...
);
This is a convenience function to create a new path that starts with the build directory for this build configuration.
This is functionally equivalent to calling g_build_filename()
with the
result of ide_pipeline_get_builddir()
as the first parameter.
Since: 3.32
void ide_pipeline_invalidate_phase (IdePipeline *self
,IdePipelinePhase phases
);
Invalidates the phases matching phases
flags.
If the requested phases include the phases invalidated here, the next execution of the pipeline will build thse phases.
This should be used by plugins to ensure a particular phase is re-buildd
upon discovering its state is no longer valid. Such an example might be
invalidating the IDE_PIPELINE_PHASE_AUTOGEN
phase when the an autotools
projects autogen.sh file has been changed.
Since: 3.32
gboolean ide_pipeline_request_phase (IdePipeline *self
,IdePipelinePhase phase
);
Requests that the next execution of the pipeline will build up to phase
including all stages that were previously invalidated.
Since: 3.32
guint ide_pipeline_attach (IdePipeline *self
,IdePipelinePhase phase
,gint priority
,IdePipelineStage *stage
);
Insert stage
into the pipeline as part of the phase denoted by phase
.
If priority is non-zero, it will be used to sort the stage among other stages that are part of the same phase.
self |
an IdePipeline |
|
phase |
||
priority |
an optional priority for sorting within the phase |
|
stage |
Since: 3.32
guint ide_pipeline_attach_launcher (IdePipeline *self
,IdePipelinePhase phase
,gint priority
,IdeSubprocessLauncher *launcher
);
This creates a new stage that will spawn a process using launcher
and log
the output of stdin/stdout.
It is a programmer error to modify launcher
after passing it to this
function.
self |
an IdePipeline |
|
phase |
||
priority |
an optional priority for sorting within the phase |
|
launcher |
Since: 3.32
void ide_pipeline_detach (IdePipeline *self
,guint stage_id
);
This removes the stage matching stage_id
. You are returned a stage_id
when
inserting a stage with functions such as ide_pipeline_attach()
or ide_pipeline_attach_launcher()
.
Plugins should use this function to remove their stages when the plugin is unloading.
Since: 3.32
IdePipelineStage * ide_pipeline_get_stage_by_id (IdePipeline *self
,guint stage_id
);
Gets the stage matching the identifier stage_id
as returned from
ide_pipeline_attach()
.
Since: 3.32
guint ide_pipeline_add_log_observer (IdePipeline *self
,IdeBuildLogObserver observer
,gpointer observer_data
,GDestroyNotify observer_data_destroy
);
gboolean ide_pipeline_remove_log_observer (IdePipeline *self
,guint observer_id
);
void ide_pipeline_emit_diagnostic (IdePipeline *self
,IdeDiagnostic *diagnostic
);
guint ide_pipeline_add_error_format (IdePipeline *self
,const gchar *regex
,GRegexCompileFlags flags
);
This can be used to add a regex that will extract errors from standard output. This is similar to the "errorformat" feature of vim to extract warnings from standard output.
The regex should used named capture groups to pass information to the extraction process.
Supported group names are:
• filename (a string path) • line (an integer) • column (an integer) • level (a string) • message (a string)
For example, to extract warnings from GCC you might do something like the following:
"(?<filename>[a-zA-Z0-9\-\.\/_]+):" "(?<line>\d+):" "(?<column>\d+): " "(?<level>[\w\s]+): " "(?<message>.*)"
To remove the regex, use the ide_pipeline_remove_error_format()
function with the resulting format id returned from this function.
The resulting format id will be > 0 if successful.
Since: 3.32
gboolean ide_pipeline_remove_error_format (IdePipeline *self
,guint error_format_id
);
Removes an error format that was registered with
ide_pipeline_add_error_format()
.
Since: 3.32
void ide_pipeline_build_async (IdePipeline *self
,IdePipelinePhase phase
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously starts the build pipeline.
The phase
parameter should contain the IdePipelinePhase that is
necessary to complete. If you simply want to trigger a generic
build, you probably want IDE_PIPELINE_PHASE_BUILD
. If you only
need to configure the project (and necessarily the dependencies
up to that phase) you might want IDE_PIPELINE_PHASE_CONFIGURE
.
You may not specify IDE_PIPELINE_PHASE_AFTER
or
IDE_PIPELINE_PHASE_BEFORE
flags as those must always be processed
with the underlying phase they are attached to.
Upon completion, callback
will be buildd and should call
ide_pipeline_build_finish()
to get the status of the
operation.
self |
A |
|
phase |
the requested build phase |
|
cancellable |
a GCancellable or |
[nullable] |
callback |
a callback to build upon completion |
|
user_data |
data for |
Since: 3.32
gboolean ide_pipeline_build_finish (IdePipeline *self
,GAsyncResult *result
,GError **error
);
This function completes the asynchronous request to build up to a particular phase of the build pipeline.
self |
An IdePipeline |
|
result |
a GAsyncResult provided to callback |
|
error |
A location for a GError, or |
TRUE
if the build stages were buildd successfully
up to the requested build phase provided to
ide_pipeline_build_async()
.
Since: 3.32
void ide_pipeline_build_targets_async (IdePipeline *self
,IdePipelinePhase phase
,GPtrArray *targets
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously starts the build pipeline.
The phase
parameter should contain the IdePipelinePhase that is
necessary to complete. If you simply want to trigger a generic
build, you probably want IDE_PIPELINE_PHASE_BUILD
. If you only
need to configure the project (and necessarily the dependencies
up to that phase) you might want IDE_PIPELINE_PHASE_CONFIGURE
.
You may not specify IDE_PIPELINE_PHASE_AFTER
or
IDE_PIPELINE_PHASE_BEFORE
flags as those must always be processed
with the underlying phase they are attached to.
Upon completion, callback
will be buildd and should call
ide_pipeline_build_finish()
to get the status of the
operation.
self |
A |
|
phase |
the requested build phase |
|
targets |
an optional array of IdeBuildTarget for the pipeline to build. |
[nullable][element-type IdeBuildTarget] |
cancellable |
a GCancellable or |
[nullable] |
callback |
a callback to build upon completion |
|
user_data |
data for |
Since: 3.32
gboolean ide_pipeline_build_targets_finish (IdePipeline *self
,GAsyncResult *result
,GError **error
);
This function completes the asynchronous request to build up to a particular phase and targets of the build pipeline.
self |
An IdePipeline |
|
result |
a GAsyncResult provided to callback |
|
error |
A location for a GError, or |
TRUE
if the build stages were buildd successfully
up to the requested build phase provided to
ide_pipeline_build_targets_async()
.
Since: 3.32
void ide_pipeline_foreach_stage (IdePipeline *self
,GFunc stage_callback
,gpointer user_data
);
This function will call stage_callback
for every IdePipelineStage registered
in the pipeline.
self |
An IdePipeline |
|
stage_callback |
A callback for each IdePipelineStage. |
[scope call] |
user_data |
user data for |
Since: 3.32
void ide_pipeline_clean_async (IdePipeline *self
,IdePipelinePhase phase
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
gboolean ide_pipeline_clean_finish (IdePipeline *self
,GAsyncResult *result
,GError **error
);
void ide_pipeline_rebuild_async (IdePipeline *self
,IdePipelinePhase phase
,GPtrArray *targets
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously starts the build pipeline after cleaning any existing build artifacts.
self |
A |
|
phase |
the requested build phase |
|
targets |
an array of
IdeBuildTarget or |
[element-type IdeBuildTarget][nullable] |
cancellable |
a GCancellable or |
[nullable] |
callback |
a callback to build upon completion |
|
user_data |
data for |
Since: 3.32
gboolean ide_pipeline_rebuild_finish (IdePipeline *self
,GAsyncResult *result
,GError **error
);
void ide_pipeline_attach_pty (IdePipeline *self
,IdeSubprocessLauncher *launcher
);
Attaches a PTY to stdin/stdout/stderr of the IdeSubprocessLauncher. This is useful if the application can take advantage of a PTY for features like colors and other escape sequences.
Since: 3.32
gboolean
ide_pipeline_has_configured (IdePipeline *self
);
Checks to see if the pipeline has advanced far enough to ensure that the configure stage has been reached.
Since: 3.32
IdePipelinePhase
ide_pipeline_get_requested_phase (IdePipeline *self
);
Gets the phase that has been requested. This can be useful when you want to get an idea of where the build pipeline will attempt to advance.
Since: 3.32
gboolean ide_pipeline_contains_program_in_path (IdePipeline *self
,const gchar *name
,GCancellable *cancellable
);
Looks through the runtime and SDK extensions for binaries matching
name
that may be executed.
Since: 3.34
#define IDE_PIPELINE_PHASE_WHENCE_MASK (IDE_PIPELINE_PHASE_BEFORE | IDE_PIPELINE_PHASE_AFTER)
“busy”
property “busy” gboolean
Gets the "busy" property. If TRUE
, the pipeline is busy executing.
Owner: IdePipeline
Flags: Read / Write
Default value: FALSE
Since: 3.32
“config”
property“config” IdeConfig *
Configuration.
Owner: IdePipeline
Flags: Read / Write / Construct Only
“device”
property“device” IdeDevice *
The "device" property is the device we are compiling for.
Owner: IdePipeline
Flags: Read / Write / Construct Only
Since: 3.32
“message”
property “message” char *
The "message" property is descriptive text about what the the pipeline is doing or it's readiness status.
Owner: IdePipeline
Flags: Read
Default value: NULL
Since: 3.32
“phase”
property“phase” IdePipelinePhase
The current build phase during execution of the pipeline.
Owner: IdePipeline
Flags: Read
Since: 3.32
“diagnostic”
signalvoid user_function (IdePipeline *self, IdeDiagnostic *diagnostic, gpointer user_data)
This signal is emitted when a plugin has detected a diagnostic while building the pipeline.
self |
An IdePipeline |
|
diagnostic |
The newly created diagnostic |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 3.32
“finished”
signalvoid user_function (IdePipeline *self, gboolean failed, gpointer user_data)
This signal is emitted when the build process has finished executing.
If the build failed to complete all requested stages, then failed
will
be set to TRUE
, otherwise FALSE
.
self |
An IdePipeline |
|
failed |
If the build was a failure |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 3.32
“launcher-created”
signalvoid user_function (IdePipeline *self, IdeSubprocessLauncher *launcher, gpointer user_data)
The "launcher-created" signal is emitted when a new IdeSubprocessLauncher is created by the pipeline. This may be useful to plugins that wan to modify the launcher in a consistent way for all pipeline consumers.
self |
an IdePipeline |
|
launcher |
||
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 3.34
“loaded”
signalvoid user_function (IdePipeline *idepipeline, gpointer user_data)
The "loaded" signal is emitted after the pipeline has finished loading addins.
Flags: Run Last
Since: 3.32
“started”
signalvoid user_function (IdePipeline *self, IdePipelinePhase phase, gpointer user_data)
This signal is emitted when the pipeline has started executing in
response to ide_pipeline_build_async()
being called.
self |
An IdePipeline |
|
phase |
the IdePipelinePhase for which we are advancing |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 3.32