[gnome-games/wip/exalm/rebrand: 87/102] Remove plugin machinery




commit 51a923b19703f388ade6a2f9968673a30a74c048
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Mar 30 21:23:07 2021 +0500

    Remove plugin machinery
    
    We don't have plugins anymore.

 meson.build                            |  5 --
 plugins/meson.build                    |  8 ----
 src/core/plugin-register-iterator.vala | 45 ------------------
 src/core/plugin-register.vala          | 33 --------------
 src/core/plugin-registrar.vala         | 83 ----------------------------------
 src/core/plugin.vala                   |  7 ---
 src/meson.build                        | 22 ---------
 src/ui/application.vala                | 18 +-------
 8 files changed, 2 insertions(+), 219 deletions(-)
---
diff --git a/meson.build b/meson.build
index 2c705519..a6826b75 100644
--- a/meson.build
+++ b/meson.build
@@ -59,7 +59,6 @@ libexecdir = prefix / get_option ('libexecdir')
 localedir = prefix / get_option ('localedir')
 servicedir = datadir / 'dbus-1' / 'services'
 options_dir = datadir / meson.project_name() / 'options'
-plugins_dir = libdir / meson.project_name() / 'plugins'
 
 config_h = configuration_data ()
 config_h.set_quoted ('APPLICATION_ID', application_id)
@@ -67,7 +66,6 @@ config_h.set_quoted ('GETTEXT_PACKAGE', meson.project_name ())
 config_h.set_quoted ('GNOMELOCALEDIR', localedir)
 config_h.set_quoted ('NAME_SUFFIX', name_suffix)
 config_h.set_quoted ('OPTIONS_DIR', options_dir)
-config_h.set_quoted ('PLUGINS_DIR', plugins_dir)
 config_h.set_quoted ('PROFILE', profile)
 config_h.set_quoted ('VERSION', '@0@@1@'.format (meson.project_version (), version_suffix))
 
@@ -96,9 +94,6 @@ meson.add_install_script (
   datadir
 )
 
-# FIXME 'plugins' have to be after 'src' as the plugins depend on the
-# produced VAPI file and dependency tracking doesn't work as expected.
 subdir ('data')
 subdir ('po')
 subdir ('src')
-subdir ('plugins')
diff --git a/src/meson.build b/src/meson.build
index b1b8763b..b311c0c4 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -37,10 +37,6 @@ vala_sources = [
   'core/media-set/media-set.vala',
   'core/media-set/media-set-error.vala',
   'core/migrator.vala',
-  'core/plugin.vala',
-  'core/plugin-register.vala',
-  'core/plugin-register-iterator.vala',
-  'core/plugin-registrar.vala',
   'core/runner.vala',
   'core/runner-error.vala',
   'core/snapshot.vala',
@@ -298,21 +294,3 @@ executable (
   install: true,
   install_dir: libexecdir
 )
-
-plugin_dependencies = [
-  archive_dep,
-  gio_dep,
-  glib_dep,
-  gtk_dep,
-  retro_gtk_dep,
-  soup_dep,
-  tracker_sparql_dep,
-
-  event_codes_dep,
-]
-
-gnome_games_dep = declare_dependency (
-  dependencies: plugin_dependencies,
-  link_with: gnome_games_exec,
-  include_directories: srcinc
-)
diff --git a/src/ui/application.vala b/src/ui/application.vala
index 177fccb4..a302041c 100644
--- a/src/ui/application.vala
+++ b/src/ui/application.vala
@@ -438,23 +438,9 @@ public class Games.Application : Gtk.Application {
                        game_collection.add_source (tracker_uri_source);
 
                var platform_register = PlatformRegister.get_register ();
-
-               /* Register game types from the plugins */
-               var register = PluginRegister.get_register ();
-               foreach (var plugin_registrar in register) {
-                       try {
-                               var plugin = plugin_registrar.get_plugin ();
-
-                               foreach (var platform in plugin.get_platforms ())
-                                       platform_register.add_platform (platform);
-                       }
-                       catch (Error e) {
-                               debug ("Error: %s", e.message);
-                       }
-               }
-
                var mime_types = new GenericSet<string> (str_hash, str_equal);
-               foreach (var platform in PlatformRegister.get_register ().get_all_platforms ()) {
+
+               foreach (var platform in platform_register.get_all_platforms ()) {
                        var factory = new UriGameFactory (platform);
                        game_collection.add_factory (factory);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]