We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

AzubiRA
Posts: 10
Joined: Tue Oct 14, 2014 9:59 am

Setting up a constantly updated mutex property.

Hi guys,
I made a property which should be TRUE if two features are selected in the CustomizeDlg:
1.JPG
1.JPG (37.1 KiB) Viewed 4057 times
It should be evaluated constantly depending on the installation state of the named features.
Yet, it seems like mutex is always TRUE, because
1. the MessageBox is displayed independently from the features' state:
3.JPG
3.JPG (27.59 KiB) Viewed 4057 times
2. The 'Next'-Button is disabled as if mutex is always TRUE:
2.JPG
2.JPG (34.54 KiB) Viewed 4057 times

BUT, when I use the condition

Code: Select all

(&Standard=3) AND (&Komfort=3)
the state is updated properly.

Now, as my Selection Tree is somewhat huge, including a lot of features that are mutually exclusive, it would be a lot easier to aggregate conditions into general properties.

How do I achieve this?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Setting up a constantly updated mutex property.

Hi,

In order to achieve what you want, you can go in the "Dialogs" page, select the "Next" button of the feature selection dialog, then add a "Set installer property" published event that sets the "mutex" property to empty if the appropriate features are not selected. For instance:
  • Property: MUTEX
    Value: {}
    Condition: NOT ((&Standard=3) AND (&Komfort=3))
However, in this case, you need to remove the disable control condition that is set for the "Next" button or use a custom button to update that property.

Please note that if you want to use the updated value of that property on the "Install Execution Stage" (Progress dialog) too, you need to use only capital letters in its name. You can see more details in the Windows Installer Properties article.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AzubiRA
Posts: 10
Joined: Tue Oct 14, 2014 9:59 am

Re: Setting up a constantly updated mutex property.

Thanks for your reply Eusebiu,
unfortunately it didn't help me that much.

Am I getting anything wrong here? If I make a global property

Code: Select all

MUTEX = ( (&Feature1=3) AND (&Feature2=3) )
then it is updated in realtime as the User is choosing from the Selection Tree in CustomizeDlg. Is this right or wrong?

Now let's assume that MUTEX is NOT updated automatically in realtime. I could set a Published Event at Selection Tree that sets MUTEX to {} when the condition is right and sets it to 1 the other way round, when

Code: Select all

NOT((&Feature1=3)AND(&Feature2=3))
.
I already tried that but it doesn't work at all, even though the conditions are validated positively.

What am I missing here? Why doesn't it seem to work properly?
Even when I try to visualize the values for &Feature1 and &Feature2 by putting them into a Textbox with Text = F1: [&Feature1] the property is not being displayed.

Now, my Tree is too big to only warn the user at pressing some 'validate'-button. He needs to get a message popup right when he chooses mutually exclusive features.
Please elaborate..
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Setting up a constantly updated mutex property.

Hi,
then it is updated in realtime as the User is choosing from the Selection Tree in CustomizeDlg. Is this right or wrong?
I'm afraid that a property cannot be updated in real time, this can be achieved only through a published event or custom action.
Now let's assume that MUTEX is NOT updated automatically in realtime. I could set a Published Event at Selection Tree that sets MUTEX to {} when the condition is right and sets it to 1 the other way round, when
Unfortunately, a published event cannot be executed when modifications are made on the Selection Tree, this can only be achieved through a button or a control that supports published events.
Now, my Tree is too big to only warn the user at pressing some 'validate'-button. He needs to get a message popup right when he chooses mutually exclusive features.
Please elaborate..
In order to achieve this you can create a custom feature selection dialog as detailed in the How do I show a custom feature selection dialog tutorial.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AzubiRA
Posts: 10
Joined: Tue Oct 14, 2014 9:59 am

Re: Setting up a constantly updated mutex property.

I'm afraid this
Unfortunately, a published event cannot be executed when modifications are made on the Selection Tree, this can only be achieved through a button or a control that supports published events.
is quite wrong. I have made a demonstration project in which exactly this works.
As soon as two mutually exclusive features are selected for installation, a published event is fired which in turn sets [disableNextButton] to 1. The Next-Button itself is conditioned with [disableNextButton]->disable and it actually disables. Yet, it won't enable the Next-Button, when set to {}. I actually had to make another [enableNextButton] which operates exactly the other way round.

Additionally, there is a messageBox that pops up instantly, when both mutually exclusive features are chosen. The (NOT BTN_PRESSED) condition is necessary, because otherwise the messageBox keeps popping up as long as the features are chosen and each time the selection tree is clicked, which is quite annoying obviously.
SelectionTreeDemo.aip
(13.51 KiB) Downloaded 222 times
Thanks for the input though, I think I'm just gonna start building this concept.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Setting up a constantly updated mutex property.

Hi,
is quite wrong. I have made a demonstration project in which exactly this works.
Indeed, it seems that I missed that, sorry for my mistake.

I tested the project that you attached and it seems to work just as you described in your previous posts. Is there anything else that you want to achieve and cannot get it to work?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AzubiRA
Posts: 10
Joined: Tue Oct 14, 2014 9:59 am

Re: Setting up a constantly updated mutex property.

Never mind and thanks for asking.

Best wishes,
Siavosh.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Setting up a constantly updated mutex property.

You're welcome.

Just let us know anytime you need help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”