[msitools] wixl: add ExtendedType to CustomAction



commit fe9a3a12d883917e6202c71210c1701676b44213
Author: Marc-André Lureau <marcandre lureau gmail com>
Date:   Thu May 16 01:52:15 2013 +0200

    wixl: add ExtendedType to CustomAction

 tools/wixl/msi.vala |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/tools/wixl/msi.vala b/tools/wixl/msi.vala
index d11a357..f566ca8 100644
--- a/tools/wixl/msi.vala
+++ b/tools/wixl/msi.vala
@@ -575,15 +575,16 @@ namespace Wixl {
         static construct {
             name = "CustomAction";
             sql_create = "CREATE TABLE `CustomAction` (`Action` CHAR(72) NOT NULL, `Type` INT NOT NULL, 
`Source` CHAR(72), `Target` CHAR(255), `ExtendedType` LONG PRIMARY KEY `Action`)";
-            sql_insert = "INSERT INTO `CustomAction` (`Action`, `Type`, `Source`, `Target`) VALUES (?, ?, ?, 
?)";
+            sql_insert = "INSERT INTO `CustomAction` (`Action`, `Type`, `Source`, `Target`, `ExtendedType`) 
VALUES (?, ?, ?, ?, ?)";
         }
 
-        public void add (string Action, int Type, string Source, string Target) throws GLib.Error {
-            var rec = new Libmsi.Record (4);
+        public void add (string Action, int Type, string Source, string Target, int? ExtendedType = null) 
throws GLib.Error {
+            var rec = new Libmsi.Record (5);
             if (!rec.set_string (1, Action) ||
                 !rec.set_int (2, Type) ||
                 !rec.set_string (3, Source) ||
-                !rec.set_string (4, Target))
+                !rec.set_string (4, Target) ||
+                (ExtendedType != null && !rec.set_int (5, ExtendedType)))
                 throw new Wixl.Error.FAILED ("failed to add record");
 
             records.append (rec);


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