[gnome-builder/wip/chergert/gtk4: 2/2] build: minimal stub to get a gtk4 binary
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/gtk4: 2/2] build: minimal stub to get a gtk4 binary
- Date: Sun, 28 Mar 2021 16:39:26 +0000 (UTC)
commit 756d02a6bdd031740aba28344b5c3c20793ea6bb
Author: Christian Hergert <chergert redhat com>
Date: Sun Mar 28 09:39:17 2021 -0700
build: minimal stub to get a gtk4 binary
Obviously almost nothing is in this build, but it gets things started so
we can incrementally port libide libraries to GTK 4.
meson.build | 20 +++++------
src/libide/core/libide-core.h | 2 +-
src/libide/core/meson.build | 7 ++--
src/libide/gui/ide-application-plugins.c | 5 ++-
src/libide/meson.build | 40 ++++++++++-----------
src/main.c | 31 +++++++----------
src/meson.build | 60 +++++---------------------------
7 files changed, 57 insertions(+), 108 deletions(-)
---
diff --git a/meson.build b/meson.build
index 2091cea52..9ce5db0ea 100644
--- a/meson.build
+++ b/meson.build
@@ -254,26 +254,26 @@ ld_supports_version_script = cc.links('''
message('Linker supports --version-script: @0@'.format(ld_supports_version_script))
# Commonly used deps
-libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.37.0')
libglib_dep = dependency('glib-2.0', version: '>= 2.65.0')
libgio_dep = dependency('gio-2.0', version: '>= 2.61.2')
+libgobject_introspection_dep = dependency('gobject-introspection-1.0', version: '>= 1.68.0')
libgiounix_dep = dependency('gio-unix-2.0')
-libgtk_dep = dependency('gtk+-3.0', version: '>= 3.22.26')
-libgtksource_dep = dependency('gtksourceview-4', version: '>= 4.0.0')
+libgtk_dep = dependency('gtk4', version: '>= 4.1.2')
+libgtksource_dep = dependency('gtksourceview-5', version: '>= 5.0.0')
libjson_glib_dep = dependency('json-glib-1.0', version: '>= 1.2.0')
libjsonrpc_glib_dep = dependency('jsonrpc-glib-1.0', version: '>= 3.29.91')
libm_dep = cc.find_library('m', required: false)
libpangoft2_dep = dependency('pangoft2', version: '>= 1.38.0')
-libpeas_dep = dependency('libpeas-1.0', version: '>= 1.22.0')
+libpeas_dep = dependency('libpeas-1.0', version: '>= 1.30.0')
libportal_dep = dependency('libportal', version: '>= 0.3', required: false)
libtemplate_glib_dep = dependency('template-glib-1.0', version: '>= 3.28.0')
-libvte_dep = dependency('vte-2.91', version: '>= 0.40.2')
-libwebkit_dep = dependency('webkit2gtk-4.0', version: '>= 2.26', required: false)
+# libvte_dep = dependency('vte-2.91', version: '>= 0.40.2')
+# libwebkit_dep = dependency('webkit2gtk-4.0', version: '>= 2.26', required: false)
libxml2_dep = dependency('libxml-2.0', version: '>= 2.9.0')
-if libwebkit_dep.found()
- config_h.set10('HAVE_WEBKIT', 1)
-endif
+#if libwebkit_dep.found()
+# config_h.set10('HAVE_WEBKIT', 1)
+#endif
check_functions = [
# pty
@@ -295,7 +295,7 @@ endforeach
# to the SYSPROF_TRACE_FD. We use sysprof-4 instead since we will
# already have to link against that for the plugin.
#
-libsysprof_capture = dependency('sysprof-4', version: '>= 3.37.1', required: false)
+libsysprof_capture = dependency('sysprof-capture-4', version: '>= 3.40.0', required: false)
if libsysprof_capture.found()
config_h.set10('ENABLE_TRACING_SYSCAP', true)
endif
diff --git a/src/libide/core/libide-core.h b/src/libide/core/libide-core.h
index 85cb7a9a0..73fd7ce36 100644
--- a/src/libide/core/libide-core.h
+++ b/src/libide/core/libide-core.h
@@ -34,7 +34,7 @@
#include "ide-notifications.h"
#include "ide-object.h"
#include "ide-object-box.h"
-#include "ide-settings.h"
+//#include "ide-settings.h"
#include "ide-transfer.h"
#include "ide-transfer-manager.h"
#include "ide-version.h"
diff --git a/src/libide/core/meson.build b/src/libide/core/meson.build
index bb75cbf26..fb8146a5d 100644
--- a/src/libide/core/meson.build
+++ b/src/libide/core/meson.build
@@ -62,7 +62,7 @@ libide_core_public_headers = [
'ide-notifications.h',
'ide-object.h',
'ide-object-box.h',
- 'ide-settings.h',
+ # 'ide-settings.h',
'ide-transfer.h',
'ide-transfer-manager.h',
'ide-version-macros.h',
@@ -89,7 +89,7 @@ libide_core_public_sources = [
'ide-object.c',
'ide-object-box.c',
'ide-object-notify.c',
- 'ide-settings.c',
+ # 'ide-settings.c',
'ide-transfer.c',
'ide-transfer-manager.c',
]
@@ -105,7 +105,6 @@ libide_core_sources += libide_core_public_sources
libide_core_deps = [
libgio_dep,
libgtk_dep,
- libdazzle_dep,
libpeas_dep,
]
@@ -121,6 +120,8 @@ libide_core_dep = declare_dependency(
include_directories: include_directories('.'),
)
+gnome_builder_deps += [libide_core_dep]
+gnome_builder_static += [libide_core]
gnome_builder_public_sources += files(libide_core_public_sources)
gnome_builder_public_headers += files(libide_core_public_headers)
gnome_builder_private_headers += files(libide_core_private_headers)
diff --git a/src/libide/gui/ide-application-plugins.c b/src/libide/gui/ide-application-plugins.c
index 4a410fbeb..bf7b217b0 100644
--- a/src/libide/gui/ide-application-plugins.c
+++ b/src/libide/gui/ide-application-plugins.c
@@ -408,11 +408,10 @@ _ide_application_load_plugins (IdeApplication *self)
* the process space.
*/
g_irepository_prepend_search_path (PACKAGE_LIBDIR"/gnome-builder/girepository-1.0");
- if (!g_irepository_require (NULL, "GtkSource", "4", 0, &error) ||
+ if (!g_irepository_require (NULL, "GtkSource", "5", 0, &error) ||
!g_irepository_require (NULL, "Gio", "2.0", 0, &error) ||
!g_irepository_require (NULL, "GLib", "2.0", 0, &error) ||
- !g_irepository_require (NULL, "Gtk", "3.0", 0, &error) ||
- !g_irepository_require (NULL, "Dazzle", "1.0", 0, &error) ||
+ !g_irepository_require (NULL, "Gtk", "4.0", 0, &error) ||
!g_irepository_require (NULL, "Jsonrpc", "1.0", 0, &error) ||
!g_irepository_require (NULL, "Template", "1.0", 0, &error) ||
#ifdef HAVE_WEBKIT
diff --git a/src/libide/meson.build b/src/libide/meson.build
index 7f5dff4f2..b96e0af13 100644
--- a/src/libide/meson.build
+++ b/src/libide/meson.build
@@ -3,27 +3,27 @@ libide_header_dir = join_paths(get_option('includedir'), libide_header_subdir)
libide_include_directories = []
subdir('core')
-subdir('plugins')
-subdir('threading')
-subdir('io')
-subdir('code')
-subdir('vcs')
-subdir('projects')
-subdir('search')
-subdir('foundry')
-subdir('debugger')
-subdir('themes')
-subdir('gui')
-subdir('terminal')
-subdir('sourceview')
-subdir('editor')
-subdir('lsp')
-subdir('greeter')
-if libwebkit_dep.found()
- subdir('webkit')
-endif
+# subdir('plugins')
+# subdir('threading')
+# subdir('io')
+# subdir('code')
+# subdir('vcs')
+# subdir('projects')
+# subdir('search')
+# subdir('foundry')
+# subdir('debugger')
+# subdir('themes')
+# subdir('gui')
+# subdir('terminal')
+# subdir('sourceview')
+# subdir('editor')
+# subdir('lsp')
+# subdir('greeter')
+# if libwebkit_dep.found()
+ # subdir('webkit')
+# endif
-subdir('tree')
+# subdir('tree')
py_installation = pymod.find_installation('python3')
py_installation.install_sources('Ide.py', subdir: 'gi' / 'overrides')
diff --git a/src/main.c b/src/main.c
index 072acb6a1..1a6dce2f3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -25,12 +25,6 @@
#include <girepository.h>
#include <glib/gi18n.h>
#include <gtksourceview/gtksource.h>
-#include <libide-core.h>
-#include <libide-code.h>
-#include <libide-editor.h>
-#include <libide-greeter.h>
-#include <libide-gui.h>
-#include <libide-threading.h>
#include <locale.h>
#ifdef ENABLE_TRACING_SYSCAP
# include <sysprof-capture.h>
@@ -38,10 +32,8 @@
#include <sched.h>
#include <unistd.h>
-#include "ide-application-private.h"
-#include "ide-thread-private.h"
-#include "ide-terminal-private.h"
-#include "ide-private.h"
+#include <libide-core.h>
+#include <ide-private.h>
#include "bug-buddy.h"
@@ -191,7 +183,7 @@ is_running_in_shell (void)
* that we are not running within a shell. Use that before checking any
* file-descriptors since it is more reliable.
*/
- if (ide_str_equal0 (shlvl, "0"))
+ if (g_strcmp0 (shlvl, "0") == 0)
return FALSE;
/* If stdin is not a TTY, then assume we have no access to communicate
@@ -211,7 +203,7 @@ main (gint argc,
g_autofree gchar *plugin = NULL;
g_autofree gchar *type = NULL;
g_autofree gchar *dbus_address = NULL;
- IdeApplication *app;
+ // IdeApplication *app;
const gchar *desktop;
gboolean standalone = FALSE;
int ret;
@@ -233,13 +225,6 @@ main (gint argc,
g_set_prgname (ide_get_program_name ());
g_set_application_name (_("Builder"));
-#if 0
- /* TODO: allow support for parallel nightly install */
-#ifdef DEVELOPMENT_BUILD
- ide_set_application_id ("org.gnome.Builder-Devel");
-#endif
-#endif
-
/* Early init of logging so that we get messages in a consistent
* format. If we deferred this to GApplication, we'd get them in
* multiple formats.
@@ -286,11 +271,18 @@ main (gint argc,
gtk_source_init ();
/* Initialize thread pools */
+#if 0
_ide_thread_pool_init (FALSE);
+#endif
/* Guess the user shell early */
+#if 0
_ide_guess_shell ();
+#endif
+ g_irepository_require (NULL, "Gtk", "4.0", 0, NULL);
+
+#if 0
app = _ide_application_new (standalone, type, plugin, dbus_address);
g_application_add_option_group (G_APPLICATION (app), g_irepository_get_option_group ());
ret = g_application_run (G_APPLICATION (app), argc, argv);
@@ -299,6 +291,7 @@ main (gint argc,
*/
g_object_run_dispose (G_OBJECT (app));
g_clear_object (&app);
+#endif
/* Flush any outstanding logs */
ide_log_shutdown ();
diff --git a/src/meson.build b/src/meson.build
index dac1e1611..ddd8d43f4 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -16,64 +16,20 @@ gnome_builder_gir_extra_args = ['--pkg-export=gnome-builder-1.0']
exe_link_args = []
exe_c_args = []
-subdir('gstyle')
-subdir('libide')
-subdir('tests')
-subdir('plugins')
-
gnome_builder_deps = [
libgio_dep,
libgiounix_dep,
- libdazzle_dep,
libgtk_dep,
-
- libide_code_dep,
- libide_core_dep,
- libide_debugger_dep,
- libide_editor_dep,
- libide_foundry_dep,
- libide_greeter_dep,
- libide_gui_dep,
- libide_io_dep,
- libide_lsp_dep,
- libide_plugins_dep,
- libide_projects_dep,
- libide_search_dep,
- libide_sourceview_dep,
- libide_terminal_dep,
- libide_themes_dep,
- libide_threading_dep,
- libide_vcs_dep,
- libide_tree_dep,
+ libgobject_introspection_dep,
+ libgtksource_dep,
]
-
gnome_builder_static = [
- libide_code,
- libide_core,
- libide_debugger,
- libide_editor,
- libide_foundry,
- libide_greeter,
- libide_gui,
- libide_io,
- libide_lsp,
- libide_plugins,
- libide_projects,
- libide_search,
- libide_sourceview,
- libide_terminal,
- libide_themes,
- libide_threading,
- libide_tree,
- libide_vcs,
-
- plugins,
]
-if libwebkit_dep.found()
- gnome_builder_deps += [libide_webkit_dep]
- gnome_builder_static += [libide_webkit]
-endif
+# subdir('gstyle')
+subdir('libide')
+# subdir('tests')
+# subdir('plugins')
if libsysprof_capture.found()
gnome_builder_deps += libsysprof_capture
@@ -100,7 +56,7 @@ pkgconfig.generate(
filebase: 'gnome-builder-@0@.@1@'.format(MAJOR_VERSION, MINOR_VERSION),
description: 'Contains the plugin container for Builder.',
install_dir: join_paths(pkglibdir, 'pkgconfig'),
- requires: [ 'gio-2.0', 'gio-unix-2.0', 'gtk+-3.0', 'gtksourceview-4', 'libdazzle-1.0', 'vte-2.91',
'template-glib-1.0', 'libpeas-1.0' ],
+ requires: [ 'gio-2.0', 'gio-unix-2.0', 'gtk4', 'gtksourceview-5', 'template-glib-1.0', 'libpeas-1.0' ],
)
libide_gir = gnome.generate_gir(gnome_builder,
@@ -112,7 +68,7 @@ libide_gir = gnome.generate_gir(gnome_builder,
namespace: 'Ide',
symbol_prefix: 'ide',
identifier_prefix: 'Ide',
- includes: [ 'Gio-2.0', 'Gtk-3.0', 'Dazzle-1.0', 'Peas-1.0', 'Vte-2.91', 'GtkSource-4',
'Template-1.0' ],
+ includes: [ 'Gio-2.0', 'Gtk-4.0', 'Peas-1.0', 'GtkSource-5', 'Template-1.0' ],
install: true,
install_dir_gir: pkggirdir,
install_dir_typelib: pkgtypelibdir,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]