I have installed uppercut integrated cc.net such a way that i didnt make any change in webdashboard,
This is my cc.net config code,
-->
-->
<!-- PROJECT STRUCTURE -->
<cb:define name="WindowsFormsApplication1">
<project name="$(projectName)">
<workingDirectory>$(working_directory)\$(projectName)</workingDirectory>
<artifactDirectory>$(drop_directory)\$(projectName)</artifactDirectory>
<category>$(projectName)</category>
<queuePriority>$(queuePriority)</queuePriority>
<triggers>
<intervalTrigger name="continuous" seconds="60" buildCondition="IfModificationExists" />
</triggers>
<sourcecontrol type="svn">
<executable>c:\program files\subversion\bin\svn.exe</executable>
<!--<trunkUrl>http://192.168.1.8/trainingrepos/deepasundari/WindowsFormsApplication1</trunkUrl>-->
<trunkUrl>$(svnPath)</trunkUrl>
<workingDirectory>$(working_directory)\$(projectName)</workingDirectory>
</sourcecontrol>
<tasks>
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
<workingDirectory>$(working_directory)\$(projectName)</workingDirectory>
<projectFile>WindowsFormsApplication1.sln</projectFile>
<timeout>600</timeout>
<buildArgs> /noconsolelogger /p:configuration=Debug </buildArgs>
<!--<buildArgs>/noconsolelogger /p:OutputPath=$(drop_directory)\$(projectName)\sample </buildArgs>-->
<logger>ThoughtWorks.CruiseControl.MsBuild.XmlLogger,C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
</msbuild>
<!--<labeller type="svnRevisionLabeller">
<prefix>Test-</prefix>
<major>7</major>
<minor>11</minor>
<url>$svnpath</url>
<username>deepasundari</username>
<password>deepasundari</password>
</labeller>-->
<exec>
<executable>$(working_directory)\$(projectName)\build.bat</executable>
</exec>
</tasks>
<publishers>
<!--<buildpublisher>
--><!--<sourceDir>C:\myprojects\project1</sourceDir>--><!--
<publishDir>$(working_directory)\$(projectName)</publishDir>
</buildpublisher>-->
<merge>
<files>
<file>$(working_directory)\$(projectName)\build_output\build_artifacts\*.xml</file>
<file>$(working_directory)\$(projectName)\build_output\build_artifacts\mbunit\*-results.xml</file>
<file>$(working_directory)\$(projectName)\build_output\build_artifacts\nunit\*-results.xml</file>
<file>$(working_directory)\$(projectName)\build_output\build_artifacts\ncover\*-results.xml</file>
<file>$(working_directory)\$(projectName)\build_output\build_artifacts\ndepend\*.xml</file>
</files>
</merge>
<!--<email from="buildserver#somewhere.com" mailhost="smtp.somewhere.com" includeDetails="TRUE">
<users>
<user name="YOUR NAME" group="BuildNotice" address="yourEmail#somewhere.com" />
</users>
<groups>
<group name="BuildNotice" notification="change" />
</groups>
</email>-->
<xmllogger/>
<statistics>
<statisticList>
<firstMatch name="Svn Revision" xpath="//modifications/modification/changeNumber" />
<firstMatch name="ILInstructions" xpath="//ApplicationMetrics/#NILInstruction" />
<firstMatch name="LinesOfCode" xpath="//ApplicationMetrics/#NbLinesOfCode" />
<firstMatch name="LinesOfComment" xpath="//ApplicationMetrics/#NbLinesOfComment" />
</statisticList>
</statistics>
<modificationHistory onlyLogWhenChangesFound="true" />
<rss/>
</publishers>
</project>
</cb:define>
<cb:WindowsFormsApplication1 projectname="WindowsFormsApplication1" queuepriority="1" svnpath="http://192.168.1.8/trainingrepos/deepasundari/WindowsFormsApplication1" />
this code is updating rss and report xml files, but i could not get the build folder in the code_drop..
could anyone help me with this problem??
It looks like you have followed the sample almost perfectly. http://uppercut.googlecode.com/svn/trunk/docs/Samples/CC.NET/server/ccnet.config
What you should see in the code_drop folder on the build server is a folder b##-r## for build and revision per each build.
Most of this is talked about in here: http://uppercut.googlecode.com/svn/trunk/docs/IntegrateUppercuTWithCruiseControl.NET.doc
Related
I have a task to create installation for nodejs web application. I have found the solution to compress the whole application copy it as one file with Wix and extract it with wix custom actions. This works. But its downside is that targt server has to have compressing software installed. In this case 7z.
Watching other installations, they are extracting files with out any external software.
I have investigate a wix a bit it says that I should use HEAT, nut I am not sure what it that. There any simple start examples, where I can understand it conceptually. I have found out also that other guys out there have slow learning curve on Wix. I am quite serious in learning this but I need a little push. I would like to start from this example.
How to whole folder copy with wix? or what it best practice with. Maybe some compressing with out third party software.
EDIT:
Here is how my wixproj file looks like:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>a42f686d-72e6-4452-b066-796c441e0d65</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>SomeManager</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
<Content Include="google-credentials-release-server.p12" />
<Content Include="LICENSE.rtf" />
<Content Include="some_service.tar.gz">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="XSLT\readme.txt" />
<Content Include="XSLT\RegisterForCOM.xml" />
<Content Include="XSLT\XslFile.xslt" />
<Content Include="XSLT\XslProjectOutput.xslt" />
<Content Include="XSLT\XslRegisterForCOM.xslt" />
<Content Include="XSLT\_ERMPanel.xml" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
</ItemGroup>
<ItemGroup>
<Folder Include="XSLT\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ERMPanel\ERMPanel.csproj">
<Name>ERMPanel</Name>
<Project>{F62EB2B5-967E-4E32-BE06-89248AFA3385}</Project>
<Private>True</Private>
<DoNotHarvest>
</DoNotHarvest>
<RefProjectOutputGroups>Binaries</RefProjectOutputGroups>
<RefTargetDir>INSTALLDIR</RefTargetDir>
</ProjectReference>
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<Target Name="BeforeBuild">
<MakeDir Directories="$(IntermediateOutputPath)Harvested XML" />
<MakeDir Directories="$(IntermediateOutputPath)Harvested Output" />
<XslTransformation XmlInputPaths="XSLT\RegisterForCOM.xml" XslInputPath="XSLT\XslRegisterForCOM.xslt" OutputPaths="$(IntermediateOutputPath)_COMFiles.txt" Parameters="<Parameter Name='operationType' Value='HeatFiles'/><Parameter Name='intermediateDir' Value='$(IntermediateOutputPath)'/>" Condition="$(MSBuildToolsVersion) <= 12" />
<XslTransformation XmlInputPaths="XSLT\RegisterForCOM.xml" XslInputPath="XSLT\XslRegisterForCOM.xslt" UseTrustedSettings="true" OutputPaths="$(IntermediateOutputPath)_COMFiles.txt" Parameters="<Parameter Name='operationType' Value='HeatFiles'/><Parameter Name='intermediateDir' Value='$(IntermediateOutputPath)'/>" Condition="$(MSBuildToolsVersion) >= 14" />
<ReadLinesFromFile File="$(IntermediateOutputPath)_COMFiles.txt">
<Output TaskParameter="Lines" ItemName="COMFilelist" />
</ReadLinesFromFile>
<ConvertToAbsolutePath Paths="#(COMFilelist)">
<Output TaskParameter="AbsolutePaths" ItemName="ResolvedCOMFilelist" />
</ConvertToAbsolutePath>
<Exec Command=""$(Wix)Bin\heat.exe" file "%(ResolvedCOMFilelist.Identity)" -sw -gg -sfrag -nologo -srd -out "$(IntermediateOutputPath)Harvested XML\_%(Filename).com.xml"" IgnoreExitCode="false" WorkingDirectory="$(MSBuildProjectDirectory)" Condition="'%(ResolvedCOMFilelist.Identity)'!=''" />
<XslTransformation XmlInputPaths="XSLT\RegisterForCOM.xml" XslInputPath="XSLT\XslRegisterForCOM.xslt" OutputPaths="$(IntermediateOutputPath)_COMFiles.txt" Parameters="<Parameter Name='operationType' Value='TransformFiles'/><Parameter Name='intermediateDir' Value='$(IntermediateOutputPath)Harvested XML\'/>" Condition="$(MSBuildToolsVersion) <= 12" />
<XslTransformation XmlInputPaths="XSLT\RegisterForCOM.xml" XslInputPath="XSLT\XslRegisterForCOM.xslt" UseTrustedSettings="true" OutputPaths="$(IntermediateOutputPath)_COMFiles.txt" Parameters="<Parameter Name='operationType' Value='TransformFiles'/><Parameter Name='intermediateDir' Value='$(IntermediateOutputPath)Harvested XML\'/>" Condition="$(MSBuildToolsVersion) >= 14" />
<ReadLinesFromFile File="$(IntermediateOutputPath)_COMFiles.txt">
<Output TaskParameter="Lines" ItemName="XMLFileList" />
</ReadLinesFromFile>
<XslTransformation XmlInputPaths="%(XMLFileList.Identity)" XslInputPath="XSLT\XslFile.xslt" OutputPaths="$(IntermediateOutputPath)Harvested Output\%(Filename).wsx" Parameters="<Parameter Name='sourceFilePath' Value='%(XMLFileList.Identity)'/>" Condition="'%(XMLFileList.Identity)'!='' And $(MSBuildToolsVersion) <= 12" />
<XslTransformation XmlInputPaths="%(XMLFileList.Identity)" XslInputPath="XSLT\XslFile.xslt" UseTrustedSettings="true" OutputPaths="$(IntermediateOutputPath)Harvested Output\%(Filename).wsx" Parameters="<Parameter Name='sourceFilePath' Value='%(XMLFileList.Identity)'/>" Condition="'%(XMLFileList.Identity)'!='' And $(MSBuildToolsVersion) >= 14" />
<Exec Command=""$(Wix)Bin\heat.exe" project "%(ProjectReference.FullPath)" -projectname "%(ProjectReference.Name)" -pog %(ProjectReference.RefProjectOutputGroups) -gg -sfrag -nologo -out "$(IntermediateOutputPath)Harvested XML\_%(ProjectReference.Name).xml"" IgnoreExitCode="false" WorkingDirectory="$(MSBuildProjectDirectory)" Condition="'%(ProjectReference.FullPath)'!='' And '%(ProjectReference.DoNotHarvest)'!='True' And '%(ProjectReference.ImportedFromVDProj)'=='True'" />
<HeatProject Project="%(ProjectReference.FullPath)" ProjectName="%(ProjectReference.Name)" OutputFile="$(IntermediateOutputPath)Harvested XML\_%(ProjectReference.Name).xml" ProjectOutputGroups="%(ProjectReference.RefProjectOutputGroups)" ToolPath="$(Wix)Bin\" SuppressAllWarnings="true" AutogenerateGuids="false" GenerateGuidsNow="true" SuppressFragments="true" SuppressUniqueIds="false" Condition="'%(ProjectReference.FullPath)'!='' And '%(ProjectReference.DoNotHarvest)'!='True' And '%(ProjectReference.ImportedFromVDProj)'!='True'" />
<XslTransformation XmlInputPaths="$(IntermediateOutputPath)Harvested XML\_%(ProjectReference.Name).xml" XslInputPath="XSLT\XslProjectOutput.xslt" OutputPaths="$(IntermediateOutputPath)Harvested Output\_%(ProjectReference.Name).wxs" Parameters="<Parameter Name='projectName' Value='%(ProjectReference.Name)'/><Parameter Name='projectFilePath' Value='%(ProjectReference.FullPath)'/><Parameter Name='intermediateDir' Value='$(IntermediateOutputPath)Harvested Output\'/>" Condition="'%(ProjectReference.FullPath)'!='' And '%(ProjectReference.DoNotHarvest)'!='True' And Exists('$(IntermediateOutputPath)Harvested XML\_%(ProjectReference.Name).xml') And $(MSBuildToolsVersion) <= 12" />
<XslTransformation XmlInputPaths="$(IntermediateOutputPath)Harvested XML\_%(ProjectReference.Name).xml" XslInputPath="XSLT\XslProjectOutput.xslt" UseTrustedSettings="true" OutputPaths="$(IntermediateOutputPath)Harvested Output\_%(ProjectReference.Name).wxs" Parameters="<Parameter Name='projectName' Value='%(ProjectReference.Name)'/><Parameter Name='projectFilePath' Value='%(ProjectReference.FullPath)'/><Parameter Name='intermediateDir' Value='$(IntermediateOutputPath)Harvested Output\'/>" Condition="'%(ProjectReference.FullPath)'!='' And '%(ProjectReference.DoNotHarvest)'!='True' And Exists('$(IntermediateOutputPath)Harvested XML\_%(ProjectReference.Name).xml') And $(MSBuildToolsVersion) >= 14" />
<XslTransformation XmlInputPaths="XSLT\RegisterForCOM.xml" XslInputPath="XSLT\XslRegisterForCOM.xslt" OutputPaths="$(IntermediateOutputPath)_COMFiles.txt" Parameters="<Parameter Name='operationType' Value='CompileFiles'/><Parameter Name='intermediateDir' Value='$(IntermediateOutputPath)Harvested Output\'/>" Condition="$(MSBuildToolsVersion) <= 12" />
<XslTransformation XmlInputPaths="XSLT\RegisterForCOM.xml" XslInputPath="XSLT\XslRegisterForCOM.xslt" UseTrustedSettings="true" OutputPaths="$(IntermediateOutputPath)_COMFiles.txt" Parameters="<Parameter Name='operationType' Value='CompileFiles'/><Parameter Name='intermediateDir' Value='$(IntermediateOutputPath)Harvested Output\'/>" Condition="$(MSBuildToolsVersion) >= 14" />
<ReadLinesFromFile File="$(IntermediateOutputPath)_COMFiles.txt">
<Output TaskParameter="Lines" ItemName="WSXFileList" />
</ReadLinesFromFile>
<CreateItem Include="$(IntermediateOutputPath)Harvested Output\_%(ProjectReference.Name).wxs" Condition="'%(ProjectReference.FullPath)'!='' And '%(ProjectReference.DoNotHarvest)'!='True' And Exists('$(IntermediateOutputPath)Harvested Output\_%(ProjectReference.Name).wxs')">
<Output TaskParameter="Include" ItemName="Compile" />
</CreateItem>
<CreateItem Include="#(WSXFileList)" Condition="Exists('%(WSXFileList.Identity)')">
<Output TaskParameter="Include" ItemName="Compile" />
</CreateItem>
</Target>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Here is Product.wsx file:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="SomeManager" Language="1033" Version="1.0.0.2" Manufacturer="Certus" UpgradeCode="4810b5e4-21d8-4a45-b289-eafb10dddc0a">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<Media Id="1" Cabinet="Cab1.cab" EmbedCab="yes" />
<Feature Id="ProductFeature" Title="SomeInstaller" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentGroupRef Id="ERMPanel.Binaries" />
<ComponentRef Id="comp_5D704CE7_9E55_4FC5_8CB2_6BA4612D6D35" />
<ComponentRef Id="comp_C9901889_BAD5_4B2C_9407_EAF967B1526C" />
<ComponentRef Id="comp_03332461_4D6C_4BB5_90D1_4C4D896D7775" />
<ComponentRef Id="comp_3AE770A3_904C_4458_81BD_300F195A4250" />
<ComponentRef Id="comp_dir_8F9BAB58_4415_4353_BE9E_36C8F7EEF78A" />
</Feature>
<UIRef Id="WixUI_InstallDir" />
<WixVariable Id="WixUILicenseRtf" Value="LICENSE.rtf" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<CustomAction Id="ExtractService" Directory="INSTALLFOLDER" Impersonate="no" Execute="deferred" ExeCommand="7z e -y some_service.tar.gz" Return="check" />
<CustomAction Id="ExtractService2" Directory="INSTALLFOLDER" Impersonate="no" Execute="deferred" ExeCommand="7z x -y some_service.tar" Return="check" />
<!--<CustomAction Id="Create_Some_Files" Directory="INSTALLFOLDER" ExeCommand="cmd /C "mkdir some_files"" Execute="deferred" Return="ignore" HideTarget="no" Impersonate="no" />
<CustomAction Id="Copy_p12" Directory="INSTALLFOLDER" ExeCommand="cmd /C "xcopy google-credentials-release-server.p12 some_files"" Execute="deferred" Return="ignore" HideTarget="no" Impersonate="no" />-->
<!--<CustomAction Id="Create_Log" Directory="INSTALLFOLDER" ExeCommand="cmd /C "mkdir Logs"" Execute="deferred" Return="ignore" HideTarget="no" Impersonate="no" />-->
<CustomAction Id="Cleanup_tarfile" Directory="INSTALLFOLDER" ExeCommand="cmd /C "del some_service.tar"" Execute="deferred" Return="ignore" HideTarget="no" Impersonate="no" />
<CustomAction Id="Cleanup_targzfile" Directory="INSTALLFOLDER" ExeCommand="cmd /C "del some_service.tar.gz"" Execute="deferred" Return="ignore" HideTarget="no" Impersonate="no" />
<CustomAction Id="Cleanup_bundle" Directory="INSTALLFOLDER" ExeCommand="cmd /C RD "[INSTALLFOLDER]" /s /q" Execute="deferred" Return="ignore" HideTarget="no" Impersonate="no" />
<!--<CustomAction Id="Cleanup_Some_Files" Directory="INSTALLFOLDER" ExeCommand="cmd /C RD "some_files" /s /q" Execute="deferred" Return="ignore" HideTarget="no" Impersonate="no" />-->
<InstallExecuteSequence>
<Custom Action="ExtractService" Before="InstallFinalize">NOT Installed</Custom>
<Custom Action="ExtractService2" After="ExtractService">NOT Installed</Custom>
<!--<Custom Action="Create_Some_Files" After="ExtractService">NOT Installed</Custom>
<Custom Action="Copy_p12" After="Create_Some_Files">NOT Installed</Custom>-->
<!--<Custom Action="Create_Log" After="ExtractService2">NOT Installed</Custom>-->
<Custom Action="Cleanup_tarfile" Before="RemoveFiles">REMOVE="ALL"</Custom>
<Custom Action="Cleanup_targzfile" Before="RemoveFiles">REMOVE="ALL"</Custom>
<Custom Action="Cleanup_bundle" Before="RemoveFiles">REMOVE="ALL"</Custom>
<!--<Custom Action="Cleanup_Some_Files" Before="RemoveFiles">REMOVE="ALL"</Custom>-->
</InstallExecuteSequence>
<UI />
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="SomeInstaller">
<Directory Id="ERMPanel.Binaries" />
<Directory Id="dir_585C16B3_5205_4D63_87F5_D7576697D2A9" Name="some_files">
<Component Id="comp_3AE770A3_904C_4458_81BD_300F195A4250" Guid="E117F3ED-771F-4547-9713-4A8FCDF173C8" Permanent="no" SharedDllRefCount="no" Transitive="no">
<File Id="_95238475_7B18_4058_82A2_B56483BCEFD1" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="google-credentials-release-server.p12" Source="google-credentials-release-server.p12" KeyPath="yes" />
</Component>
</Directory>
<Directory Id="dir_8F9BAB58_4415_4353_BE9E_36C8F7EEF78A" Name="Logs">
<Component Id="comp_dir_8F9BAB58_4415_4353_BE9E_36C8F7EEF78A" Guid="2EB4F74F-2FF4-42A6-B149-746C25950972" KeyPath="yes">
<CreateFolder Directory="dir_8F9BAB58_4415_4353_BE9E_36C8F7EEF78A" />
<RemoveFolder Id="id_026B5F17_73B3_4F92_803A_7ED05A3E3D7A" On="uninstall" Directory="dir_8F9BAB58_4415_4353_BE9E_36C8F7EEF78A" />
</Component>
</Directory>
</Directory>
</Directory>
<Directory Id="DesktopFolder">
<Component Id="comp_5D704CE7_9E55_4FC5_8CB2_6BA4612D6D35" Guid="32628FC1-02E6-486C-88BD-1E1B3EB24E44" Permanent="no" SharedDllRefCount="no" Transitive="no">
<Shortcut Id="_337FA89F_92ED_457C_899C_5344A548FD97" Directory="DesktopFolder" Name="ERMPanel" Show="normal" Target="[INSTALLFOLDER]ERMPanel.exe" WorkingDirectory="INSTALLFOLDER" />
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]\Installer" Name="comp_5D704CE7_9E55_4FC5_8CB2_6BA4612D6D35" Type="string" Value="User's Desktop directory" KeyPath="yes" />
</Component>
</Directory>
<Directory Id="StartMenuFolder">
<Component Id="comp_03332461_4D6C_4BB5_90D1_4C4D896D7775" Guid="98E2BC79-8D59-4FEF-B235-92BB611CC608" Permanent="no" SharedDllRefCount="no" Transitive="no">
<Shortcut Id="_69EBF121_EA14_40B0_A587_1F520C033E45" Directory="StartMenuFolder" Name="ERMPanel" Show="normal" Target="[INSTALLFOLDER]ERMPanel.exe" WorkingDirectory="INSTALLFOLDER" />
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]\Installer" Name="comp_03332461_4D6C_4BB5_90D1_4C4D896D7775" Type="string" Value="User's Start Menu directory" KeyPath="yes" />
</Component>
</Directory>
<Directory Id="ProgramMenuFolder">
<Component Id="comp_C9901889_BAD5_4B2C_9407_EAF967B1526C" Guid="AAA016CC-1B36-417A-A5EA-CB92A1A440AF" Permanent="no" SharedDllRefCount="no" Transitive="no">
<Shortcut Id="_3732D7A6_3230_4CCB_8037_3DA1D02E98E6" Directory="ProgramMenuFolder" Name="ERMPanel" Show="normal" Target="[INSTALLFOLDER]ERMPanel.exe" WorkingDirectory="INSTALLFOLDER" />
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]\Installer" Name="comp_C9901889_BAD5_4B2C_9407_EAF967B1526C" Type="string" Value="User's Programs Menu directory" KeyPath="yes" />
</Component>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="packages" Guid="">
<File Source="some_service.tar.gz" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
What I am doing is manually compressing node application into file some_service.tar.gz, then I copy it as a single file, and extract it in custom actions. Of course that is wrong. I would like to have just nodejsdir on the same place as some_service.tar.gz and copy it with heat.exe
I must admit I find this quite confusing, if you could help me please based on my example.
Thank you.
Heat is just the harvesting tool included in wix. You can use it to harvest hundreds of files automatically if you have the directory structure on your build machine that you want to replicate on the install machine.
If your included files change rather frequently, setting up a heat task to run every build is something you should do. If the files included are rather static and you only add/remove or move some files infrequently, use heat to generate the first WXS with all the files and then manually update it when required.
Don't forget that the msi already compresses all the files it includes, there's no reason to compress all the files into a zip then include that into your msi only to unpack it after "installing" it. You just end up taking way too much space unnecessarily on the customer's machine and may fail to install since the MSI cannot properly do the file costing and may run out of disk space when unpacking.
You also forego all the useful file tracking and handling features of the windows installer when you use a zip containing all your files. Uninstalling requires extra steps, upgrading is basically impossible to do nicely. You can't roll back during a failure.
I harvest the "help" directory for our product with a "BeforeBuild" task of my wixproj.
I have a file called genComponents.targets which contains
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)..\CommonBuild.props" Condition="$(_CommonBuildPropertyLoaded) != 'true'"/>
<PropertyGroup>
<HeatEXE>$(WixToolPath)Heat.exe</HeatEXE>
</PropertyGroup>
<Target Name="GenHelpDependsOn">
<PropertyGroup>
<HelpHeatArgs>dir "$(MSBuildThisFileDirectory)..\..\Help" -gg -cg BinHelp -dr BINHELP -template fragment -sreg -sfrag -srd -var var.dirHELP -o "$(MSBuildThisFileDirectory)Components\BinHelp.wxs"</HelpHeatArgs>
</PropertyGroup>
</Target>
<Target Name="GenBinHelp" DependsOnTargets="GenHelpDependsOn">
<Exec Command=""$(HeatEXE)" $(HelpHeatArgs)" Condition="!Exists('$(MSBuildThisFileDirectory)Components\BinHelp.wxs')"/>
</Target>
</Project>
And just use
<Target Name="BeforeBuild" DependsOnTargets="GenBinHelp" />
in my wixproj which will generate the wxs for the BinHelp component group for the directory with all the help files. There's a thousand or so help files for all the languages we support.
In the wixproj I add the wxs as a link and just make sure it is included in a feature as a ComponentGroupRef.
You can just include an <Exec> task in your beforebuild task with all the correct arguments I just use a second file because I have many heat tasks. There are lots of different arguments to heat and you can take a look at them with heat /? to see them.
Just run heat.exe on your js dir and see what it looks like.
In one project where I harvest all files with heat has 3836 files in it. Here's the process for the build. I grab the zip file of built binaries and other files from a network location and unzip all the file contents into a folder that I called ZipFolder.
In my wixproj I put a heat call in the before build target
<Target Name="BeforeBuild" >
<Exec Command=""$(WixToolPath)Heat.exe" dir "$(MSBuildThisFileDirectory)..\Binaries\ZipFolder" -ag -cg SDK -dr INSTALLDIR -suid -sreg -sfrag -srd -var var.ZipFolderDir -o "$(MSBuildThisFileDirectory)..\src\InstallerSDK\Components\SDKFiles.wxs"" Condition="!Exists('$(MSBuildThisFileDirectory)..\src\InstallerSDK\Components\SDKFiles.wxs')" />
</Target>
and in my wixproj I add an existing file SDKFiles.wxs as a link (small arrow on Add button shows drop down with "as link")
I'm using a few cmd line switches that you don't have defined in your heat call which I use so that I can reference the generated file's components properly. Firstly I use -var var.ZipFolderDir and this makes the source of your files equal to $(var.ZipFolderDir)\rest\of\path.dll. And you can just define this variable in your defineconstants (one for each configuration):
<DefineConstants>Debug;ZipFolderDir=$(MSBuildThisFileDirectory)..\Binaries\ZipFolder\;</DefineConstants>
<DefineConstants>ZipFolderDir=$(MSBuildThisFileDirectory)..\Binaries\ZipFolder\;</DefineConstants>
The other difference is also using -dr INSTALLFOLDER which will set the top level Directory to be INSTALLFOLDER which is defined by your INSTALLFOLDER directory in the product.wxs.
Finally there is -cg SDK defining the name of the component group which holds all the files harvested by heat. Here is where we tie in to the main product.wxs with a ComponentGroupRef
<Feature Id="ProductFeature" Title="SomeInstaller" Level="1">
<ComponentGroupRef Id="SDK" />
<ComponentGroupRef Id="ERMPanel.Binaries" />
<ComponentRef Id="comp_5D704CE7_9E55_4FC5_8CB2_6BA4612D6D35" />
<ComponentRef Id="comp_C9901889_BAD5_4B2C_9407_EAF967B1526C" />
<ComponentRef Id="comp_03332461_4D6C_4BB5_90D1_4C4D896D7775" />
<ComponentRef Id="comp_3AE770A3_904C_4458_81BD_300F195A4250" />
<ComponentRef Id="comp_dir_8F9BAB58_4415_4353_BE9E_36C8F7EEF78A" />
</Feature>
And you can remove your ProductComponents group at the bottom of the product.wxs
I've never used the <HarvestProject> but I do know wix has Harvest targets already defined but I never spent the time to figure out how to use them. I've also never used heat on a project either so I can't really help there. All my installer projects are built as their own separate projects due to the build process we use. Generally they grab a zip of binaries and unzip to a Binaries folder then build the installers calling heat on some folders.
Below is my config what i am using even though i force a build by doing a check-in, version number of assemblies are not updated.
probably i am missing some thing.
note: new to build servers and this is my first. we have lot of Assemblyinfo.cs files, under different projects.
do i need to use msbuildtaks to get around this? if so can you help with an example.
<cruisecontrol xmlns:cb="urn:ccnet.config.builder" xmlns="http://thoughtworks.org/ccnet/1/8">
<!-- preprocessor settings -->
<cb:define ArtifactsDir="\Artifacts" />
<cb:define ProductNameCompanySvnPath = "D:\CompanySvn\Trunk\Source\"/>
<cb:define TortoiseSvnExe = "C:\Program Files\TortoiseSVN\bin\svn.exe"/>
<cb:define SvnPathToBuild = "http://dummy.mummy.com/svn/Company/branches/Branch-meau/" />
<cb:define NantExecutablePath = "C:\Program Files\NANT\bin\nant.exe"/>
<cb:define BranchNameCI="_BR_Meau_CI"/>
<cb:define BuildMode = "Release"/>
<cb:define PlatformCpu = "X86"/>
<cb:define MsBuildExecutable = "C:\Windows\Microsoft.NET\Framework64\v3.5\msbuild.exe" />
<cb:define MajorVersionNumber = "4"/>
<cb:define MinorVersionNumber = "1"/>
<cb:define name="svn_ci_ProductName">
<executable>$(TortoiseSvnExe)</executable>
<workingDirectory>$(ProductNameCompanySvnPath)ProductName.Company\</workingDirectory>
<trunkUrl>$(SvnPathToBuild)ProductName.Company/</trunkUrl>
<cleanUp>true</cleanUp>
<autoGetSource>true</autoGetSource>
</cb:define>
<cb:define name="svn_ci_Database">
<executable>$(TortoiseSvnExe)</executable>
<workingDirectory>$(ProductNameCompanySvnPath)Database\</workingDirectory>
<trunkUrl>$(SvnPathToBuild)Database/</trunkUrl>
<cleanUp>true</cleanUp>
<autoGetSource>true</autoGetSource>
</cb:define>
<cb:define name="svn_ci_ThirdParty">
<executable>$(TortoiseSvnExe)</executable>
<workingDirectory>$(ProductNameCompanySvnPath)ThirdParty\</workingDirectory>
<trunkUrl>$(SvnPathToBuild)ThirdParty/</trunkUrl>
<cleanUp>true</cleanUp>
<autoGetSource>true</autoGetSource>
</cb:define>
<cb:define name="svn_ci_Release">
<executable>$(TortoiseSvnExe)</executable>
<workingDirectory>$(ProductNameCompanySvnPath)Release\</workingDirectory>
<trunkUrl>$(SvnPathToBuild)Release/</trunkUrl>
<cleanUp>true</cleanUp>
<autoGetSource>true</autoGetSource>
</cb:define>
<project name="Company_SVN_Build" description="Build Trunk after merge.">
<workingDirectory>$(ProductNameCompanySvnPath)ProductName.Company\</workingDirectory>
<!--<triggers>
check the source control every X time for changes, and run the tasks if changes are found
<intervalTrigger name="continuous" seconds="30" buildCondition="IfModificationExists" initialSeconds="5"/>
</triggers>-->
<triggers>
<intervalTrigger name="continuous" seconds="180" buildCondition="IfModificationExists" initialSeconds="30" />
</triggers>
<labeller type="assemblyVersionLabeller">
<major>$(MajorVersionNumber)</major>
<minor>$(MinorVersionNumber)</minor>
<incrementOnFailure>true</incrementOnFailure>
</labeller>
<!-- get all the souce from the branch required to build the binaries. -->
<sourcecontrol type="multi">
<sourceControls>
<svn>
<cb:svn_ci_ProductName/>
</svn>
<svn>
<cb:svn_ci_Database/>
</svn>
<svn>
<cb:svn_ci_ThirdParty/>
</svn>
<svn>
<cb:svn_ci_Release/>
</svn>
</sourceControls>
</sourcecontrol>
<tasks>
<msbuild>
<executable>$(MsBuildExecutable)</executable>
<projectFile>$(ProductNameCompanySvnPath)ProductName.Company\ProductName.Company.sln</projectFile>
<buildArgs>/p:Configuration=Release /p:Platform=$(PlatformCpu) /v:diag</buildArgs>
<targets>clean</targets>
<timeout>9000</timeout>
<logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
</msbuild>
<msbuild>
<executable>$(MsBuildExecutable)</executable>
<projectFile>$(ProductNameCompanySvnPath)ProductName.Company\ProductName.Company.sln</projectFile>
<buildArgs>/p:Configuration=Release /p:Platform=$(PlatformCpu) /v:diag</buildArgs>
<targets>Build</targets>
<timeout>9000</timeout>
<logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
</msbuild>
<exec>
<executable>Prepare_ProductName_Release.bat</executable>
<baseDirectory>$(ProductNameCompanySvnPath)Release</baseDirectory>
<buildArgs>all</buildArgs>
<buildTimeoutSeconds>100</buildTimeoutSeconds>
</exec>
</tasks>
<!-- all plublishers are listed below -->
<publishers>
<xmllogger />
<artifactcleanup cleanUpMethod="KeepLastXBuilds" cleanUpValue="50" />
</publishers>
</project>
<!-- End Projects -->
</cruisecontrol>
If I'm reading this correctly:
CC.NET is not going to tag your Assemblyinfo.cs files. You have to do that yourself.
The "Version" in the CC.NET context is the Cardinal/Ordinal number of the build. Your first build will be "1", then "2", etc, etc.
See my AssemblyInfo.cs "tagging" example here:
Use SVN Revision to label build in CCNET
I prefer to tag it with the SVN revision. You may use the CC.NET version.
The way I think of CC.NET is "a big super fancy msbuild caller" "with some post build reporting".
I have installed Cruise Control 1.5 on my machine and trying to configure the automated build. Everything is working fine. Application is building, i receive an email but I don't see the FXCop result embedded in the Build Email. What am i missing?
ccnet.config file
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<project name="SampleProject">
<webURL>http://localhost/ccnet</webURL>
<workingDirectory>E:\\NewProject\\DevBuilds</workingDirectory>
<artifactDirectory>E:\\NewProject\\DevBuilds\Artifacts</artifactDirectory>
<modificationDelaySeconds>600</modificationDelaySeconds>
<category>Dev Build</category>
<sourcecontrol type="svn">
<trunkUrl>https://mycompany.com/svn/trunk/MyApplication</trunkUrl>
<workingDirectory>E:\\NewProject\\DevBuilds\SourceCode</workingDirectory>
<autoGetSource>false</autoGetSource>
<executable>C:\Program Files\Subversion\bin\svn.exe</executable>
<username>username</username>
<password>password</password>
</sourcecontrol>
<initialState>Started</initialState>
<startupMode>UseInitialState</startupMode>
<triggers>
<intervalTrigger seconds="3600" buildCondition="IfModificationExists" />
</triggers>
<state type="state" directory="E:\\NewProject\\DevBuilds" />
<labeller type="iterationlabeller">
<prefix>1.0</prefix>
<duration>1</duration>
<releaseStartDate>2012/04/11</releaseStartDate>
<separator>.</separator>
</labeller>
<tasks>
<nant>
<executable>E:\NewProject\Installables\nant\bin\nant.exe</executable>
<baseDirectory>E:\\NewProject\\Build Files</baseDirectory>
<buildFile>Build.xml</buildFile>
<targetList>
<target>Run</target>
</targetList>
<buildTimeoutSeconds>5000</buildTimeoutSeconds>
</nant>
</tasks>
<publishers>
<merge>
<files>
<file>E:\NewProject\DevBuilds\FxCopOutput\FxCop-results.xml</file>
</files>
</merge>
<xmllogger logDir="E:\\NewProject\\DevBuilds\Artifacts\\buildlogs" />
<email from="Checkins#symphonysv.com" mailhost="smtp.gmail.com" includeDetails="true" useSSL="false">
<users>
<user name="dev1" group="buildmaster" address="myname#gmail.com"/>
</users>
<groups>
<group name="buildmaster">
<notifications>
<notificationType>Always</notificationType>
</notifications>
</group>
</groups>
</email>
</publishers>
</project>
</cruisecontrol>
Build.xml
<?xml version="1.0"?>
<project name="Test" default="Run" basedir=".">
<property name="BuildNumber" value="1.0.0.0"/>
<property name="SourceControlURL" value="https://mycompany.com/svn/trunk/MyApplication/"/>
<property name="BuildFile" value=".\Build.xml"/>
<property name="TagBuild" value="false"/>
<property name="BuildType" value="Release"/>
<property name="BuildTargetDir" value="E:\NewProject\DevBuilds\Executables"/>
<property name="BuildWorkDir" value="E:\NewProject\DevBuilds\SourceCode"/>
<property name="MSBUILD" value="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319"/>
<property name="FxCopOutPutDirectory" value="E:\NewProject\DevBuilds\FxCopOutput" />
<property name="FxCopInputDirectory" value="E:\NewProject\DevBuilds" />
<target name="Run" description="Starting ThinkPets Build">
<call target="GetLatestCode"/>
<call target="BuildCode"/>
<call target="BuildASPWebSite"/>
<call target="runFxCop"/>
</target>
<target name="GetLatestCode">
<echo message="Updating Code From SVN to ${BuildWorkDir}"/>
<exec program="svn.exe">
<arg line="checkout ${SourceControlURL} ${BuildWorkDir} -q"/>
</exec>
</target>
<target name="BuildCode">
<echo message="Building VS10 Projects Web" />
<exec program="${MSBUILD}\msbuild.exe" failonerror="true">
<arg line=" "${BuildWorkDir}\Application.sln" /t:Rebuild /p:Configuration=Release /V:q"/>
</exec>
</target>
<target name="BuildASPWebSite">
<echo message="Building ASP Web Site" />
<exec program="${MSBUILD}\aspnet_compiler.exe" failonerror="true">
<arg line=" -v / -p "${BuildWorkDir}\MyDir" -f -c "${BuildTargetDir}" "/>
</exec>
</target>
<target name="runFxCop" depends="BuildCode">
<exec program="C:\Program Files\Microsoft FxCop 1.36\FxCopCmd.exe" failonerror="false">
<arg line="/p:${FxCopInputDirectory}\SampleProject.FxCop /o:${FxCopOutPutDirectory}\FxCop-results.xml"/>
</exec>
</target>
</project>
There are a few points you missed:
You need to add <includeDetails>true</includeDetails> to your e-mail publisher block. This will give you HTML e-mails.
In order to transform your XML build results into HTML you need to add an <xslFiles> section to your e-mail publisher block. The elements of this block point to XSL transformation files in [CCNET_INSTALL_DIR]\server\xsl.
So for including the FxCop summary just as appears in CCNET webdasboard this is your e-mail publisher block:
<email from="Checkins#symphonysv.com" mailhost="smtp.gmail.com" includeDetails="true" useSSL="false">
<users>
<user name="dev1" group="buildmaster" address="myname#gmail.com"/>
</users>
<groups>
<group name="buildmaster">
<notifications>
<notificationType>Always</notificationType>
</notifications>
</group>
</groups>
<includeDetails>true</includeDetails>
<xslFiles>
<file>xsl\fxcop-summary_1_36.xsl</file>
</xslFiles>
</email>
Thanks Chairman for your valuable time. I think my mistake was that I did not host the "ccnet" application on my machine which resulted in not able to find the xsls for the publishers. When I used the same settings and config file on the Server machine with "ccnet" application hosted, I was able to see the FxCop summary in the email. Please correct my understanding if wrong.
I'm developing a ccnet.config script for CruiseControl.net that invokes an Ant script, and I'm getting the following error while executing the CruiseControl.NET service:
Error: "Unused node detected:schedule block"
This is my ccnet.config:
<cruisecontrol xmlns:cb="urn:ccnet.config.builder" xmlns="http://thoughtworks.org/ccnet/1/5">
<project name="testprj">
<webURL>http://localhost/ccnet</webURL>
<modificationDelaySeconds>10</modificationDelaySeconds>
<sourcecontrol type="cvs" autoGetSource="true">
<executable>C:\dev\ccnet\ccnet\tools\cvs.exe</executable>
<cvsroot>:ext:exortech#ccnet:/cvsroot/ccnetcontrib</cvsroot>
<module>ccnet</module>
<workingDirectory>C:\dev\Copy of FAT\</workingDirectory>
<webUrlBuilder type="viewcvs">
<url>http://localhost:7899/viewcvs/ccnet/NUnitDemo/</url>
</webUrlBuilder>
</sourcecontrol>
<schedule>
<ant>
<antscript>C:\Apache\apache-ant-1.8.1\bin\ant.bat</antscript>
<antworkingdir>C:\Apache</antworkingdir>
<buildfile>internalpush.xml</buildfile>
<uselogger>true</uselogger>
<usedebug>false</usedebug>
</ant>
</schedule>
<publishers>
<merge>
<files>
<file>C:\dev\ccnet\ccnet\build\ccnet.exe-results.xml</file>
</files>
</merge>
<xmllogger>
<logDir>log</logDir>
</xmllogger>
<email mailhost="foo" from="sreekanth#foo.com" includeDetails="true">
<users>
<user name="BuildGuru" group="buildmaster" address="buildguru#mycompany.com"/>
<user name="JoeDeveloper" group="developers" address="joedeveloper#thoughtworks.com"/>
</users>
<groups>
<group name="developers">
<notifications>
<NotificationType>Change</NotificationType>
</notifications>
</group>
<group name="buildmaster">
<notifications>
<NotificationType>Change</NotificationType>
</notifications>
</group>
</groups>
</email>
</publishers>
</project>
</cruisecontrol>
There is no "schedule" element available under the "project" element: http://confluence.public.thoughtworks.org/display/CCNET/Project+Configuration+Block
How can I use CCNetLabel in the file merge task? From what I have found I have to use dynamicValues. I have something like this and it is not working any help?
<publishers>
<merge>
<dynamicValues>
<replacementValue property="files">
<format>D:\Testoutput\{0}\*.xml</format>
<parameters>
<namedValue name="$CCNetLabel" value="Default" />
</parameters>
</replacementValue>
</dynamicValues>
</merge>
<xmllogger />
<modificationHistory onlyLogWhenChangesFound="true" />
<statistics />
</publishers>
In your script you're trying to generate the following configuration (intentionally I'm using the shorthand notation which is easier to read):
<publishers>
<merge>
<files>D:\Testoutput\$[$CCNetLabel]\*.xml</files>
</merge>
<xmllogger />
<modificationHistory onlyLogWhenChangesFound="true" />
<statistics />
</publishers>
This won't work because <files> is an array, therefore you'd need something like:
<publishers>
<merge>
<files>
<file>D:\Testoutput\$[$CCNetLabel]\*.xml</file>
</files>
</merge>
<xmllogger />
<modificationHistory onlyLogWhenChangesFound="true" />
<statistics />
</publishers>
Unfortunately this doesn't work either because <dynamicValues> are supported only for the <merge> but not for the <files> tag. I don't think it's currently (version 1.6) possible to use integration properties here at all.
I'd use the following workaround to achieve the same result:
<publishers>
<exec>
<executable>C:\Windows\system32\cmd.exe</executable>
<buildArgs>/C copy D:\Testoutput\$[$CCNetLabel]\*.xml D:\Testoutput\FixedDir</buildArgs>
</exec>
<merge>
<files>
<file>D:\Testoutput\FixedDir\*.xml</file>
</files>
</merge>
<xmllogger />
<modificationHistory onlyLogWhenChangesFound="true" />
<statistics />
<exec>
<executable>C:\Windows\system32\cmd.exe</executable>
<buildArgs>/C del D:\Testoutput\FixedDir\*.xml</buildArgs>
</exec>
</publishers>