3

I know Installer Variables can be set programmatically. But, I see no setCompilerVariables() method ....

I want to change which component to install based on user selection.

4

1 回答 1

2

Compiler variables are fixed at compile-time, they cannot be changed at runtime. Variables that are "variable" in the installer are called "installer variables" in install4j. This is a different concept. For more on the different variable systems, see here.

I want to change which component to install based on user selection.

This is unrelated to compiler variables. With the API, you make a call like

context.getInstallationComponentById("myId").setSelected(true);

to change the selection state of an installation component.

于 2012-02-07T13:07:11.887 回答