Commit 0bf06c26 authored by Christian Hergert's avatar Christian Hergert
Browse files

Merge branch 'wip/chergert/pipeline-merge'

parents 516389b1 1578d0d1
[default]
name=Builder (Development)
device=local
runtime=org.gnome.Builder.json@c316fdc083822fd726db1bb38207d31ab63bd6aa
runtime=flatpak:org.gnome.Sdk/master/x86_64
config-opts=--enable-tracing --enable-debug --enable-hello-cpp-plugin
prefix=/app
app-id=org.gnome.Builder
......
......@@ -274,14 +274,13 @@ dnl ***********************************************************************
m4_include([plugins/autotools/configure.ac])
m4_include([plugins/autotools-templates/configure.ac])
m4_include([plugins/beautifier/configure.ac])
m4_include([plugins/build-tools/configure.ac])
m4_include([plugins/c-pack/configure.ac])
m4_include([plugins/cargo/configure.ac])
m4_include([plugins/clang/configure.ac])
m4_include([plugins/color-picker/configure.ac])
m4_include([plugins/cmake/configure.ac])
m4_include([plugins/command-bar/configure.ac])
m4_include([plugins/comment-code/configure.ac])
m4_include([plugins/contributing/configure.ac])
m4_include([plugins/create-project/configure.ac])
m4_include([plugins/ctags/configure.ac])
m4_include([plugins/devhelp/configure.ac])
......@@ -588,10 +587,10 @@ echo " Beautifier .......................... : ${enable_beautifier_plugin}"
echo " C Language Pack ...................... : ${enable_c_pack_plugin}"
echo " Cargo ................................ : ${enable_cargo_plugin}"
echo " Clang ................................ : ${enable_clang_plugin}"
echo " CMake ................................ : ${enable_cmake_plugin}"
echo " Color picker.......................... : ${enable_color_picker_plugin}"
echo " Command Bar .......................... : ${enable_command_bar_plugin}"
echo " Comment Code.......................... : ${enable_comment_code_plugin}"
echo " Contribute ........................... : ${enable_contributing_plugin}"
echo " Ctags ................................ : ${enable_ctags_plugin}"
echo " Devhelp .............................. : ${enable_devhelp_plugin}"
echo " Editorconfig ......................... : ${enable_editorconfig}"
......
......@@ -212,3 +212,89 @@ popover.transfers list row:first-child {
popover.transfers list row > box {
padding: 10px;
}
/*
buildpanel button.popup:active,
buildpanel button.popup:checked,
buildpanel button.popup {
background-image: none;
background-color: transparent;
box-shadow: none;
border-style: none;
margin: 0;
padding: 0;
}
*/
list.buildpanel row {
padding: 10px;
border-bottom: 1px solid alpha(@borders, 0.4);
}
list.buildpanel row:last-child {
border-bottom: none;
}
buildpanel list row {
padding: 6px;
border-bottom: 1px solid alpha(@borders, 0.4);
}
buildpanel list row:last-child {
border-bottom: none;
}
buildpanel list row label.file {
opacity: 0.5;
}
buildpanel box.build-status {
background: shade(@theme_bg_color, 0.96);
}
buildperspective list.sidebar row:selected button:hover {
border-color: transparent;
box-shadow: none;
background: transparent;
color: @theme_selected_fg_color;
opacity: 1;
}
buildperspective list.sidebar row:selected button,
buildperspective list.sidebar row:selected button:active {
opacity: 0.8;
}
buildperspective list.sidebar {
border-right: 1px solid alpha(@borders, 0.55);
}
configurationview list row {
padding: 10px;
border-bottom: 1px solid alpha(@borders, 0.4);
}
configurationview list row:last-child {
border-bottom: none;
}
configurationview list row entry {
background: transparent;
border: none;
padding: 0;
margin: 0;
}
/* hrmm, we can use this to get row separators */
buildpanel treeview,
configurationview treeview {
border-bottom: 1px solid alpha(@borders, 0.4);
}
buildpanel list > label {
font-weight: bold;
opacity: 0.55;
margin: 6px 10px 0px 10px;
}
......@@ -30,19 +30,23 @@ libide_1_0_la_public_headers = \
buffers/ide-buffer.h \
buffers/ide-unsaved-file.h \
buffers/ide-unsaved-files.h \
buildsystem/ide-build-command.h \
buildsystem/ide-build-command-queue.h \
buildconfig/ide-buildconfig-configuration.h \
buildconfig/ide-buildconfig-configuration-provider.h \
buildsystem/ide-build-log.h \
buildsystem/ide-build-manager.h \
buildsystem/ide-build-result-addin.h \
buildsystem/ide-build-result.h \
buildsystem/ide-build-pipeline.h \
buildsystem/ide-build-pipeline-addin.h \
buildsystem/ide-build-stage.h \
buildsystem/ide-build-stage-launcher.h \
buildsystem/ide-build-stage-mkdirs.h \
buildsystem/ide-build-stage-transfer.h \
buildsystem/ide-build-system.h \
buildsystem/ide-build-target.h \
buildsystem/ide-builder.h \
buildsystem/ide-configuration-manager.h \
buildsystem/ide-configuration.h \
buildsystem/ide-configuration-provider.h \
buildsystem/ide-environment-variable.h \
buildsystem/ide-environment.h \
buildsystem/ide-simple-builder.h \
devices/ide-device-manager.h \
devices/ide-device-provider.h \
devices/ide-device.h \
......@@ -149,6 +153,7 @@ libide_1_0_la_public_headers = \
transfers/ide-transfer-manager.h \
transfers/ide-transfer-row.h \
transfers/ide-transfer.h \
transfers/ide-transfer-button.h \
transfers/ide-transfers-button.h \
transfers/ide-transfers-progress-icon.h \
tree/ide-tree-builder.h \
......@@ -157,6 +162,7 @@ libide_1_0_la_public_headers = \
tree/ide-tree.h \
util/ide-cairo.h \
util/ide-dnd.h \
util/ide-directory-reaper.h \
util/ide-file-manager.h \
util/ide-flatpak.h \
util/ide-glib.h \
......@@ -198,19 +204,22 @@ libide_1_0_la_public_sources = \
buffers/ide-buffer.c \
buffers/ide-unsaved-file.c \
buffers/ide-unsaved-files.c \
buildsystem/ide-build-command.c \
buildsystem/ide-build-command-queue.c \
buildconfig/ide-buildconfig-configuration.c \
buildconfig/ide-buildconfig-configuration-provider.c \
buildsystem/ide-build-manager.c \
buildsystem/ide-build-result-addin.c \
buildsystem/ide-build-result.c \
buildsystem/ide-build-pipeline.c \
buildsystem/ide-build-pipeline-addin.c \
buildsystem/ide-build-stage.c \
buildsystem/ide-build-stage-launcher.c \
buildsystem/ide-build-stage-mkdirs.c \
buildsystem/ide-build-stage-transfer.c \
buildsystem/ide-build-system.c \
buildsystem/ide-build-target.c \
buildsystem/ide-builder.c \
buildsystem/ide-configuration-manager.c \
buildsystem/ide-configuration.c \
buildsystem/ide-configuration-provider.c \
buildsystem/ide-environment-variable.c \
buildsystem/ide-environment.c \
buildsystem/ide-simple-builder.c \
devices/ide-device-manager.c \
devices/ide-device-provider.c \
devices/ide-device.c \
......@@ -323,6 +332,7 @@ libide_1_0_la_public_sources = \
transfers/ide-transfer-manager.c \
transfers/ide-transfer-row.c \
transfers/ide-transfer.c \
transfers/ide-transfer-button.c \
transfers/ide-transfers-button.c \
transfers/ide-transfers-progress-icon.c \
tree/ide-tree-builder.c \
......@@ -330,6 +340,7 @@ libide_1_0_la_public_sources = \
tree/ide-tree.c \
util/ide-cairo.c \
util/ide-dnd.c \
util/ide-directory-reaper.c \
util/ide-file-manager.c \
util/ide-flatpak.c \
util/ide-glib.c \
......@@ -370,6 +381,31 @@ libide_1_0_la_SOURCES = \
application/ide-application-private.h \
application/ide-application-tests.c \
application/ide-application-tests.h \
buildconfig/ide-buildconfig-plugin.c \
buildconfig/ide-buildconfig-pipeline-addin.c \
buildconfig/ide-buildconfig-pipeline-addin.h \
buildsystem/ide-build-log.c \
buildsystem/ide-build-log-private.h \
buildsystem/ide-build-stage-private.h \
buildui/ide-build-configuration-row.c \
buildui/ide-build-configuration-row.h \
buildui/ide-build-configuration-view.c \
buildui/ide-build-configuration-view.h \
buildui/ide-build-log-panel.c \
buildui/ide-build-log-panel.h \
buildui/ide-build-panel.c \
buildui/ide-build-panel.h \
buildui/ide-build-perspective.c \
buildui/ide-build-perspective.h \
buildui/ide-build-plugin.c \
buildui/ide-build-tool.c \
buildui/ide-build-tool.h \
buildui/ide-build-workbench-addin.c \
buildui/ide-build-workbench-addin.h \
buildui/ide-environment-editor-row.c \
buildui/ide-environment-editor-row.h \
buildui/ide-environment-editor.c \
buildui/ide-environment-editor.h \
editor/ide-editor-frame-actions.c \
editor/ide-editor-frame-actions.h \
editor/ide-editor-frame-private.h \
......@@ -601,7 +637,8 @@ endif
glib_enum_headers = \
buffers/ide-buffer.h \
buildsystem/ide-build-result.h \
buildsystem/ide-build-log.h \
buildsystem/ide-build-pipeline.h \
devices/ide-device.h \
diagnostics/ide-diagnostic.h \
doap/ide-doap.h \
......
......@@ -64,6 +64,8 @@ struct _IdeApplication
GHashTable *plugin_settings;
GPtrArray *reapers;
guint disable_theme_tracking : 1;
};
......
......@@ -427,6 +427,17 @@ ide_application_shutdown (GApplication *application)
if (G_APPLICATION_CLASS (ide_application_parent_class)->shutdown)
G_APPLICATION_CLASS (ide_application_parent_class)->shutdown (application);
/* Run all reapers serially on shutdown */
for (guint i = 0; i < self->reapers->len; i++)
{
IdeDirectoryReaper *reaper = g_ptr_array_index (self->reapers, i);
g_assert (IDE_IS_DIRECTORY_REAPER (reaper));
ide_directory_reaper_execute (reaper, NULL, NULL);
}
}
static void
......@@ -469,6 +480,7 @@ ide_application_finalize (GObject *object)
g_clear_pointer (&self->merge_ids, g_hash_table_unref);
g_clear_pointer (&self->plugin_css, g_hash_table_unref);
g_clear_pointer (&self->plugin_settings, g_hash_table_unref);
g_clear_pointer (&self->reapers, g_ptr_array_unref);
g_clear_object (&self->worker_manager);
g_clear_object (&self->keybindings);
g_clear_object (&self->recent_projects);
......@@ -504,6 +516,8 @@ ide_application_init (IdeApplication *self)
{
ide_set_program_name (PACKAGE_NAME);
self->reapers = g_ptr_array_new_with_free_func (g_object_unref);
self->started_at = g_date_time_new_now_utc ();
self->mode = IDE_APPLICATION_MODE_PRIMARY;
......@@ -826,3 +840,13 @@ ide_application_get_main_thread (void)
{
return main_thread;
}
void
ide_application_add_reaper (IdeApplication *self,
IdeDirectoryReaper *reaper)
{
g_return_if_fail (IDE_IS_APPLICATION (self));
g_return_if_fail (IDE_IS_DIRECTORY_REAPER (reaper));
g_ptr_array_add (self->reapers, g_object_ref (reaper));
}
......@@ -22,6 +22,7 @@
#include <gtk/gtk.h>
#include "projects/ide-recent-projects.h"
#include "util/ide-directory-reaper.h"
G_BEGIN_DECLS
......@@ -58,6 +59,8 @@ GMenu *ide_application_get_menu_by_id (IdeApplication *
const gchar *id);
gboolean ide_application_open_project (IdeApplication *self,
GFile *file);
void ide_application_add_reaper (IdeApplication *self,
IdeDirectoryReaper *reaper);
G_END_DECLS
......
# BuildConfig
Once upon a time, Builder needed a simple format to track build configurations
so that we could build projects and associate the proper SDK/Runtime, configure
options, prefix, and other tweaks.
The format for this file was called ".buildconfig" following in the footsteps
of ".editorconfig" files.
It looked something like:
```
[default]
id = default
default = true
name = Default Configuration
prefix = /app
runtime = flatpak:org.gnome.Sdk
device = local
```
However, as we grew the configuration engine, we allowed configuration backends
so this format no longer became a requirement. Therefore, it was abstracted
into the buildconfig embedded plugin.
It continues to provide a simple configuration provider based on .buildconfig
files.
[Plugin]
Module=buildconfig
Name=Build config
Description=Configuration Provider for .buildconfig files
Authors=Christian Hergert <christian@hergert.me>
Copyright=Copyright © 2017 Christian Hergert
Builtin=true
Hidden=true
Embedded=ide_buildconfig_register_types
This diff is collapsed.
/* ide-autotools-builder.h
/* ide-buildconfig-configuration-provider.h
*
* Copyright (C) 2015 Christian Hergert <christian@hergert.me>
* Copyright (C) 2016 Matthew Leeds <mleeds@redhat.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -16,20 +16,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_AUTOTOOLS_BUILDER_H
#define IDE_AUTOTOOLS_BUILDER_H
#ifndef IDE_BUILDCONFIG_CONFIGURATION_PROVIDER_H
#define IDE_BUILDCONFIG_CONFIGURATION_PROVIDER_H
#include <ide.h>
#include <glib.h>
G_BEGIN_DECLS
#include "ide-types.h"
#define IDE_TYPE_AUTOTOOLS_BUILDER (ide_autotools_builder_get_type())
G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (IdeAutotoolsBuilder, ide_autotools_builder, IDE, AUTOTOOLS_BUILDER, IdeBuilder)
#define IDE_TYPE_BUILDCONFIG_CONFIGURATION_PROVIDER (ide_buildconfig_configuration_provider_get_type())
GFile *ide_autotools_builder_get_build_directory (IdeAutotoolsBuilder *self);
gboolean ide_autotools_builder_get_needs_bootstrap (IdeAutotoolsBuilder *self);
G_DECLARE_FINAL_TYPE (IdeBuildconfigConfigurationProvider, ide_buildconfig_configuration_provider, IDE, BUILDCONFIG_CONFIGURATION_PROVIDER, GObject)
G_END_DECLS
#endif /* IDE_AUTOTOOLS_BUILDER_H */
#endif /* IDE_BUILDCONFIG_CONFIGURATION_PROVIDER_H */
/* ide-buildconfig-configuration.c
*
* Copyright (C) 2017 Christian Hergert <chergert@redhat.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define G_LOG_DOMAIN "ide-buildconfig-configuration"
#include "buildconfig/ide-buildconfig-configuration.h"
struct _IdeBuildconfigConfiguration
{
IdeConfiguration parent_instance;
gchar **prebuild;
gchar **postbuild;
};
enum {
PROP_0,
PROP_PREBUILD,
PROP_POSTBUILD,
N_PROPS
};
G_DEFINE_TYPE (IdeBuildconfigConfiguration, ide_buildconfig_configuration, IDE_TYPE_CONFIGURATION)
static GParamSpec *properties [N_PROPS];
static void
ide_buildconfig_configuration_finalize (GObject *object)
{
IdeBuildconfigConfiguration *self = (IdeBuildconfigConfiguration *)object;
g_clear_pointer (&self->prebuild, g_strfreev);
g_clear_pointer (&self->postbuild, g_strfreev);
G_OBJECT_CLASS (ide_buildconfig_configuration_parent_class)->finalize (object);
}
static void
ide_buildconfig_configuration_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
IdeBuildconfigConfiguration *self = (IdeBuildconfigConfiguration *)object;
switch (prop_id)
{
case PROP_PREBUILD:
g_value_set_boxed (value, ide_buildconfig_configuration_get_prebuild (self));
break;
case PROP_POSTBUILD:
g_value_set_boxed (value, ide_buildconfig_configuration_get_postbuild (self));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static void
ide_buildconfig_configuration_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
IdeBuildconfigConfiguration *self = (IdeBuildconfigConfiguration *)object;
switch (prop_id)
{
case PROP_PREBUILD:
ide_buildconfig_configuration_set_prebuild (self, g_value_get_boxed (value));
break;
case PROP_POSTBUILD:
ide_buildconfig_configuration_set_postbuild (self, g_value_get_boxed (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static void
ide_buildconfig_configuration_class_init (IdeBuildconfigConfigurationClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = ide_buildconfig_configuration_finalize;
object_class->get_property = ide_buildconfig_configuration_get_property;
object_class->set_property = ide_buildconfig_configuration_set_property;
properties [PROP_PREBUILD] =
g_param_spec_boxed ("prebuild", NULL, NULL,
G_TYPE_STRV,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
properties [PROP_POSTBUILD] =
g_param_spec_boxed ("postbuild", NULL, NULL,
G_TYPE_STRV,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, N_PROPS, properties);
}
static void
ide_buildconfig_configuration_init (IdeBuildconfigConfiguration *self)
{
}
const gchar * const *
ide_buildconfig_configuration_get_prebuild (IdeBuildconfigConfiguration *self)
{
g_return_val_if_fail (IDE_IS_BUILDCONFIG_CONFIGURATION (self), NULL);
return (const gchar * const *)self->prebuild;
}
const gchar * const *
ide_buildconfig_configuration_get_postbuild (IdeBuildconfigConfiguration *self)
{
g_return_val_if_fail (IDE_IS_BUILDCONFIG_CONFIGURATION (self), NULL);
return (const gchar * const *)self->prebuild;
}
void
ide_buildconfig_configuration_set_prebuild (IdeBuildconfigConfiguration *self,
const gchar * const *prebuild)
{
g_return_if_fail (IDE_IS_BUILDCONFIG_CONFIGURATION (self));
if (self->prebuild != (gchar **)prebuild)
{
g_strfreev (self->prebuild);
self->prebuild = g_strdupv ((gchar **)prebuild);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_PREBUILD]);
}
}
void
ide_buildconfig_configuration_set_postbuild (IdeBuildconfigConfiguration *self,
const gchar * const *postbuild)
{
g_return_if_fail (IDE_IS_BUILDCONFIG_CONFIGURATION (self));
if (self->postbuild != (gchar **)postbuild)
{
g_strfreev (self->postbuild);
self->postbuild = g_strdupv ((gchar **)postbuild);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_POSTBUILD]);
}
}
/* ide-build-result-addin.h
/* ide-buildconfig-configuration.h
*
* Copyright (C) 2015 Christian Hergert <christian@hergert.me>
* Copyright (C) 2017 Christian Hergert <chergert@redhat.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -16,32 +16,24 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IDE_BUILD_RESULT_ADDIN_H
#define IDE_BUILD_RESULT_ADDIN_H
#ifndef IDE_BUILDCONFIG_CONFIGURATION_H
#define IDE_BUILDCONFIG_CONFIGURATION_H
#include "ide-build-result.h"
#include "buildsystem/ide-configuration.h"
G_BEGIN_DECLS
#define IDE_TYPE_BUILD_RESULT_ADDIN (ide_build_result_addin_get_type ())
#define IDE_TYPE_BUILDCONFIG_CONFIGURATION (ide_buildconfig_configuration_get_type())
G_DECLARE_INTERFACE (IdeBuildResultAddin, ide_build_result_addin, IDE, BUILD_RESULT_ADDIN, GObject)
G_DECLARE_FINAL_TYPE (IdeBuildconfigConfiguration, ide_buildconfig_configuration, IDE, BUILDCONFIG_CONFIGURATION, IdeConfiguration)
struct _IdeBuildResultAddinInterface
{
GTypeInterface parent;
void (*load) (IdeBuildResultAddin *self,
IdeBuildResult *result);
void (*unload) (IdeBuildResultAddin *self,
IdeBuildResult *result);
};
void ide_build_result_addin_load (IdeBuildResultAddin *self,
IdeBuildResult *result);
void ide_build_result_addin_unload (IdeBuildResultAddin *self,
IdeBuildResult *result);
const gchar * const *ide_buildconfig_configuration_get_prebuild (IdeBuildconfigConfiguration *self);