Update to latest versions

This commit is contained in:
Paul Betts
2016-10-20 19:51:19 -07:00
parent ef59060612
commit d18102acb3
14 changed files with 78 additions and 52 deletions

View File

@@ -3,8 +3,8 @@ using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using SharpCompress.Compressor;
using SharpCompress.Compressor.BZip2;
using SharpCompress.Compressors;
using SharpCompress.Compressors.BZip2;
// Adapted from https://github.com/LogosBible/bsdiff.net/blob/master/src/bsdiff/BinaryPatchUtility.cs

View File

@@ -9,13 +9,12 @@ using Splat;
using DeltaCompressionDotNet.MsDelta;
using System.ComponentModel;
using Squirrel.Bsdiff;
using SharpCompress.Archive;
using SharpCompress.Archive.Zip;
using SharpCompress.Writer;
using SharpCompress.Archives;
using SharpCompress.Archives.Zip;
using SharpCompress.Writers;
using SharpCompress.Common;
using SharpCompress.Reader;
using SharpCompress.Writer;
using SharpCompress.Compressor.Deflate;
using SharpCompress.Readers;
using SharpCompress.Compressors.Deflate;
namespace Squirrel
{
@@ -69,7 +68,7 @@ namespace Squirrel
this.Log().Info("Extracting {0} and {1} into {2}",
basePackage.ReleasePackageFile, newPackage.ReleasePackageFile, tempPath);
var opts = ExtractOptions.ExtractFullPath | ExtractOptions.Overwrite | ExtractOptions.PreserveFileTime;
var opts = new ExtractionOptions() { ExtractFullPath = true, Overwrite = true, PreserveFileTime = true };
using (var za = ZipArchive.Open(basePackage.ReleasePackageFile))
using (var reader = za.ExtractAllEntries()) {
@@ -115,7 +114,7 @@ namespace Squirrel
using (Utility.WithTempDirectory(out deltaPath, localAppDirectory))
using (Utility.WithTempDirectory(out workingPath, localAppDirectory)) {
var opts = ExtractOptions.ExtractFullPath | ExtractOptions.Overwrite | ExtractOptions.PreserveFileTime;
var opts = new ExtractionOptions() { ExtractFullPath = true, Overwrite = true, PreserveFileTime = true };
using (var za = ZipArchive.Open(deltaPackage.InputPackageFile))
using (var reader = za.ExtractAllEntries()) {
@@ -163,9 +162,11 @@ namespace Squirrel
});
this.Log().Info("Repacking into full package: {0}", outputFile);
using (var za = ZipArchive.Create()) {
using (var za = ZipArchive.Create())
using (var tgt = File.OpenWrite(outputFile)) {
za.DeflateCompressionLevel = CompressionLevel.BestSpeed;
za.AddAllFromDirectory(workingPath);
za.SaveTo(outputFile, new CompressionInfo() { DeflateCompressionLevel = CompressionLevel.BestSpeed, Type = CompressionType.Deflate });
za.SaveTo(File.OpenWrite(outputFile));
}
}

View File

@@ -13,11 +13,11 @@ using MarkdownSharp;
using NuGet;
using Splat;
using System.Threading.Tasks;
using SharpCompress.Archive.Zip;
using SharpCompress.Reader;
using SharpCompress.Archive;
using SharpCompress.Archives.Zip;
using SharpCompress.Readers;
using SharpCompress.Archives;
using SharpCompress.Common;
using SharpCompress.Compressor.Deflate;
using SharpCompress.Compressors.Deflate;
namespace Squirrel
{
@@ -67,8 +67,6 @@ namespace Squirrel
public class ReleasePackage : IEnableLogger, IReleasePackage
{
IEnumerable<IPackage> localPackageCache;
public ReleasePackage(string inputPackageFile, bool isReleasePackage = false)
{
InputPackageFile = inputPackageFile;
@@ -253,7 +251,9 @@ namespace Squirrel
// Create zip file with entry names %-encoded, as nupkg file does.
void createZipEncoded(string zipFilePath, string folder)
{
using (var archive = ZipArchive.Create()) {
using (var archive = ZipArchive.Create())
using (var tgt = File.OpenWrite(zipFilePath)) {
archive.DeflateCompressionLevel = CompressionLevel.BestCompression;
archive.AddAllFromDirectory(folder);
archive.SaveTo(
zipFilePath,

View File

@@ -42,11 +42,17 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="DeltaCompressionDotNet">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.dll</HintPath>
<Reference Include="DeltaCompressionDotNet, Version=1.1.0.0, Culture=neutral, PublicKeyToken=1d14d6e5194e7f4a, processorArchitecture=MSIL">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="DeltaCompressionDotNet.MsDelta">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.MsDelta.dll</HintPath>
<Reference Include="DeltaCompressionDotNet.MsDelta, Version=1.1.0.0, Culture=neutral, PublicKeyToken=46b2138a390abf55, processorArchitecture=MSIL">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.MsDelta.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="DeltaCompressionDotNet.PatchApi, Version=1.1.0.0, Culture=neutral, PublicKeyToken=3e8888ee913ed789, processorArchitecture=MSIL">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.PatchApi.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Web.XmlTransform">
<HintPath>..\..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
@@ -55,6 +61,9 @@
<HintPath>..\..\packages\SharpCompress.0.16.1\lib\net45\SharpCompress.dll</HintPath>
<Reference Include="SharpCompress, Version=0.12.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SharpCompress.0.12.3\lib\net45\SharpCompress.dll</HintPath>
<Reference Include="SharpCompress, Version=0.14.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SharpCompress.0.14.0\lib\net45\SharpCompress.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -120,4 +129,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DeltaCompressionDotNet" version="1.0.0" targetFramework="net45" />
<package id="DeltaCompressionDotNet" version="1.1.0" targetFramework="net45" />
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net45" />
<package id="Mono.Cecil" version="0.9.6.1" targetFramework="net45" />
<package id="SharpCompress" version="0.16.1" targetFramework="net45" />
<package id="Splat" version="1.6.2" targetFramework="net45" />
</packages>
</packages>

View File

@@ -41,6 +41,9 @@
</Reference>
<Reference Include="SharpCompress, Version=0.16.1.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
<HintPath>..\..\packages\SharpCompress.0.16.1\lib\net45\SharpCompress.dll</HintPath>
<Reference Include="SharpCompress, Version=0.14.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SharpCompress.0.14.0\lib\net45\SharpCompress.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Splat.1.6.2\lib\Net45\Splat.dll</HintPath>
@@ -85,4 +88,4 @@
del "$(TargetFileName)"
ren "$(TargetFileName).tmp" "$(TargetFileName)"</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>

View File

@@ -5,4 +5,4 @@
<package id="Octokit" version="0.10.0" targetFramework="net45" />
<package id="SharpCompress" version="0.16.1" targetFramework="net45" />
<package id="Splat" version="1.6.2" targetFramework="net45" />
</packages>
</packages>

View File

@@ -38,14 +38,17 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="DeltaCompressionDotNet">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.dll</HintPath>
<Reference Include="DeltaCompressionDotNet, Version=1.1.0.0, Culture=neutral, PublicKeyToken=1d14d6e5194e7f4a, processorArchitecture=MSIL">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="DeltaCompressionDotNet.MsDelta">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.MsDelta.dll</HintPath>
<Reference Include="DeltaCompressionDotNet.MsDelta, Version=1.1.0.0, Culture=neutral, PublicKeyToken=46b2138a390abf55, processorArchitecture=MSIL">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.MsDelta.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="DeltaCompressionDotNet.PatchApi">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.PatchApi.dll</HintPath>
<Reference Include="DeltaCompressionDotNet.PatchApi, Version=1.1.0.0, Culture=neutral, PublicKeyToken=3e8888ee913ed789, processorArchitecture=MSIL">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.PatchApi.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Web.XmlTransform">
<HintPath>..\..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
@@ -67,6 +70,10 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="WpfAnimatedGif, Version=1.4.14.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\WpfAnimatedGif.1.4.14\lib\net\WpfAnimatedGif.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\SolutionAssemblyInfo.cs">
@@ -125,4 +132,4 @@ ren "$(TargetFileName).tmp" "$(TargetFileName)"</PostBuildEvent>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@@ -68,9 +68,9 @@
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
<Reference Include="WpfAnimatedGif, Version=1.4.12.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\WpfAnimatedGif.1.4.12\lib\net\WpfAnimatedGif.dll</HintPath>
<Private>True</Private>
<Reference Include="WpfAnimatedGif, Version=1.4.14.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\WpfAnimatedGif.1.4.14\lib\net\WpfAnimatedGif.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -130,4 +130,4 @@ ren "$(TargetFileName).tmp" "$(TargetFileName)"</PostBuildEvent>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DeltaCompressionDotNet" version="1.0.0" targetFramework="net45" />
<package id="DeltaCompressionDotNet" version="1.1.0" targetFramework="net45" />
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net45" />
<package id="Mono.Cecil" version="0.9.6.1" targetFramework="net45" />
<package id="Mono.Options" version="1.1" targetFramework="net45" />
<package id="SimpleJson" version="0.38.0" targetFramework="net45" />
<package id="Splat" version="1.6.2" targetFramework="net45" />
<package id="WpfAnimatedGif" version="1.4.12" targetFramework="net45" />
<package id="WpfAnimatedGif" version="1.4.14" targetFramework="net45" />
</packages>

View File

@@ -244,7 +244,7 @@ namespace Squirrel.Tests.Core
public void ContentFilesAreIncludedInCreatedPackage()
{
var inputPackage = IntegrationTestHelper.GetPath("fixtures", "ProjectWithContent.1.0.0.0-beta.nupkg");
var outputPackage = Path.GetTempFileName() + ".nupkg";
var outputPackage = Path.GetTempFileName() + ".zip";
var sourceDir = IntegrationTestHelper.GetPath("fixtures", "packages");
var fixture = new ReleasePackage(inputPackage);

View File

@@ -43,20 +43,26 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="DeltaCompressionDotNet">
<HintPath>..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.dll</HintPath>
<Reference Include="DeltaCompressionDotNet, Version=1.1.0.0, Culture=neutral, PublicKeyToken=1d14d6e5194e7f4a, processorArchitecture=MSIL">
<HintPath>..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="DeltaCompressionDotNet.MsDelta">
<HintPath>..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.MsDelta.dll</HintPath>
<Reference Include="DeltaCompressionDotNet.MsDelta, Version=1.1.0.0, Culture=neutral, PublicKeyToken=46b2138a390abf55, processorArchitecture=MSIL">
<HintPath>..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.MsDelta.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="DeltaCompressionDotNet.PatchApi">
<HintPath>..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.PatchApi.dll</HintPath>
<Reference Include="DeltaCompressionDotNet.PatchApi, Version=1.1.0.0, Culture=neutral, PublicKeyToken=3e8888ee913ed789, processorArchitecture=MSIL">
<HintPath>..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.PatchApi.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Web.XmlTransform">
<HintPath>..\packages\Microsoft.Web.Xdt.2.1.1\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
</Reference>
<Reference Include="SharpCompress, Version=0.16.1.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
<HintPath>..\packages\SharpCompress.0.16.1\lib\net45\SharpCompress.dll</HintPath>
<Reference Include="SharpCompress, Version=0.14.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SharpCompress.0.14.0\lib\net45\SharpCompress.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@@ -8,8 +8,8 @@ using Squirrel;
using Splat;
using Xunit;
using System.Text;
using SharpCompress.Archive.Zip;
using SharpCompress.Reader;
using SharpCompress.Archives.Zip;
using SharpCompress.Readers;
using SharpCompress.Common;
namespace Squirrel.Tests.TestHelpers
@@ -133,7 +133,7 @@ namespace Squirrel.Tests.TestHelpers
var zipPath = GetPath("fixtures", zipFile);
Assert.True(File.Exists(zipPath));
var opts = ExtractOptions.Overwrite | ExtractOptions.ExtractFullPath | ExtractOptions.PreserveFileTime;
var opts = new ExtractionOptions() { ExtractFullPath = true, Overwrite = true, PreserveFileTime = true };
using (var za = ZipArchive.Open(zipFile))
using (var reader = za.ExtractAllEntries()) {
reader.WriteEntryToDirectory(path, opts);

View File

@@ -12,4 +12,4 @@
<package id="xunit.extensibility.core" version="2.0.0" targetFramework="net45" />
<package id="xunit.runner.utility" version="2.0.0" targetFramework="net45" />
<package id="xunit.runner.visualstudio" version="2.0.0" targetFramework="net45" />
</packages>
</packages>