[msitools: 2/3] Auto-detect RegistrySearch::Win64 with --arch flag




commit 8fa30eaaf9455f926ed13ffcd0bbba8471c26cf5
Author: roblabla <unfiltered roblab la>
Date:   Fri Nov 12 22:54:27 2021 +0100

    Auto-detect RegistrySearch::Win64 with --arch flag
    
    The same logic is used as for Component::Win64 auto-detection introduced
    in the previous commit.

 tools/wixl/builder.vala | 5 ++++-
 tools/wixl/wix.vala     | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/tools/wixl/builder.vala b/tools/wixl/builder.vala
index dc31b3b..40890ce 100644
--- a/tools/wixl/builder.vala
+++ b/tools/wixl/builder.vala
@@ -1162,7 +1162,10 @@ namespace Wixl {
 
             var root = RegistryRoot.from_string (search.Root.down ());
             var type = RegistryType.from_string (search.Type.down ());
-            if (parse_yesno (search.Win64))
+
+            if (search.Win64 != null && parse_yesno (search.Win64))
+                type |= RegistryType.64BIT;
+            else if (search.Win64 == null && (arch == Arch.X64 || arch == Arch.IA64))
                 type |= RegistryType.64BIT;
 
             db.table_app_search.add (property.Id, search.Id);
diff --git a/tools/wixl/wix.vala b/tools/wixl/wix.vala
index fe5cbdd..985a1e9 100644
--- a/tools/wixl/wix.vala
+++ b/tools/wixl/wix.vala
@@ -312,7 +312,7 @@ namespace Wixl {
         public string Key { get; set; }
         public string Type { get; set; }
         public string Name { get; set; }
-        public string Win64 { get; set; }
+        public string? Win64 { get; set; }
 
         public override void accept (WixNodeVisitor visitor) throws GLib.Error {
             visitor.visit_registry_search (this);


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