summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-01-25 09:16:03 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2013-01-25 09:45:36 +0100
commit42e457fb52a35893e4a63cce42774dbf6d2fb3d6 (patch)
treebfc398ae8c10e2aacbab2bae1e4de905d194f72e /tools
parentf014a5c6d7dd4835b4e773605809b7ca44496a48 (diff)
downloadmsitools-42e457fb52a35893e4a63cce42774dbf6d2fb3d6.zip
msitools-42e457fb52a35893e4a63cce42774dbf6d2fb3d6.tar.gz
msitools-42e457fb52a35893e4a63cce42774dbf6d2fb3d6.tar.xz
wixl: two-stage visit for components
Diffstat (limited to 'tools')
-rw-r--r--tools/wixl/builder.vala4
-rw-r--r--tools/wixl/wix.vala5
2 files changed, 6 insertions, 3 deletions
diff --git a/tools/wixl/builder.vala b/tools/wixl/builder.vala
index 43a8542..8b3d994 100644
--- a/tools/wixl/builder.vala
+++ b/tools/wixl/builder.vala
@@ -347,8 +347,10 @@ namespace Wixl {
buffer[12], buffer[13], buffer[14], buffer[15]);
}
- public override void visit_component (WixComponent comp) throws GLib.Error {
+ public override void visit_component (WixComponent comp, VisitState state) throws GLib.Error {
var attr = 0;
+ if (state == VisitState.ENTER)
+ return;
if (comp.key is WixRegistryValue)
attr |= ComponentAttribute.REGISTRY_KEY_PATH;
diff --git a/tools/wixl/wix.vala b/tools/wixl/wix.vala
index dee6947..a7cf3c9 100644
--- a/tools/wixl/wix.vala
+++ b/tools/wixl/wix.vala
@@ -37,7 +37,7 @@ namespace Wixl {
public abstract void visit_property (WixProperty prop) throws GLib.Error;
public abstract void visit_media (WixMedia media) throws GLib.Error;
public abstract void visit_directory (WixDirectory dir) throws GLib.Error;
- public abstract void visit_component (WixComponent comp) throws GLib.Error;
+ public abstract void visit_component (WixComponent comp, VisitState state) throws GLib.Error;
public abstract void visit_feature (WixFeature feature, VisitState state) throws GLib.Error;
public abstract void visit_component_ref (WixComponentRef ref) throws GLib.Error;
public abstract void visit_remove_folder (WixRemoveFolder rm) throws GLib.Error;
@@ -995,8 +995,9 @@ namespace Wixl {
public List<WixFeature> in_feature;
public override void accept (WixNodeVisitor visitor) throws GLib.Error {
+ visitor.visit_component (this, VisitState.ENTER);
base.accept (visitor);
- visitor.visit_component (this);
+ visitor.visit_component (this, VisitState.LEAVE);
}
}