Location of files to be packaged

asked 14 Sep '11, 07:56

Jake's gravatar image

Jake ♦♦
accept rate: 98%

When choosing the files and directories to be packaged in the installer, sometimes it is necessary to specify different locations depending on the build machine or operating system. For example, you may store your program files in /opt/repository in Unix systems and z:\repository on Windows. The simplest way to address this issue is to use the saveRelativePaths option and specify the path to files relative to the location of the XML project file (What does the "save relative paths" option mean? ). Sometimes, however, you may need more fine-grained control. In this case you can edit the XML directly and embed variables in the 'origin' field of distributionFile and distributionDirectory sections. These variables can be set in a preBuildActionList or refer to environment variables.


    <setInstallerVariable name="programroot" value="z:\repository">
              <platformTest type="windows" />
    <setInstallerVariable name="programroot" value="/opt/repository">
              <platformTest type="unix" />
      <description>Program Files</description>
          <distributionDirectory origin="${programroot}/bin"></distributionDirectory>


answered 14 Sep '11, 07:59

Jake's gravatar image

Jake ♦♦
accept rate: 98%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 14 Sep '11, 07:56

Seen: 1,192 times

Last updated: 15 Sep '11, 10:39