Install features based on checkboxes

前端 未结 3 1174
遇见更好的自我
遇见更好的自我 2020-12-06 06:44

I am trying to make it so that when the user selects something via check box, a corresponding feature will be installed.

I am aware of the prebuilt feature tree that

3条回答
  •  一整个雨季
    2020-12-06 07:41

    I found what it was that solves my issue. To do as I had intended, I needed to create a checkbox for each feature as so.

    
    
    
    

    Now once I did that I then added a corresponding publish to each, and made a condition that made it so that only if the check box is selected will that feature be installed. Like so:

    
       1
       
          
       
    
    

    NOTE:

    Remove is used to deselect everything from being installed (It was brought to my attention that once the UI is invoked, it is too late to change feature levels).

    Then each feature is checked to see if the "corresponding checkbox" has been selected and if so adds it to the "AddLocal" Property. AddLocal would look like this if one were to look at it:

    ADDLOCAL=FeatureX, FeatureY, FeatureZ...
    

    The final thing I needed to do to get this to work was too check in my main.wxs to make sure that the FeatureID used in the checkboxes matched up with the ComponentGroupRefID used:

     
    

    So there it is... I again, thank everyone for their help with this. If anyone reading this is confused by anything, please feel free to drop me a line, and I will do my best to explain things a little bit further.

提交回复
热议问题