summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-12-21 22:34:45 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2010-12-21 22:34:45 -0800
commitc62c2653be002ab3f51a1be659e898364470ffdf (patch)
tree93fdaebca9693f272822864fb6f5f60ab1b60b13
parent9c622e22cc18728dd648f59807c833161ec1d694 (diff)
downloadDotNetOpenAuth-c62c2653be002ab3f51a1be659e898364470ffdf.zip
DotNetOpenAuth-c62c2653be002ab3f51a1be659e898364470ffdf.tar.gz
DotNetOpenAuth-c62c2653be002ab3f51a1be659e898364470ffdf.tar.bz2
The nightly build now creates deployable archives of docs and samples in the .7z format.
-rw-r--r--build.proj2
-rw-r--r--doc/doc.proj13
-rw-r--r--lib/DotNetOpenAuth.BuildTasks.dllbin101888 -> 103424 bytes
-rw-r--r--lib/DotNetOpenAuth.BuildTasks.pdbbin245248 -> 251392 bytes
-rw-r--r--lib/DotNetOpenAuth.BuildTasks.targets1
-rw-r--r--samples/Samples.proj13
-rw-r--r--src/DotNetOpenAuth.BuildTasks/AddFilesTo7Zip.cs101
-rw-r--r--src/DotNetOpenAuth.BuildTasks/DotNetOpenAuth.BuildTasks.csproj1
-rw-r--r--src/DotNetOpenAuth.BuildTasks/ReSignDelaySignedAssemblies.cs2
-rw-r--r--tools/7-Zip.x86/7-zip.chmbin0 -> 91020 bytes
-rw-r--r--tools/7-Zip.x86/7za.exebin0 -> 587776 bytes
-rw-r--r--tools/7-Zip.x86/license.txt29
-rw-r--r--tools/7-Zip.x86/readme.txt41
-rw-r--r--tools/DotNetOpenAuth.props1
14 files changed, 194 insertions, 10 deletions
diff --git a/build.proj b/build.proj
index 63c81b2..f036b5c 100644
--- a/build.proj
+++ b/build.proj
@@ -12,7 +12,7 @@
samples\samples.proj;
doc\doc.proj;
">
- <Targets>Zip</Targets>
+ <Targets>DeployableArchive</Targets>
</NightlyProjects>
<ProjectsToClean Include="
diff --git a/doc/doc.proj b/doc/doc.proj
index ef4a48c..c4f2bf3 100644
--- a/doc/doc.proj
+++ b/doc/doc.proj
@@ -24,7 +24,7 @@
<Target Name="PrepareForPublish" DependsOnTargets="BuildProduct;Html">
<PropertyGroup>
- <DocZip>$(DropDirectoryNoSlash)-htmldoc.zip</DocZip>
+ <DocZip>$(DropDirectoryNoSlash)-htmldoc.7z</DocZip>
</PropertyGroup>
<ItemGroup>
@@ -32,15 +32,20 @@
</ItemGroup>
</Target>
- <Target Name="Zip"
+ <Target Name="DeployableArchive"
DependsOnTargets="PrepareForPublish"
Inputs="@(DocSources)"
Outputs="$(DocZip)">
- <Zip Files="@(DocSources)" ZipFileName="$(DocZip)" WorkingDirectory="$(ProjectRoot)doc\api\" ZipLevel="$(ZipLevel)" />
+ <Delete Files="$(DocZip)" />
+ <AddFilesTo7Zip
+ Files="@(DocSources)"
+ ZipFileName="$(DocZip)"
+ WorkingDirectory="$(ProjectRoot)doc\api\"
+ ToolPath="$(Zip7ToolPath)" />
</Target>
<Target Name="Publish"
- DependsOnTargets="Zip" />
+ DependsOnTargets="DeployableArchive" />
<Target Name="CreateSiteOnIis" DependsOnTargets="Prepare">
<Error Text="The PublishDocsWebSiteName property must be set." Condition=" '$(PublishDocsWebSiteName)' == '' "/>
diff --git a/lib/DotNetOpenAuth.BuildTasks.dll b/lib/DotNetOpenAuth.BuildTasks.dll
index 1da70b0..8fae306 100644
--- a/lib/DotNetOpenAuth.BuildTasks.dll
+++ b/lib/DotNetOpenAuth.BuildTasks.dll
Binary files differ
diff --git a/lib/DotNetOpenAuth.BuildTasks.pdb b/lib/DotNetOpenAuth.BuildTasks.pdb
index d326b07..d61fabd 100644
--- a/lib/DotNetOpenAuth.BuildTasks.pdb
+++ b/lib/DotNetOpenAuth.BuildTasks.pdb
Binary files differ
diff --git a/lib/DotNetOpenAuth.BuildTasks.targets b/lib/DotNetOpenAuth.BuildTasks.targets
index e57ec97..6b48632 100644
--- a/lib/DotNetOpenAuth.BuildTasks.targets
+++ b/lib/DotNetOpenAuth.BuildTasks.targets
@@ -28,4 +28,5 @@
<UsingTask AssemblyFile="DotNetOpenAuth.BuildTasks.dll" TaskName="DowngradeProjects" />
<UsingTask AssemblyFile="DotNetOpenAuth.BuildTasks.dll" TaskName="HardLinkCopy" />
<UsingTask AssemblyFile="DotNetOpenAuth.BuildTasks.dll" TaskName="PrepareOhlohRelease" />
+ <UsingTask AssemblyFile="DotNetOpenAuth.BuildTasks.dll" TaskName="AddFilesTo7Zip" />
</Project>
diff --git a/samples/Samples.proj b/samples/Samples.proj
index 3890f69..ed37e6d 100644
--- a/samples/Samples.proj
+++ b/samples/Samples.proj
@@ -58,7 +58,7 @@
<Target Name="PrepareForPublish" DependsOnTargets="Build">
<PropertyGroup>
- <SamplesZip>$(DropDirectoryNoSlash)-samples.zip</SamplesZip>
+ <SamplesZip>$(DropDirectoryNoSlash)-samples.7z</SamplesZip>
</PropertyGroup>
<ItemGroup>
@@ -72,15 +72,20 @@
</FilterItems>
</Target>
- <Target Name="Zip"
+ <Target Name="DeployableArchive"
DependsOnTargets="PrepareForPublish"
Inputs="@(PublishableWebSampleSources)"
Outputs="$(SamplesZip)">
- <Zip Files="@(PublishableWebSampleSources)" ZipFileName="$(SamplesZip)" WorkingDirectory="$(ProjectRoot)samples\" ZipLevel="$(ZipLevel)" />
+ <Delete Files="$(SamplesZip)" />
+ <AddFilesTo7Zip
+ Files="@(PublishableWebSampleSources)"
+ ZipFileName="$(SamplesZip)"
+ WorkingDirectory="$(ProjectRoot)samples\"
+ ToolPath="$(Zip7ToolPath)" />
</Target>
<Target Name="Publish"
- DependsOnTargets="Zip" />
+ DependsOnTargets="DeployableArchive" />
<Target Name="CreateSitesOnIis" DependsOnTargets="Prepare">
<Error Text="The PublishSamplesWebSiteName property must be set." Condition=" '$(PublishSamplesWebSiteName)' == '' "/>
diff --git a/src/DotNetOpenAuth.BuildTasks/AddFilesTo7Zip.cs b/src/DotNetOpenAuth.BuildTasks/AddFilesTo7Zip.cs
new file mode 100644
index 0000000..b21512d
--- /dev/null
+++ b/src/DotNetOpenAuth.BuildTasks/AddFilesTo7Zip.cs
@@ -0,0 +1,101 @@
+//-----------------------------------------------------------------------
+// <copyright file="AddFilesTo7Zip.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOpenAuth.BuildTasks {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Text;
+ using Microsoft.Build.Utilities;
+ using Microsoft.Build.Framework;
+
+ public class AddFilesTo7Zip : ToolTask {
+ [Required]
+ public ITaskItem ZipFileName { get; set; }
+
+ [Required]
+ public ITaskItem[] Files { get; set; }
+
+ public string WorkingDirectory { get; set; }
+
+ /// <summary>
+ /// Gets the name of the tool.
+ /// </summary>
+ /// <value>
+ /// The name of the tool.
+ /// </value>
+ protected override string ToolName {
+ get { return "7za.exe"; }
+ }
+
+ /// <summary>
+ /// Generates the full path to tool.
+ /// </summary>
+ /// <returns></returns>
+ protected override string GenerateFullPathToTool() {
+ return this.ToolPath;
+ }
+
+ protected override string GenerateCommandLineCommands() {
+ var args = new CommandLineBuilder();
+
+ args.AppendSwitch("a");
+ args.AppendSwitch("--");
+
+ args.AppendFileNameIfNotNull(this.ZipFileName);
+
+ return args.ToString();
+ }
+
+ /// <summary>
+ /// Gets the response file switch.
+ /// </summary>
+ /// <param name="responseFilePath">The response file path.</param>
+ protected override string GetResponseFileSwitch(string responseFilePath) {
+ return "@" + responseFilePath;
+ }
+
+ /// <summary>
+ /// Gets the response file encoding.
+ /// </summary>
+ /// <value>
+ /// The response file encoding.
+ /// </value>
+ protected override Encoding ResponseFileEncoding {
+ get { return Encoding.UTF8; }
+ }
+
+ /// <summary>
+ /// Generates the response file commands.
+ /// </summary>
+ protected override string GenerateResponseFileCommands()
+ {
+ var args = new CommandLineBuilder();
+ args.AppendFileNamesIfNotNull(this.Files.Select(GetWorkingDirectoryRelativePath).ToArray(), Environment.NewLine);
+ return args.ToString();
+ }
+
+ /// <summary>
+ /// Gets the working directory.
+ /// </summary>
+ protected override string GetWorkingDirectory() {
+ if (!String.IsNullOrEmpty(this.WorkingDirectory)) {
+ return this.WorkingDirectory;
+ } else {
+ return base.GetWorkingDirectory();
+ }
+ }
+
+ private string GetWorkingDirectoryRelativePath(ITaskItem taskItem)
+ {
+ if (taskItem.ItemSpec.StartsWith(this.WorkingDirectory, StringComparison.OrdinalIgnoreCase)) {
+ return taskItem.ItemSpec.Substring(this.WorkingDirectory.Length);
+ } else {
+ return taskItem.ItemSpec;
+ }
+ }
+ }
+}
diff --git a/src/DotNetOpenAuth.BuildTasks/DotNetOpenAuth.BuildTasks.csproj b/src/DotNetOpenAuth.BuildTasks/DotNetOpenAuth.BuildTasks.csproj
index 179c825..484082c 100644
--- a/src/DotNetOpenAuth.BuildTasks/DotNetOpenAuth.BuildTasks.csproj
+++ b/src/DotNetOpenAuth.BuildTasks/DotNetOpenAuth.BuildTasks.csproj
@@ -101,6 +101,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
+ <Compile Include="AddFilesTo7Zip.cs" />
<Compile Include="AddProjectItems.cs" />
<Compile Include="ChangeProjectReferenceToAssemblyReference.cs" />
<Compile Include="CompareFiles.cs" />
diff --git a/src/DotNetOpenAuth.BuildTasks/ReSignDelaySignedAssemblies.cs b/src/DotNetOpenAuth.BuildTasks/ReSignDelaySignedAssemblies.cs
index a0ba386..2bcc160 100644
--- a/src/DotNetOpenAuth.BuildTasks/ReSignDelaySignedAssemblies.cs
+++ b/src/DotNetOpenAuth.BuildTasks/ReSignDelaySignedAssemblies.cs
@@ -32,7 +32,7 @@ namespace DotNetOpenAuth.BuildTasks {
////if (this.Assemblies.Length != 1) {
//// throw new NotSupportedException("Exactly 1 assembly for signing is supported.");
////}
- CommandLineBuilder args = new CommandLineBuilder();
+ var args = new CommandLineBuilder();
args.AppendSwitch("-q");
if (this.KeyFile != null) {
diff --git a/tools/7-Zip.x86/7-zip.chm b/tools/7-Zip.x86/7-zip.chm
new file mode 100644
index 0000000..08e4df2
--- /dev/null
+++ b/tools/7-Zip.x86/7-zip.chm
Binary files differ
diff --git a/tools/7-Zip.x86/7za.exe b/tools/7-Zip.x86/7za.exe
new file mode 100644
index 0000000..7f6bf86
--- /dev/null
+++ b/tools/7-Zip.x86/7za.exe
Binary files differ
diff --git a/tools/7-Zip.x86/license.txt b/tools/7-Zip.x86/license.txt
new file mode 100644
index 0000000..530ff36
--- /dev/null
+++ b/tools/7-Zip.x86/license.txt
@@ -0,0 +1,29 @@
+ 7-Zip Command line version
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ License for use and distribution
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ 7-Zip Copyright (C) 1999-2010 Igor Pavlov.
+
+ 7za.exe is distributed under the GNU LGPL license
+
+ Notes:
+ You can use 7-Zip on any computer, including a computer in a commercial
+ organization. You don't need to register or pay for 7-Zip.
+
+
+ GNU LGPL information
+ --------------------
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You can receive a copy of the GNU Lesser General Public License from
+ http://www.gnu.org/
diff --git a/tools/7-Zip.x86/readme.txt b/tools/7-Zip.x86/readme.txt
new file mode 100644
index 0000000..9ae4222
--- /dev/null
+++ b/tools/7-Zip.x86/readme.txt
@@ -0,0 +1,41 @@
+7-Zip Command line version 9.20
+-------------------------------
+
+7-Zip is a file archiver with high compression ratio.
+7za.exe is a standalone command line version of 7-Zip.
+
+7-Zip Copyright (C) 1999-2010 Igor Pavlov.
+
+Features of 7za.exe:
+ - High compression ratio in new 7z format
+ - Supported formats:
+ - Packing / unpacking: 7z, xz, ZIP, GZIP, BZIP2 and TAR
+ - Unpacking only: Z, lzma
+ - Highest compression ratio for ZIP and GZIP formats.
+ - Fast compression and decompression
+ - Strong AES-256 encryption in 7z and ZIP formats.
+
+7za.exe is a free software distributed under the GNU LGPL.
+Read license.txt for more information.
+
+Source code of 7za.exe and 7-Zip can be found at
+http://www.7-zip.org/
+
+7za.exe can work in Windows 95/98/ME/NT/2000/2003/2008/XP/Vista/7.
+
+There is also port of 7za.exe for POSIX systems like Unix (Linux, Solaris, OpenBSD,
+FreeBSD, Cygwin, AIX, ...), MacOS X and BeOS:
+
+http://p7zip.sourceforge.net/
+
+
+ This distributive packet contains the following files:
+
+ 7za.exe - 7-Zip standalone command line version.
+ readme.txt - This file.
+ license.txt - License information.
+ 7-zip.chm - User's Manual in HTML Help format.
+
+
+---
+End of document
diff --git a/tools/DotNetOpenAuth.props b/tools/DotNetOpenAuth.props
index b282db5..12ea3f9 100644
--- a/tools/DotNetOpenAuth.props
+++ b/tools/DotNetOpenAuth.props
@@ -11,6 +11,7 @@
<BaseIntermediateOutputPath Condition=" '$(BaseIntermediateOutputPath)' == '' ">obj\$(TargetFrameworkVersion)\</BaseIntermediateOutputPath>
<ToolsDir>$(ProjectRoot)tools\</ToolsDir>
<ZipLevel>6</ZipLevel>
+ <Zip7ToolPath>$(ToolsDir)7-Zip.x86\</Zip7ToolPath>
<ClrVersion Condition=" '$(TargetFrameworkVersion)' == 'v4.0' ">4</ClrVersion>
<ClrVersion Condition=" '$(TargetFrameworkVersion)' != 'v4.0' ">2</ClrVersion>