Unpack Java during splash screen?

Comments

1 comment

  • Avatar
    wojciechka

    It is possible to unpack certain directory or file before installation. This can be done using <unpackFile> or <unpackDirectory> actions. For example:

    <deleteFile>
      <path>${system_temp_directory}/jre</path>
    </deleteFile>
    <createDirectory>
      <path>${system_temp_directory}/jre</path>
    </createDirectory>
    <unpackDirectory>
      <component>java</component>
      <folder>jre</folder>
      <origin>jre</origin>
      <destination>${system_temp_directory}/jre</destination>
    </unpackDirectory>
    

    This will unpack directory jre from folder jre in component java to system temporary directory. You can then use <runProgram> or any other action to run Java applications with this JRE.

    Accessing files from installer is described in more details in Unpacking Before Installation Time section of InstallBuilder UserGuide.

    You can run the actions in Initialization Actions (<initializationActionList>) - when the installer has started, just before the parsing of the command line options. It is also possible to run the actions Pre-installation Actions (<preInstallationActionList>) that are run before the first page of the installer is displayed, right after the parsing of the command line options takes place.

    It is documented in more details in Action Lists section of InstallBuilder UserGuide.

    While it is not possible to show the splash screen for the duration of unpacking and running the scripts, you can use <showProgressDialog> action to show a dialog while unpacking and running Java. For example:

    <showProgressDialog>
      <title>Extracting Java and checking pre-requisites</title>
      <actionList>
        <deleteFile>
          <path>${system_temp_directory}/jre</path>
        </deleteFile>
        <createDirectory>
          <path>${system_temp_directory}/jre</path>
        </createDirectory>
        <unpackDirectory>
          <component>java</component>
          <folder>jre</folder>
          <origin>jre</origin>
          <destination>${system_temp_directory}/jre</destination>
        </unpackDirectory>
        <!-- ... -->
      </actionList>
    </showProgressDialog>
    

    It is documented in Displaying Progress While Executing Long Running Actions section of InstallBuilder UserGuide.

Please sign in to leave a comment.