Function
Idefoundry_get_launcher_for_context
Declaration
IdeSubprocessLauncher*
ide_foundry_get_launcher_for_context (
IdeContext* context,
const char* program_name,
const char* bundled_program_path,
GError** error
)
Description
A helper to get a launcher for program
in the proper environment.
If available within the build environment, that will be used. Otherwise, either the host system or a bundled version of the program may be used as a fallback.
If the program could not be located, NULL
is returned and
error
is set.
Parameters
context
-
Type:
IdeContext
An
IdeContext
.The data is owned by the caller of the function. program_name
-
Type:
const char*
The basename of the program.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. bundled_program_path
-
Type:
const char*
The path to a bundled version of the program.
The argument can be NULL
.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. error
-
Type:
GError **
The return location for a recoverable error.
The argument can be NULL
.If the return location is not NULL
, then you must initialize it to aNULL
GError*
.The argument will be left initialized to NULL
by the function if there are no errors.In case of error, the argument will be set to a newly allocated GError
; the caller will take ownership of the data, and be responsible for freeing it.
Return value
Type: IdeSubprocessLauncher
A IdeSubprocessLauncher
or NULL
and
error
is set.
The caller of the function takes ownership of the data, and is responsible for freeing it. |