diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2013-01-11 18:47:58 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2013-01-11 18:47:58 +0100 |
commit | fdcb3c9e17bc602a193fc6bf7cec2412c3f883f0 (patch) | |
tree | 01429a84b24601fc5a1148b7887d42ac32f52956 /tools | |
parent | 86948b9b08000540129787331b951a9018bf734c (diff) | |
download | msitools-fdcb3c9e17bc602a193fc6bf7cec2412c3f883f0.tar.gz msitools-fdcb3c9e17bc602a193fc6bf7cec2412c3f883f0.tar.xz msitools-fdcb3c9e17bc602a193fc6bf7cec2412c3f883f0.zip |
wixl: allow ComponentGroupRef as child of ComponentGroup
This is not available in WiX upstream, but it makes life easy to
have componentgroup dependencies..
Diffstat (limited to 'tools')
-rw-r--r-- | tools/wixl/builder.vala | 17 | ||||
-rw-r--r-- | tools/wixl/wix.vala | 1 |
2 files changed, 15 insertions, 3 deletions
diff --git a/tools/wixl/builder.vala b/tools/wixl/builder.vala index 50fbdd3..30a6b72 100644 --- a/tools/wixl/builder.vala +++ b/tools/wixl/builder.vala @@ -395,6 +395,17 @@ namespace Wixl { db.table_feature_components.add (feature.Id, component.Id); } + void feature_add_component_group (WixFeature feature, WixComponentGroup group) throws GLib.Error { + foreach (var node in group.children) { + var child = node as WixElement; + if (child is WixComponentGroupRef) { + feature_add_component_group (feature, resolve<WixComponentGroup> (child)); + } else { + feature_add_component (feature, resolve<WixComponent> (child)); + } + } + } + public override void visit_component_ref (WixComponentRef ref) throws GLib.Error { var component = resolve<WixComponent> (@ref); @@ -411,9 +422,9 @@ namespace Wixl { if (ref.parent is WixFeature) { var feature = ref.parent as WixFeature; - - foreach (var comp in group.children) - feature_add_component (feature, resolve<WixComponent> (comp as WixElement)); + feature_add_component_group (feature, group); + } else if (ref.parent is WixComponentGroup) { + // is added by parent group } else warning ("unhandled parent type %s", @ref.parent.name); } diff --git a/tools/wixl/wix.vala b/tools/wixl/wix.vala index f4d596b..1901d09 100644 --- a/tools/wixl/wix.vala +++ b/tools/wixl/wix.vala @@ -217,6 +217,7 @@ namespace Wixl { add_child_types (child_types, { typeof (WixComponentRef), + typeof (WixComponentGroupRef), }); } } |