From dbbe5e39d069196aa17951b12575492cfa8c7976 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sun, 12 Mar 2017 14:42:04 +0100 Subject: Automatically compile and use gsettings schema --- main/src/main.vala | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'main/src') diff --git a/main/src/main.vala b/main/src/main.vala index bec2d752..ba326ad8 100644 --- a/main/src/main.vala +++ b/main/src/main.vala @@ -5,7 +5,14 @@ namespace Dino { void main(string[] args) { try{ - Plugins.Loader loader = new Plugins.Loader(args.length > 0 ? args[0] : null); + string? exec_path = args.length > 0 ? args[0] : null; + if (exec_path != null && exec_path.contains(Path.DIR_SEPARATOR_S)) { + string bindir = Path.get_dirname(exec_path); + if (FileUtils.test(Path.build_filename(bindir, "gschemas.compiled"), FileTest.IS_REGULAR)) { + Environment.set_variable("GSETTINGS_SCHEMA_DIR", Path.get_dirname(exec_path), false); + } + } + Plugins.Loader loader = new Plugins.Loader(exec_path); Gtk.init(ref args); Dino.Ui.Application app = new Dino.Ui.Application(); foreach (string plugin in new string[]{"omemo", "openpgp"}) { -- cgit v1.2.3-54-g00ecf