extract a file from installer executable

Answered

Comments

1 comment

  • Avatar
    wojciechka

    You can use <unpackFile> and <unpackDirectory> action to unpack one or more files at any time.

    For example to unpack an entire packed directory you can do:

    <unpackDirectory> <destination>${system_temp_directory}</destination> <component>tools</component> <folder>license</folder> <origin>management</origin> </unpackDirectory>

    And to unpack a file:

    <unpackFile> <destination>${system_temp_directory}</destination> <component>tools</component> <folder>license</folder> <origin>management/validator.exe</origin> </unpackFile>

    The Unpacking Before Installation Time section of InstallBuilder User Guide describes this in more details.

    Also, you can use --setvars at build time to specify values that can then be stored for the installer - all that is needed is to create a parameter with the same name (and setting <ask> to 0, so it is not shown to the user).

    $> builder build project.xml --setvars buildFlavor=minimal

    Next create a hidden parameter to make the buildFlavor persistent at runtime:

    <project> <shortName>myProject</shortName> <version>1.4</version> ... <parameterList> ... <stringParameter name="buildFlavor" value="minimal" ask="0"/> ... </parameterList> ... </project>

    The variables can also be set in <preBuildActionList> - for example by reading files at build time and setting the values appropriately.

    This approach is described in Creating Custom Builds section of InstallBuilder User Guide.

Please sign in to leave a comment.