MantisBT - CMake
View Issue Details
0015236CMakeCPackpublic2014-11-07 10:252016-06-10 14:31
Richard Ulrich 
Kitware Robot 
normalfeaturealways
closedmoved 
CMake 3.0 
 
0015236: CPACK_COMPONENT_GROUP can de-select required children
I have some required features inside a group.
Now in the WiX installer, I cannot deselect the features separately, but I can de-select the group as a whole.
I didn't find a way to make the group required.

No idea how this bahaves with the other generators..
SET(CPACK_GENERATOR WIX)
# documenting the components
SET(CPACK_COMPONENT_RUNTIME_DISPLAY_NAME "Runtimes")
SET(CPACK_COMPONENT_RUNTIME_DESCRIPTION "!(loc.FeatDescRuntimes)")
SET(CPACK_COMPONENT_BASE_DISPLAY_NAME "Base")
SET(CPACK_COMPONENT_BASE_DESCRIPTION "!(loc.FeatDescBase)")
SET(CPACK_COMPONENT_SHARED_DISPLAY_NAME "Shared")
SET(CPACK_COMPONENT_SHARED_DESCRIPTION "!(loc.FeatDescShared)")
SET(CPACK_COMPONENT_PYTHON_DISPLAY_NAME "Python")
SET(CPACK_COMPONENT_PYTHON_DESCRIPTION "!(loc.FeatDescPython)")
SET(CPACK_COMPONENT_CONVERTER_DISPLAY_NAME "Converter")
SET(CPACK_COMPONENT_CONVERTER_DESCRIPTION "!(loc.FeatDescConverter)")
SET(CPACK_COMPONENT_VIEWER_DISPLAY_NAME "Viewer")
SET(CPACK_COMPONENT_VIEWER_DESCRIPTION "!(loc.FeatDescViewer)")
SET(CPACK_COMPONENT_PL2D_DISPLAY_NAME "PointLine2D")
SET(CPACK_COMPONENT_PL2D_DESCRIPTION "!(loc.FeatDescPointLine2D)")
SET(CPACK_COMPONENT_PL3D_DISPLAY_NAME "PointLine3D")
SET(CPACK_COMPONENT_PL3D_DESCRIPTION "!(loc.FeatDescPointLine3D)")
# grouping
SET(CPACK_COMPONENT_GROUP_REQUIREMENTS_DESCRIPTION "!(loc.FeatDescRequirements)")
SET(CPACK_COMPONENT_RUNTIME_GROUP "Requirements")
SET(CPACK_COMPONENT_BASE_GROUP "Requirements")
SET(CPACK_COMPONENT_SHARED_GROUP "Requirements")
SET(CPACK_COMPONENT_PYTHON_GROUP "Requirements")
# requirements
SET(CPACK_COMPONENT_RUNTIME_REQUIRED TRUE)
SET(CPACK_COMPONENT_BASE_REQUIRED TRUE)
SET(CPACK_COMPONENT_SHARED_REQUIRED TRUE)
SET(CPACK_COMPONENT_PYTHON_REQUIRED FALSE)
SET(CPACK_COMPONENT_CONVERTER_REQUIRED FALSE)
SET(CPACK_COMPONENT_VIEWER_REQUIRED FALSE)
SET(CPACK_COMPONENT_PL2D_REQUIRED FALSE)
SET(CPACK_COMPONENT_PL3D_REQUIRED FALSE)

translates to features.wxs :
<Fragment>
        <Feature Id="ProductFeature" Display="expand" ConfigurableDirectory="INSTALL_ROOT" Title="PointLine23" Level="1">
            <Feature Id="CM_G_Requirements" Title="Requirements" Description="!(loc.FeatDescRequirements)">
                <Feature Id="CM_C_runtime" Title="Runtimes" Description="!(loc.FeatDescRuntimes)" Absent="disallow"/>
                <Feature Id="CM_C_base" Title="Base" Description="!(loc.FeatDescBase)" Absent="disallow"/>
                <Feature Id="CM_C_python" Title="Python" Description="!(loc.FeatDescPython)"/>
                <Feature Id="CM_C_shared" Title="Shared" Description="!(loc.FeatDescShared)" Absent="disallow"/>
            </Feature>
            <Feature Id="CM_C_converter" Title="Converter" Description="!(loc.FeatDescConverter)"/>
            <Feature Id="CM_C_pl2d" Title="PointLine2D" Description="!(loc.FeatDescPointLine2D)"/>
            <Feature Id="CM_C_pl3d" Title="PointLine3D" Description="!(loc.FeatDescPointLine3D)"/>
            <Feature Id="CM_C_viewer" Title="Viewer" Description="!(loc.FeatDescViewer)"/>
        </Feature>
Wix does support hidden features, this would also solve the problem.
http://wixtoolset.org/documentation/manual/v3/xsd/wix/feature.html [^] -> Display:hidden

So for my case, two different solutions could solve it:
 * SET(CPACK_COMPONENT_GROUP_REQUIREMENTS_REQUIRED TRUE)
 * SET(CPACK_COMPONENT_RUNTIME_HIDDEN TRUE)
No tags attached.
Issue History
2014-11-07 10:25Richard UlrichNew Issue
2014-11-07 10:33Richard UlrichNote Added: 0037160
2016-06-10 14:29Kitware RobotNote Added: 0042659
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0037160)
Richard Ulrich   
2014-11-07 10:33   
If I could append attributes with a patch file, that would also work.
(0042659)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.