diff options
author | Daniel Espinosa <esodan@gmail.com> | 2017-05-26 13:42:55 -0500 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2017-06-07 18:05:56 +0200 |
commit | a667b82aab0fecb6f932de54ddfd0a577e3f8cd7 (patch) | |
tree | 6b22b90c2d966af2a5a43ecdc8d692e15d905579 /compiler | |
parent | 7a282213f56bfd33dd8fe91c4e349ccc403fcc27 (diff) | |
download | vala-a667b82aab0fecb6f932de54ddfd0a577e3f8cd7.tar.gz |
compiler: Add --gresourcesdir option
In case a gresources.xml is located in a different directory than its
corresponding resources, --gresourcesdir will add additional search
locations for UI files of Gtk+ templates.
https://bugzilla.gnome.org/show_bug.cgi?id=783133
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/valacompiler.vala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala index d2d399760..8a87525c9 100644 --- a/compiler/valacompiler.vala +++ b/compiler/valacompiler.vala @@ -49,6 +49,8 @@ class Vala.Compiler { static string target_glib; [CCode (array_length = false, array_null_terminated = true)] static string[] gresources; + [CCode (array_length = false, array_null_terminated = true)] + static string[] gresources_directories; static bool ccode_only; static string header_filename; @@ -151,7 +153,8 @@ class Vala.Compiler { { "no-color", 0, 0, OptionArg.NONE, ref disable_colored_output, "Disable colored output, alias for --color=never", null }, { "color", 0, OptionFlags.OPTIONAL_ARG, OptionArg.CALLBACK, (void*) option_parse_color, "Enable color output, options are 'always', 'never', or 'auto'", "WHEN" }, { "target-glib", 0, 0, OptionArg.STRING, ref target_glib, "Target version of glib for code generation", "MAJOR.MINOR" }, - { "gresources", 0, 0, OptionArg.STRING_ARRAY, ref gresources, "XML of gresources", "FILE..." }, + { "gresources", 0, 0, OptionArg.FILENAME_ARRAY, ref gresources, "XML of gresources", "FILE..." }, + { "gresourcesdir", 0, 0, OptionArg.FILENAME_ARRAY, ref gresources_directories, "Look for resources in DIRECTORY", "DIRECTORY..." }, { "enable-version-header", 0, 0, OptionArg.NONE, ref enable_version_header, "Write vala build version in generated files", null }, { "disable-version-header", 0, 0, OptionArg.NONE, ref disable_version_header, "Do not write vala build version in generated files", null }, { "", 0, 0, OptionArg.FILENAME_ARRAY, ref sources, null, "FILE..." }, @@ -327,6 +330,7 @@ class Vala.Compiler { } context.gresources = gresources; + context.gresources_directories = gresources_directories; if (context.report.get_errors () > 0 || (fatal_warnings && context.report.get_warnings () > 0)) { return quit (); |