flow: Promoted 'trunk' (22bf185b75f0) to 'feature/ruby-loader'.
--- a/.hgignore Wed Dec 10 01:29:25 2014 -0600
+++ b/.hgignore Mon Jun 29 22:08:31 2015 -0500
@@ -1,6 +1,7 @@
--- a/CMakeLists.txt Wed Dec 10 01:29:25 2014 -0600
+++ b/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
@@ -11,6 +11,14 @@
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Compatibility)
endif(${CMAKE_VERSION} VERSION_LESS "2.8.3")
+if(${CMAKE_VERSION} VERSION_GREATER "3.0.0") + # allow reading of the LOCATION property + cmake_policy(SET CMP0026 OLD) + # don't force target names to match a pattern + cmake_policy(SET CMP0037 OLD) +endif(${CMAKE_VERSION} VERSION_GREATER "3.0.0") ###############################################################################
###############################################################################
@@ -18,7 +26,7 @@
set(GPLUGIN_MAJOR_VERSION 0)
set(GPLUGIN_MINOR_VERSION 0)
-set(GPLUGIN_MICRO_VERSION 17)
+set(GPLUGIN_MICRO_VERSION 22) set(GPLUGIN_EXTRA_VERSION dev)
set(GPLUGIN_VERSION ${GPLUGIN_MAJOR_VERSION}.${GPLUGIN_MINOR_VERSION}.${GPLUGIN_MICRO_VERSION}${GPLUGIN_EXTRA_VERSION})
@@ -84,6 +92,7 @@
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/sw/lib/pkgconfig:/opt/local/lib/pkgconfig")
include(PkgConfigVariable)
@@ -142,7 +151,8 @@
-DPREFIX="${CMAKE_INSTALL_PREFIX}"
- -DGPLUGIN_WEBSITE="http://bitbucket.org/rw_grim/gplugin/"
+ -DLIBDIR="${CMAKE_INSTALL_LIBDIR}" + -DGPLUGIN_WEBSITE="http://bitbucket.org/gplugin/main" @@ -181,16 +191,44 @@
add_subdirectory(plugins)
###############################################################################
###############################################################################
-install(FILES ChangeLog INSTALL README HACKING DESTINATION share/doc/gplugin)
+install(FILES ChangeLog INSTALL README HACKING DESTINATION ${CMAKE_INSTALL_DOCDIR}) +############################################################################### +############################################################################### + gplugin-${GPLUGIN_VERSION}.tar.bz2 + gplugin-${GPLUGIN_VERSION}.tar.gz + gplugin-${GPLUGIN_VERSION}.zip +foreach(ARCHIVE ${ARCHIVES}) + COMMAND hg archive ${ARCHIVE} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMAND gpg --yes -abs ${ARCHIVE} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + list(APPEND SIGNATURES ${ARCHIVE}.asc) +add_custom_target(dist DEPENDS ${ARCHIVES} ${SIGNATURES}) --- a/ChangeLog Wed Dec 10 01:29:25 2014 -0600
+++ b/ChangeLog Mon Jun 29 22:08:31 2015 -0500
@@ -1,4 +1,28 @@
+ * Use the GNUInstallDirs cmake module to install everything to the correct + locations. - Elliott Sales de Andrade + * Added -L, --list option to gplugin-query to show the search paths it is + * Added an option to toggle whether or not the moonscript tests are run. + * Fixed the lua dependency checks for Fedora 20 + * Fixed the build on cmake<3.0.0 + * Add debug packages to the Debian packaging + * Add libgplugin-loaders package to the Debian packaging + * Removed the Seed JavaScript loader (issue #63) + * Removed the GNOME JavaScript loader (issue #64) + * Fixed crash in gplugin-gtk-viewer (issue #25) + * Add a dist target to build and sign source archives * Finished the gjs loader.
* Created the Debian packaging.
--- a/HACKING Wed Dec 10 01:29:25 2014 -0600
+++ b/HACKING Mon Jun 29 22:08:31 2015 -0500
@@ -7,7 +7,7 @@
fixes. When a release is deemed done, it's merged back into develop and into
default. hgflow takes care of all of this for us.
-To add a feature please fork https://bitbucket.org/rw_grim/gplugin. Then clone
+To add a feature please fork https://bitbucket.org/gplugin/main. Then clone your fork. Once you have your fork cloned and hgflow setup and installed, type
hg flow feature start $NAME_OF_YOUR_FEATURE$
--- a/INSTALL Wed Dec 10 01:29:25 2014 -0600
+++ b/INSTALL Mon Jun 29 22:08:31 2015 -0500
@@ -5,13 +5,13 @@
gobject-introspection, libgirepository1.0-dev
A full build (enabled by default) depends on the following:
python3-dev, python-gi-dev, python3-gi
All of these packages and their development headers need to be installed
@@ -19,7 +19,7 @@
-GPlugin uses CMake (http://www.cmake.org) as it's build system. As such
+GPlugin uses CMake (http://www.cmake.org) as its build system. As such compiling is a little bit different than your typical ./configure, make,
sudo make install. But luckily for you, not too much different.
--- a/cmake/Modules/GObjectIntrospection.cmake Wed Dec 10 01:29:25 2014 -0600
+++ b/cmake/Modules/GObjectIntrospection.cmake Mon Jun 29 22:08:31 2015 -0500
@@ -47,8 +47,8 @@
_pkg_config_variable(girdir GIR_GIRDIR)
_pkg_config_variable(typelibdir GIR_TYPELIBDIR)
- set(GIR_GIRDIR "${CMAKE_INSTALL_PREFIX}/share/gir-1.0")
- set(GIR_TYPELIBDIR "${CMAKE_INSTALL_PREFIX}/lib/girepository-1.0")
+ set(GIR_GIRDIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/gir-1.0") + set(GIR_TYPELIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}/girepository-1.0") ###############################################################################
--- a/gjs/CMakeLists.txt Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
- "Whether or not to build the GJS JavaScript plugin loader"
- set(GPLUGIN_GJS_SOURCES
- set(GPLUGIN_GJS_HEADERS
- pkg_check_modules(GJS REQUIRED gjs-1.0>=1.32.0)
- add_library(gplugin-gjs MODULE
- set_target_properties(gplugin-gjs PROPERTIES PREFIX "")
- include_directories(${GJS_INCLUDE_DIRS})
- target_link_libraries(gplugin-gjs
- install(TARGETS gplugin-gjs DESTINATION lib/gplugin)
- add_subdirectory(tests)
--- a/gjs/gplugin-gjs-core.c Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#include <gplugin-native.h>
-#include "gplugin-gjs-loader.h"
-#include "gplugin-gjs-plugin.h"
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(GPLUGIN_UNUSED GError **error) {
- const gchar * const authors[] = {
- "Gary Kramlich <grim@reaperworld.com>",
- return gplugin_plugin_info_new(
- GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
- "name", "Gjs JavaScript Plugin Loader",
- "version", GPLUGIN_VERSION,
- "summary", "A plugin that can load Gjs JavaScript plugins",
- "description", "This plugin allows the loading of plugins written in "
- "website", GPLUGIN_WEBSITE,
-G_MODULE_EXPORT gboolean
-gplugin_load(GPluginNativePlugin *plugin,
- GPLUGIN_UNUSED GError **error)
- gplugin_gjs_loader_register(plugin);
- gplugin_gjs_plugin_register(plugin);
- gplugin_manager_register_loader(gplugin_gjs_loader_get_type());
-G_MODULE_EXPORT gboolean
-gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
- GPLUGIN_UNUSED GError **error)
--- a/gjs/gplugin-gjs-loader.c Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#include "gplugin-gjs-loader.h"
-#include "gplugin-gjs-plugin.h"
-#include <gjs/gjs-module.h>
-/******************************************************************************
- *****************************************************************************/
-static GObjectClass *parent_class = NULL;
-static GType type_real = 0;
-/******************************************************************************
- *****************************************************************************/
-gplugin_gjs_loader_find_function(JSContext *jsctx, JSObject *parent,
- const gchar *name, GError **error)
- if(!JS_GetProperty(jsctx, parent, name, &value)) {
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- "Failed to find the function '%s'", name);
- if(!JSVAL_IS_OBJECT(value) || JSVAL_IS_NULL(value)) {
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- "'%s' is not a function", name);
- return JS_ValueToFunction(jsctx, value);
-/******************************************************************************
- * GPluginLoaderInterface API
- *****************************************************************************/
-gplugin_gjs_loader_class_supported_extensions(GPLUGIN_UNUSED const GPluginLoaderClass *klass) {
- return g_slist_append(NULL, "js");
-gplugin_gjs_loader_query(GPluginLoader *loader,
- GPluginPluginInfo *info = NULL;
- GjsContext *context = NULL;
- JSContext *jsctx = NULL;
- JSObject *global = NULL, *jsobj = NULL;
- JSFunction *query = NULL;
- context = gjs_context_new();
- if(!gjs_context_eval_file(context, filename, NULL, error)) {
- g_object_unref(G_OBJECT(context));
- jsctx = gjs_context_get_native_context(context);
- global = JS_GetGlobalObject(jsctx);
- /* find the query function */
- query = gplugin_gjs_loader_find_function(jsctx, global, "gplugin_query",
- g_object_unref(G_OBJECT(context));
- /* now call the query function */
- if(!JS_CallFunction(jsctx, global, query, 0, NULL, &value)) {
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- "Failed to call the query function");
- g_object_unref(G_OBJECT(context));
- /* now grab the plugin info */
- if(!JS_ValueToObject(jsctx, value, &jsobj)) {
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- "Query function did not return a GObject");
- g_object_unref(G_OBJECT(context));
- gobj = gjs_g_object_from_object(jsctx, jsobj);
- if(!GPLUGIN_IS_PLUGIN_INFO(gobj)) {
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- "Query function did not return a "
- "GPluginPluginInfo object");
- g_object_unref(G_OBJECT(context));
- info = GPLUGIN_PLUGIN_INFO(gobj);
- return g_object_new(GPLUGIN_TYPE_GJS_PLUGIN,
-gplugin_gjs_loader_load_unload(GPLUGIN_UNUSED GPluginLoader *loader,
- GPLUGIN_UNUSED GError **error)
- JSContext *jsctx = NULL;
- JSFunction *func = NULL;
- JSObject *global = NULL, *js_plugin = NULL;
- const gchar *func_name = (load) ? "gplugin_load" : "gplugin_unload";
- gchar *filename = NULL;
- g_object_get(G_OBJECT(plugin),
- func = gplugin_gjs_loader_find_function(jsctx, global, func_name, error);
- js_plugin = gjs_object_from_g_object(jsctx, G_OBJECT(plugin));
- args[0] = OBJECT_TO_JSVAL(js_plugin);
- if(!JS_CallFunction(jsctx, global, func, 1, args, &rval)) {
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- (load) ? "load" : "unload", filename);
- ret = JSVAL_TO_BOOLEAN(rval);
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- (load) ? "load" : "unload", filename);
-gplugin_gjs_loader_load(GPluginLoader *loader, GPluginPlugin *plugin,
- return gplugin_gjs_loader_load_unload(loader, plugin, TRUE, error);
-gplugin_gjs_loader_unload(GPluginLoader *loader, GPluginPlugin *plugin,
- return gplugin_gjs_loader_load_unload(loader, plugin, FALSE, error);
-/******************************************************************************
- *****************************************************************************/
-gplugin_gjs_loader_class_init(GPluginGjsLoaderClass *klass) {
- GPluginLoaderClass *loader_class = GPLUGIN_LOADER_CLASS(klass);
- parent_class = g_type_class_peek_parent(klass);
- loader_class->supported_extensions =
- gplugin_gjs_loader_class_supported_extensions;
- loader_class->query = gplugin_gjs_loader_query;
- loader_class->load = gplugin_gjs_loader_load;
- loader_class->unload = gplugin_gjs_loader_unload;
-/******************************************************************************
- *****************************************************************************/
-gplugin_gjs_loader_register(GPluginNativePlugin *plugin) {
- if(g_once_init_enter(&type_real)) {
- static const GTypeInfo info = {
- .class_size = sizeof(GPluginGjsLoaderClass),
- .class_init = (GClassInitFunc)gplugin_gjs_loader_class_init,
- .instance_size = sizeof(GPluginGjsLoader),
- type = gplugin_native_plugin_register_type(plugin,
- g_once_init_leave(&type_real, type);
-gplugin_gjs_loader_get_type(void) {
- if(G_UNLIKELY(type_real == 0)) {
- g_warning("gplugin_gjs_loader_get_type was called before "
- "the type was registered!\n");
--- a/gjs/gplugin-gjs-loader.h Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#ifndef GPLUGIN_GJS_LOADER_H
-#define GPLUGIN_GJS_LOADER_H
-#define GPLUGIN_TYPE_GJS_LOADER (gplugin_gjs_loader_get_type())
-#define GPLUGIN_GJS_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GPLUGIN_TYPE_GJS_LOADER, GPluginGjsLoader))
-#define GPLUGIN_GJS_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((obj), GPLUGIN_TYPE_GJS_LOADER, GPluginGjsLoaderClass))
-#define GPLUGIN_IS_GJS_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPLUGIN_TYPE_GJS_LOADER))
-#define GPLUGIN_IS_GJS_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((obj), GPLUGIN_TYPE_GJS_LOADER))
-#define GPLUGIN_GJS_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GPLUGIN_TYPE_GJS_LOADER, GPluginGjsLoaderClass))
-typedef struct _GPluginGjsLoader GPluginGjsLoader;
-typedef struct _GPluginGjsLoaderClass GPluginGjsLoaderClass;
-#include <gplugin-native.h>
-struct _GPluginGjsLoader {
- void (*_gplugin_reserved_1)(void);
- void (*_gplugin_reserved_2)(void);
- void (*_gplugin_reserved_3)(void);
- void (*_gplugin_reserved_4)(void);
-struct _GPluginGjsLoaderClass {
- GPluginLoaderClass parent;
- void (*_gplugin_reserved_1)(void);
- void (*_gplugin_reserved_2)(void);
- void (*_gplugin_reserved_3)(void);
- void (*_gplugin_reserved_4)(void);
-void gplugin_gjs_loader_register(GPluginNativePlugin *plugin);
-GType gplugin_gjs_loader_get_type(void);
-#endif /* GPLUGIN_GJS_LOADER_H */
--- a/gjs/gplugin-gjs-plugin.c Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#include "gplugin-gjs-plugin.h"
-#define GPLUGIN_GJS_PLUGIN_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE((obj), GPLUGIN_TYPE_GJS_PLUGIN, GPluginGjsPluginPrivate))
-/******************************************************************************
- *****************************************************************************/
-} GPluginGjsPluginPrivate;
-/******************************************************************************
- *****************************************************************************/
-/******************************************************************************
- *****************************************************************************/
-static GObjectClass *parent_class = NULL;
-static GType type_real = 0;
-/******************************************************************************
- *****************************************************************************/
-gplugin_gjs_plugin_set_context(GPluginGjsPlugin *plugin, GjsContext *context) {
- GPluginGjsPluginPrivate *priv = GPLUGIN_GJS_PLUGIN_GET_PRIVATE(plugin);
- g_object_unref(G_OBJECT(priv->context));
- priv->context = GJS_IS_CONTEXT(context) ? g_object_ref(G_OBJECT(context)) :
-gplugin_gjs_plugin_set_global_scope(GPluginGjsPlugin *plugin, JSObject *global) {
- GPluginGjsPluginPrivate *priv = GPLUGIN_GJS_PLUGIN_GET_PRIVATE(plugin);
-gplugin_gjs_plugin_set_js_context(GPluginGjsPlugin *plugin, JSContext *jsctx) {
- GPluginGjsPluginPrivate *priv = GPLUGIN_GJS_PLUGIN_GET_PRIVATE(plugin);
- priv->js_context = jsctx;
-/******************************************************************************
- *****************************************************************************/
-gplugin_gjs_plugin_get_property(GObject *obj, guint param_id, GValue *value,
- GPluginGjsPlugin *plugin = GPLUGIN_GJS_PLUGIN(obj);
- g_value_set_object(value, gplugin_gjs_plugin_get_context(plugin));
- g_value_set_pointer(value,
- gplugin_gjs_plugin_get_global_scope(plugin));
- g_value_set_pointer(value,
- gplugin_gjs_plugin_get_js_context(plugin));
- G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
-gplugin_gjs_plugin_set_property(GObject *obj, guint param_id,
- const GValue *value, GParamSpec *pspec)
- GPluginGjsPlugin *plugin = GPLUGIN_GJS_PLUGIN(obj);
- gplugin_gjs_plugin_set_context(plugin, g_value_get_object(value));
- gplugin_gjs_plugin_set_global_scope(plugin,
- g_value_get_pointer(value));
- gplugin_gjs_plugin_set_js_context(plugin,
- g_value_get_pointer(value));
- G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
-gplugin_gjs_plugin_finalize(GObject *obj) {
- GPluginGjsPluginPrivate *priv = GPLUGIN_GJS_PLUGIN_GET_PRIVATE(obj);
- g_object_unref(G_OBJECT(priv->context));
- G_OBJECT_CLASS(parent_class)->finalize(obj);
-gplugin_gjs_plugin_class_init(GPluginGjsPluginClass *klass) {
- GObjectClass *obj_class = G_OBJECT_CLASS(klass);
- parent_class = g_type_class_peek_parent(klass);
- g_type_class_add_private(klass, sizeof(GPluginGjsPluginPrivate));
- obj_class->get_property = gplugin_gjs_plugin_get_property;
- obj_class->set_property = gplugin_gjs_plugin_set_property;
- obj_class->finalize = gplugin_gjs_plugin_finalize;
- g_object_class_install_property(obj_class, PROP_CONTEXT,
- g_param_spec_object("context", "context",
- "The Gjs Context for this plugin",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_STATIC_STRINGS));
- g_object_class_install_property(obj_class, PROP_GLOBAL,
- g_param_spec_pointer("global", "global",
- "The global scope for this plugin",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_STATIC_STRINGS));
- g_object_class_install_property(obj_class, PROP_JS_CONTEXT,
- g_param_spec_pointer("js-context", "js-context",
- "The JSContext function for this plugin",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_STATIC_STRINGS));
-/******************************************************************************
- *****************************************************************************/
-gplugin_gjs_plugin_register(GPluginNativePlugin *plugin) {
- if(g_once_init_enter(&type_real)) {
- static const GTypeInfo info = {
- .class_size = sizeof(GPluginGjsPluginClass),
- .class_init = (GClassInitFunc)gplugin_gjs_plugin_class_init,
- .instance_size = sizeof(GPluginGjsPlugin),
- type = gplugin_native_plugin_register_type(plugin,
- g_once_init_leave(&type_real, type);
-gplugin_gjs_plugin_get_type(void) {
- if(G_UNLIKELY(type_real == 0)) {
- g_warning("gplugin_gjs_plugin_get_type was called before "
- "the type was registered!\n");
-gplugin_gjs_plugin_get_context(const GPluginGjsPlugin *plugin) {
- GPluginGjsPluginPrivate *priv = NULL;
- g_return_val_if_fail(GPLUGIN_IS_GJS_PLUGIN(plugin), NULL);
- priv = GPLUGIN_GJS_PLUGIN_GET_PRIVATE(plugin);
-gplugin_gjs_plugin_get_global_scope(const GPluginGjsPlugin *plugin) {
- GPluginGjsPluginPrivate *priv = NULL;
- g_return_val_if_fail(GPLUGIN_IS_GJS_PLUGIN(plugin), NULL);
- priv = GPLUGIN_GJS_PLUGIN_GET_PRIVATE(plugin);
-gplugin_gjs_plugin_get_js_context(const GPluginGjsPlugin *plugin) {
- GPluginGjsPluginPrivate *priv = NULL;
- g_return_val_if_fail(GPLUGIN_IS_GJS_PLUGIN(plugin), NULL);
- priv = GPLUGIN_GJS_PLUGIN_GET_PRIVATE(plugin);
- return priv->js_context;
--- a/gjs/gplugin-gjs-plugin.h Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#ifndef GPLUGIN_GJS_PLUGIN_H
-#define GPLUGIN_GJS_PLUGIN_H
-#define GPLUGIN_TYPE_GJS_PLUGIN (gplugin_gjs_plugin_get_type())
-#define GPLUGIN_GJS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GPLUGIN_TYPE_GJS_PLUGIN, GPluginGjsPlugin))
-#define GPLUGIN_GJS_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((obj), GPLUGIN_TYPE_GJS_PLUGIN, GPluginGjsPluginClass))
-#define GPLUGIN_IS_GJS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPLUGIN_TYPE_GJS_PLUGIN))
-#define GPLUGIN_IS_GJS_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((obj), GPLUGIN_TYPE_GJS_PLUGIN))
-#define GPLUGIN_GJS_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GPLUGIN_TYPE_GJS_PLUGIN, GPluginGjsPluginClass))
-typedef struct _GPluginGjsPlugin GPluginGjsPlugin;
-typedef struct _GPluginGjsPluginClass GPluginGjsPluginClass;
-#include <gplugin-native.h>
-#include <gjs/gjs-module.h>
-struct _GPluginGjsPlugin {
-struct _GPluginGjsPluginClass {
- GPluginPluginClass parent;
- void (*_gplugin_reserved_1)(void);
- void (*_gplugin_reserved_2)(void);
- void (*_gplugin_reserved_3)(void);
- void (*_gplugin_reserved_4)(void);
-void gplugin_gjs_plugin_register(GPluginNativePlugin *plugin);
-GType gplugin_gjs_plugin_get_type(void);
-GjsContext *gplugin_gjs_plugin_get_context(const GPluginGjsPlugin *plugin);
-JSObject *gplugin_gjs_plugin_get_global_scope(const GPluginGjsPlugin *plugin);
-JSContext *gplugin_gjs_plugin_get_js_context(const GPluginGjsPlugin *plugin);
-#endif /* GPLUGIN_GJS_PLUGIN_H */
--- a/gjs/tests/CMakeLists.txt Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-macro(add_gjs_gtest target)
- add_executable(${target} ${target}.c)
- target_link_libraries(${target}
- ${GLIB_LIBRARIES} ${GJS_LIBRARIES} gplugin
- add_dependencies(${target} gplugin-gjs)
- get_target_property(_output_name ${target} RUNTIME_OUTPUT_NAME)
- if(NOT ${_output_name})
- get_target_property(_output_name ${target} LOCATION)
- endif(NOT ${_output_name})
- list(APPEND GJS_TESTS ${_output_name})
- -DGJS_LOADER_DIR="${CMAKE_BINARY_DIR}/gjs"
- -DGJS_PLUGIN_DIR="${CMAKE_CURRENT_SOURCE_DIR}/plugins"
-add_gjs_gtest(test-gjs-loader)
-target_link_libraries(test-gjs-loader gplugin-loader-tests)
-set(GTESTER_GJS_TESTS "${GJS_TESTS}")
-set(GTESTER_GJS_LOG "test-gplugin-gjs.xml")
-set(GTESTER_GJS_JUNIT "test-gplugin-gjs-junit.xml")
- COMMAND ${GTESTER} -k --verbose -o ${GTESTER_GJS_LOG} ${GJS_TESTS}
- OUTPUT ${GTESTER_GJS_LOG}
- DEPENDS gplugin gplugin-gjs
- ${GJS_TESTS} ${CMAKE_CURRENT_SOURCE_DIR}/plugins
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMAND ${XSLTPROC} -o ${GTESTER_GJS_JUNIT} --nonet
- ${CMAKE_SOURCE_DIR}/xsl/gtester-junit.xsl
- OUTPUT ${GTESTER_GJS_JUNIT}
- DEPENDS ${GTESTER_GJS_LOG}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-add_custom_target(gjs-tests ALL
- DEPENDS ${GTESTER_GJS_LOG} ${GTESTER_GJS_JUNIT} ${GJS_TESTS}
--- a/gjs/tests/plugins/basic.js Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-const GPlugin = imports.gi.GPlugin;
-function gplugin_query() {
- return new GPlugin.PluginInfo({
- id: "gplugin/gjs-basic-plugin",
- abi_version: 0x01020304,
- description: 'description'
-function gplugin_load(plugin) {
-function gplugin_unload(plugin) {
--- a/gjs/tests/plugins/dependent.js Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-const GPlugin = imports.gi.GPlugin;
-function gplugin_query() {
- return new GPlugin.PluginInfo({
- id: "gplugin/gjs-dependent-plugin",
- dependencies: ["dependency1", "dependency2"],
-function gplugin_load(plugin) {
-function gplugin_unload(plugin) {
--- a/gjs/tests/plugins/load-exception.js Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-const GPlugin = imports.gi.GPlugin;
-function gplugin_query() {
- return new GPlugin.PluginInfo({
- id: "gplugin/gjs-load-exception"
-function gplugin_load(plugin) {
-function gplugin_unload(plugin) {
--- a/gjs/tests/plugins/load-failed.js Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-const GPlugin = imports.gi.GPlugin;
-function gplugin_query() {
- return new GPlugin.PluginInfo({
- id: "gplugin/gjs-load-failed"
-function gplugin_load(plugin) {
-function gplugin_unload(plugin) {
--- a/gjs/tests/plugins/unload-failed.js Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-const GPlugin = imports.gi.GPlugin;
-function gplugin_query() {
- return new GPlugin.PluginInfo({
- id: "gplugin/gjs-unload-failed"
-function gplugin_load(plugin) {
-function gplugin_unload(plugin) {
--- a/gjs/tests/test-gjs-loader.c Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#include <gplugin/gplugin-loader-tests.h>
-main(gint argc, gchar **argv) {
- g_test_init(&argc, &argv, NULL);
- gplugin_loader_tests_main(GJS_LOADER_DIR, GJS_PLUGIN_DIR, "gjs");
--- a/gplugin-gtk/CMakeLists.txt Wed Dec 10 01:29:25 2014 -0600
+++ b/gplugin-gtk/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
@@ -71,7 +71,7 @@
configure_file(gplugin-gtk.pc.in gplugin-gtk.pc @ONLY)
FILES ${CMAKE_CURRENT_BINARY_DIR}/gplugin-gtk.pc
- DESTINATION lib/pkgconfig
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ###############################################################################
@@ -96,26 +96,26 @@
-install(TARGETS gplugin-gtk DESTINATION lib)
+install(TARGETS gplugin-gtk DESTINATION ${CMAKE_INSTALL_LIBDIR}) # install the single include into the main directory
FILES ${CMAKE_CURRENT_BINARY_DIR}/gplugin-gtk.h
- DESTINATION include/gplugin-1.0
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gplugin-1.0 # install the normal includes into the gplugin-gtk subdirectory
foreach(HEADER ${GPLUGIN_GTK_HEADERS})
FILES ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER}
- DESTINATION include/gplugin-1.0/gplugin-gtk
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gplugin-1.0/gplugin-gtk # install the GtkBuilder files
FILES gplugin-gtk-plugin-info.ui
- DESTINATION share/gplugin/gplugin-gtk/
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/gplugin/gplugin-gtk/ ###############################################################################
@@ -138,6 +138,6 @@
-install(TARGETS gplugin-gtk-viewer RUNTIME DESTINATION bin)
+install(TARGETS gplugin-gtk-viewer RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) --- a/gplugin-gtk/gplugin-gtk-plugin-info.c Wed Dec 10 01:29:25 2014 -0600
+++ b/gplugin-gtk/gplugin-gtk-plugin-info.c Mon Jun 29 22:08:31 2015 -0500
@@ -84,14 +84,14 @@
GPluginPluginInfo *plugin_info = gplugin_plugin_get_info(plugin);
GPluginLoader *plugin_loader = gplugin_plugin_get_loader(plugin);
- if(GPLUGIN_IS_LOADER(plugin_loader)) {
+ filename = gplugin_plugin_get_filename(plugin); + if(plugin_loader && GPLUGIN_IS_LOADER(plugin_loader)) { const char *loader_name = G_OBJECT_TYPE_NAME(plugin_loader);
loader = g_strdup(loader_name);
g_object_unref(G_OBJECT(plugin_loader));
- filename = gplugin_plugin_get_filename(plugin);
g_object_get(G_OBJECT(plugin_info),
"abi_version", &abi_version_uint,
@@ -139,7 +139,8 @@
for(i = 0; authors[i]; i++) {
widget = gtk_label_new(authors[i]);
- gtk_misc_set_alignment(GTK_MISC(widget), 0.0f, 0.0f);
+ gtk_widget_set_halign(widget, GTK_ALIGN_START); + gtk_widget_set_valign(widget, GTK_ALIGN_START); gtk_grid_attach(GTK_GRID(authors_grid), widget, 0, i, 1, 1);
@@ -309,7 +310,7 @@
priv = GPLUGIN_GTK_PLUGIN_INFO_GET_PRIVATE(info);
+ if(GPLUGIN_IS_PLUGIN(priv->plugin)) g_object_unref(G_OBJECT(priv->plugin));
if(GPLUGIN_IS_PLUGIN(plugin))
--- a/gplugin/CMakeLists.txt Wed Dec 10 01:29:25 2014 -0600
+++ b/gplugin/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
@@ -248,23 +248,23 @@
###############################################################################
# install the main library
-install(TARGETS gplugin DESTINATION lib)
+install(TARGETS gplugin DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(TARGETS gplugin-query RUNTIME DESTINATION bin)
+install(TARGETS gplugin-query RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) # install the single includes into the main directory
FILES ${CMAKE_CURRENT_BINARY_DIR}/gplugin.h
${CMAKE_CURRENT_BINARY_DIR}/gplugin-native.h
- DESTINATION include/gplugin-1.0
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gplugin-1.0 # install the normal includes into the gplugin subdirectory
foreach(HEADER ${GPLUGIN_HEADERS} ${GPLUGIN_NATIVE_HEADERS})
FILES ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER}
- DESTINATION include/gplugin-1.0/gplugin
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gplugin-1.0/gplugin @@ -272,12 +272,12 @@
foreach(HEADER ${GPLUGIN_PUBLIC_BUILT_HEADERS})
FILES ${CMAKE_CURRENT_BINARY_DIR}/${HEADER}
- DESTINATION include/gplugin-1.0/gplugin
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gplugin-1.0/gplugin -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gplugin.pc DESTINATION lib/pkgconfig)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gplugin.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ###############################################################################
--- a/gplugin/gplugin-manager.c Wed Dec 10 01:29:25 2014 -0600
+++ b/gplugin/gplugin-manager.c Mon Jun 29 22:08:31 2015 -0500
@@ -1119,7 +1119,7 @@
gplugin_manager_add_default_paths(void) {
- path = g_build_filename(PREFIX, "lib", "gplugin", NULL);
+ path = g_build_filename(PREFIX, LIBDIR, "gplugin", NULL); gplugin_manager_prepend_path(path);
@@ -1140,13 +1140,13 @@
gplugin_manager_add_app_paths(const gchar *prefix,
g_return_if_fail(appname != NULL);
- path = g_build_filename(prefix, "lib", appname, NULL);
+ path = g_build_filename(prefix, LIBDIR, appname, NULL); gplugin_manager_prepend_path(path);
--- a/gplugin/gplugin-plugin.c Wed Dec 10 01:29:25 2014 -0600
+++ b/gplugin/gplugin-plugin.c Mon Jun 29 22:08:31 2015 -0500
@@ -130,10 +130,10 @@
g_value_set_string(value, gplugin_plugin_get_filename(plugin));
- g_value_set_object(value, gplugin_plugin_get_loader(plugin));
+ g_value_take_object(value, gplugin_plugin_get_loader(plugin)); - g_value_set_object(value, gplugin_plugin_get_info(plugin));
+ g_value_take_object(value, gplugin_plugin_get_info(plugin)); g_value_set_enum(value, gplugin_plugin_get_state(plugin));
@@ -306,7 +306,7 @@
* gplugin_plugin_get_loader:
* @plugin: #GPluginPlugin instance
- * Return Value: (transfer none): The #GPluginLoader that loaded @plugin
+ * Return Value: (transfer full): The #GPluginLoader that loaded @plugin gplugin_plugin_get_loader(const GPluginPlugin *plugin) {
@@ -316,7 +316,7 @@
priv = GPLUGIN_PLUGIN_GET_PRIVATE(plugin);
+ return (priv->info) ? g_object_ref(G_OBJECT(priv->loader)) : NULL; --- a/gplugin/gplugin-query.c Wed Dec 10 01:29:25 2014 -0600
+++ b/gplugin/gplugin-query.c Mon Jun 29 22:08:31 2015 -0500
@@ -29,7 +29,8 @@
*****************************************************************************/
static gint verbosity = 0;
static gboolean show_internal = FALSE;
-static gboolean version_only = FALSE;
+static gboolean output_paths = FALSE; +static gboolean exit_early = FALSE; /******************************************************************************
@@ -75,7 +76,18 @@
printf("gplugin-query %s\n", GPLUGIN_VERSION);
+list_cb(GPLUGIN_UNUSED const gchar *n, + GPLUGIN_UNUSED const gchar *v, + GPLUGIN_UNUSED gpointer d, + GPLUGIN_UNUSED GError **e) @@ -252,6 +264,10 @@
version_cb, N_("Display the version and exit"),
+ "list", 'L', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, + list_cb, N_("Display all search paths and exit"), NULL, 0, 0, 0, NULL, NULL, NULL,
@@ -286,7 +302,19 @@
+ for(path = gplugin_manager_get_paths(); path; path = path->next) { + printf("%s\n", (gchar *)path->data); --- a/gplugin/gplugin.pc.in Wed Dec 10 01:29:25 2014 -0600
+++ b/gplugin/gplugin.pc.in Mon Jun 29 22:08:31 2015 -0500
@@ -2,7 +2,7 @@
includedir=${prefix}/include/gplugin-1.0/
+plugindir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ Description: A fully featured GModule based plugin library
--- a/gplugin/tests/test-option-group.c Wed Dec 10 01:29:25 2014 -0600
+++ b/gplugin/tests/test-option-group.c Mon Jun 29 22:08:31 2015 -0500
@@ -71,7 +71,7 @@
- path = g_build_filename(PREFIX, "lib", "gplugin", NULL);
+ path = g_build_filename(PREFIX, LIBDIR, "gplugin", NULL); paths = g_list_prepend(paths, path);
path = g_build_filename(g_get_user_config_dir(), "gplugin", NULL);
--- a/gplugin/tests/test-plugin-manager-paths.c Wed Dec 10 01:29:25 2014 -0600
+++ b/gplugin/tests/test-plugin-manager-paths.c Mon Jun 29 22:08:31 2015 -0500
@@ -92,7 +92,7 @@
req = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
/* create and add the paths we are expecting to the table */
- path = g_build_filename(PREFIX, "lib", "gplugin", NULL);
+ path = g_build_filename(PREFIX, LIBDIR, "gplugin", NULL); g_hash_table_insert(req, path, GINT_TO_POINTER(FALSE));
path = g_build_filename(g_get_user_config_dir(), "gplugin", NULL);
@@ -127,7 +127,7 @@
/* build our table of required paths */
req = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
- path = g_build_filename(prefix, "lib", appname, NULL);
+ path = g_build_filename(prefix, LIBDIR, appname, NULL); g_hash_table_insert(req, path, GINT_TO_POINTER(FALSE));
path = g_build_filename(g_get_user_config_dir(), appname, "plugins", NULL);
--- a/lua/CMakeLists.txt Wed Dec 10 01:29:25 2014 -0600
+++ b/lua/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
@@ -20,7 +20,7 @@
- set(_LUAS "luajit>=2.0.0;lua5.2>=5.2.0;lua5.1>=5.1.0")
+ set(_LUAS "luajit>=2.0.0;lua>=5.1.0;lua5.2>=5.2.0;lua5.1>=5.1.0") pkg_check_modules(LUA ${_LUA})
@@ -62,6 +62,11 @@
message(FATAL_ERROR " failed to find the 'lgi' lua module")
endif(${LUA_LGI_FOUND} EQUAL 0)
+ "Whether or not to run the moonscript tests" add_library(gplugin-lua MODULE
@@ -76,7 +81,7 @@
- install(TARGETS gplugin-lua DESTINATION lib/gplugin)
+ install(TARGETS gplugin-lua DESTINATION ${CMAKE_INSTALL_LIBDIR}/gplugin) --- a/lua/tests/CMakeLists.txt Wed Dec 10 01:29:25 2014 -0600
+++ b/lua/tests/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
@@ -23,8 +23,10 @@
add_lua_gtest(test-lua-loader)
target_link_libraries(test-lua-loader gplugin-loader-tests)
-add_lua_gtest(test-lua-moon-loader)
-target_link_libraries(test-lua-moon-loader gplugin-loader-tests)
+ add_lua_gtest(test-lua-moon-loader) + target_link_libraries(test-lua-moon-loader gplugin-loader-tests) +endif(${MOONSCRIPT_TESTS}) set(GTESTER_LUA_TESTS "${LUA_TESTS}")
set(GTESTER_LUA_LOG "test-gplugin-lua.xml")
--- a/packaging/debian/changelog Wed Dec 10 01:29:25 2014 -0600
+++ b/packaging/debian/changelog Mon Jun 29 22:08:31 2015 -0500
@@ -1,5 +1,23 @@
-gplugin (0.0.17) UNRELEASED; urgency=medium
+gplugin (0.0.21) unstable; urgency=medium + * New release, see official changelog + -- Gary Kramlich <grim@reaperworld.com> Mon, 29 Jun 2015 21:05:07 -0500 +gplugin (0.0.20) unstable; urgency=medium + * New release, see official changelog + -- Gary Kramlich <grim@reaperworld.com> Mon, 29 Jun 2015 21:04:51 -0500 +gplugin (0.0.19) unstable; urgency=medium + * New release, see official changelog + -- Gary Kramlich <grim@reaperworld.com> Thu, 07 May 2015 21:50:20 -0500 +gplugin (0.0.18) unstable; urgency=medium - -- Gary Kramlich <grim@reaperworld.com> Wed, 14 May 2014 01:31:15 -0500
+ -- Gary Kramlich <grim@reaperworld.com> Wed, 06 May 2015 10:43:35 -0500 --- a/packaging/debian/control Wed Dec 10 01:29:25 2014 -0600
+++ b/packaging/debian/control Mon Jun 29 22:08:31 2015 -0500
@@ -2,21 +2,20 @@
Maintainer: Gary Kramlich <grim@reaperworld.com>
-Build-Depends: debhelper (>=9), cmake, libglib2.0-dev,
+Build-Depends: debhelper (>=9), cmake, libglib2.0-dev, libgtk-3-dev, xsltproc, gettext, help2man,
gobject-introspection, libgirepository1.0-dev,
- libluajit-5.1-dev, lua-lgi,
- python3-dev, python-gi-dev, python3-gi,
-Homepage: https://bitbucket.org/rw_grim/gplugin
-Vcs-Browser: https://bitbucket.org/rw_grim/gplugin/src
-Vcs-Hg: https://bitbucket.org/rw_grim/gplugin
-Standards-Version: 3.9.5
+ liblua5.1-0-dev, lua-lgi, + python3-dev, python-gi-dev, python3-gi +Homepage: https://bitbucket.org/gplugin/main +Vcs-Browser: https://bitbucket.org/gplugin/main/src +Vcs-Hg: https://bitbucket.org/gplugin/main +Standards-Version: 3.9.6 -Depends: ${misc:Depends}, ${shlibs:Depends}, libglib-2.0
+Depends: ${misc:Depends}, ${shlibs:Depends}, libglib2.0-0 (>=2.20.0) +Recommends: libgplugin-loaders Description: GObject based plugin library
GPlugin is a GObject based library that implements a reusable plugin system
which supports loading plugins in other languages via loaders. It relies
@@ -24,17 +23,41 @@
This package contains the main library.
+Package: libgplugin0-dbg +Depends: ${misc:Depends}, libgplugin0 (= ${binary:Version}) +Description: debugging symbols for libgplugin0 + GPlugin is a GObject based library that implements a reusable plugin system + which supports loading plugins in other languages via loaders. It relies + heavily on GObjectIntrospection to expose its API to the other languages. + This package contains the debugging symbols for libgplugin0. Depends: ${misc:Depends}, libgplugin0 (= ${binary:Version}), libglib2.0-dev
-Description: Development filesfor libgplugin
+Description: Development files for libgplugin GPlugin is a GObject based library that implements a reusable plugin system
which supports loading plugins in other languages via loaders. It relies
heavily on GObjectIntrospection to expose its API to the other languages.
This package includes the files used for development against libgplugin.
+Package: libgplugin-loaders +Depends: ${misc:Depends}, ${shlibs:Depends}, +Description: metapackage for all gplugin loaders + GPlugin is a GObject based library that implements a reusable plugin system + which supports loading plugins in other languages via loaders. It relies + heavily on GObjectIntrospection to expose its API to the other languages. + This package will install all of the gplugin loaders. Depends: ${misc:Depends}, ${shlibs:Depends}, libgtk-3-0, libgplugin0
@@ -45,6 +68,18 @@
This library provides some default GTK+-3 widgets for GPlugin.
+Package: libgplugin-gtk0-dbg +Depends: ${misc:Depends}, libgplugin-gtk0 (= ${binary:Version}) +Description: debugging symbols for libgplugin-gtk0 + GPlugin is a GObject based library that implements a reusable plugin system + which supports loading plugins in other languages via loaders. It relies + heavily on GObjectIntrospection to expose its API to the other languages. + This library provides the debugging symbols for libgplugin-gtk0 Package: libgplugin-gtk-dev
@@ -103,27 +138,3 @@
This package allows GPlugin to load plugin written in the Python programming
-Package: libgplugin-seed
-Depends: ${misc:Depends}, ${shlibs:Depends}, libseed-gtk3-0,
- libgplugin0, gir1.2-gplugin-0.0
-Description: GPlugin Seed JavaScript Loader
- GPlugin is a GObject based library that implements a reusable plugin system
- which supports loading plugins in other languages via loaders. It relies
- heavily on GObjectIntrospection to expose its API to the other languages.
- This package allows GPlugin to load plugin written in the Seed JavaScript
-Depends: ${misc:Depends}, ${shlibs:Depends}, libgjs0c,
- libgplugin0, gir1.2-gplugin-0.0
-Description: GPlugin GNOME JavaScript Loader
- GPlugin is a GObject based library that implements a reusable plugin system
- which supports loading plugins in other languages via loaders. It relies
- heavily on GObjectIntrospection to expose its API to the other languages.
- This package allows GPlugin to load plugin written in the GNOME JavaScript
--- a/packaging/debian/copyright Wed Dec 10 01:29:25 2014 -0600
+++ b/packaging/debian/copyright Mon Jun 29 22:08:31 2015 -0500
@@ -1,7 +1,7 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Contact: grim@reaperworld.com
-Source: https://bitbucket.org/rw_grim/gplugin
+Source: https://bitbucket.org/gplugin/main Copyright: 2011-2014 Gary Kramlich <grim@reaperworld.com>
--- a/packaging/debian/gir1.2-gplugin-0.0.install Wed Dec 10 01:29:25 2014 -0600
+++ b/packaging/debian/gir1.2-gplugin-0.0.install Mon Jun 29 22:08:31 2015 -0500
@@ -1,3 +1,3 @@
-usr/lib/girepository-1.0/
+usr/lib/*/girepository-1.0/ --- a/packaging/debian/libgplugin-dev.install Wed Dec 10 01:29:25 2014 -0600
+++ b/packaging/debian/libgplugin-dev.install Mon Jun 29 22:08:31 2015 -0500
@@ -1,6 +1,6 @@
usr/include/gplugin-1.0/gplugin
usr/include/gplugin-1.0/gplugin.h
usr/include/gplugin-1.0/gplugin-native.h
-usr/lib/pkgconfig/gplugin.pc
+usr/lib/*/pkgconfig/gplugin.pc --- a/packaging/debian/libgplugin-gjs.install Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-usr/lib/gplugin/gplugin-gjs.so usr/lib/gplugin
--- a/packaging/debian/libgplugin-gtk-dev.install Wed Dec 10 01:29:25 2014 -0600
+++ b/packaging/debian/libgplugin-gtk-dev.install Mon Jun 29 22:08:31 2015 -0500
@@ -1,4 +1,5 @@
usr/include/gplugin-1.0/gplugin-gtk
usr/include/gplugin-1.0/gplugin-gtk.h
-usr/lib/libgplugin-gtk.so
-usr/lib/pkgconfig/gplugin-gtk.pc usr/lib/pkgconfig
+usr/lib/*/libgplugin-gtk.so +usr/lib/*/pkgconfig/gplugin-gtk.pc --- a/packaging/debian/libgplugin-gtk0.install Wed Dec 10 01:29:25 2014 -0600
+++ b/packaging/debian/libgplugin-gtk0.install Mon Jun 29 22:08:31 2015 -0500
@@ -1,2 +1,2 @@
-usr/lib/libgplugin-gtk.so.* usr/lib
+usr/lib/*/libgplugin-gtk.so.* --- a/packaging/debian/libgplugin-lua.install Wed Dec 10 01:29:25 2014 -0600
+++ b/packaging/debian/libgplugin-lua.install Mon Jun 29 22:08:31 2015 -0500
@@ -1,2 +1,2 @@
-usr/lib/gplugin/gplugin-lua.so usr/lib/gplugin
+usr/lib/*/gplugin/gplugin-lua.so usr/lib/*/gplugin --- a/packaging/debian/libgplugin-python.install Wed Dec 10 01:29:25 2014 -0600
+++ b/packaging/debian/libgplugin-python.install Mon Jun 29 22:08:31 2015 -0500
@@ -1,2 +1,2 @@
-usr/lib/gplugin/gplugin-python.so usr/lib/gplugin
+usr/lib/*/gplugin/gplugin-python.so usr/lib/*/gplugin --- a/packaging/debian/libgplugin-seed.install Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-usr/lib/gplugin/gplugin-seed.so usr/lib/gplugin
--- a/packaging/debian/libgplugin0.install Wed Dec 10 01:29:25 2014 -0600
+++ b/packaging/debian/libgplugin0.install Mon Jun 29 22:08:31 2015 -0500
@@ -1,4 +1,4 @@
+usr/lib/*/libgplugin.so.* usr/share/man/man1/gplugin-query.1
--- a/packaging/debian/rules Wed Dec 10 01:29:25 2014 -0600
+++ b/packaging/debian/rules Mon Jun 29 22:08:31 2015 -0500
@@ -7,3 +7,8 @@
dh_makeshlibs -plibgplugin0
dh_makeshlibs -plibgplugin-gtk0
+ dh_strip -plibgplugin0 --dbg-package=libgplugin0-dbg + dh_strip -plibgplugin-gtk0 --dbg-package=libgplugin-gtk0-dbg --- a/perl/CMakeLists.txt Wed Dec 10 01:29:25 2014 -0600
+++ b/perl/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
@@ -46,7 +46,7 @@
include_directories(${PERL_INCLUDE_PATH})
target_link_libraries(gplugin-perl ${PERL_LIBRARY})
- install(TARGETS gplugin-perl DESTINATION lib/gplugin)
+ install(TARGETS gplugin-perl DESTINATION ${CMAKE_INSTALL_LIBDIR}/gplugin) message(FATAL_ERROR "Failed to find the Perl libraries")
--- a/plugins/CMakeLists.txt Wed Dec 10 01:29:25 2014 -0600
+++ b/plugins/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
@@ -2,7 +2,7 @@
add_library(${plugin} MODULE ${plugin}.c)
set_target_properties(${plugin} PROPERTIES PREFIX "")
target_link_libraries(${plugin} gplugin)
- install(TARGETS ${plugin} DESTINATION lib/gplugin)
+ install(TARGETS ${plugin} DESTINATION ${CMAKE_INSTALL_LIBDIR}/gplugin) add_plugin(gplugin-license-check)
--- a/python/CMakeLists.txt Wed Dec 10 01:29:25 2014 -0600
+++ b/python/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
@@ -101,7 +101,7 @@
- install(TARGETS gplugin-python DESTINATION lib/gplugin)
+ install(TARGETS gplugin-python DESTINATION ${CMAKE_INSTALL_LIBDIR}/gplugin) --- a/python/gplugin-python-loader.c Wed Dec 10 01:29:25 2014 -0600
+++ b/python/gplugin-python-loader.c Mon Jun 29 22:08:31 2015 -0500
@@ -315,14 +315,14 @@
program = g_get_prgname();
program = program ? program : "";
- len = __mbstowcs_chk(NULL, program, 0, 0);
+ len = mbstowcs(NULL, program, 0); g_warning("Could not convert program name to wchar_t string.");
argv[0] = g_new(wchar_t, len + 1);
- len = __mbstowcs_chk(argv[0], program, len + 1, len + 1);
+ len = mbstowcs(argv[0], program, len + 1); g_warning("Could not convert program name to wchar_t string.");
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/bitbucket_upload Mon Jun 29 22:08:31 2015 -0500
@@ -0,0 +1,70 @@
+OUTPUT=.bitbucket.cookies +if [ -z ${PATH} ] ; then + echo "You must provide a repository path" +if [ -z "${FILES}" ] ; then + echo "You must provide at least one file to upload" +BASE_URI=https://bitbucket.org +LOGIN_URI=${BASE_URI}/account/signin/ +UPLOAD_URI=${BASE_URI}/${PATH}/downloads +read -e -p "bitbucket username: " BB_USERNAME +read -e -s -p "bitbucket password: " BB_PASSWORD +echo -n "getting login token ... " +${CURL} -s -k -c ${OUTPUT} -o /dev/null ${LOGIN_URI} +CSRF_TOKEN=$(${GREP} csrftoken ${OUTPUT} | ${AWK} '{print $7}') +if [ -z ${CSRF_TOKEN} ] ; then +echo -n "logging in ... " +${CURL} -s -k -c ${OUTPUT} -b ${OUTPUT} -o /dev/null -d "username=${BB_USERNAME}&password=${BB_PASSWORD}&csrfmiddlewaretoken=${CSRF_TOKEN}" --referer ${LOGIN_URI} -L ${LOGIN_URI} +${GREP} -q bb_session ${OUTPUT} +for FILE in ${FILES} ; do + echo -n "uploading ${FILE} ... " + ${CURL} -s -k -c ${OUTPUT} -b ${OUTPUT} --referer ${UPLOAD_URI} -L --form csrfmiddlewaretoken=${CSRF_TOKEN} --form token= --form file=@"${FILE}" ${UPLOAD_URI} --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/makeviz.sh Mon Jun 29 22:08:31 2015 -0500
@@ -0,0 +1,31 @@
+ --auto-skip-seconds .1 \ + --title "History of GPlugin" \ + --hide filenames,mouse,progress \ + --output-framerate 30 \ --- a/seed/CMakeLists.txt Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
- "Whether or not to build the seed JavaScript plugin loader"
- message(FATAL_ERROR "Seed JavaScript plugin requires GObject Introspection.")
- set(GPLUGIN_SEED_SOURCES
- set(GPLUGIN_SEED_HEADERS
- pkg_check_modules(SEED REQUIRED seed>=3.0.0)
- add_library(gplugin-seed MODULE
- ${GPLUGIN_SEED_SOURCES}
- ${GPLUGIN_SEED_HEADERS}
- set_target_properties(gplugin-seed PROPERTIES PREFIX "")
- include_directories(${SEED_INCLUDE_DIRS})
- target_link_libraries(gplugin-seed
- install(TARGETS gplugin-seed DESTINATION lib/gplugin)
- add_subdirectory(tests)
--- a/seed/gplugin-seed-core.c Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#include <gplugin-native.h>
-#include "gplugin-seed-loader.h"
-#include "gplugin-seed-plugin.h"
-G_MODULE_EXPORT GPluginPluginInfo *
-gplugin_query(GPLUGIN_UNUSED GError **error) {
- const gchar * const authors[] = {
- "Gary Kramlich <grim@reaperworld.com>",
- return gplugin_plugin_info_new(
- GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
- "name", "Seed JavaScript Plugin Loader",
- "version", GPLUGIN_VERSION,
- "summary", "A plugin that can load seed JavaScript plugins",
- "description", "This plugin allows the loading of plugins written in "
- "website", GPLUGIN_WEBSITE,
-G_MODULE_EXPORT gboolean
-gplugin_load(GPluginNativePlugin *plugin,
- GPLUGIN_UNUSED GError **error)
- gplugin_seed_loader_register(plugin);
- gplugin_seed_plugin_register(plugin);
- gplugin_manager_register_loader(gplugin_seed_loader_get_type());
-G_MODULE_EXPORT gboolean
-gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
- GPLUGIN_UNUSED GError **error)
--- a/seed/gplugin-seed-loader.c Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,330 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#include "gplugin-seed-loader.h"
-#include "gplugin-seed-plugin.h"
-/******************************************************************************
- *****************************************************************************/
-static GObjectClass *parent_class = NULL;
-static GType type_real = 0;
-static SeedEngine *engine = NULL;
-/******************************************************************************
- *****************************************************************************/
-/******************************************************************************
- * GPluginLoaderInterface API
- *****************************************************************************/
-gplugin_seed_loader_class_supported_extensions(GPLUGIN_UNUSED const GPluginLoaderClass *klass) {
- return g_slist_append(NULL, "js");
-gplugin_seed_loader_query(GPluginLoader *loader, const gchar *filename,
- GPluginPluginInfo *info = NULL;
- SeedContext ctx = NULL;
- SeedException exp = NULL;
- SeedObject global = NULL, query = NULL, load = NULL, unload = NULL;
- SeedObject sinfo = NULL;
- SeedScript *script = NULL;
- gchar *contents = NULL;
- if(!g_file_get_contents(filename, &contents, NULL, error)) {
- /* create our context */
- ctx = seed_context_create(engine->group, NULL);
- seed_prepare_global_context(ctx);
- /* now create and evaluate the script object */
- script = seed_make_script(ctx, contents, filename, 0);
- seed_evaluate(ctx, script, NULL);
- exp = seed_script_exception(script);
- seed_script_destroy(script);
- /* did we get any exceptions during evaluation? */
- gchar *message = seed_exception_to_string(ctx, exp);
- *error = g_error_new(GPLUGIN_DOMAIN, 0, "Failed to load %s : %s",
- seed_context_unref(ctx);
- /* now get the global namespace from the context and use it to get the
- * GPlugin entry points.
- global = seed_context_get_global_object(ctx);
- query = seed_object_get_property(ctx, global, "gplugin_query");
- load = seed_object_get_property(ctx, global, "gplugin_load");
- unload = seed_object_get_property(ctx, global, "gplugin_unload");
- /* now validate the entry points */
- if(!seed_value_is_function(ctx, query)) {
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- "Failed to find the gplugin_query function");
- seed_context_unref(ctx);
- if(!seed_value_is_function(ctx, load)) {
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- "Failed to find the gplugin_load function");
- seed_context_unref(ctx);
- if(!seed_value_is_function(ctx, unload)) {
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- "Failed to find the gplugin_unload function");
- seed_context_unref(ctx);
- /* now that we have all of our entry points, call the query method to get
- sinfo = seed_object_call(ctx, query, NULL, 0, NULL, &exp);
- gchar *message = seed_exception_get_message(ctx, exp);
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- "Failed to query %s : %s", filename, message);
- seed_context_unref(ctx);
- /* now convert the JavaScript PluginInfo into the C version */
- info = GPLUGIN_PLUGIN_INFO(seed_value_to_object(ctx, sinfo, &exp));
- gchar *message = seed_exception_get_message(ctx, exp);
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- "Failed to query %s : %s", filename, message);
- seed_context_unref(ctx);
- /* validate that the info we got is an instance of GPluginPluginInfo */
- if(!GPLUGIN_IS_PLUGIN_INFO(info)) {
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- "Plugin %s did not return a PluginInfo",
- seed_context_unref(ctx);
- return g_object_new(GPLUGIN_TYPE_SEED_PLUGIN,
-gplugin_seed_loader_load_unload(GPLUGIN_UNUSED GPluginLoader *loader,
- SeedContext ctx = NULL;
- SeedException exp = NULL;
- SeedObject func = NULL;
- g_return_val_if_fail(GPLUGIN_IS_SEED_PLUGIN(plugin), FALSE);
- g_object_get(G_OBJECT(plugin),
- /* make sure we got the context and the function */
- if(ctx == NULL || func == NULL) {
- *error = g_error_new(GPLUGIN_DOMAIN, 0,
- "Plugin is in an unknown state");
- /* convert the plugin into a SeedObject */
- args[0] = seed_value_from_object(ctx, G_OBJECT(plugin), exp);
- gchar *message = seed_exception_get_message(ctx, exp);
- *error = g_error_new(GPLUGIN_DOMAIN, 0, "%s", message);
- /* now call the function */
- sret = seed_object_call(ctx, func, NULL, 1, args, exp);
- gchar *message = seed_exception_get_message(ctx, exp);
- *error = g_error_new(GPLUGIN_DOMAIN, 0, "%s", message);
- /* finally check what the plugins function returned */
- ret = seed_value_to_boolean(ctx, sret, &exp);
- gchar *message = seed_exception_get_message(ctx, exp);
- *error = g_error_new(GPLUGIN_DOMAIN, 0, "%s", message);
-gplugin_seed_loader_load(GPluginLoader *loader, GPluginPlugin *plugin,
- return gplugin_seed_loader_load_unload(loader, plugin, "load", error);
-gplugin_seed_loader_unload(GPluginLoader *loader, GPluginPlugin *plugin,
- return gplugin_seed_loader_load_unload(loader, plugin, "unload", error);
-/******************************************************************************
- *****************************************************************************/
-gplugin_seed_loader_class_init(GPluginSeedLoaderClass *klass) {
- GPluginLoaderClass *loader_class = GPLUGIN_LOADER_CLASS(klass);
- parent_class = g_type_class_peek_parent(klass);
- loader_class->supported_extensions =
- gplugin_seed_loader_class_supported_extensions;
- loader_class->query = gplugin_seed_loader_query;
- loader_class->load = gplugin_seed_loader_load;
- loader_class->unload = gplugin_seed_loader_unload;
-/******************************************************************************
- *****************************************************************************/
-gplugin_seed_loader_register(GPluginNativePlugin *plugin) {
- if(g_once_init_enter(&type_real)) {
- static const GTypeInfo info = {
- .class_size = sizeof(GPluginSeedLoaderClass),
- .class_init = (GClassInitFunc)gplugin_seed_loader_class_init,
- .instance_size = sizeof(GPluginSeedLoader),
- type = gplugin_native_plugin_register_type(plugin,
- engine = seed_init(NULL, NULL);
- g_once_init_leave(&type_real, type);
-gplugin_seed_loader_get_type(void) {
- if(G_UNLIKELY(type_real == 0)) {
- g_warning("gplugin_seed_loader_get_type was called before "
- "the type was registered!\n");
--- a/seed/gplugin-seed-loader.h Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#ifndef GPLUGIN_SEED_LOADER_H
-#define GPLUGIN_SEED_LOADER_H
-#define GPLUGIN_TYPE_SEED_LOADER (gplugin_seed_loader_get_type())
-#define GPLUGIN_SEED_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GPLUGIN_TYPE_SEED_LOADER, GPluginSeedLoader))
-#define GPLUGIN_SEED_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((obj), GPLUGIN_TYPE_SEED_LOADER, GPluginSeedLoaderClass))
-#define GPLUGIN_IS_SEED_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPLUGIN_TYPE_SEED_LOADER))
-#define GPLUGIN_IS_SEED_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((obj), GPLUGIN_TYPE_SEED_LOADER))
-#define GPLUGIN_SEED_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GPLUGIN_TYPE_SEED_LOADER, GPluginSeedLoaderClass))
-typedef struct _GPluginSeedLoader GPluginSeedLoader;
-typedef struct _GPluginSeedLoaderClass GPluginSeedLoaderClass;
-#include <gplugin-native.h>
-struct _GPluginSeedLoader {
- void (*_gplugin_reserved_1)(void);
- void (*_gplugin_reserved_2)(void);
- void (*_gplugin_reserved_3)(void);
- void (*_gplugin_reserved_4)(void);
-struct _GPluginSeedLoaderClass {
- GPluginLoaderClass parent;
- void (*_gplugin_reserved_1)(void);
- void (*_gplugin_reserved_2)(void);
- void (*_gplugin_reserved_3)(void);
- void (*_gplugin_reserved_4)(void);
-void gplugin_seed_loader_register(GPluginNativePlugin *plugin);
-GType gplugin_seed_loader_get_type(void);
-#endif /* GPLUGIN_SEED_LOADER_H */
--- a/seed/gplugin-seed-plugin.c Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#include "gplugin-seed-plugin.h"
-#define GPLUGIN_SEED_PLUGIN_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE((obj), GPLUGIN_TYPE_SEED_PLUGIN, GPluginSeedPluginPrivate))
-/******************************************************************************
- *****************************************************************************/
-} GPluginSeedPluginPrivate;
-/******************************************************************************
- *****************************************************************************/
-/******************************************************************************
- *****************************************************************************/
-static GObjectClass *parent_class = NULL;
-static GType type_real = 0;
-/******************************************************************************
- *****************************************************************************/
-gplugin_seed_plugin_set_context(GPluginSeedPlugin *plugin, SeedContext ctx) {
- GPluginSeedPluginPrivate *priv = GPLUGIN_SEED_PLUGIN_GET_PRIVATE(plugin);
-gplugin_seed_plugin_set_load(GPluginSeedPlugin *plugin, SeedObject load) {
- GPluginSeedPluginPrivate *priv = GPLUGIN_SEED_PLUGIN_GET_PRIVATE(plugin);
-gplugin_seed_plugin_set_unload(GPluginSeedPlugin *plugin, SeedObject unload) {
- GPluginSeedPluginPrivate *priv = GPLUGIN_SEED_PLUGIN_GET_PRIVATE(plugin);
-/******************************************************************************
- *****************************************************************************/
-gplugin_seed_plugin_get_property(GObject *obj, guint param_id, GValue *value,
- GPluginSeedPlugin *plugin = GPLUGIN_SEED_PLUGIN(obj);
- g_value_set_pointer(value,
- gplugin_seed_plugin_get_context(plugin));
- g_value_set_pointer(value,
- gplugin_seed_plugin_get_load_func(plugin));
- g_value_set_pointer(value,
- gplugin_seed_plugin_get_unload_func(plugin));
- G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
-gplugin_seed_plugin_set_property(GObject *obj, guint param_id,
- const GValue *value, GParamSpec *pspec)
- GPluginSeedPlugin *plugin = GPLUGIN_SEED_PLUGIN(obj);
- gplugin_seed_plugin_set_context(plugin,
- g_value_get_pointer(value));
- gplugin_seed_plugin_set_load(plugin,
- g_value_get_pointer(value));
- gplugin_seed_plugin_set_unload(plugin,
- g_value_get_pointer(value));
- G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
-gplugin_seed_plugin_finalize(GObject *obj) {
- GPluginSeedPluginPrivate *priv = GPLUGIN_SEED_PLUGIN_GET_PRIVATE(obj);
- seed_context_unref(priv->ctx);
- G_OBJECT_CLASS(parent_class)->finalize(obj);
-gplugin_seed_plugin_class_init(GPluginSeedPluginClass *klass) {
- GObjectClass *obj_class = G_OBJECT_CLASS(klass);
- parent_class = g_type_class_peek_parent(klass);
- g_type_class_add_private(klass, sizeof(GPluginSeedPluginPrivate));
- obj_class->get_property = gplugin_seed_plugin_get_property;
- obj_class->set_property = gplugin_seed_plugin_set_property;
- obj_class->finalize = gplugin_seed_plugin_finalize;
- g_object_class_install_property(obj_class, PROP_CONTEXT,
- g_param_spec_pointer("context", "context",
- "The seed context for the plugin",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property(obj_class, PROP_LOAD,
- g_param_spec_pointer("load", "load",
- "The load function for the plugin",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property(obj_class, PROP_UNLOAD,
- g_param_spec_pointer("unload", "unload",
- "The unload function for the plugin",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-/******************************************************************************
- *****************************************************************************/
-gplugin_seed_plugin_register(GPluginNativePlugin *plugin) {
- if(g_once_init_enter(&type_real)) {
- static const GTypeInfo info = {
- .class_size = sizeof(GPluginSeedPluginClass),
- .class_init = (GClassInitFunc)gplugin_seed_plugin_class_init,
- .instance_size = sizeof(GPluginSeedPlugin),
- type = gplugin_native_plugin_register_type(plugin,
- g_once_init_leave(&type_real, type);
-gplugin_seed_plugin_get_type(void) {
- if(G_UNLIKELY(type_real == 0)) {
- g_warning("gplugin_seed_plugin_get_type was called before "
- "the type was registered!\n");
-gplugin_seed_plugin_get_context(const GPluginSeedPlugin *plugin) {
- GPluginSeedPluginPrivate *priv = GPLUGIN_SEED_PLUGIN_GET_PRIVATE(plugin);
-gplugin_seed_plugin_get_load_func(const GPluginSeedPlugin *plugin) {
- GPluginSeedPluginPrivate *priv = GPLUGIN_SEED_PLUGIN_GET_PRIVATE(plugin);
-gplugin_seed_plugin_get_unload_func(const GPluginSeedPlugin *plugin) {
- GPluginSeedPluginPrivate *priv = GPLUGIN_SEED_PLUGIN_GET_PRIVATE(plugin);
--- a/seed/gplugin-seed-plugin.h Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#ifndef GPLUGIN_SEED_PLUGIN_H
-#define GPLUGIN_SEED_PLUGIN_H
-#define GPLUGIN_TYPE_SEED_PLUGIN (gplugin_seed_plugin_get_type())
-#define GPLUGIN_SEED_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GPLUGIN_TYPE_SEED_PLUGIN, GPluginSeedPlugin))
-#define GPLUGIN_SEED_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((obj), GPLUGIN_TYPE_SEED_PLUGIN, GPluginSeedPluginClass))
-#define GPLUGIN_IS_SEED_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPLUGIN_TYPE_SEED_PLUGIN))
-#define GPLUGIN_IS_SEED_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((obj), GPLUGIN_TYPE_SEED_PLUGIN))
-#define GPLUGIN_SEED_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GPLUGIN_TYPE_SEED_PLUGIN, GPluginSeedPluginClass))
-typedef struct _GPluginSeedPlugin GPluginSeedPlugin;
-typedef struct _GPluginSeedPluginClass GPluginSeedPluginClass;
-#include <gplugin-native.h>
-struct _GPluginSeedPlugin {
-struct _GPluginSeedPluginClass {
- GPluginPluginClass parent;
- void (*_gplugin_reserved_1)(void);
- void (*_gplugin_reserved_2)(void);
- void (*_gplugin_reserved_3)(void);
- void (*_gplugin_reserved_4)(void);
-void gplugin_seed_plugin_register(GPluginNativePlugin *plugin);
-GType gplugin_seed_plugin_get_type(void);
-SeedContext gplugin_seed_plugin_get_context(const GPluginSeedPlugin *plugin);
-SeedObject gplugin_seed_plugin_get_load_func(const GPluginSeedPlugin *plugin);
-SeedObject gplugin_seed_plugin_get_unload_func(const GPluginSeedPlugin *plugin);
-#endif /* GPLUGIN_SEED_PLUGIN_H */
--- a/seed/tests/CMakeLists.txt Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-macro(add_seed_gtest target)
- add_executable(${target} ${target}.c)
- target_link_libraries(${target}
- ${GLIB_LIBRARIES} ${SEED_LIBRARIES} gplugin
- add_dependencies(${target} gplugin-seed)
- get_target_property(_output_name ${target} RUNTIME_OUTPUT_NAME)
- if(NOT ${_output_name})
- get_target_property(_output_name ${target} LOCATION)
- endif(NOT ${_output_name})
- list(APPEND SEED_TESTS ${_output_name})
-endmacro(add_seed_gtest)
- -DSEED_LOADER_DIR="${CMAKE_BINARY_DIR}/seed"
- -DSEED_PLUGIN_DIR="${CMAKE_CURRENT_SOURCE_DIR}/plugins"
-add_seed_gtest(test-seed-loader)
-target_link_libraries(test-seed-loader gplugin-loader-tests)
-set(GTESTER_SEED_TESTS "${SEED_TESTS}")
-set(GTESTER_SEED_LOG "test-gplugin-seed.xml")
-set(GTESTER_SEED_JUNIT "test-gplugin-seed-junit.xml")
- COMMAND ${GTESTER} -k --verbose -o ${GTESTER_SEED_LOG} ${SEED_TESTS}
- OUTPUT ${GTESTER_SEED_LOG}
- DEPENDS gplugin ${GPLUGIN_GIR_TARGETS} gplugin-seed
- ${SEED_TESTS} ${CMAKE_CURRENT_SOURCE_DIR}/plugins
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMAND ${XSLTPROC} -o ${GTESTER_SEED_JUNIT} --nonet
- ${CMAKE_SOURCE_DIR}/xsl/gtester-junit.xsl
- OUTPUT ${GTESTER_SEED_JUNIT}
- DEPENDS ${GTESTER_SEED_LOG}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-add_custom_target(seed-tests ALL
- DEPENDS ${GTESTER_SEED_LOG} ${GTESTER_SEED_JUNIT} ${SEED_TESTS}
--- a/seed/tests/plugins/basic.js Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-var GPlugin = imports.gi.GPlugin;
-function gplugin_query() {
- return new GPlugin.PluginInfo({
- id: "gplugin/seed-basic-plugin",
- abi_version: 0x01020304,
- description: 'description'
-function gplugin_load(plugin) {
-function gplugin_unload(plugin) {
--- a/seed/tests/plugins/dependent.js Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-var GPlugin = imports.gi.GPlugin;
-function gplugin_query() {
- return new GPlugin.PluginInfo({
- id: "gplugin/seed-dependent-plugin",
- dependencies: ["dependency1", "dependency2"],
-function gplugin_load(plugin) {
-function gplugin_unload(plugin) {
--- a/seed/tests/plugins/load-exception.js Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-var GPlugin = imports.gi.GPlugin;
-function gplugin_query() {
- return new GPlugin.PluginInfo({
- id: "gplugin/seed-load-exception"
-function gplugin_load(plugin) {
-function gplugin_unload(plugin) {
--- a/seed/tests/plugins/load-failed.js Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-var GPlugin = imports.gi.GPlugin;
-function gplugin_query() {
- return new GPlugin.PluginInfo({
- id: "gplugin/seed-load-failed"
-function gplugin_load(plugin) {
-function gplugin_unload(plugin) {
--- a/seed/tests/plugins/unload-failed.js Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-var GPlugin = imports.gi.GPlugin;
-function gplugin_query() {
- return new GPlugin.PluginInfo({
- id: "gplugin/seed-unload-failed"
-function gplugin_load(plugin) {
-function gplugin_unload(plugin) {
--- a/seed/tests/test-seed-loader.c Wed Dec 10 01:29:25 2014 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
- * Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library 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
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#include <gplugin/gplugin-loader-tests.h>
-main(gint argc, gchar **argv) {
- g_test_init(&argc, &argv, NULL);
- gplugin_loader_tests_main(SEED_LOADER_DIR, SEED_PLUGIN_DIR, "seed");