diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-02-11 07:46:56 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-02-11 07:46:56 -0800 |
commit | cc2976b4fcebf1f87f6211cb0e8558677b9e8fde (patch) | |
tree | b65b48fd55b2a6601ff1e07837d0ccf67bccc85d /tools | |
parent | 9aac5e6ed63693f5aad2ddf2e1e326d65018dc3f (diff) | |
download | DotNetOpenAuth-cc2976b4fcebf1f87f6211cb0e8558677b9e8fde.zip DotNetOpenAuth-cc2976b4fcebf1f87f6211cb0e8558677b9e8fde.tar.gz DotNetOpenAuth-cc2976b4fcebf1f87f6211cb0e8558677b9e8fde.tar.bz2 |
Refactored build.proj to pull out project template building.
VSI and VSIX is broken right now. The only thing that works is raw project template layout itself. Very much a work in progress.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/DotNetOpenAuth.automated.props | 13 | ||||
-rw-r--r-- | tools/DotNetOpenAuth.automated.targets | 29 | ||||
-rw-r--r-- | tools/DotNetOpenAuth.props | 11 | ||||
-rw-r--r-- | tools/DotNetOpenAuth.targets | 17 |
4 files changed, 69 insertions, 1 deletions
diff --git a/tools/DotNetOpenAuth.automated.props b/tools/DotNetOpenAuth.automated.props new file mode 100644 index 0000000..f66c1fe --- /dev/null +++ b/tools/DotNetOpenAuth.automated.props @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> + <Import Project="DotNetOpenAuth.props"/> + + <PropertyGroup> + <AutomatedBuild>true</AutomatedBuild> + <SolutionPath>$(ProjectRoot)src\$(ProductName).sln</SolutionPath> + <BuildInParallel Condition=" '$(BuildInParallel)' == '' ">true</BuildInParallel> + <!-- Validation controls whether extra builds are done in order to fully validate what we're distributing, + even if we're not distributing the built bits (as is the case for project templates). --> + <Validation Condition=" '$(Validation)' == '' ">Full</Validation> + </PropertyGroup> +</Project> diff --git a/tools/DotNetOpenAuth.automated.targets b/tools/DotNetOpenAuth.automated.targets new file mode 100644 index 0000000..c6f34cd --- /dev/null +++ b/tools/DotNetOpenAuth.automated.targets @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" InitialTargets="_SetDropProperties"> + <Import Project="$(ProjectRoot)tools\$(ProductName).targets"/> + <UsingTask AssemblyFile="$(ProjectRoot)lib\MSBuild.Community.Tasks.dll" TaskName="Zip"/> + <UsingTask AssemblyFile="$(ProjectRoot)lib\MSBuild.Community.Tasks.dll" TaskName="NUnit" /> + + <Target Name="Rebuild" DependsOnTargets="Clean;Build"/> + + <Target Name="Clean"> + <Delete Files="@(FilesToClean)" /> + <RemoveDir Directories="@(DirectoriesToClean)" /> + </Target> + + <Target Name="_SetDropProperties" DependsOnTargets="GetBuildVersion"> + <!-- This target is necessary because PropertyGroups within the same Target as + where CallTarget is fired do NOT affect those called targets. --> + <!-- The rest of these are here so that other DependsOn targets have access to these properties. --> + <PropertyGroup> + <DropDirectoryNoSlash>$(DropsRoot)$(ProductName)-$(BuildVersion)</DropDirectoryNoSlash> + <DropDirectory>$(DropDirectoryNoSlash)\</DropDirectory> + </PropertyGroup> + </Target> + + <Target Name="BuildUnifiedProduct"> + <MSBuild BuildInParallel="$(BuildInParallel)" + Projects="$(ProjectRoot)src\$(ProductName)\$(ProductName).csproj" + Targets="BuildUnifiedProduct" /> + </Target> +</Project> diff --git a/tools/DotNetOpenAuth.props b/tools/DotNetOpenAuth.props index a3ad973..844fe92 100644 --- a/tools/DotNetOpenAuth.props +++ b/tools/DotNetOpenAuth.props @@ -4,13 +4,14 @@ <ProductName>DotNetOpenAuth</ProductName> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v3.5</TargetFrameworkVersion> - <ProjectRoot Condition="'$(ProjectRoot)' == ''">$(MSBuildProjectDirectory)\</ProjectRoot> + <ProjectRoot Condition="'$(ProjectRoot)' == ''">$(MSBuildThisFileDirectory)..\</ProjectRoot> <DropsRoot>$(ProjectRoot)drops\$(Configuration)\</DropsRoot> <OutputPath>$(ProjectRoot)bin\$(TargetFrameworkVersion)\$(Configuration)\</OutputPath> <DocOutputPath>$(ProjectRoot)doc\</DocOutputPath> <IntermediatePath>$(ProjectRoot)obj\$(TargetFrameworkVersion)\$(Configuration)\</IntermediatePath> <BaseIntermediateOutputPath Condition=" '$(BaseIntermediateOutputPath)' == '' ">obj\$(TargetFrameworkVersion)\</BaseIntermediateOutputPath> <ToolsDir>$(ProjectRoot)tools\</ToolsDir> + <ZipLevel>6</ZipLevel> <ClrVersion Condition=" '$(TargetFrameworkVersion)' == 'v4.0' ">4</ClrVersion> <ClrVersion Condition=" '$(TargetFrameworkVersion)' != 'v4.0' ">2</ClrVersion> @@ -20,8 +21,16 @@ <KeyPairContainer Condition="'$(KeyPairContainer)' == ''">DotNetOpenAuth</KeyPairContainer> <PublicKeyToken>2780CCD10D57B246</PublicKeyToken> <DelaySign>true</DelaySign> + + <ILMergeOutputAssemblyDirectory>$(OutputPath)unified\</ILMergeOutputAssemblyDirectory> + <ILMergeOutputAssembly>$(ILMergeOutputAssemblyDirectory)$(ProductName).dll</ILMergeOutputAssembly> </PropertyGroup> + <ItemGroup> + <ILMergeInputAssemblies Include="$(OutputPath)$(ProductName).dll; + $(ProjectRoot)lib\Microsoft.Contracts.dll; "/> + </ItemGroup> + <Import Project="$(ProjectRoot)lib\DotNetOpenAuth.BuildTasks.targets" /> <Target Name="InitializeProps"> diff --git a/tools/DotNetOpenAuth.targets b/tools/DotNetOpenAuth.targets index 9a2c6f9..6aa5057 100644 --- a/tools/DotNetOpenAuth.targets +++ b/tools/DotNetOpenAuth.targets @@ -2,12 +2,21 @@ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <Import Project="DotNetOpenAuth.Versioning.targets" /> <Import Project="JavascriptPacker.targets" /> + <UsingTask AssemblyFile="$(ProjectRoot)lib\MSBuild.Community.Tasks.dll" TaskName="ILMerge"/> <PropertyGroup> <DefineConstants Condition=" '$(SignAssembly)' == 'true' ">$(DefineConstants);StrongNameSigned</DefineConstants> <DefineConstants Condition=" '$(ClrVersion)' == '4' ">$(DefineConstants);CLR4</DefineConstants> </PropertyGroup> + <ItemGroup> + <DelaySignedAssemblies Include="$(ILMergeOutputAssembly); + $(OutputPath)$(ProductName).dll; + $(OutputPath)$(ProductName).Contracts.dll; + $(OutputPath)$(ProductName).Test.dll; + $(ProjectRoot)samples\OpenIdOfflineProvider\bin\$(Configuration)\OpenIdOfflineProvider.exe" /> + </ItemGroup> + <ItemGroup Condition=" '$(ClrVersion)' != '4' "> <Reference Include="Microsoft.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=736440c9b414ea16, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> @@ -48,4 +57,12 @@ <Output TaskParameter="AccessorAssembly" ItemName="ReferencePath" /> </Publicize> </Target> + + <Target Name="ReSignDelaySignedAssemblies"> + <Message Text="Signing delay-signed assemblies using key pair container $(KeyPairContainer)." /> + <ReSignDelaySignedAssemblies + KeyContainer="$(KeyPairContainer)" + Assemblies="@(DelaySignedAssemblies)" + Condition="Exists(%(Identity))" /> + </Target> </Project> |