vilmosnagy

Untitled

Jun 23rd, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.28 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project ToolsVersion="3.5" DefaultTargets="Build"
  3.       xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  4.   <PropertyGroup>
  5.     <WebSiteSource>..\Tacho.Web\</WebSiteSource>
  6.     <SetupF>..\Setup\</SetupF>
  7.     <PublishF>publish\</PublishF>
  8.     <Publish>$(SetupF)$(PublishF)</Publish>
  9.     <WebSiteContentCode>WebSiteContent.wxs</WebSiteContentCode>
  10.     <WebSiteContentObject>WebSiteContent.wixobj</WebSiteContentObject>
  11.     <MsiOut>bin\Release\DemoWebsite_Setup.msi</MsiOut>
  12.   </PropertyGroup>
  13.  
  14.   <!-- Defining group of temporary files which is the content of the web site. -->
  15.   <ItemGroup>
  16.     <WebSiteContent Include="$(WebSiteContentCode)" />
  17.   </ItemGroup>
  18.   <ItemGroup>
  19.     <WixExtension Include='WixUIExtension' />
  20.   </ItemGroup>
  21.  
  22.   <!-- The list of WIX input files -->
  23.   <ItemGroup>
  24.     <WixCode Include="DemoUI.wxs" />
  25.     <WixCode Include="Product.wxs" />
  26.     <WixCode Include="$(WebSiteContentCode)" />
  27.   </ItemGroup>
  28.  
  29.   <!-- The list of WIX after candle files -->
  30.   <ItemGroup>
  31.     <WixObject Include="DemoUI.wixobj" />
  32.     <WixObject Include="Product.wixobj" />
  33.     <WixObject Include="$(WebSiteContentObject)" />    
  34.   </ItemGroup>
  35.  
  36.   <!-- Define default target with name 'Build' -->
  37.   <Target Name="Build">
  38.     <!-- Compile whole solution in release mode -->
  39.     <MSBuild
  40.        Projects="..\Tacho.sln"
  41.        Targets="ReBuild"
  42.        Properties="Configuration=Release" />
  43.   </Target>
  44.  
  45.   <Target Name="PublishWebsite">
  46.     <!-- Remove complete publish folder in order to
  47.             be sure that evrything will be newly compiled -->
  48.     <Message Text="Removing publish directory: $(SetupF)"/>
  49.     <RemoveDir Directories="$(SetupF)" ContinueOnError="false" />
  50.     <Message Text="Start to publish website" Importance="high" />
  51.     <MSBuild
  52.        Projects="..\\Tacho.Web\Tacho.Web.csproj"
  53.        Targets="ResolveReferences;_CopyWebApplication"
  54.        Properties="OutDir=$(Publish)bin\;WebProjectOutputDir=
  55.                        $(Publish);Configuration=Release" />
  56.   </Target>
  57.   <!-- Define creating installer in another target -->
  58.   <Target Name="Harvest">
  59.     <!-- Harvest all content of published result -->
  60.     <Exec
  61.        Command='"$(WiX)bin\heat.exe" dir $(Publish) -dr INSTALLFOLDER -ke -srd -cg MyWebWebComponents -var var.publishDir -gg -out $(WebSiteContentCode)'
  62.        ContinueOnError="false"
  63.        WorkingDirectory="." />
  64.   </Target>
  65.   <Target Name="WIX">
  66.     <!--     At last create an installer -->
  67.     <Message Text="TEST1" />
  68.     <Exec
  69.        Command='"$(WiX)bin\candle.exe" -dpublishDir=$(Publish) -dMyWebResourceDir=. @(WixCode, &apos; &apos;)'
  70.        ContinueOnError="false"
  71.        WorkingDirectory="." />
  72.     <Message Text="TEST2" />
  73.     <Exec
  74.        Command='"$(WiX)bin\light.exe" -ext WixUIExtension.dll -cultures:en-us -out $(MsiOut) @(WixObject, &apos; &apos;)'
  75.        ContinueOnError="false"
  76.        WorkingDirectory="." />
  77.  
  78.     <!-- A message at the end -->
  79.     <Message Text="Install package has been created." />
  80.   </Target>
  81.   <Target Name="DeleteTmpFiles">
  82.     <RemoveDir Directories="$(Publish)" ContinueOnError="false" />
  83.     <RemoveDir Directories="$(SetupF)" ContinueOnError="false" />
  84.   <Delete Files="@(WixObject);@(WebSiteContent)" />
  85. </Target>
  86. </Project>
Advertisement
Add Comment
Please, Sign In to add comment