Media File Wizard: Installer Options


  In this step of the media file wizard you define options for the installer, most importantly the default installation directory.
  This step is different for installers and archives:
  • Installers:
    • Installation directory
      Enter a simple directory name (without backslashes). The standard location for applications will we prepended to this directory name. In other words: do not enter C:\Program Files\MyApplication but only MyApplication The installer will find out the correct equivalent for C:\Program Files, /opt or similar standard locations at runtime. By default, install4j will suggest the short name you have entered in the general application options. It is also possible to enter a composite relative directory like My Corp\MyApplication.

      Note that this value will be overridden if an installer with the same application ID has been previously installed and "Detect previous installation directory" is selected on the update options tab of the installer section.

    • Use custom installation base directory
      If you do not want to install your application to the standard application directory, you can enter a custom base directory here. This is useful for internal deployments with non-standard directory policies. The installation directory entered above will be appended to the custom base directory. For example, if the application should be installed in D:\apps\MyApplication, check the custom installation base option, enter D:\apps in the text field below it and enter MyApplication in the installation directory text field above.

      On Unix, if you want to suggest a directory below the user home directory, you can use ~ as the custom installation base directory.

  • Archives:
    With the installation directory you determine the top level directory for the archive. All files will be contained in the top level directory. Enter a simple name without slashes, such as myapp. By default, install4j will suggest the short name you have entered in the general application options.

    For macOS single bundle archives, it is not possible to set an installation directory since all files in a single bundle are in contained in a single directory whose name is determined by the name of the main launcher. The user can move the entire bundle somewhere else by dragging the displayed icon.

    For macOS bundle archives, you can configure whether the media file should be a DMG or a .tar.gz file. For GUI applications, DMG is preferred. For command line applications or for folder bundles, you may want to select the .tar.gz file.

  For Windows installer media files, this step includes an option Verify integrity of installer file that allows you to disable the built-in integrity verification. You might have to do that if you use EXE-wrapper software for licensing purposes or similar tools that modify the installer executable.
  For macOS installer media files, this step has an option Sign installed launchers. By default, only the installer is signed on macOS. If you have configured entitlements for code signing in the "Executable info->macOS options" step of the launcher wizard, these entitlements will only be used for your launchers if the above option is selected.

Note that it is not possible to modify the Info.plist file at runtime if you select this option.

  For Linux Deb media files, this step includes the following options:
  • Register files with overwrite policy "Never" as config files
    If selected, all files that have an overwrite policy "Never" from their configuration in the distribution tree are marked as config files. When updating the package through the package manager, those files will not be changed and they are kept when the package is removed.
  • Use bzip2 compression method
    If selected, the bzip2 compression method will be used. It is slower, but more efficient than the standard gzip compression method.
  • Archive description
    Enter an optional description that will be displayed by package managers.
  • Dependencies
    Enter optional dependencies that will have to be present in the package management for the installation to succeed. Enter a comma separated list of packages.
  • Maintainer email
    Optionally enter the email of the maintainer that will be displayed by package managers.
  For Linux RPM media files, this step includes the following options:
  • Register files with overwrite policy "Never" as config files
    If selected, all files that have an overwrite policy "Never" from their configuration in the distribution tree are marked as config files. When updating the package through the package manager, those files will not be changed and they are kept when the package is removed.
  • Operating system
    By default, the operating system of the RPM is set to "linux", here you can change it to something else.
  • Architecture
    By default, the architecture system of the RPM is set to "i386", here you can change it to something else.
  For Unix/Linux GUI installer media files, this step has a Installer custom script sub-step.

If you specify a Bourne shell custom script, the entered script fragment will be inserted into the launcher script immediately before the Java invocation of your installer takes place. This is a hook for experienced users to make custom changes in the environment.

You can select one of:

  • No custom fragment
    No custom script fragment will be inserted.
  • Custom fragment from file
    Specify a file from which the custom script will be read. If you enter a relative file, the file will be interpreted relative to the project file.
  • Direct entry
    Enter your custom script fragment in the text area below.
  For Linux RPM and Linux Deb media files, this step has sub-steps where you can define scripts to run before and after installation or uninstallation by the rpm executable. The available hooks are:
  • Pre-install script
  • Post-install script
  • Pre-uninstall script
  • Post-uninstall script

Please see http://www.rpm.org for more information.

You can select one of:

  • No custom fragment
    No custom script fragment will be inserted.
  • Custom fragment from file
    Specify a file from which the custom script will be read. If you enter a relative file, the file will be interpreted relative to the project file.
  • Direct entry
    Enter your custom script fragment in the text area below.