Thank you very much! It’s working!
Here’s how I updated my meson.build
:
project('gcal', 'c')
gnome = import('gnome')
sources = files(
'gcal-alarm-row.c',
'gcal-shell-search-provider-generated.c',
'gcal-application.c',
'gcal-calendar-management-dialog.c',
'gcal-calendar-management-page.c',
'gcal-calendar-monitor.c',
'gcal-calendar-popover.c',
'gcal-calendar.c',
'gcal-calendars-page.c',
'gcal-clock.c',
'gcal-context.c',
'gcal-date-chooser-day.c',
'gcal-date-chooser.c',
'gcal-date-selector.c',
'gcal-date-time-utils.c',
'gcal-edit-calendar-page.c',
'gcal-enum-types.c',
'gcal-event-editor-dialog.c',
'gcal-event-editor-section.c',
'gcal-event-popover.c',
'gcal-event-widget.c',
'gcal-event.c',
'gcal-expandable-entry.c',
'gcal-import-dialog.c',
'gcal-import-file-row.c',
'gcal-importer.c',
'gcal-log.c',
'gcal-manager.c',
'gcal-meeting-row.c',
'gcal-month-cell.c',
'gcal-month-popover.c',
'gcal-month-view.c',
'gcal-multi-choice.c',
'gcal-new-calendar-page.c',
'gcal-night-light-monitor.c',
'gcal-notes-section.c',
'gcal-quick-add-popover.c',
'gcal-range-tree.c',
'gcal-range.c',
'gcal-recurrence.c',
'gcal-reminders-section.c',
'gcal-schedule-section.c',
'gcal-search-button.c',
'gcal-search-engine.c',
'gcal-search-hit-event.c',
'gcal-search-hit.c',
'gcal-search-model.c',
'gcal-shell-search-provider.c',
'gcal-simple-server.c',
'gcal-source-discoverer.c',
'gcal-stub-calendar.c',
'gcal-summary-section.c',
'gcal-time-selector.c',
'gcal-time-zone-monitor.c',
'gcal-timeline-subscriber.c',
'gcal-timeline.c',
'gcal-timer.c',
'gcal-utils.c',
'gcal-view.c',
'gcal-weather-info.c',
'gcal-weather-service.c',
'gcal-weather-settings.c',
'gcal-week-grid.c',
'gcal-week-header.c',
'gcal-week-view.c',
'gcal-window.c',
'gcal-year-view.c',
'main.c',
)
headers = files(
'gcal-alarm-row.h',
'gcal-shell-search-provider-generated.h',
'gcal-application.h',
'gcal-calendar-management-dialog.h',
'gcal-calendar-management-page.h',
'gcal-calendar-monitor.h',
'gcal-calendar-popover.h',
'gcal-calendar.h',
'gcal-calendars-page.h',
'gcal-clock.h',
'gcal-context.h',
'gcal-date-chooser-day.h',
'gcal-date-chooser.h',
'gcal-date-selector.h',
'gcal-date-time-utils.h',
'gcal-edit-calendar-page.h',
'gcal-enum-types.h',
'gcal-event-editor-dialog.h',
'gcal-event-editor-section.h',
'gcal-event-popover.h',
'gcal-event-widget.h',
'gcal-event.h',
'gcal-expandable-entry.h',
'gcal-import-dialog.h',
'gcal-import-file-row.h',
'gcal-importer.h',
'gcal-log.h',
'gcal-manager.h',
'gcal-meeting-row.h',
'gcal-month-cell.h',
'gcal-month-popover.h',
'gcal-month-view.h',
'gcal-multi-choice.h',
'gcal-new-calendar-page.h',
'gcal-night-light-monitor.h',
'gcal-notes-section.h',
'gcal-quick-add-popover.h',
'gcal-range-tree.h',
'gcal-range.h',
'gcal-recurrence.h',
'gcal-reminders-section.h',
'gcal-schedule-section.h',
'gcal-search-button.h',
'gcal-search-engine.h',
'gcal-search-hit-event.h',
'gcal-search-hit.h',
'gcal-search-model.h',
'gcal-shell-search-provider.h',
'gcal-simple-server.h',
'gcal-source-discoverer.h',
'gcal-stub-calendar.h',
'gcal-summary-section.h',
'gcal-time-selector.h',
'gcal-time-zone-monitor.h',
'gcal-timeline-subscriber.h',
'gcal-timeline.h',
'gcal-timer.h',
'gcal-utils.h',
'gcal-view.h',
'gcal-weather-info.h',
'gcal-weather-service.h',
'gcal-weather-settings.h',
'gcal-week-grid.h',
'gcal-week-header.h',
'gcal-week-view.h',
'gcal-window.h',
'gcal-year-view.h',
)
common_flags = [
'-DGOA_API_IS_SUBJECT_TO_CHANGE',
'-DGWEATHER_I_KNOW_THIS_IS_UNSTABLE',
'-DPACKAGE_LOCALE_DIR="/usr/local/share/locale"',
]
add_project_arguments(common_flags, language: 'c')
cc = meson.get_compiler('c')
libical_dep = dependency('libical', version: '>= 1.0')
gsettings_desktop_schemas_dep = dependency('gsettings-desktop-schemas', version: '>= 3.21.2')
libedataserverui_dep = dependency('libedataserverui-1.2', version: '>= 3.17.1')
libedataserver_dep = dependency('libedataserver-1.2', version: '>= 3.17.1')
libecal_dep = dependency('libecal-2.0', version: '>= 3.33.2')
libsoup_dep = dependency('libsoup-2.4')
libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.33.1')
libhandy_dep = dependency('libhandy-1', version: '>= 1.0.0')
glib_dep = dependency('glib-2.0', version: '>= 2.67.5')
gtk_dep = dependency('gtk+-3.0', version: '>= 3.22.20')
gio_dep = dependency('gio-2.0', version: '>= 2.58.0')
goa_dep = dependency('goa-1.0', version: '>= 3.2.0')
gweather_dep = dependency('gweather-3.0', version: '>= 40.0')
geoclue_dep = dependency('libgeoclue-2.0', version: '>=2.4')
geocode_dep = dependency('geocode-glib-1.0', version: '>=3.23')
m_dep = cc.find_library('m')
gcal_deps = [
gsettings_desktop_schemas_dep,
libedataserverui_dep,
libedataserver_dep,
libecal_dep,
libdazzle_dep,
libsoup_dep,
libical_dep,
libhandy_dep,
glib_dep,
gtk_dep,
gio_dep,
goa_dep,
gweather_dep,
geoclue_dep,
geocode_dep,
m_dep,
]
lib = library(
'gcal',
sources: sources,
dependencies: gcal_deps,
)
gnome = import('gnome')
gnome.generate_gir(lib,
sources: [sources, headers],
namespace: 'Gcal',
nsversion: '1.0',
identifier_prefix: 'Gcal',
dependencies: [gcal_deps],
symbol_prefix: 'gcal',
)
I call generate_gir
passing headers and c files. Gcal-1.0.gir
and Gcal-1.0.typelib
files are generated, they are now not empty because they contain correct data.
I will have to put Gcal-1.0.gir
into /usr/share/gir-1.0
folder, and Gcal-1.0.typelib
in /usr/lib/girepository-1.0
.
and you use them like you do with any other introspected library
But I don’t know how. The only introspected libraries I use are Gtk, Gdk, Gio, etc. and PyGObject is providing them for me. I don’t know how PyGObject works under the hood. Can you explain me more how I can generate python bindings from the introspection data I have?
Thank you and everyone else a lot for helping me! I love you guys! I would have never achieved all this without you.