Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
439 lines (353 sloc) 19.2 KB
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<Import Project="$(MSBuildProjectDirectory)\Common.targets"/>
<PropertyGroup>
<LocalBuildConfig>C:\LocalBuildConfig.proj</LocalBuildConfig>
</PropertyGroup>
<Import Project="$(LocalBuildConfig)" Condition="Exists($(LocalBuildConfig))"/>
<!-- This is a fake signing certificate that serves as a placeholer in case there isn't a real signing key -->
<PropertyGroup Condition="!Exists($(LocalBuildConfig))">
<SigningKeyName>Placeholder</SigningKeyName>
<SigningKeyPath>$(MSBuildProjectDirectory)\Certificates</SigningKeyPath>
</PropertyGroup>
<Import Project="$(MSBuildProjectDirectory)\CodeSigning.targets"/>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<PlatformCPP>Win32</PlatformCPP>
</PropertyGroup>
<Choose>
<When Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<PropertyGroup/>
</When>
<When Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<PropertyGroup/>
</When>
</Choose>
<PropertyGroup>
<Major>2</Major>
<Minor>0</Minor>
<Build>1</Build>
<Revision>0</Revision>
<Build Condition="'$(BUILD_NUMBER)'!=''">$(BUILD_NUMBER)</Build>
<Version>$(Major).$(Minor).$(Build).$(Revision)</Version>
</PropertyGroup>
<PropertyGroup>
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
<Vsto3OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)VSTO3</Vsto3OutputDirectory>
<OutputName>XiantFiler</OutputName>
<OutputType>Package</OutputType>
<FullOutputPath>$(MSBuildProjectDirectory)\bin\$(Configuration)</FullOutputPath>
<Vsto3Project>$(MSBuildProjectDirectory)\Xiant.Filer.VSTO\Filer.VSTO.csproj</Vsto3Project>
<Vsto3ManifestFile>$(Vsto3OutputDirectory)\Xiant.Filer.VSTO.dll.manifest</Vsto3ManifestFile>
<Vsto3AssemblyFile>$(Vsto3OutputDirectory)\Xiant.Filer.VSTO.dll</Vsto3AssemblyFile>
<Vsto3VstoFile>$(Vsto3OutputDirectory)\Xiant.Filer.VSTO.vsto</Vsto3VstoFile>
<Solution>$(MSBuildProjectDirectory)\XiantFiler.sln</Solution>
<KeyOriginatorFile>$(MSBuildProjectDirectory)\Xiant.snk</KeyOriginatorFile>
<ProductName>Xiant Filer</ProductName>
<ProductUrl>http://www.xiant.com</ProductUrl>
<SupportUrl>http://www.xiant.com/support</SupportUrl>
<PublisherName>Xiant</PublisherName>
<OfficeApplicationDescription>Manage your e-mail more effectively</OfficeApplicationDescription>
<ZipBuildsPath>$(MSBuildProjectDirectory)\ZipBuilds</ZipBuildsPath>
<FilerZipFileName>$(ZipBuildsPath)\XiantFiler-$(Configuration)-$(Version).zip</FilerZipFileName>
<FilerSFXFileName>$(ZipBuildsPath)\XiantFiler-$(Configuration)-$(Version).exe</FilerSFXFileName>
</PropertyGroup>
<PropertyGroup>
<WindowsSDKPath>$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\GenericBootstrapper\14.0@Path)</WindowsSDKPath>
<VisualStudio9>$(DevEnvDir)\devenv.com</VisualStudio9>
</PropertyGroup>
<!-- These properties are important in the Wix Installer processing. -->
<PropertyGroup>
<WixToolPath>$(MSBuildProjectDirectory)\Vendor\wix\3.9.1006.0\</WixToolPath>
<WixTargetsPath>$(WixToolPath)Wix.targets</WixTargetsPath>
<WixTasksPath>$(WixToolPath)wixtasks.dll</WixTasksPath>
<CompilerTreatWarningsAsErrors>False</CompilerTreatWarningsAsErrors>
<SuppressSpecificWarnings>1076;1026</SuppressSpecificWarnings>
<DefineConstants>
ReleaseVersion=$(Major).$(Minor).$(Build);
OutputDirectory=$(OutputDirectory);
Vsto3OutputDirectory=$(Vsto3OutputDirectory);
Vsto3AssemblyFile=$(Vsto3AssemblyFile);
XiantCommonBin=$(MSBuildProjectDirectory)\Vendor\XiantCommon\$(Configuration);
XiantCommonBinx64=$(MSBuildProjectDirectory)\Vendor\XiantCommon\$(Configuration)x64;
</DefineConstants>
<KitPublishFolder>$(MSBuildProjectDirectory)\Builds\$(Version)\$(Configuration)</KitPublishFolder>
</PropertyGroup>
<ItemGroup>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixToolPath)\WixUtilExtension.dll</HintPath>
</WixExtension>
<WixExtension Include="WixNetfxExtension">
<HintPath>$(WixToolPath)\WixNetfxExtension.dll</HintPath>
</WixExtension>
</ItemGroup>
<ItemGroup>
<BootstrapperFile Include="Microsoft.Windows.Installer.4.5">
<ProductName>Microsoft.Windows.Installer.3.1</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Visual.C++.12.0.x86">
<ProductName>Microsoft.Visual.C++.12.0.x86</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Visual.C++.12.0.x64">
<ProductName>Microsoft.Visual.C++.12.0.x64</ProductName>
</BootstrapperFile>
<BootstrapperFile Include=".NETFramework,Version=v4.5.1">
<ProductName>Microsoft .NET Framework 4.5.1(x86 and x64)</ProductName>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.VSTORuntime.4.0">
<ProductName>Microsoft.VSTORuntime.4.0"</ProductName>
</BootstrapperFile>
</ItemGroup>
<ItemGroup>
<AdditionalAssemblies Include="$(OutputDirectory)\Xiant.Filer.Outlook2007.dll"/>
<AdditionalAssemblies Include="$(OutputDirectory)\Xiant.Filer.Outlook2010.dll"/>
</ItemGroup>
<ItemGroup>
<ExcludedAssemblies Include="$(OutputDirectory)\Microsoft.Search.Interop.dll"/>
<ExcludedAssemblies Include="$(OutputDirectory)\Microsoft.Office.Interop.Outlook.dll"/>
<ExcludedAssemblies Include="$(OutputDirectory)\Office.dll"/>
<ExcludedAssemblies Include="$(OutputDirectory)\Xiant.MapiAccessor.dll"/>
<ExcludedAssemblies Include="$(OutputDirectory)\Xiant.Common.Windows.dll"/>
<ExcludedAssemblies Include="$(OutputDirectory)\Xiant.Common.Outlook.dll"/>
<ExcludedAssemblies Include="$(OutputDirectory)\Xiant.Common.dll"/>
<ExcludedAssemblies Include="$(OutputDirectory)\Lucene.Net.dll"/>
<ExcludedAssemblies Include="$(OutputDirectory)\Lucene.Net.Contrib.SpellChecker.dll"/>
<ExcludedAssemblies Include="$(OutputDirectory)\Xiant.Filer.Resources.dll"/>
<ExcludedAssemblies Include="$(OutputDirectory)\Xiant.Topics.Resources.dll"/>
<ExcludedAssemblies Include="$(OutputDirectory)\System.Data.SQLite.dll"/>
<ExcludedAssemblies Include="$(OutputDirectory)\log4net.dll"/>
</ItemGroup>
<ItemGroup>
<VstoProject3 Include="Filer.VSTO\*.csproj">
<AssemblyTitle>Xiant Filer</AssemblyTitle>
</VstoProject3>
</ItemGroup>
<!-- Projects to be compiled specified in the required order -->
<ItemGroup>
<ProjectListCS Include="OfficeAddinRegistration\*.csproj">
<AssemblyTitle>OfficeAddinRegistration</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="InclusionListCustomActions\*.csproj">
<AssemblyTitle>InclusionListCustomActions</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="ListRunningAppsCustomAction\*.csproj">
<AssemblyTitle>ListRunningAppsCustomAction</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="Filer.Addin\*.csproj">
<AssemblyTitle>Xiant Filer UI</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="Filer.Addin.Core\*.csproj">
<AssemblyTitle>Xiant Filer Core</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="Filer.Addin.Resources\*.csproj">
<AssemblyTitle>Xiant Filer Resources</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="Filer.Addin.UI.Common\*.csproj">
<AssemblyTitle>Xiant Filer UI Common</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="Filer.Addin.Outlook2007\*.csproj">
<AssemblyTitle>Xiant Filer Outlook 2007</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="Filer.Addin.Outlook2010\*.csproj">
<AssemblyTitle>Xiant Filer Outlook 2010</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="AC.Resources\*.csproj">
<AssemblyTitle>Xiant Filer Outlook 2010</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="AC.Core\*.csproj">
<AssemblyTitle>Xiant Filer Outlook 2010</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="AC.UI\*.csproj">
<AssemblyTitle>Xiant Filer Outlook 2010</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="SetSecurity\*.csproj">
<AssemblyTitle>SetSecurity</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="DeploymentCA\*.csproj">
<AssemblyTitle>Xiant Filer Deployment</AssemblyTitle>
</ProjectListCS>
<ProjectListCS Include="XiantFilerDiagnostics\*.csproj">
<AssemblyTitle>XiantFilerDiagnostics</AssemblyTitle>
</ProjectListCS>
</ItemGroup>
<ItemGroup>
<AllProjectsBuildFiles Include="@(ProjectListCS);"/>
</ItemGroup>
<ItemGroup>
<AllProjects Include="@(AllProjectsBuildFiles-&gt;'%(rootdir)%(directory)')"/>
</ItemGroup>
<ItemGroup>
<AssemblyInfoFilesCS Include="@(ProjectListCS-&gt;'%(rootdir)%(directory)Properties\AssemblyInfo.cs')"/>
<AssemblyInfoFilesCS Include="@(VstoProjects-&gt;'%(rootdir)%(directory)Properties\AssemblyInfo.cs')"/>
</ItemGroup>
<ItemGroup>
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Filer.Diagnostics.exe" />
<ApplicationFilesToSign Include ="$(Vsto3AssemblyFile)" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Filer.UI.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Filer.UI.Common.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Filer.Resources.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Filer.Outlook2010.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Filer.Outlook2007.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Filer.Core.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.AC.UI.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.AC.Core.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.AC.Resources.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Common.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Common.Outlook.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Common.Windows.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.MapiAccessor.dll" />
<ApplicationFilesToSign Include ="$(MSBuildProjectDirectory)\Vendor\XiantCommon\$(Configuration)x64\Xiant.MapiAccessor.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Setup.DeploymentCA.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Setup.DeploymentCA.CA.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Setup.InclusionListCustomActions.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Setup.ListRunningAppsCustomAction.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Setup.ListRunningAppsCustomAction.CA.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Setup.OfficeAddinRegistration.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Xiant.Setup.SetSecurity.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\log4net.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\Lucene.Net.dll" />
<ApplicationFilesToSign Include ="$(OutputDirectory)\System.Data.SQLite.DLL" />
<ApplicationFilesToSign Include ="$(MSBuildProjectDirectory)\Vendor\SQLite\bin\x64\System.Data.SQLite.DLL" />
<!-- <ApplicationFilesToSign Include ="$(MSBuildProjectDirectory)\Bootstrapper\Packages\Office2007PIA\ComponentCheck.exe" />
<ApplicationFilesToSign Include ="$(MSBuildProjectDirectory)\Bootstrapper\OutlookCheck\OutlookCheck.exe" />
<ApplicationFilesToSign Include ="$(MSBuildProjectDirectory)\Bootstrapper\Packages\Office2007PIA\OutlookCheck.exe" />
<ApplicationFilesToSign Include ="$(MSBuildProjectDirectory)\Bootstrapper\Packages\VSTOR30\OutlookCheck.exe" />
<ApplicationFilesToSign Include ="$(MSBuildProjectDirectory)\Bootstrapper\Packages\DotNetFX30\OutlookCheck.exe" /> -->
</ItemGroup>
<ItemGroup>
<MsiFilesToSign Include="$(FullOutputPath)\bootstrap.exe" />
<MsiFilesToSign Include="$(FullOutputPath)\$(OutputName).msi" />
<MsiFilesToSign Include="$(FullOutputPath)\setup.exe" />
</ItemGroup>
<ItemGroup>
<SFXFilesToSign Include="$(FilerSFXFileName)" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectDirectory)\Filer.Setup\XiantFiler.wxs" />
</ItemGroup>
<PropertyGroup>
<NUNIT_BIN Condition="'$(NUNIT_HOME)'!=''">$(NUNIT_HOME)\bin</NUNIT_BIN>
<NUNIT_BIN Condition=" '$(NUNIT_BIN)' == '' ">C:\Program Files\NUnit 2.4.8\bin</NUNIT_BIN>
<!-- MSI Build -->
<NoWarn Condition="'$(NoWarn)'!=''">$(NoWarn),</NoWarn>
<NoWarn>$(NoWarn)MSB4078</NoWarn>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<VisualStudioIDE Condition="'$(VisualStudioIDE)'==''">E:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE</VisualStudioIDE>
</PropertyGroup>
<PropertyGroup>
<KitRootFolder>Builds</KitRootFolder>
</PropertyGroup>
<Target Name="Filer_SetVersionInfo">
<Message Text="Version set to '$(Version)'"/>
<CreateProperty Value="$(Version)">
<Output TaskParameter="Value" PropertyName="AssemblyInfoAssemblyFileVersion"/>
</CreateProperty>
<Message Text="AssemblyInfoAssemblyFileVersion set to '$(AssemblyInfoAssemblyFileVersion)'"/>
</Target>
<Target Name="Filer_UpdateAssemblyInfo">
<!--Bug in MSBuild that any properties created in this target are not available to the target referenced in CallTarget -->
<CallTarget Targets="AssemblyInfoCS"/>
</Target>
<Target Name="props">
<Message Text="SDKPath = $(WindowsSDKPath)" />
</Target>
<Target Name="Filer_Compile">
<Message Text="Compiling @(ProjectListCS)"/>
<MSBuild Projects="@(ProjectListCS)" Targets="Build" StopOnFirstFailure="true" Properties="OutputPath=$(OutputDirectory)"/>
<Message Text="Compiling @(VstoProject3)"/>
<MSBuild Projects="@(VstoProject3)" Targets="Build" StopOnFirstFailure="true" Properties="OutputPath=$(Vsto3OutputDirectory)"/>
<Message Text="Xiant Filer Compile Complete"/>
</Target>
<Target Name="RegenerateVSTO3Manifests" DependsOnTargets="SignApplicationFiles">
<Message Text="Regenerate VSTO 3 Manifest"/>
<CreateItem Include="$(OutputDirectory)\*.dll;$(OutputDirectory)\*.exe;$(OutputDirectory)\*.pdb">
<Output ItemName="ObfuscatedFiles" TaskParameter="Include"/>
</CreateItem>
<Copy SourceFiles="@(ObfuscatedFiles)" DestinationFolder="$(Vsto3OutputDirectory)"/>
<MSBuild
Projects="@(VstoProject3)"
Properties="Configuration=$(Configuration);OutputPath=$(Vsto3OutputDirectory);Again=true;ProductName=$(ProductName);PublisherName=$(PublisherName);SupportUrl=$(SupportUrl);OfficeApplicationDescription=$(OfficeApplicationDescription)"
Targets="VisualStudioForApplicationsBuild"
RunEachTargetSeparately="true">
<Output ItemName="Outputs" TaskParameter="TargetOutputs"/>
</MSBuild>
<CallTarget Targets="ResignVSTO3Manifests" />
<Message Text="Regenerate VSTO 3 Manifest finished @(Outputs)"/>
</Target>
<Target Name="ResignVSTO3Manifests">
<CallTarget Targets="SignVSTO3Manifest" />
</Target>
<!--
This Import and the following hook targets relinquish control to the "Build" target within the wix.targets file.
-->
<Import Project="$(WixTargetsPath)"/>
<Target Name="BeforeBuild">
<Message Text="Starting build, currently inside &quot;BeforeBuild&quot; target." />
<CallTarget Targets="Filer_SetVersionInfo" />
<CallTarget Targets="Filer_SetVersionInfo" />
<CallTarget Targets="Filer_UpdateAssemblyInfo" />
<CallTarget Targets="Filer_Compile" />
<CallTarget Targets="RegenerateVSTO3Manifests" />
</Target>
<ItemGroup>
<AlternateBootstrapperFiles Include="Bootstrapper\**\*.*" />
</ItemGroup>
<Target Name="CopyBootstrapperPackages">
<Message Text="Copying custom Bootstrapper Packages to the SDKs packages folder." />
<Copy SourceFiles="@(AlternateBootstrapperFiles)"
DestinationFiles="@(AlternateBootstrapperFiles->'$(WindowsSDKPath)%(RecursiveDir)%(Filename)%(Extension)')"
OverwriteReadOnlyFiles="True"
ContinueOnError="WarnAndContinue"
/>
<OnError ExecuteTargets="NotifyErrors"/>
</Target>
<Target Name="NotifyErrors">
<Message Text="Error copying bootstrapper packages to the windows SDK directory. Please copy them manually or run this script as admin at least once."/>
</Target>
<Target Name="BuildInstallZip">
<ItemGroup>
<!-- Selected Files -->
<ZipInstallFiles Include="$(FullOutputPath)\**\*"
Exclude="$(FullOutputPath)\**\*.7z;$(FullOutputPath)\**\*.wixpdb" />
</ItemGroup>
<MakeDir Directories="$(ZipBuildsPath)" Condition="!Exists('$(ZipBuildsPath)')" />
<Message Text="Creating a Zip file containing: @(ZipInstallFiles)" />
<Zip Files="@(ZipInstallFiles)"
WorkingDirectory="$(FullOutputPath)"
ZipFileName="$(FilerZipFileName)"
ZipLevel="9" />
<!-- Create a self-extracting zip file, using WinRAR. -->
<!-- I run this from the Bootstrapper directory because the zipper wouldn't honor my config.txt file otherwise. -->
<Exec Command="winrar a -sfx -r -z$(MSBuildProjectDirectory)\Bootstrapper\archive-comment.txt -iimg$(MSBuildProjectDirectory)\Bootstrapper\xiant-filer-logo.bmp -iicon$(MSBuildProjectDirectory)\Bootstrapper\xiant-filer.ico $(FilerSFXFileName) *"
WorkingDirectory="$(FullOutputPath)" />
</Target>
<Target Name="AfterBuild">
<MSBuild Projects="bootstrap\bootstrap.vcxproj" Properties="Configuration=$(Configuration)" />
<CallTarget Targets="CopyBootstrapperPackages" />
<Message Text="Filer Addin Moving final setup to builds directory [TargetFileName = $(TargetFileName)]"/>
<!-- Generate a bootstrapper that only does prerequisites. -->
<GenerateBootstrapper ApplicationFile="$(TargetFileName)" ApplicationName="Xiant Filer Prerequisites Installer"
BootstrapperItems="@(BootstrapperFile)" ComponentsLocation="HomeSite"
BootstrapperKeyFile="$(FullOutputPath)"
OutputPath="$(FullOutputPath)"
CopyComponents="True"
Path="$(WindowsSDKPath)"/>
<!-- Copy our custom bootstrapper to setup.exe -->
<Copy SourceFiles="$(MSBuildProjectDirectory)\bootstrap\$(Configuration)\bootstrap.exe"
DestinationFiles="$(FullOutputPath)\bootstrap.exe" />
<Copy SourceFiles="$(MSBuildProjectDirectory)\bootstrap\settings.ini"
DestinationFiles="$(FullOutputPath)\settings.ini" />
<CreateItem Include="$(FullOutputPath)\**\*">
<Output ItemName="KitFiles" TaskParameter="Include"/>
</CreateItem>
<CallTarget Targets="SignMsi" />
<MakeDir Directories="$(KitPublishFolder)" Condition="!Exists('$(KitPublishFolder)')"/>
<Message Text="File List is : @(KitFiles)" />
<Copy SourceFiles="@(KitFiles)"
DestinationFiles="@(KitFiles->'$(KitPublishFolder)\%(RecursiveDir)%(Filename)%(Extension)')" />
<CallTarget Targets="BuildInstallZip" />
<CallTarget Targets="SignSFX" />
</Target>
</Project>