Create a config.vapi for config.h
Currently, a lot of our build variables that are defined at configuration time, are spread out across the code base, often declared as `extern` which can break when moving around sections of the code across files. This commit introduces a "Config" namespace which basically maps to the definitions in `config.h`, but allows us to properly access them too from the Vala source code. By doing so, it helps us to more explicitly see where we rely on a build variable from this file (which should be obvious from the `Config' namespace). To make it ourselves a bit easier in Meson too, we can declare an internal dependency, which helps ensure that we pull in the dependency where needed.
This commit is contained in:
parent
dc14aa091c
commit
6ce2373a75
39 changed files with 126 additions and 131 deletions
|
|
@ -16,7 +16,7 @@ int main(string[] args) {
|
|||
Environment.set_variable("GSETTINGS_BACKEND", "memory", true);
|
||||
|
||||
// Let GSettings know where to find the dev schema
|
||||
Environment.set_variable("GSETTINGS_SCHEMA_DIR", _GSETTINGS_DIR, true);
|
||||
Environment.set_variable("GSETTINGS_SCHEMA_DIR", Config.GSETTINGS_DIR, true);
|
||||
|
||||
/*
|
||||
* Initialise all the things.
|
||||
|
|
@ -27,7 +27,7 @@ int main(string[] args) {
|
|||
Gtk.init(ref args);
|
||||
Test.init(ref args);
|
||||
|
||||
IconFactory.init(GLib.File.new_for_path(_SOURCE_ROOT_DIR));
|
||||
IconFactory.init(GLib.File.new_for_path(Config.SOURCE_ROOT_DIR));
|
||||
Geary.RFC822.init();
|
||||
Geary.HTML.init();
|
||||
Geary.Logging.init();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue