gnome-shell/js/misc/config.js.in
Florian Müllner 5a9d365f84 config: Check runtime dependencies at runtime
Both bluetooth and screencast support are based on build checks
right now. However in both cases, the dependency is only consumed
at runtime via the typelib, so let's actually check for that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2297>
2022-05-20 12:00:22 +00:00

28 lines
1.0 KiB
JavaScript

// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const pkg = imports.package;
/* The name of this package (not localized) */
var PACKAGE_NAME = '@PACKAGE_NAME@';
/* The version of this package */
var PACKAGE_VERSION = '@PACKAGE_VERSION@';
/* 1 if networkmanager is available, 0 otherwise */
var HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@;
/* 1 if soup2 should be used instead of soup3, 0 otherwise */
var HAVE_SOUP2 = @HAVE_SOUP2@;
/* gettext package */
var GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
/* locale dir */
var LOCALEDIR = '@datadir@/locale';
/* other standard directories */
var LIBEXECDIR = '@libexecdir@';
var PKGDATADIR = '@datadir@/@PACKAGE_NAME@';
/* g-i package versions */
var LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@'
var HAVE_BLUETOOTH = pkg.checkSymbol('GnomeBluetooth', '3.0');
var HAVE_RECORDER =
pkg.checkSymbol('Gst', '1.0') &&
imports.gi.Gst.init_check(null) &&
imports.gi.Gst.ElementFactory.find('pipewiresrc') &&
imports.gi.Gst.ElementFactory.find('filesrc');