diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2013-07-11 18:25:42 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2013-07-11 19:12:04 +0200 |
commit | e70c5e1a9dc37b0f265be4a8cb6b28b7fec543ff (patch) | |
tree | cb0d851d0ee3d0ce44e7117d83e1a357a41e729b /tools/wixl | |
parent | b95579fdce3d1693d49977d68163e8b4ad4bb3d3 (diff) | |
download | msitools-e70c5e1a9dc37b0f265be4a8cb6b28b7fec543ff.tar.gz msitools-e70c5e1a9dc37b0f265be4a8cb6b28b7fec543ff.tar.xz msitools-e70c5e1a9dc37b0f265be4a8cb6b28b7fec543ff.zip |
wixl: add InstallScope
Diffstat (limited to 'tools/wixl')
-rw-r--r-- | tools/wixl/builder.vala | 18 | ||||
-rw-r--r-- | tools/wixl/msi.vala | 1 | ||||
-rw-r--r-- | tools/wixl/wix.vala | 1 |
3 files changed, 19 insertions, 1 deletions
diff --git a/tools/wixl/builder.vala b/tools/wixl/builder.vala index 9780ced..356652f 100644 --- a/tools/wixl/builder.vala +++ b/tools/wixl/builder.vala @@ -283,6 +283,14 @@ namespace Wixl { db.table_property.add ("UpgradeCode", add_braces (product.UpgradeCode)); } + [Flags] + enum SourceFlags { + SHORT_NAMES, + COMPRESSED, + ADMIN, + NO_PRIVILEGES, + } + public override void visit_package (WixPackage package) throws GLib.Error { if (package.Comments != null) db.info.set_comments (package.Comments); @@ -302,6 +310,16 @@ namespace Wixl { db.info.set_property (Libmsi.Property.VERSION, version); } + int source = SourceFlags.COMPRESSED; + if (package.InstallScope != null) { + if (package.InstallScope == "perUser") + source |= SourceFlags.NO_PRIVILEGES; + else if (package.InstallScope == "perMachine") + source |= 0; + else + error ("invalid InstallScope value: %s", package.InstallScope); + } + db.info.set_property (Libmsi.Property.SOURCE, source); } public override void visit_icon (WixIcon icon) throws GLib.Error { diff --git a/tools/wixl/msi.vala b/tools/wixl/msi.vala index 9c2e40e..7c0e570 100644 --- a/tools/wixl/msi.vala +++ b/tools/wixl/msi.vala @@ -811,7 +811,6 @@ namespace Wixl { info.set_property (Libmsi.Property.LASTSAVED_TM, time_to_filetime (now ())); 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); } catch (GLib.Error error) { diff --git a/tools/wixl/wix.vala b/tools/wixl/wix.vala index 41b83d8..6566920 100644 --- a/tools/wixl/wix.vala +++ b/tools/wixl/wix.vala @@ -335,6 +335,7 @@ namespace Wixl { public string SummaryCodepage { get; set; } public string Comments { get; set; } public string Description { get; set; } + public string InstallScope { get; set; } public override void accept (WixNodeVisitor visitor) throws GLib.Error { base.accept (visitor); |