开发者

msbuild wix proj file

开发者 https://www.devze.com 2023-03-15 16:09 出处:网络
I have a current build using teambuild/msbuild that I need to integrate a wix compilation into. The Wix project is not part of the solutio开发者_如何学Gon that is being built instead it lives with th

I have a current build using teambuild/msbuild that I need to integrate a wix compilation into.

The Wix project is not part of the solutio开发者_如何学Gon that is being built instead it lives with the various tools that get pulled in with the TFSBuild.proj directory.

Before I can build the setup project I have to use Heat to harvest a couple of directories that were created during the after compile target. I have this working ok but now I'm not sure how to compile my wix project

The after compile target looks like this

 <Target Name="AfterCompile" DependsOnTargets="CopyOutputFiles;BuildMsi;BuildZip" />

Where the copy output files copied the compiled files to a specific directory and does a bit more work on them and this is the output that I need to include in my Wix project.

The BuildMsi target looks currently like this.

 <Target Name="BuildMsi" >
    <Message Text="Start harvesting Website files for Wix compliation" />
    <HeatDirectory
                  ToolPath="$(WixToolPath)"
                  Directory="$(DropLocation)\Latest\x86\Release\_PublishedWebsites\IFMA.MasterPlan.Web"
                  GenerateGuidsNow="yes"
                  ComponentGroupName="MasterPlanWeb"
                  OutputFile="$(MSBuildProjectDirectory)\Setup\Product\Fragments\wwwfiles.wxs"
                  SuppressFragments="yes"
                  DirectoryRefId="WEBROOT"
                  KeepEmptyDirectories="yes"
                  PreprocessorVariable="var.WebRoot"
                  SuppressRegistry="yes"
                  SuppressRootDirectory="yes"
                  SuppressCom="yes" />

    <Message Text="Finished harvesting Website files for Wix compliation" />

    <Message Text="Start harvesting database files for Wix compliation" />
    <HeatDirectory
                  ToolPath="$(WixToolPath)"
                  Directory="$(DropLocation)\Latest\x86\Release\Database"
                  GenerateGuidsNow="yes"
                  ComponentGroupName="MasterPlanWeb"
                  OutputFile="$(MSBuildProjectDirectory)\Setup\Product\Fragments\dbfiles.wxs"
                  SuppressFragments="yes"
                  DirectoryRefId="WEBROOT"
                  KeepEmptyDirectories="yes"
                  PreprocessorVariable="var.WebRoot"
                  SuppressRegistry="yes"
                  SuppressRootDirectory="yes"
                  SuppressCom="yes" />
<Message Text="Finished harvesting database files for Wix compliation" />  
  </Target>

So now the Wix directory $(MSBuildProjectDirectory)\Setup has the fragments its needs and I just need to essentially compile the wix project "$(MSBuildProjectDirectory)\Setup\Setup.proj".

Do I have to first call the candle task and specify the various properties and then pass the output of that to the light task or can I somehow just compile the .proj file directly as it already has all of the information it needs (eg. referenced libraries etc).


I would create a .wixproj with the list of Compile elements for you product, put the BuildMsi target above in that .wixproj and schedule it BeforeCompileAndLink. Then point TFS to MSBuild the .wixproj.

That way your setup build is cleanly contained.

0

精彩评论

暂无评论...
验证码 换一张
取 消