summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/wixl/builder.vala14
-rw-r--r--tools/wixl/msi.vala15
2 files changed, 22 insertions, 7 deletions
diff --git a/tools/wixl/builder.vala b/tools/wixl/builder.vala
index 924672b..b3da2e9 100644
--- a/tools/wixl/builder.vala
+++ b/tools/wixl/builder.vala
@@ -239,7 +239,7 @@ namespace Wixl {
}
public MsiDatabase build () throws GLib.Error {
- db = new MsiDatabase ();
+ db = new MsiDatabase (arch);
foreach (var r in roots) {
root = r;
@@ -281,8 +281,14 @@ namespace Wixl {
if (package.Keywords != null)
db.info.set_keywords (package.Keywords);
- if (package.InstallerVersion != null)
- db.info.set_property (Libmsi.Property.VERSION, int.parse (package.InstallerVersion));
+ if (package.InstallerVersion != null) {
+ var version = int.parse (package.InstallerVersion);
+
+ if (arch != Arch.X86 && version < 200)
+ warning ("InstallerVersion >= 200 required for !x86 builds");
+
+ db.info.set_property (Libmsi.Property.VERSION, version);
+ }
}
@@ -349,7 +355,7 @@ namespace Wixl {
var cs = new Checksum (ChecksumType.SHA1);
uint8 buffer[20];
size_t buflen = buffer.length;
-
+
cs.update (uuid_namespace.data, 16);
cs.update (s.data, s.length);
cs.get_digest (buffer, ref buflen);
diff --git a/tools/wixl/msi.vala b/tools/wixl/msi.vala
index ed3c949..f1de726 100644
--- a/tools/wixl/msi.vala
+++ b/tools/wixl/msi.vala
@@ -673,6 +673,8 @@ namespace Wixl {
}
class MsiDatabase: Object {
+ public Arch arch { get; construct set; }
+
public MsiSummaryInfo info;
public MsiTableProperty table_property;
public MsiTableIcon table_icon;
@@ -701,6 +703,13 @@ namespace Wixl {
public HashTable<string, MsiTable> tables;
+ int get_default_version () {
+ if (arch == Arch.X86)
+ return 100;
+ else
+ return 200;
+ }
+
construct {
info = new MsiSummaryInfo ();
try {
@@ -713,7 +722,7 @@ namespace Wixl {
time_to_filetime (now ()));
info.set_property (Libmsi.Property.LASTSAVED_TM,
time_to_filetime (now ()));
- info.set_property (Libmsi.Property.VERSION, 100);
+ info.set_property (Libmsi.Property.VERSION, get_default_version ());
info.set_property (Libmsi.Property.SOURCE, 2);
info.set_property (Libmsi.Property.APPNAME, Config.PACKAGE_STRING);
info.set_property (Libmsi.Property.SECURITY, 2);
@@ -779,8 +788,8 @@ namespace Wixl {
}
}
- public MsiDatabase () {
- // empty ctor
+ public MsiDatabase (Arch arch) {
+ Object (arch: arch);
}
public void build (string filename) throws GLib.Error {