Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ XR Studio

installer​.xml

  • Last UpdatedSep 04, 2024
  • 5 minute read

The installer.xml file provides all the information needed by the Installer tool to perform an installation based on the content of the installdata folder.

  • The installer node provides general information about the installation.

  • The installer can contain one or more bundles that represents a set of installation activities.

  • When the application is to be installed in different setups (such as player0, player1, instructor), the corresponding bundles can be created to perform only what is needed for each setup.

  • Placeholders are available to use in specific node attributes to make the installer script contextual.

Code example

This is a code example of installer.xml.

<?xml version="1.0" encoding="utf-8"?>

<installer title="This is the title" PROJECT_NAME="PRJ_NAME" PATH_NAME="Eyesim" PROJECT_DIR="PRJ_DIR" VERSION="1.0" >

<bundle name="generic" description="Generic Installer">

<acceptText title="EULA" file="EULA.txt"/>

<pickDrive/> <copyDir from="data\code\" to="$DRIVE$\$PATH_NAME$\$PROJECT_DIR$\code\"/>

<shortcut name="MWPLConfigurator" location="StartMenu" folder="EYESIM Test Project" file="$DRIVE$\$PATH_NAME$\$PROJECT_DIR$\code\MWPLConfigurator.exe"/>

<shortcut name="MWPLPlayer" location="StartMenu" folder="EYESIM Test Project" file="$DRIVE$\$PATH_NAME$\$PROJECT_DIR$\code\MWPLPlayer.exe"/>

<shortcut name="UnInstall" location="StartMenu" folder="EYESIM Test Project" file="$DRIVE$\$PATH_NAME$\$PROJECT_DIR$\UnInstaller.exe"/> <copyDir from="data\PCLibsInstaller\" to="$DRIVE$\$PATH_NAME$\$PROJECT_DIR$\PCLibsInstaller\"/>

<launch file="$DRIVE$\$PATH_NAME$\$PROJECT_DIR$\PCLibsInstaller\PCLibsInstaller.exe"/>

</bundle>

</installer>

<installer>

The installer node contains general installation information, such as text to present in the Installer UI and destination folder name.

PATH_NAME\PROJECT_DIR is the base path for the installation and the user can only select the drive.

Attribute

Use

Description

title

Mandatory

The title text for the Installer form.

requireAdmin

Optional

If set to True, the installer application must be started with Administrator privileges. If not started with Administrator privileges, the installer will automatically prompt to elevate the privileges. The default is set to False.

PROJECT_NAME

Mandatory

The name used to identity the project and to be presented in the Installer UI.

PATH_NAME

Mandatory

Main Installation folder (generally set to EYESIM).

PROJECT_DIR

Mandatory

Name to assign to the project specific folder.

VERSION

Mandatory

The Installer version displays in the Installer interface to help user to understand what version of the product is going to install.

INSTALLER_GUIDE

Optional

When set, the Installer shows a button on the Installer UI that enables the user to open an installation guide before starting the installation process. The path is relative to the installer executable.

UNINSTALL

Optional

When set to False, the uninstaller is not created. This is used mostly for update installers that install extra features on an already installed solution. This setting is set to True by default.

<bundle>

A bundle is a container that groups a set of sequential actions that define the installation.

Attribute

Use

Description

name

Mandatory

The name of the bundle.

description

Mandatory

Description information for the bundle.

Available actions for bundles

The following sections describe all available actions that can be included in a bundle installation sequence.

Some are mandatory, but others are optional. Some can be multiple, but others should be unique.

<acceptText> (optional, unique)

  • Shows the EULA and requires the user to accept.

  • If user does not accept the installation sequence ends.

  • It has no attributes.

<pickDrive> (mandatory, unique)

  • Asks the user to select on which machine drive to install the application.

  • The <pickDrive> must be placed before any <copyDir> and <shortcut> node, because it creates the base installation directory and the uninstaller.

  • It has no attributes.

<copyDir> (optional, multiple)

  • Copies a folder with its files from installdata.dat to installation directory.

  • From path is relative to installdata.dat position. It must usually start with \data because almost all project-related content is placed in that subfolder.

  • You can copy files to fixed paths.

Attribute

Use

Description

from

Mandatory

The source relative path.

to

Mandatory

The destination absolute path. Supports placeholders.

<copyFile> (optional, multiple)

  • Copies a single file from installdata.dat to a defined installation filepath.

  • From filepath is relative to installdata.dat position. It must usually start with \data because almost all project-related content is placed in that subfolder.

  • You can copy a file to a fixed filepath.

  • If a destination folder is not present, the copyFile will not copy file. If a folder needs to be created while copying file, then you need to add the attribute forciblyCreateDir = true.

Attribute

Use

Description

from

Mandatory

The source relative path.

to

Mandatory

The destination absolute path. Supports placeholders.

forciblyCreateDir

Optional

When set to true, XR creates a directory to the destination

path, if not present. The default is false (does not create the directory).

<restrictDirPermission> (optional, multiple)

  • Requires the requireAdmin installer parameter to be set to true to work.

  • Restricts the user privileges on the specified path to Read and Execute, so that the user cannot modify the files in the path or create new ones.

  • Restrictions are applied recursively to all specified path files and subfolders.

    Attribute

    Use

    Description

    path

    Mandatory

    The path of the folder on which apply the restrictions. Supports placeholders.

<shortcut> (optional, multiple)

  • Creates a shortcut for a specific installed file. The shortcut creation happens after <copyDir> completion.

  • Multiple shortcuts with different locations can be created for an unique file.

  • Setting file to UnInstall creates a shortcut for the uninstaller.

Attribute

Use

Description

file

Mandatory

Installed file path. Use UnInstall to create a shortcut for uninstaller. Supports placeholders.

name

Mandatory

The name assigned to the shortcut.

location

Mandatory

Specifies location as Desktop, Startup, or Startmenu to define the shortcut type.

folder

Folder in which to place shortcuts. This should be set to a value only when using Startmenu.

<launch> (optional, multiple)

  • Enables launch for external applications that are copied, such as the PCLibsInstaller.exe, or already available on the machine.

  • It waits for the launched process to end before proceeding with the installation sequence.

Attribute

Use

Description

file

Mandatory

The process file path. Supports placeholders.

args

Optional

Enables you to specify command line arguments to pass to the process when launching.

mode

Optional

Specifies which mode/role to use to start the process. It can be set to user and admin values. If not set, the user role is default.

processToWait

Optional

When set forces the installer to wait for a specific additional process before proceeding to next step.

<showContent> (optional, multiple)

  • When executed triggers the opening of a content like a pdf or a web page in its default editor.

  • It does not wait before proceeding to next step.

Attribute

Use

Description

content

Mandatory

Filepath or URL of the resource to be shown. Supports Placeholders.

Placeholders

The Installer supports a few placeholder tags that can be used in several node fields to define paths in a contextual and not absolute way. As most of the placeholders depend on specific nodes to be valorized, it’s important not to use them before assigning.

Placeholder

Defined by

Description

$PROGRAM_DATA$

System

Path of the OS program data shared folder. This usually corresponds to C:\ProgramData\.

$VERSION$

installer node

Version string defined in the bundle.

$PROJECT_DIR$

installer node

Project specific directory.

$PATH_NAME$

installer node

Installation root.

$DRIVE$

pickDrive node

The drive selected with pickDrive where the installer will install content.

Placeholders can be used to define a folder location in a contextual way.

<copyDir from="data\XRStudio\" to="$DRIVE$\$PATH_NAME$\$PROJECT_DIR$\"/>

Attributes supporting placeholders

The placeholders are supported by the following node attributes.

Node

Attributes supporting placeholders

copyDir

to

copyFile

to

launch

file

showContent

content

restrictDirPermission

path

shortcut

file

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in