summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-05-17 01:33:36 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2013-05-17 01:33:36 +0200
commit8b9c84a007e660021c9cf5c8374dd7c5ff34690a (patch)
tree0ee61535bb8088192415421ee2aa28215b4035fe /tools
parentf111627a1a1fcb6b83b6cf8bdaacfa72cf3a3f6f (diff)
downloadmsitools-8b9c84a007e660021c9cf5c8374dd7c5ff34690a.zip
msitools-8b9c84a007e660021c9cf5c8374dd7c5ff34690a.tar.gz
msitools-8b9c84a007e660021c9cf5c8374dd7c5ff34690a.tar.xz
Add basic JScript CustomAction support
Diffstat (limited to 'tools')
-rw-r--r--tools/wixl/builder.vala18
-rw-r--r--tools/wixl/wix.vala1
2 files changed, 14 insertions, 5 deletions
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);