gplugin/gplugin

Fix the windows build for real this time

6 weeks ago, Gary Kramlich
7f400459dbe1
Parents f0930af845ef
Children 342af34b1c48
Fix the windows build for real this time

* Mark gplugin_introspection_introspect_plugin and
gplugin_introspection_introspect_plugins as internal as this is a static
library and that is how they should be marked.
* Use G_MODULE_EXPORT to export the G_DEFINE_FINAL_TYPE for IntrospectableType.
* Clean up the gplugin-introspection/tests/meson.build file bit as it's
already shortcut in gplugin-introspection/meson.build.

Testing Done:
Compiled from a clean build on Windows and Linux using `ninja turtles` on both.

Reviewed at https://reviews.imfreedom.org/r/3030/
--- a/gplugin-introspection/gplugin-introspection.h Tue Mar 12 21:17:06 2024 -0500
+++ b/gplugin-introspection/gplugin-introspection.h Sat Mar 16 17:02:21 2024 -0500
@@ -24,12 +24,13 @@
G_BEGIN_DECLS
-GPLUGIN_AVAILABLE_IN_0_41
+G_GNUC_INTERNAL
int gplugin_introspection_introspect_plugin(
int *argc,
char ***argv,
const char *filename);
-GPLUGIN_AVAILABLE_IN_0_41
+
+G_GNUC_INTERNAL
int gplugin_introspection_introspect_plugins(int *argc, char ***argv, ...)
G_GNUC_NULL_TERMINATED;
--- a/gplugin-introspection/tests/introspectablecore.c Tue Mar 12 21:17:06 2024 -0500
+++ b/gplugin-introspection/tests/introspectablecore.c Sat Mar 16 17:02:21 2024 -0500
@@ -50,4 +50,4 @@
return TRUE;
}
-GPLUGIN_NATIVE_PLUGIN_DECLARE(introspectable)
\ No newline at end of file
+GPLUGIN_NATIVE_PLUGIN_DECLARE(introspectable)
--- a/gplugin-introspection/tests/introspectabletype.h Tue Mar 12 21:17:06 2024 -0500
+++ b/gplugin-introspection/tests/introspectabletype.h Sat Mar 16 17:02:21 2024 -0500
@@ -24,6 +24,8 @@
G_BEGIN_DECLS
#define INTROSPECTABLE_TYPE_TYPE (introspectable_type_get_type())
+
+G_MODULE_EXPORT
G_DECLARE_FINAL_TYPE(
IntrospectableType,
introspectable_type,
--- a/gplugin-introspection/tests/meson.build Tue Mar 12 21:17:06 2024 -0500
+++ b/gplugin-introspection/tests/meson.build Sat Mar 16 17:02:21 2024 -0500
@@ -10,25 +10,24 @@
name_prefix : '',
dependencies : [gplugin_dep, GLIB, GOBJECT])
-if get_option('introspection')
- GIR = dependency('gobject-introspection-1.0', version : '>=1.0.0')
+GIR = dependency('gobject-introspection-1.0', version : '>=1.0.0')
- plugin_path = introspectable.full_path()
+plugin_path = introspectable.full_path()
- exe_introspectable = executable('introspectable',
- sources : 'generate.c',
- dependencies : [gplugin_dep, gplugin_introspection_dep, GLIB, GOBJECT, GIR],
- c_args : [f'-DPLUGIN_FILENAME="@plugin_path@"'],
- install : false)
+exe_introspectable = executable('introspectable',
+ sources : 'generate.c',
+ dependencies : [gplugin_dep, gplugin_introspection_dep, GLIB, GOBJECT, GIR],
+ c_args : [f'-DPLUGIN_FILENAME="@plugin_path@"'],
+ install : false,
+ win_subsystem : 'console')
- gnome.generate_gir(
- exe_introspectable,
- sources : SOURCES,
- includes : ['GObject-2.0', gplugin_gir[0]],
- namespace : 'Introspectable',
- symbol_prefix : 'introspectable',
- nsversion : '1.0',
- install : false,
- export_packages : ['introspectable'],
- extra_args : ['--quiet'])
-endif
+gnome.generate_gir(
+ exe_introspectable,
+ sources : SOURCES,
+ includes : ['GObject-2.0', gplugin_gir[0]],
+ namespace : 'Introspectable',
+ symbol_prefix : 'introspectable',
+ nsversion : '1.0',
+ install : false,
+ export_packages : ['introspectable'],
+ extra_args : ['--quiet'])