forked from Mirrors/flatpak-builder
builder: Add build_context_get_build_dir()
parent
393163200d
commit
e233705379
|
@ -41,6 +41,7 @@ struct BuilderContext {
|
||||||
|
|
||||||
GFile *download_dir;
|
GFile *download_dir;
|
||||||
GFile *state_dir;
|
GFile *state_dir;
|
||||||
|
GFile *build_dir;
|
||||||
GFile *cache_dir;
|
GFile *cache_dir;
|
||||||
GFile *ccache_dir;
|
GFile *ccache_dir;
|
||||||
|
|
||||||
|
@ -135,6 +136,7 @@ builder_context_constructed (GObject *object)
|
||||||
|
|
||||||
self->state_dir = g_file_get_child (self->base_dir, ".xdg-app-builder");
|
self->state_dir = g_file_get_child (self->base_dir, ".xdg-app-builder");
|
||||||
self->download_dir = g_file_get_child (self->state_dir, "downloads");
|
self->download_dir = g_file_get_child (self->state_dir, "downloads");
|
||||||
|
self->build_dir = g_file_get_child (self->state_dir, "build");
|
||||||
self->cache_dir = g_file_get_child (self->state_dir, "cache");
|
self->cache_dir = g_file_get_child (self->state_dir, "cache");
|
||||||
self->ccache_dir = g_file_get_child (self->state_dir, "ccache");
|
self->ccache_dir = g_file_get_child (self->state_dir, "ccache");
|
||||||
}
|
}
|
||||||
|
@ -200,6 +202,12 @@ builder_context_get_cache_dir (BuilderContext *self)
|
||||||
return self->cache_dir;
|
return self->cache_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GFile *
|
||||||
|
builder_context_get_build_dir (BuilderContext *self)
|
||||||
|
{
|
||||||
|
return self->build_dir;
|
||||||
|
}
|
||||||
|
|
||||||
GFile *
|
GFile *
|
||||||
builder_context_get_ccache_dir (BuilderContext *self)
|
builder_context_get_ccache_dir (BuilderContext *self)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,6 +39,7 @@ GFile * builder_context_get_app_dir (BuilderContext *self);
|
||||||
GFile * builder_context_get_base_dir (BuilderContext *self);
|
GFile * builder_context_get_base_dir (BuilderContext *self);
|
||||||
GFile * builder_context_get_state_dir (BuilderContext *self);
|
GFile * builder_context_get_state_dir (BuilderContext *self);
|
||||||
GFile * builder_context_get_cache_dir (BuilderContext *self);
|
GFile * builder_context_get_cache_dir (BuilderContext *self);
|
||||||
|
GFile * builder_context_get_build_dir (BuilderContext *self);
|
||||||
GFile * builder_context_get_ccache_dir (BuilderContext *self);
|
GFile * builder_context_get_ccache_dir (BuilderContext *self);
|
||||||
GFile * builder_context_get_download_dir (BuilderContext *self);
|
GFile * builder_context_get_download_dir (BuilderContext *self);
|
||||||
SoupSession * builder_context_get_soup_session (BuilderContext *self);
|
SoupSession * builder_context_get_soup_session (BuilderContext *self);
|
||||||
|
|
|
@ -749,7 +749,7 @@ builder_module_build (BuilderModule *self,
|
||||||
g_autoptr(GFile) configure_file = NULL;
|
g_autoptr(GFile) configure_file = NULL;
|
||||||
g_autoptr(GFile) cmake_file = NULL;
|
g_autoptr(GFile) cmake_file = NULL;
|
||||||
const char *makefile_names[] = {"Makefile", "makefile", "GNUmakefile", NULL};
|
const char *makefile_names[] = {"Makefile", "makefile", "GNUmakefile", NULL};
|
||||||
g_autoptr(GFile) build_parent_dir = NULL;
|
GFile *build_parent_dir = NULL;
|
||||||
g_autoptr(GFile) build_dir = NULL;
|
g_autoptr(GFile) build_dir = NULL;
|
||||||
g_autoptr(GFile) build_link = NULL;
|
g_autoptr(GFile) build_link = NULL;
|
||||||
g_autofree char *build_dir_relative = NULL;
|
g_autofree char *build_dir_relative = NULL;
|
||||||
|
@ -768,7 +768,7 @@ builder_module_build (BuilderModule *self,
|
||||||
g_autoptr(GError) my_error = NULL;
|
g_autoptr(GError) my_error = NULL;
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
build_parent_dir = g_file_get_child (builder_context_get_state_dir (context), "build");
|
build_parent_dir = builder_context_get_build_dir (context);
|
||||||
|
|
||||||
if (!gs_file_ensure_directory (build_parent_dir, TRUE,
|
if (!gs_file_ensure_directory (build_parent_dir, TRUE,
|
||||||
NULL, error))
|
NULL, error))
|
||||||
|
|
Loading…
Reference in New Issue