CPack WIX - disable feature by default

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

CPack WIX - disable feature by default

tonka tonka

Hello,

 

I’ve create an installer with cpack and WIX (cpack –G WIX). Everything works fine, but I have one big problem.

 

I have 2 features, which are created by cpack(wix).

 

    <Feature Id="ProductFeature" Display="expand" ConfigurableDirectory="INSTALL_ROOT" Title="MyApp" Level="1">

         <Feature Id="CM_C_dev" Title="Development" Description=" Development "/>

         <Feature Id="CM_C_runtime" Title="Runtime" Description="Runtime"/>

    </Feature>

 

My Problem:

I want to deactivate the CM_C_dev feature by default (CPACK_WIX seems to ignore my set(CPACK_COMPONENT_DEV_DISABLED ON)  ). The user should be able to activate it if he/she wants that. I know how I can do it with WIX itself (handmade), but I have big troubles to inject that into the cpack_wix flow.

I have to add Level=”2” to the Feature with the Id=”CM_C_DEV” like

 

    <Feature Id="CM_C_dev" Title="Development" Description=" Development " Level=”2”/>

 

or add a property (as value) like

 

    <Feature Id="CM_C_dev" Title="Development" Description=" Development ">DISABLE_FEATUREA</Feature>

 

I’ve tried the CPACK_WIX_PATCH function, but I’m only able to add something to the ProductRoot feature (ID=”ProductFeature”) via

 

    <CPackWiXPatch>

      <CPackWiXFragment Id="#PRODUCTFEATURE">

            <Environment Id="MyEnvironment" Action="set" Name="MyVariableName" Value="MyVariableValue"/>

      </CPackWiXFragment>

    </CPackWiXPatch>

 

But not into the subfeature CM_C_dev

 

Does anybody know how I can do that (or maybe another way)?


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Loading...