From ad453f0502fe5d95ca1f050cdf52c2d32a892988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20St=C3=BCrmer?= Date: Thu, 21 Jul 2016 16:34:35 +0200 Subject: [PATCH] CPackWIX: Support CPACK_COMPONENT__DISABLED Reviewed-by: Nils Gladitz --- Help/release/dev/wix-disabled-components.rst | 6 ++++++ Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 Help/release/dev/wix-disabled-components.rst diff --git a/Help/release/dev/wix-disabled-components.rst b/Help/release/dev/wix-disabled-components.rst new file mode 100644 index 0000000000..a7e4d5f597 --- /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/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx index 16dd0abaa5..1747b62d89 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"); }