component definition using paths

Comments

1 comment

  • Avatar
    wojciechka

    Paths in XML can be specified relative to the project.xml file. Builder GUI will save this as relative paths automatically when <saveRelativePaths> is enabled. For example:

    <project> <saveRelativePaths>1</saveRelativePaths> </project>

    Also, paths to files included can use variables - for example:

    <distributionfilelist> <distributiondirectory> <origin>${build_libraries_directory}/common-libraries</origin> </distributiondirectory> </distributionfilelist>

    Then, the ${build_libraries_directory} variable will be used to specify paths. The variable can be set using --setvars when building from command line or in <preBuildActionList>, or combined. For example to build from command line it can be:

    C> path\to\builder-cli.exe build project.xml windows --setvars build_libraries_directory=path/to/libs

    Also, it can be set in <preBuildActionList>. The example below sets a default value if current value for ${build_libraries_directory} does not exist:

    <preBuildActionList> <setInstallerVariable> <name>build_libraries_directory</name> <value>${build_project_directory}/libraries</value> <ruleList> <fileTest> <condition>not_exists</condition> <path>${build_libraries_directory}</path> </fileTest> </ruleList> </setInstallerVariable> </preBuildActionList>

    This mechanism can be used to specify a default directory to use and allow overriding it using --setvars.

    In order to modify the output directory for building the installer, the <outputDirectory> can be set when using command line when building the installer:

    C> path\to\builder-cli.exe build project.xml windows --setvars project.outputDirectory=path/to/output

    All of the project's properties can be set using the --setvars option and this will override the values in the projects.

    Command line options are documented in more details along with examples in Creating Custom Builds section of InstallBuilder user guide.

Please sign in to leave a comment.