[msitools] wixl: visit Binary and fill db



commit 73cf9832c693b548bd1732ab77bec9e349e3cdd6
Author: Marc-André Lureau <marcandre lureau gmail com>
Date:   Thu May 16 01:53:30 2013 +0200

    wixl: visit Binary and fill db

 tools/wixl/builder.vala |    7 +++++++
 tools/wixl/wix.vala     |   19 +++++++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/tools/wixl/builder.vala b/tools/wixl/builder.vala
index a7405ad..b57cac8 100644
--- a/tools/wixl/builder.vala
+++ b/tools/wixl/builder.vala
@@ -1031,6 +1031,13 @@ namespace Wixl {
 
             db.table_custom_action.add (action.Id, type, action.Property, action.ExeCommand);
         }
+
+        public override void visit_binary (WixBinary binary) throws GLib.Error {
+            FileInfo info;
+
+            binary.file = find_file (binary.SourceFile, out info);
+            db.table_binary.add (binary.Id, binary.file.get_path ());
+        }
     }
 
 } // Wixl
diff --git a/tools/wixl/wix.vala b/tools/wixl/wix.vala
index 52ec667..717062b 100644
--- a/tools/wixl/wix.vala
+++ b/tools/wixl/wix.vala
@@ -63,6 +63,7 @@ namespace Wixl {
         public abstract void visit_service_install (WixServiceInstall service_install, VisitState state) 
throws GLib.Error;
         public abstract void visit_registry_search (WixRegistrySearch search) throws GLib.Error;
         public abstract void visit_custom_action (WixCustomAction action) throws GLib.Error;
+        public abstract void visit_binary (WixBinary binary) throws GLib.Error;
     }
 
     public abstract class WixNode: Object {
@@ -912,12 +913,29 @@ namespace Wixl {
         public string ExeCommand { get; set; }
         public string Impersonate { get; set; }
         public string Return { get; set; }
+        public string BinaryKey { get; set; }
+        public string DllEntry { get; set; }
+        public string HideTarget { get; set; }
 
         public override void accept (WixNodeVisitor visitor) throws GLib.Error {
             visitor.visit_custom_action (this);
         }
     }
 
+    public class WixBinary: WixElement {
+        static construct {
+            name = "Binary";
+        }
+
+        public string SourceFile { get; set; }
+
+        public File file;
+
+        public override void accept (WixNodeVisitor visitor) throws GLib.Error {
+            visitor.visit_binary (this);
+        }
+    }
+
     public class WixProduct: WixElement {
         static construct {
             name = "Product";
@@ -938,6 +956,7 @@ namespace Wixl {
                 typeof (WixProperty),
                 typeof (WixUpgrade),
                 typeof (WixCustomAction),
+                typeof (WixBinary),
             });
         }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]