From 8b9c84a007e660021c9cf5c8374dd7c5ff34690a Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 17 May 2013 01:33:36 +0200 Subject: Add basic JScript CustomAction support --- tools/wixl/builder.vala | 18 +++++++++++++----- tools/wixl/wix.vala | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/wixl/builder.vala b/tools/wixl/builder.vala index 0855fe5..0ed8abc 100644 --- a/tools/wixl/builder.vala +++ b/tools/wixl/builder.vala @@ -1020,12 +1020,23 @@ namespace Wixl { public override void visit_custom_action (WixCustomAction action) throws GLib.Error { CustomActionType type; + string source, target; // FIXME: so many missing things here... - if (action.DllEntry != null) + if (action.DllEntry != null) { type = CustomActionType.DLL_BINARY; - else + source = action.BinaryKey; + target = action.DllEntry; + } else if (action.JScriptCall != null) { + type = CustomActionType.JSCRIPT_BINARY; + source = action.BinaryKey; + target = action.JScriptCall; + } else if (action.ExeCommand != null) { type = CustomActionType.EXE_PROPERTY; + source = action.Property; + target = action.ExeCommand; + } else + throw new Wixl.Error.FAILED ("Unsupported CustomAction"); if (action.Return == "ignore") type |= CustomActionType.CONTINUE; @@ -1034,9 +1045,6 @@ namespace Wixl { if (!parse_yesno (action.Impersonate)) type |= CustomActionType.NO_IMPERSONATE; - string source = action.Property ?? action.BinaryKey; - string target = action.ExeCommand ?? action.DllEntry; - db.table_custom_action.add (action.Id, type, source, target); } diff --git a/tools/wixl/wix.vala b/tools/wixl/wix.vala index 717062b..1419090 100644 --- a/tools/wixl/wix.vala +++ b/tools/wixl/wix.vala @@ -916,6 +916,7 @@ namespace Wixl { public string BinaryKey { get; set; } public string DllEntry { get; set; } public string HideTarget { get; set; } + public string JScriptCall { get; set; } public override void accept (WixNodeVisitor visitor) throws GLib.Error { visitor.visit_custom_action (this); -- cgit