IzPack
  1. IzPack
  2. IZPACK-829

Enable default TargetPanel directory to be configured via variables based on platform

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.3.5
    • Fix Version/s: 5.0
    • Component/s: Installer
    • Labels:
      None
    • Number of attachments :
      0

      Description

      In 4.3.5, the default directory displayed in TargetPanel may be configured in a text file named:

      • TargetPanel.dir.<os name>
      • TargetPanel.dir

      In the <os name> form, the os name is one of:

      • System.getProperty("os.name").replace(' ', '_')
      • "windows"
      • "macosx"
      • "unix"

      For 4.3.6, IZPACK-798 changed the above to use variables instead of text files, following the same naming convention.
      For 5.0 a better approach would be to use Platform to determine the appropriate variable.
      The variable could be derived from:

      • Platform.getSymbolicName(), if the current platform has one, E.g. TargetPanel.dir.windows_7
      • Platform.getName() E.g., TargetPanel.dir.windows
      • The parent platform, if there is no directory specified for getSymbolicName() or getName(). E.g. if current platform is FEDORA_LINUX and there is no TargetPanel.dir.fedora_linux, fall back to TargetPanel.dir.linux. Failing that, fall back to TargetPanel.dir.unix

      If no variable is specified for the current platform, it would use TargetPanel.dir

        Activity

        Hide
        Tim Anderson added a comment -

        Pull request is at: https://github.com/izpack/izpack/pull/38

        This uses the following variable search order to determine the default directory to display:

        1. TargetPanel.dir.<platform symbolic name> e.g. TargetPanel.dir.windows_7
        2. TargetPanel.dir.<platform name> e.g. TargetPanel.dir.windows
        3. TargetPanel.dir.<parent platform> e.g. given platform "FEDORA_LINUX" looks for TargetPanel.dir.linux, followed by TargetPanel.dir.unix
        4. TargetPanel.dir
        5. DEFAULT_INSTALL_PATH
        6. SYSTEM_user_dir corresponds to the system property "user.dir"

        Available platforms can be found in the class Platforms. The names are the lowercase versions of those defined.
        Allowed names include:

        • aix
        • debian_linux
        • fedora_linux
        • freebsd
        • hp_ux
        • linux
        • mac
        • mac_osx
        • mandrake_linux
        • mandriva_linux
        • os_2
        • red_hat_linux
        • sunos
        • sunos_x86
        • sunos_sparc
        • suse_linux
        • unix
        • ubuntu_linux
        • windows
        • windows_7
        • windows_xp
        • windows_2003
        • windows_vista

        Differences from 4.3.5

        In 4.3.5, resources were used rather than variables. Resources were searched for with the following names

        • "TargetPanel.dir." + lower case version of System.getProperty("os.name"), with any spaces replace with underscores
        • "TargetPanel.dir." + <platform> where platform is one of ("windows", "macosx", "unix")
        • "TargetPanel.dir"
        Show
        Tim Anderson added a comment - Pull request is at: https://github.com/izpack/izpack/pull/38 This uses the following variable search order to determine the default directory to display: TargetPanel.dir.<platform symbolic name> e.g. TargetPanel.dir.windows_7 TargetPanel.dir.<platform name> e.g. TargetPanel.dir.windows TargetPanel.dir.<parent platform> e.g. given platform "FEDORA_LINUX" looks for TargetPanel.dir.linux, followed by TargetPanel.dir.unix TargetPanel.dir DEFAULT_INSTALL_PATH SYSTEM_user_dir corresponds to the system property "user.dir" Available platforms can be found in the class Platforms. The names are the lowercase versions of those defined. Allowed names include: aix debian_linux fedora_linux freebsd hp_ux linux mac mac_osx mandrake_linux mandriva_linux os_2 red_hat_linux sunos sunos_x86 sunos_sparc suse_linux unix ubuntu_linux windows windows_7 windows_xp windows_2003 windows_vista Differences from 4.3.5 In 4.3.5, resources were used rather than variables. Resources were searched for with the following names "TargetPanel.dir." + lower case version of System.getProperty("os.name"), with any spaces replace with underscores "TargetPanel.dir." + <platform> where platform is one of ("windows", "macosx", "unix") "TargetPanel.dir"

          People

          • Assignee:
            Tim Anderson
            Reporter:
            Tim Anderson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: