Skip to content

Commit 3a23265

Browse files
committed
fix(build): use WiX 4/5 attribute syntax for Component Condition
The WXS template declared xmlns="http://wixtoolset.org/schemas/v4/wxs" but used WiX 3 syntax (<Condition>SOMEPROP</Condition> as a child of <Component>). WiX 4 and later expect the condition as a Component attribute. The build now fails with `WIX0005: The Component element contains an unexpected child element 'Condition'`. Move the ICINGA2_SERVICE_FOUND check from a child element to an attribute. Validated against the v2.2.1 WXS, which used the same nested Directory structure and Component-with-only-ServiceControl pattern successfully. The Property/RegistrySearch addition from the October 2025 rewrite uses standard WiX 4/5 syntax and stays.
1 parent 7982d2e commit 3a23265

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

build/create-wxs.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ cat > "$LFMP_DIR_PACKAGED/in/lfmp.wxs" << EOF
3737
<Files Include="$LFMP_DIR_COMPILED\check-plugins\**" />
3838
3939
<!-- Only run ServiceControl if the Icinga 2 service exists -->
40-
<Component Id="Icinga2ServiceControl" Guid="{7e398e63-b894-47d1-9375-eea744988032}">
41-
<Condition>ICINGA2_SERVICE_FOUND</Condition>
40+
<Component Id="Icinga2ServiceControl" Guid="{7e398e63-b894-47d1-9375-eea744988032}" Condition="ICINGA2_SERVICE_FOUND">
4241
<ServiceControl
4342
Id="icinga2"
4443
Name="icinga2"

0 commit comments

Comments
 (0)