summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-01-17 11:20:16 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2013-01-17 15:31:20 +0100
commitc23d2f3151eb15160c4d63b189ca7629fd333635 (patch)
tree234aed4908a099be9728efc901b558c0aa547554 /tools
parent482ea4104953dd882ce435e3d45320b3f7114d72 (diff)
downloadmsitools-c23d2f3151eb15160c4d63b189ca7629fd333635.tar.gz
msitools-c23d2f3151eb15160c4d63b189ca7629fd333635.tar.xz
msitools-c23d2f3151eb15160c4d63b189ca7629fd333635.zip
wixl: add --wxidir option
Diffstat (limited to 'tools')
-rw-r--r--tools/wixl/builder.vala1
-rw-r--r--tools/wixl/wixl.vala12
2 files changed, 11 insertions, 2 deletions
diff --git a/tools/wixl/builder.vala b/tools/wixl/builder.vala
index f269852..9c1c9e8 100644
--- a/tools/wixl/builder.vala
+++ b/tools/wixl/builder.vala
@@ -6,7 +6,6 @@ namespace Wixl {
add_path (".");
foreach (var i in includedirs)
this.includedirs.append (File.new_for_path (i));
- this.includedirs.append (File.new_for_path (Config.PKGDATADIR + "include"));
}
WixRoot root;
diff --git a/tools/wixl/wixl.vala b/tools/wixl/wixl.vala
index 220d292..1cd2a76 100644
--- a/tools/wixl/wixl.vala
+++ b/tools/wixl/wixl.vala
@@ -11,14 +11,18 @@ namespace Wixl {
[CCode (array_length = false, array_null_terminated = true)]
static string[] defines;
[CCode (array_length = false, array_null_terminated = true)]
+ static string[] opt_includedirs;
+
static string[] includedirs;
+ static string wxidir;
private const OptionEntry[] options = {
{ "version", 0, 0, OptionArg.NONE, ref version, N_("Display version number"), null },
{ "verbose", 'v', 0, OptionArg.NONE, ref verbose, N_("Verbose output"), null },
{ "output", 'o', 0, OptionArg.FILENAME, ref output, N_("Output file"), null },
{ "define", 'D', 0, OptionArg.STRING_ARRAY, ref defines, N_("Define variable"), null },
- { "includedir", 'I', 0, OptionArg.STRING_ARRAY, ref includedirs, N_("Include directory"), null },
+ { "includedir", 'I', 0, OptionArg.STRING_ARRAY, ref opt_includedirs, N_("Include directory"), null },
+ { "wxidir", 0, 0, OptionArg.STRING, ref wxidir, N_("System include directory"), null },
{ "only-preproc", 'E', 0, OptionArg.NONE, ref preproc, N_("Stop after the preprocessing stage"), null },
{ "", 0, 0, OptionArg.FILENAME_ARRAY, ref files, null, N_("INPUT_FILE...") },
{ null }
@@ -35,6 +39,8 @@ namespace Wixl {
opt_context.set_help_enabled (true);
opt_context.add_main_entries (options, null);
+ wxidir = Config.PKGDATADIR + "/include";
+
try {
opt_context.parse (ref args);
} catch (OptionError.BAD_VALUE err) {
@@ -44,6 +50,10 @@ namespace Wixl {
warning (error.message);
}
+ /* fixme vala, does not support += on arrays without length. */
+ includedirs = opt_includedirs;
+ includedirs += wxidir;
+
if (version) {
GLib.stdout.printf ("%s\n", Config.PACKAGE_VERSION);
exit (0);