Specifying environment variables for an application

You can specify environment variables to use with your applications either at a project level or for a build configuration.

  1. Click Project > Properties.
    • To specify environment variables that apply to the entire project:
      1. Expand Micro Focus > Project Settings > Build Environment.
    • To specify environment variables that only apply to a build configuration:
      1. Expand Micro Focus > Build Configurations.
      2. Select the required build configuration.
      3. Select Build Environment.
      4. Check Enable configuration specific settings.
  2. Specify a variable to use with your project or build configuration:
    • To manually add a variable:
      1. Click Add.

        This opens the Add variable dialog box.

      2. In the Variable field, type your variable name.
        Note: The name must not be blank and must not contain the '=' character.
      3. In the Value field, type the variable value.
      4. Click OK.
    • To specify a script that contains the environment variables to use:
      1. In the Environment script to execute field, click Browse to navigate and select the script to use.

        The script must contain the variables in the following format and must not require user interaction:

        For Windows environments:

        set variable=value

        For UNIX environments:

        export variable=value
      2. Click OK.
      Restriction: The script should not allow user interaction.
  3. Click Apply.
  4. Click Apply and Close.

Building the project adds the information about the variables to the application.

Note: Click Restore Defaults to remove all variables or scripts from this page.