diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2013-07-11 18:21:22 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2013-07-11 18:26:27 +0200 |
commit | ab926e5224dafc3d9f79283e6207930357dc2cae (patch) | |
tree | 59240c438349b2ed9462b0b53fe0a76c2d7afd99 /tools | |
parent | fb78165f1e084f48abd93e003a6045fa11a9bf69 (diff) | |
download | msitools-ab926e5224dafc3d9f79283e6207930357dc2cae.tar.gz msitools-ab926e5224dafc3d9f79283e6207930357dc2cae.tar.xz msitools-ab926e5224dafc3d9f79283e6207930357dc2cae.zip |
wixl: start MediaTemplate
Diffstat (limited to 'tools')
-rw-r--r-- | tools/wixl/builder.vala | 10 | ||||
-rw-r--r-- | tools/wixl/wix.vala | 14 |
2 files changed, 23 insertions, 1 deletions
diff --git a/tools/wixl/builder.vala b/tools/wixl/builder.vala index 368b6c2..9c0bc59 100644 --- a/tools/wixl/builder.vala +++ b/tools/wixl/builder.vala @@ -194,9 +194,9 @@ namespace Wixl { table.add_sorted_actions (); } + List<WixMedia> medias; private void build_cabinet () throws GLib.Error { var sequence = 0; - var medias = get_elements<WixMedia> (); foreach (var m in medias) { var folder = new GCab.Folder (GCab.Compression.MSZIP); @@ -324,6 +324,7 @@ namespace Wixl { var rec = db.table_media.add (media.Id, media.DiskPrompt, cabinet); media.record = rec; + medias.append (media); } public override void visit_directory (WixDirectory dir) throws GLib.Error { @@ -1089,6 +1090,13 @@ namespace Wixl { node.add_dep (table.get_action ("InstallValidate")); } + public override void visit_media_template (WixMediaTemplate tmpl) throws GLib.Error { + var media = new WixMedia (); + media.EmbedCab = tmpl.EmbedCab; + media.Cabinet = "cab1.cab"; + media.Id = "1"; + visit_media (media); + } } } // Wixl diff --git a/tools/wixl/wix.vala b/tools/wixl/wix.vala index 3120be7..eaf3d56 100644 --- a/tools/wixl/wix.vala +++ b/tools/wixl/wix.vala @@ -65,6 +65,7 @@ namespace Wixl { public abstract void visit_custom_action (WixCustomAction action) throws GLib.Error; public abstract void visit_binary (WixBinary binary) throws GLib.Error; public abstract void visit_major_upgrade (WixMajorUpgrade major) throws GLib.Error; + public abstract void visit_media_template (WixMediaTemplate media) throws GLib.Error; } public abstract class WixNode: Object { @@ -950,6 +951,18 @@ namespace Wixl { } } + public class WixMediaTemplate: WixElement { + static construct { + name = "MediaTemplate"; + } + + public string EmbedCab { get; set; } + + public override void accept (WixNodeVisitor visitor) throws GLib.Error { + visitor.visit_media_template (this); + } + } + public class WixProduct: WixElement { static construct { name = "Product"; @@ -972,6 +985,7 @@ namespace Wixl { typeof (WixCustomAction), typeof (WixBinary), typeof (WixMajorUpgrade), + typeof (WixMediaTemplate), }); } |