Is it possible to conditionally set the installerFilename variable?

At the moment I've got a project setup like this:

<project>
    <installerFilename>${product_shortname}-${product_version}-${platform_name}-installer.${platform_exec_suffix}</installerFilename>
    ...
<initializationActionList>
    <if>
        <actionList>
            <setInstallerVariable name="installerFilename" value="${product_shortname}-${product_version}-${platform_name}-dotNet-installer.${platform_exec_suffix}" />
        </actionList>
        <conditionRuleList>
            <compareValues value1="${includeDotNet}" logic="equals" value2="true" />
        </conditionRuleList>
    </if>
</initializationActionList>
    ...
</project>

I'm then running the installer with --setvars includeDotNet=true but it doesn't make any difference. I could make this a postBuild action and rename the installer file but that seemed like unnecessary work so I wanted to double check to see if there was another option before doing that.

asked 11 Feb '13, 05:33

A%20Jefferiss's gravatar image

A Jefferiss
56151621
accept rate: 100%


I've moved the if and setInstallVariable into the preBuildActionList tag now and it works.

link

answered 11 Feb '13, 06:38

A%20Jefferiss's gravatar image

A Jefferiss
56151621
accept rate: 100%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×9
×3
×1

Asked: 11 Feb '13, 05:33

Seen: 977 times

Last updated: 11 Feb '13, 06:38