use checkbox value for download only?

Nov 4, 2010 at 12:43 PM

Hi, I was wondering if you could give me a pointer...

I'd like to add a checkbox to my htmlInstaller UI for a web setup, that allows the user to select whether to only download components (but not install them).

I can add a checkbox using <control> or in index.html, but how do I reference the checkbox value in Components.cpp?

If I comment out "component->Exec():" and "component->Wait();", I get the desired effect.

 

Nov 4, 2010 at 3:09 PM

See how custom values are passed into the installer in InstallerWindow::SetControlValues. It pushes a task on the UI thread (anything that accesses the UI needs to be executed on the UI thread) and waits for it to complete. That code adds values to InstallerSession::Instance->AdditionalControlArgs. So you can access your checkbox value directly from InstallerSession::Instance->AdditionalControlArgs["checkbox id"].

Now, getting it from Component.cpp would be a hack. You're not supposed to give meaning to global options that are free-formed. If you hope to make the code into DNI you would need to introduce a feature that allows users to just download components without installing, then hook up that feature to the UI. It's a sizeable workitem. 

Nov 5, 2010 at 3:27 PM

Thanks for the info... can you transfer this to a work item?

Nov 7, 2010 at 8:32 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.