diff --git a/Help/release/dev/wix-disabled-components.rst b/Help/release/dev/wix-disabled-components.rst new file mode 100644 index 000000000..a7e4d5f59 --- /dev/null +++ b/Help/release/dev/wix-disabled-components.rst @@ -0,0 +1,6 @@ +wix-disabled-components +----------------------- + +* The CPack WIX generator now supports + :variable:`CPACK_COMPONENT__DISABLED`. + This can be used to deselect a component from being installed by default. diff --git a/Modules/CPackComponent.cmake b/Modules/CPackComponent.cmake index 085992a02..6552a2dcd 100644 --- a/Modules/CPackComponent.cmake +++ b/Modules/CPackComponent.cmake @@ -75,9 +75,17 @@ # # The dependencies (list of components) on which this component depends. # +# .. variable:: CPACK_COMPONENT__HIDDEN +# +# True if this component is hidden from the user. +# # .. variable:: CPACK_COMPONENT__REQUIRED # -# True is this component is required. +# True if this component is required. +# +# .. variable:: CPACK_COMPONENT__DISABLED +# +# True if this component is not selected to be installed by default. # # .. command:: cpack_add_component # diff --git a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx index 16dd0abaa..1747b62d8 100644 --- a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx +++ b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx @@ -86,6 +86,10 @@ void cmWIXFeaturesSourceWriter::EmitFeatureForComponent( AddAttribute("Display", "hidden"); } + if (component.IsDisabledByDefault) { + AddAttribute("Level", "2"); + } + EndElement("Feature"); }