[gnome-games/wip/exalm/rebrand: 105/124] Remove plugin machinery




commit 8b1875c6e5c4ac60d1016c313ab10dbc82de0b92
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/config.vapi                        |  1 -
 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 +-------
 9 files changed, 2 insertions(+), 220 deletions(-)
---
diff --git a/meson.build b/meson.build
index a52cad35..7b4a1b08 100644
--- a/meson.build
+++ b/meson.build
@@ -60,7 +60,6 @@ localedir = prefix / get_option ('localedir')
 servicedir = datadir / 'dbus-1' / 'services'
 options_dir = datadir / meson.project_name() / 'options'
 system_dir = datadir / meson.project_name() / 'system'
-plugins_dir = libdir / meson.project_name() / 'plugins'
 
 config_h = configuration_data ()
 config_h.set_quoted ('APPLICATION_ID', application_id)
@@ -69,7 +68,6 @@ 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 ('SYSTEM_DIR', system_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))
 
@@ -98,9 +96,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/config.vapi b/src/config.vapi
index 50aa7036..284bbf4d 100644
--- a/src/config.vapi
+++ b/src/config.vapi
@@ -8,7 +8,6 @@ namespace Config {
        public const string NAME_SUFFIX;
        public const string OPTIONS_DIR;
        public const string SYSTEM_DIR;
-       public const string PLUGINS_DIR;
        public const string PROFILE;
        public const string VERSION;
 }
diff --git a/src/meson.build b/src/meson.build
index 802fb106..18e3fb2b 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',
@@ -299,21 +295,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 22991b8b..65986417 100644
--- a/src/ui/application.vala
+++ b/src/ui/application.vala
@@ -447,23 +447,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]