...
 
Commits (7)
......@@ -64,5 +64,37 @@ configure_file (
install_dir: join_paths(datadir, 'glib-2.0', 'schemas'),
)
ontology_conf = configuration_data()
ontology_conf.set('appid', application_id)
configure_file (
input: 'org.gnome.Games.rule.in',
output: '@0@.rule'.format(application_id),
configuration: ontology_conf,
install: true,
install_dir: join_paths (datadir, 'tracker', 'domain-ontologies')
)
service_conf = configuration_data()
service_conf.set('appid', application_id)
service_conf.set('libexecdir', libexecdir)
services = [
'Tracker1',
'Tracker1.Miner.Applications',
'Tracker1.Miner.Extract',
'Tracker1.Miner.Files',
'Tracker1.Writeback',
]
foreach service: services
configure_file (
input: 'org.gnome.Games.@0@.service.in'.format(service),
output: '@0@.@1@.service'.format(application_id, service),
configuration: service_conf,
install: true,
install_dir: join_paths (datadir, 'dbus-1', 'services')
)
endforeach
subdir ('icons')
subdir ('options')
[D-BUS Service]
Name=@appid@.Tracker1.Miner.Applications
Exec=@libexecdir@/tracker-miner-apps -d @appid@
# Miner details needed for tracker-control
Path=/org/freedesktop/Tracker1/Miner/Applications
NameSuffix=Miner.Applications
DisplayName=Applications
Comment=Applications data miner
[D-BUS Service]
Name=@appid@.Tracker1.Miner.Extract
Exec=@libexecdir@/tracker-extract -d @appid@
# Miner details needed for tracker-control
Path=/org/freedesktop/Tracker1/Miner/Extract
NameSuffix=Miner.Extract
DisplayName=Extractor
Comment=Metadata extractor
[D-BUS Service]
Name=@appid@.Tracker1.Miner.Files
Exec=@libexecdir@/tracker-miner-fs -d @appid@
# Miner details needed for tracker-control
Path=/org/freedesktop/Tracker1/Miner/Files
NameSuffix=Miner.Files
DisplayName=File System
Comment=File system data miner
[D-BUS Service]
Name=@appid@.Tracker1.Writeback
Exec=@libexecdir@/tracker-writeback -d @appid@
[D-BUS Service]
Name=@appid@.Tracker1
Exec=@libexecdir@/tracker-store -d @appid@
[DomainOntology]
# All locations accept
# 1) Paths relative from a variable, the variables
# may be: HOME, XDG_CACHE_HOME, XDG_DATA_HOME, XDG_RUNTIME_DIR,
# XDG_DESKTOP_DIR, XDG_DOCUMENTS_DIR, XDG_DOWNLOAD_DIR,
# XDG_MUSIC_DIR, XDG_PICTURES_DIR, XDG_PUBLICSHARE_DIR,
# XDG_VIDEOS_DIR.
#
# eg. $XDG_CACHE_HOME/...
#
# 2) URIs
#
# eg. file:///var/...
#
# Location for the Tracker database (not optional)
CacheLocation=$XDG_CACHE_HOME/gnome-games/tracker
# Location for the data journal, used in data recovery
# situations (optional)
JournalLocation=$XDG_DATA_HOME/gnome-games/tracker/journal
# Name of the ontology to use, must be one located in
# $(sharedir)/tracker/ontologies
OntologyName=nepomuk
# DBus name for the owner (not optional). Tracker will use
# the domain as the prefix of the DBus name for all the
# services related to this domain ontology.
#
# eg. org.gnome.Photos
Domain=@appid@
# Miners that the domain ontology will require. This is
# purely a hint (mainly for libtracker-control), and not
# any sort of white list. Anything else knowing about this
# domain ontology may still perform updates, miners and
# non-miners.
Miners=Miner.Files;Miner.Extract;
\ No newline at end of file
......@@ -23,8 +23,6 @@
"--device=dri",
/* PulseAudio access */
"--socket=pulseaudio",
/* Tracker access */
"--talk-name=org.freedesktop.Tracker1",
/* Needed for dconf to work */
"--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro",
......@@ -58,7 +56,6 @@
"*.la",
"*.a",
"/lib/girepository-1.0",
"/share/dbus-1",
"/share/doc",
"/share/gir-1.0"
],
......
......@@ -42,6 +42,7 @@ retro_gtk_dep = dependency ('retro-gtk-0.14', version: '>=' + retro_gtk_min_vers
rsvg_dep = dependency ('librsvg-2.0')
soup_dep = dependency ('libsoup-2.4')
sqlite_dep = dependency ('sqlite3')
tracker_control_dep = dependency ('tracker-control-2.0')
tracker_sparql_dep = dependency ('tracker-sparql-2.0')
xml_dep = dependency ('libxml-2.0')
......@@ -51,6 +52,7 @@ podir = join_paths (meson.source_root (), 'po')
prefix = get_option('prefix')
datadir = join_paths (prefix, get_option ('datadir'))
libdir = join_paths (prefix, get_option ('libdir'))
libexecdir = join_paths (prefix, get_option ('libexecdir'))
localedir = join_paths (prefix, get_option ('localedir'))
options_dir = join_paths (datadir, meson.project_name(), 'options')
plugins_dir = join_paths (libdir, meson.project_name(), 'plugins')
......
......@@ -213,6 +213,7 @@ dependencies = [
rsvg_dep,
soup_dep,
sqlite_dep,
tracker_control_dep,
tracker_sparql_dep,
xml_dep,
valac.find_library ('linux'),
......
......@@ -12,6 +12,7 @@ public class Games.Application : Gtk.Application {
private bool game_list_loaded;
private GameCollection game_collection;
private Tracker.MinerManager tracker_miner_manager;
private Manette.Monitor manette_monitor;
......@@ -249,8 +250,16 @@ public class Games.Application : Gtk.Application {
TrackerUriSource tracker_uri_source = null;
try {
Tracker.Sparql.Connection.set_domain (Config.APPLICATION_ID);
var connection = Tracker.Sparql.Connection.@get ();
tracker_uri_source = new TrackerUriSource (connection);
tracker_miner_manager = new Tracker.MinerManager ();
message("ontology: %s", tracker_miner_manager.domain_ontology);
var services = tracker_miner_manager.get_running ();
foreach (var service in services)
message("miner: %s", service);
}
catch (Error e) {
debug (e.message);
......