How is it possible to allow different destination folders for different components being specified ? For Example the user decides to install component A to E:\\somewhere and component B to D:\\somewhereelse
I tried various approaches including different $TARGETDIR$ variables, but the problem is how can I fetch the user event resulting from a component selection and how can I modify a Text Field holding a set of different installation destinations.
Is such scenario possible ?
Do I have to build seperate installers ??
Specify a different destination folder for each component
Sure, there are many ways to achieve this. What you want to do is store the target folders for each component in its own variable, say TARGETONE, TARGETTWO, etc. In the Install Files commands for the components you can just use these new variables as the target folders for the files being installed.
I'd also show the destination dialog once for each component. The pre-built destination dialog already has the logic and controls in place to work with TARGETDIR. So before calling the dialog, I'd assign TARGETDIR to the value of, for example, $TARGETONE$, and after the dialog returns, I'd reassign TARGETONE to $TARGETDIR$ using the Set Variable commands.
This is just one way to do it. You can insert multiple edit fields on a dialog to capture each target variable all at once as well. Its all up to you!
I'd also show the destination dialog once for each component. The pre-built destination dialog already has the logic and controls in place to work with TARGETDIR. So before calling the dialog, I'd assign TARGETDIR to the value of, for example, $TARGETONE$, and after the dialog returns, I'd reassign TARGETONE to $TARGETDIR$ using the Set Variable commands.
This is just one way to do it. You can insert multiple edit fields on a dialog to capture each target variable all at once as well. Its all up to you!
Who is online
Users browsing this forum: No registered users and 132 guests