Question

I'm trying to use the InstallShield MSBuild task to produce an installer on our build machine and put the output in the drop folder. I can produce the installer but it remains located in the source tree.

I tried using OutDir in the task. This worked on my local machine but it changes the actual .ism file; thus, failing on the build machine.

Next, I tried using TaggedOutputs ItemGroup. I'm just not sure how to make it work. I don't see any changes in my output. Here's my script:

    <ItemGroup>
  <!-- The TaggedOutputs items allow you to explicitly add extra files to output groups. Each item must include both Name and OutputGroup, as well as TargetPath metadata values. -->
  <TaggedOutputs Include="P:\">
          <Name>AvApp</Name>
          <OutputGroup>Primary output</OutputGroup>
          <TargetPath>My Test Exe.exe</TargetPath>
      </TaggedOutputs> 
</ItemGroup>

<!-- Run interactive InstallShield on the developer machine -->
<InstallShield Project="R:\src\Setup\AvSetup\AvSetup.ism" 
               ProductConfiguration="Product Configuration 1" 
               ReleaseConfiguration="Release 1" 
               OutputGroups="$(TaggedOutputs)"
               />

where P is mapped to the target location.

Is my syntax incorrect or is there another tag I can use? InstallShield version is 2012.

Was it helpful?

Solution

InstallShield's Targets file has this built in but it's not designed correctly and only works based on certain assumptions that may not be true.

The way I like to do it is:

1) Define a Path Variable in the ISM called ISBUILDDIR and give it a defined value of

<ISProjectDataFolder>    

2) Under Product Configurations, Release Configuration, set the Build Release location to \ProductName

This essentially gives you an abstraction that by default behaves like before but can be overridden during the build.

3) In your .ISPROJ (MSBuild) create the following item group:

<ItemGroup>
    <InstallShieldPathVariableOverrides Include="$(OutDir)">
        <PathVariable>ISBUILDDIR</PathVariable>
    </InstallShieldPathVariableOverrides>
</ItemGroup>

Now the $(OutDir) property will be assigned to the ISBUILD path variable and the product/release configuration will output to $(OutDir)\ProductName In the case of TFS Builds $(OutDir) gets assigned $(BinariesRoot) so your build output will get picked up and placed in the drop location archive.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top