diff --git a/README.md b/README.md
index 9b0b3b905..acb4f8053 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,6 @@ and also some libraries which we do not store in the source tree:
* Newtonsoft.Json.dll
* DiscUtils.dll
* ICSharpCode.SharpZipLib.dll
-* Ionic.Zip.dll
* log4net.dll
You can find the source code of these libraries (along with some patches) in
diff --git a/WixInstaller/XenCenter.wxs b/WixInstaller/XenCenter.wxs
index 400f293db..9e7d57a5d 100644
--- a/WixInstaller/XenCenter.wxs
+++ b/WixInstaller/XenCenter.wxs
@@ -70,7 +70,6 @@
-
diff --git a/WixInstaller/branding.wxs b/WixInstaller/branding.wxs
index 8a1741322..c5f5f741f 100644
--- a/WixInstaller/branding.wxs
+++ b/WixInstaller/branding.wxs
@@ -43,7 +43,6 @@
-
diff --git a/XenAdmin/Dialogs/LegalNoticesDialog.ja.resx b/XenAdmin/Dialogs/LegalNoticesDialog.ja.resx
index 71fd03f38..feb4fc45b 100644
--- a/XenAdmin/Dialogs/LegalNoticesDialog.ja.resx
+++ b/XenAdmin/Dialogs/LegalNoticesDialog.ja.resx
@@ -206,31 +206,6 @@ All schemas sourced from schemas.dmtf.org: Copyright © 2009 Distributed Managem
DMTF is a not-for-profit association of industry members dedicated to promoting enterprise and systems management and interoperability. Members and non-members may reproduce DMTF specifications and documents for uses consistent with this purpose, provided that correct attribution is given. As DMTF specifications may be revised from time to time, the particular version and release date should always be noted.
Implementation of certain elements of this standard or proposed standard may be subject to third-party patent rights, including provisional patent rights (herein "patent rights"). DMTF makes no representations to users of the standard as to the existence of such rights, and is not responsible to recognize, disclose, or identify any or all such third party patent right, owners or claimants, nor for any incomplete or inaccurate identification or disclosure of such rights, owners or claimants. DMTF shall have no liability to any party, in any manner or circumstance, under any legal theory whatsoever, for failure to recognize, disclose, or identify any such third-party patent rights, or for such party's reliance on the standard or incorporation thereof in its product, protocols or testing procedures. DMTF shall have no liability to any party implementing such standard, whether such implementation is foreseeable or not, nor to any patent owner or claimant, and shall have no liability or responsibility for costs or losses incurred if a standard is withdrawn or modified after publication, and shall be indemnified and held harmless by any party implementing the standard from any and all claims of infringement by a patent owner for such implementations.
-Software Licenses that apply to DotNetZip
-This software, the DotNetZip library and tools is provided for your use under several licenses. One license applies to DotNetZip, and several other licenses apply to work that DotNetZip derives from. To use the software, you must accept the licenses. If you do not accept the licenses, do not use the software.
-The following license, the Microsoft Public License (Ms-PL), applies to the original intellectual property in DotNetZip:
-1. Definitions
-The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
-A "contribution" is the original software, or any additions or changes to the software.
-A "contributor" is any person that distributes its contribution under this license.
-"Licensed patents" are a contributor's patent claims that read directly on its contribution.
-2. Grant of Rights
-(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
-(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
-3. Conditions and Limitations
-(A) No Trademark License - This license does not grant you rights to use any contributor’s name, logo, or trademarks.
-(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
-(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
-(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
-(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
-
-
-The managed ZLIB code included in Ionic.Zlib.dll and Ionic.Zip.dll is derived from the jzlib, which is Copyright (c) 2000,2001,2002,2003 ymnk, JCraft, Inc., and is licensed under the following terms:
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission.
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The xxHash library used in this software has the following MIT license:
MIT License
@@ -240,24 +215,6 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-The jzlib library, itself, is based on the C-language ZLIB library, v1.1.3. The following notice and license applies to zlib:
-ZLIB is Copyright (C) 1995-2004 Jean-loup Gailly and Mark Adler
-The ZLIB software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
-Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
-1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
-2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-3. This notice may not be removed or altered from any source distribution.
- Jean-loup Gailly jloup@gzip.org
- Mark Adler madler@alumni.caltech.edu
-
-
-The managed BZIP2 code included in Ionic.BZip2.dll and Ionic.Zip.dll is modified code, based on the bzip2 code in the Apache commons compress library.
-The original BZip2 was created by Julian Seward, and is licensed under the BSD license.
-The following license applies to the Apache code:
-Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
-http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-
Blueprint CSS Framework License: Copyright (c) 2007 - 2010 blueprintcss.org
Permission is hereby granted, free of charge, to any person obtaining a copy of the Blueprint CSS Framework and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/XenAdmin/Dialogs/LegalNoticesDialog.resx b/XenAdmin/Dialogs/LegalNoticesDialog.resx
index 25d95d7ca..319852d35 100644
--- a/XenAdmin/Dialogs/LegalNoticesDialog.resx
+++ b/XenAdmin/Dialogs/LegalNoticesDialog.resx
@@ -206,31 +206,6 @@ All schemas sourced from schemas.dmtf.org: Copyright © 2009 Distributed Managem
DMTF is a not-for-profit association of industry members dedicated to promoting enterprise and systems management and interoperability. Members and non-members may reproduce DMTF specifications and documents for uses consistent with this purpose, provided that correct attribution is given. As DMTF specifications may be revised from time to time, the particular version and release date should always be noted.
Implementation of certain elements of this standard or proposed standard may be subject to third-party patent rights, including provisional patent rights (herein "patent rights"). DMTF makes no representations to users of the standard as to the existence of such rights, and is not responsible to recognize, disclose, or identify any or all such third party patent right, owners or claimants, nor for any incomplete or inaccurate identification or disclosure of such rights, owners or claimants. DMTF shall have no liability to any party, in any manner or circumstance, under any legal theory whatsoever, for failure to recognize, disclose, or identify any such third-party patent rights, or for such party's reliance on the standard or incorporation thereof in its product, protocols or testing procedures. DMTF shall have no liability to any party implementing such standard, whether such implementation is foreseeable or not, nor to any patent owner or claimant, and shall have no liability or responsibility for costs or losses incurred if a standard is withdrawn or modified after publication, and shall be indemnified and held harmless by any party implementing the standard from any and all claims of infringement by a patent owner for such implementations.
-Software Licenses that apply to DotNetZip
-This software, the DotNetZip library and tools is provided for your use under several licenses. One license applies to DotNetZip, and several other licenses apply to work that DotNetZip derives from. To use the software, you must accept the licenses. If you do not accept the licenses, do not use the software.
-The following license, the Microsoft Public License (Ms-PL), applies to the original intellectual property in DotNetZip:
-1. Definitions
-The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
-A "contribution" is the original software, or any additions or changes to the software.
-A "contributor" is any person that distributes its contribution under this license.
-"Licensed patents" are a contributor's patent claims that read directly on its contribution.
-2. Grant of Rights
-(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
-(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
-3. Conditions and Limitations
-(A) No Trademark License - This license does not grant you rights to use any contributor’s name, logo, or trademarks.
-(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
-(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
-(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
-(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
-
-
-The managed ZLIB code included in Ionic.Zlib.dll and Ionic.Zip.dll is derived from the jzlib, which is Copyright (c) 2000,2001,2002,2003 ymnk, JCraft, Inc., and is licensed under the following terms:
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission.
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The xxHash library used in this software has the following MIT license:
MIT License
@@ -240,24 +215,6 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-The jzlib library, itself, is based on the C-language ZLIB library, v1.1.3. The following notice and license applies to zlib:
-ZLIB is Copyright (C) 1995-2004 Jean-loup Gailly and Mark Adler
-The ZLIB software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
-Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
-1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
-2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-3. This notice may not be removed or altered from any source distribution.
- Jean-loup Gailly jloup@gzip.org
- Mark Adler madler@alumni.caltech.edu
-
-
-The managed BZIP2 code included in Ionic.BZip2.dll and Ionic.Zip.dll is modified code, based on the bzip2 code in the Apache commons compress library.
-The original BZip2 was created by Julian Seward, and is licensed under the BSD license.
-The following license applies to the Apache code:
-Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
-http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-
Blueprint CSS Framework License: Copyright (c) 2007 - 2010 blueprintcss.org
Permission is hereby granted, free of charge, to any person obtaining a copy of the Blueprint CSS Framework and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/XenAdmin/Dialogs/LegalNoticesDialog.zh-CN.resx b/XenAdmin/Dialogs/LegalNoticesDialog.zh-CN.resx
index a6863217c..e0eef8445 100644
--- a/XenAdmin/Dialogs/LegalNoticesDialog.zh-CN.resx
+++ b/XenAdmin/Dialogs/LegalNoticesDialog.zh-CN.resx
@@ -206,31 +206,6 @@ All schemas sourced from schemas.dmtf.org: Copyright © 2009 Distributed Managem
DMTF is a not-for-profit association of industry members dedicated to promoting enterprise and systems management and interoperability. Members and non-members may reproduce DMTF specifications and documents for uses consistent with this purpose, provided that correct attribution is given. As DMTF specifications may be revised from time to time, the particular version and release date should always be noted.
Implementation of certain elements of this standard or proposed standard may be subject to third-party patent rights, including provisional patent rights (herein "patent rights"). DMTF makes no representations to users of the standard as to the existence of such rights, and is not responsible to recognize, disclose, or identify any or all such third party patent right, owners or claimants, nor for any incomplete or inaccurate identification or disclosure of such rights, owners or claimants. DMTF shall have no liability to any party, in any manner or circumstance, under any legal theory whatsoever, for failure to recognize, disclose, or identify any such third-party patent rights, or for such party's reliance on the standard or incorporation thereof in its product, protocols or testing procedures. DMTF shall have no liability to any party implementing such standard, whether such implementation is foreseeable or not, nor to any patent owner or claimant, and shall have no liability or responsibility for costs or losses incurred if a standard is withdrawn or modified after publication, and shall be indemnified and held harmless by any party implementing the standard from any and all claims of infringement by a patent owner for such implementations.
-Software Licenses that apply to DotNetZip
-This software, the DotNetZip library and tools is provided for your use under several licenses. One license applies to DotNetZip, and several other licenses apply to work that DotNetZip derives from. To use the software, you must accept the licenses. If you do not accept the licenses, do not use the software.
-The following license, the Microsoft Public License (Ms-PL), applies to the original intellectual property in DotNetZip:
-1. Definitions
-The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
-A "contribution" is the original software, or any additions or changes to the software.
-A "contributor" is any person that distributes its contribution under this license.
-"Licensed patents" are a contributor's patent claims that read directly on its contribution.
-2. Grant of Rights
-(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
-(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
-3. Conditions and Limitations
-(A) No Trademark License - This license does not grant you rights to use any contributor’s name, logo, or trademarks.
-(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
-(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
-(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
-(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
-
-
-The managed ZLIB code included in Ionic.Zlib.dll and Ionic.Zip.dll is derived from the jzlib, which is Copyright (c) 2000,2001,2002,2003 ymnk, JCraft, Inc., and is licensed under the following terms:
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission.
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The xxHash library used in this software has the following MIT license:
MIT License
@@ -240,24 +215,6 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-The jzlib library, itself, is based on the C-language ZLIB library, v1.1.3. The following notice and license applies to zlib:
-ZLIB is Copyright (C) 1995-2004 Jean-loup Gailly and Mark Adler
-The ZLIB software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
-Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
-1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
-2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-3. This notice may not be removed or altered from any source distribution.
- Jean-loup Gailly jloup@gzip.org
- Mark Adler madler@alumni.caltech.edu
-
-
-The managed BZIP2 code included in Ionic.BZip2.dll and Ionic.Zip.dll is modified code, based on the bzip2 code in the Apache commons compress library.
-The original BZip2 was created by Julian Seward, and is licensed under the BSD license.
-The following license applies to the Apache code:
-Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
-http://www.apache.org/licenses/LICENSE-2.0
-Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-
Blueprint CSS Framework License: Copyright (c) 2007 - 2010 blueprintcss.org
Permission is hereby granted, free of charge, to any person obtaining a copy of the Blueprint CSS Framework and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/XenAdminTests/ArchiveTests/ArchiveFactoryTests.cs b/XenAdminTests/ArchiveTests/ArchiveFactoryTests.cs
index d22301d41..c879fcf8e 100644
--- a/XenAdminTests/ArchiveTests/ArchiveFactoryTests.cs
+++ b/XenAdminTests/ArchiveTests/ArchiveFactoryTests.cs
@@ -39,8 +39,8 @@ namespace XenAdminTests.ArchiveTests
[TestFixture, Category(TestCategories.Unit)]
public class ArchiveFactoryTests
{
- [TestCase(ArchiveFactory.Type.Tar, ExpectedResult = typeof(SharpZipTarArchiveIterator))]
- [TestCase(ArchiveFactory.Type.TarGz, ExpectedResult = typeof(SharpZipTarArchiveIterator))]
+ [TestCase(ArchiveFactory.Type.Tar, ExpectedResult = typeof(TarArchiveIterator))]
+ [TestCase(ArchiveFactory.Type.TarGz, ExpectedResult = typeof(TarArchiveIterator))]
[Test]
public Type TestReaderGeneration(int archiveType)
{
@@ -52,8 +52,8 @@ namespace XenAdminTests.ArchiveTests
}
- [TestCase(ArchiveFactory.Type.Tar, ExpectedResult = typeof(SharpZipTarArchiveWriter))]
- [TestCase(ArchiveFactory.Type.Zip, ExpectedResult = typeof(DotNetZipZipWriter))]
+ [TestCase(ArchiveFactory.Type.Tar, ExpectedResult = typeof(TarArchiveWriter))]
+ [TestCase(ArchiveFactory.Type.Zip, ExpectedResult = typeof(ZipArchiveWriter))]
[Test]
public Type TestWriterGeneration(int archiveType)
{
diff --git a/XenAdminTests/ArchiveTests/ThirdPartyArchiveWriterTests.cs b/XenAdminTests/ArchiveTests/ThirdPartyArchiveWriterTests.cs
index 1513ef7eb..3af6721c4 100644
--- a/XenAdminTests/ArchiveTests/ThirdPartyArchiveWriterTests.cs
+++ b/XenAdminTests/ArchiveTests/ThirdPartyArchiveWriterTests.cs
@@ -38,8 +38,8 @@ using XenCenterLib.Archive;
namespace XenAdminTests.ArchiveTests
{
- [TestFixture(typeof(SharpZipTarArchiveIterator), typeof(SharpZipTarArchiveWriter))]
- [TestFixture(typeof(DotNetZipZipIterator), typeof(DotNetZipZipWriter))]
+ [TestFixture(typeof(TarArchiveIterator), typeof(TarArchiveWriter))]
+ [TestFixture(typeof(ZipArchiveIterator), typeof(ZipArchiveWriter))]
[Category(TestCategories.Unit)]
public class ThirdPartyArchiveWriterTest
where TR : ArchiveIterator, new()
diff --git a/XenAdminTests/CompressionTests/CompressionFactoryTests.cs b/XenAdminTests/CompressionTests/CompressionFactoryTests.cs
index a19fdcf5c..4749fc357 100644
--- a/XenAdminTests/CompressionTests/CompressionFactoryTests.cs
+++ b/XenAdminTests/CompressionTests/CompressionFactoryTests.cs
@@ -39,7 +39,7 @@ namespace XenAdminTests.CompressionTests
[TestFixture, Category(TestCategories.Unit)]
public class CompressionFactoryTests
{
- [TestCase(CompressionFactory.Type.Gz, ExpectedResult = typeof(DotNetZipGZipOutputStream))]
+ [TestCase(CompressionFactory.Type.Gz, ExpectedResult = typeof(GZipOutputStream))]
[Test]
public Type TestWriterGeneration(int archiveType)
{
@@ -50,7 +50,7 @@ namespace XenAdminTests.CompressionTests
}
}
- [TestCase(CompressionFactory.Type.Gz, ExpectedResult = typeof(DotNetZipGZipInputStream))]
+ [TestCase(CompressionFactory.Type.Gz, ExpectedResult = typeof(GZipInputStream))]
[Test]
public Type TestReaderGenerationWithFile(int archiveType)
{
diff --git a/XenAdminTests/CompressionTests/ThirdPartyCompressionStreamTests.cs b/XenAdminTests/CompressionTests/ThirdPartyCompressionStreamTests.cs
index 61b22e0b1..1da2d6853 100644
--- a/XenAdminTests/CompressionTests/ThirdPartyCompressionStreamTests.cs
+++ b/XenAdminTests/CompressionTests/ThirdPartyCompressionStreamTests.cs
@@ -38,7 +38,7 @@ using XenCenterLib.Compression;
namespace XenAdminTests.CompressionTests
{
[Category(TestCategories.Unit)]
- [TestFixture(typeof(DotNetZipGZipInputStream), typeof(DotNetZipGZipOutputStream))]
+ [TestFixture(typeof(GZipInputStream), typeof(GZipOutputStream))]
public class ThirdPartyCompressionTests
where TI : CompressionStream, new()
where TO : CompressionStream, new()
@@ -93,7 +93,7 @@ namespace XenAdminTests.CompressionTests
Directory.Delete(basePath, true);
}
- private void DecompressAFile( string targetFileName, string compressedFileName)
+ private void DecompressAFile(string targetFileName, string compressedFileName)
{
using (FileStream ifs = File.OpenRead(compressedFileName))
{
diff --git a/XenCenterLib/Archive/ArchiveFactory.cs b/XenCenterLib/Archive/ArchiveFactory.cs
index a14fa3cd8..b326b0440 100644
--- a/XenCenterLib/Archive/ArchiveFactory.cs
+++ b/XenCenterLib/Archive/ArchiveFactory.cs
@@ -61,11 +61,11 @@ namespace XenCenterLib.Archive
public static ArchiveIterator Reader(Type archiveType, Stream packagedData)
{
if (archiveType == Type.Tar)
- return new SharpZipTarArchiveIterator(packagedData);
+ return new TarArchiveIterator(packagedData);
if (archiveType == Type.TarGz)
- return new SharpZipTarArchiveIterator(packagedData, CompressionFactory.Type.Gz);
+ return new TarArchiveIterator(packagedData, CompressionFactory.Type.Gz);
if (archiveType == Type.Zip)
- return new DotNetZipZipIterator(packagedData);
+ return new ZipArchiveIterator(packagedData);
throw new NotSupportedException($"Type {archiveType} is not supported by ArchiveIterator");
}
@@ -80,9 +80,9 @@ namespace XenCenterLib.Archive
public static ArchiveWriter Writer(Type archiveType, Stream targetPackage)
{
if (archiveType == Type.Tar)
- return new SharpZipTarArchiveWriter(targetPackage);
+ return new TarArchiveWriter(targetPackage);
if (archiveType == Type.Zip)
- return new DotNetZipZipWriter(targetPackage);
+ return new ZipArchiveWriter(targetPackage);
throw new NotSupportedException($"Type {archiveType} is not supported by ArchiveWriter");
}
diff --git a/XenCenterLib/Archive/TarArchiveIterator.cs b/XenCenterLib/Archive/TarArchiveIterator.cs
index c6e1506b7..10c4bd9a5 100644
--- a/XenCenterLib/Archive/TarArchiveIterator.cs
+++ b/XenCenterLib/Archive/TarArchiveIterator.cs
@@ -37,18 +37,14 @@ using XenCenterLib.Compression;
namespace XenCenterLib.Archive
{
- public class SharpZipTarArchiveIterator : ArchiveIterator
+ public class TarArchiveIterator : ArchiveIterator
{
private TarInputStream tarStream;
private CompressionStream compressionStream;
private TarEntry tarEntry;
private bool disposed;
- public SharpZipTarArchiveIterator()
- {
- }
-
- public SharpZipTarArchiveIterator(Stream compressedTarFile, CompressionFactory.Type compressionType)
+ public TarArchiveIterator(Stream compressedTarFile, CompressionFactory.Type compressionType)
{
if (compressionType == CompressionFactory.Type.Gz)
compressionStream = CompressionFactory.Reader(CompressionFactory.Type.Gz, compressedTarFile);
@@ -59,7 +55,7 @@ namespace XenCenterLib.Archive
disposed = false;
}
- public SharpZipTarArchiveIterator(Stream tarFile)
+ public TarArchiveIterator(Stream tarFile)
{
tarStream = new TarInputStream(tarFile);
disposed = false;
@@ -71,7 +67,7 @@ namespace XenCenterLib.Archive
disposed = false;
}
- ~SharpZipTarArchiveIterator()
+ ~TarArchiveIterator()
{
Dispose();
}
diff --git a/XenCenterLib/Archive/TarArchiveWriter.cs b/XenCenterLib/Archive/TarArchiveWriter.cs
index 125362f0d..de462e663 100644
--- a/XenCenterLib/Archive/TarArchiveWriter.cs
+++ b/XenCenterLib/Archive/TarArchiveWriter.cs
@@ -37,7 +37,7 @@ using ICSharpCode.SharpZipLib.Tar;
namespace XenCenterLib.Archive
{
- public class SharpZipTarArchiveWriter : ArchiveWriter
+ public class TarArchiveWriter : ArchiveWriter
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -45,11 +45,11 @@ namespace XenCenterLib.Archive
private const long bufferSize = 32 * 1024;
private bool disposed;
- public SharpZipTarArchiveWriter()
+ public TarArchiveWriter()
{
}
- public SharpZipTarArchiveWriter(Stream outputStream)
+ public TarArchiveWriter(Stream outputStream)
{
tar = new TarOutputStream(outputStream);
disposed = false;
diff --git a/XenCenterLib/Archive/ZipArchiveIterator.cs b/XenCenterLib/Archive/ZipArchiveIterator.cs
index ce69b7ba7..154c7042c 100644
--- a/XenCenterLib/Archive/ZipArchiveIterator.cs
+++ b/XenCenterLib/Archive/ZipArchiveIterator.cs
@@ -32,83 +32,49 @@
using System;
using System.Collections.Generic;
using System.IO;
-using Ionic.Zip;
+using System.IO.Compression;
+
namespace XenCenterLib.Archive
{
- public class DotNetZipZipIterator : ArchiveIterator
+ public class ZipArchiveIterator : ArchiveIterator
{
- private ZipFile zipFile;
- private IEnumerator enumerator;
- private ZipEntry zipEntry;
- private bool disposed;
+ private ZipArchive _zipArchive;
+ private IEnumerator _enumerator;
+ private ZipArchiveEntry _currentEntry;
+ private int _currentPosition = -1;
+ private bool _disposed;
///
- /// delegate params: long bytesTransferred, long totalBytesToTransfer
+ /// index of current file, total file count
///
- public event Action CurrentFileExtractProgressChanged;
- public event Action CurrentFileExtractCompleted;
+ public event Action CurrentFileExtracted;
- public DotNetZipZipIterator()
+ public ZipArchiveIterator(Stream inputStream)
{
- }
-
- public DotNetZipZipIterator(Stream inputStream)
- {
- Initialise(inputStream);
- disposed = false;
- }
-
- void zipFile_ExtractProgress(object sender, ExtractProgressEventArgs e)
- {
- switch (e.EventType)
- {
- case ZipProgressEventType.Extracting_EntryBytesWritten:
- {
- var handler = CurrentFileExtractProgressChanged;
- handler?.Invoke(e.BytesTransferred, e.TotalBytesToTransfer);
- }
- break;
- case ZipProgressEventType.Extracting_AfterExtractEntry:
- {
- var handler = CurrentFileExtractCompleted;
- handler?.Invoke();
- }
- break;
- }
- }
-
- private void Initialise(Stream zipStream)
- {
- try
- {
- zipFile = ZipFile.Read(zipStream);
- }
- catch (ZipException e)
- {
- throw new ArgumentException("Cannot read input as a ZipFile", "zipStream", e);
- }
-
- enumerator = zipFile.GetEnumerator();
- zipFile.ExtractProgress += zipFile_ExtractProgress;
+ _zipArchive = new ZipArchive(inputStream, ZipArchiveMode.Read);
+ _enumerator = _zipArchive.Entries.GetEnumerator();
}
public override void SetBaseStream(Stream inputStream)
{
- Initialise(inputStream);
- disposed = false;
+ _zipArchive = new ZipArchive(inputStream, ZipArchiveMode.Read);
+ _enumerator = _zipArchive.Entries.GetEnumerator();
+ _disposed = false;
+ _currentPosition = -1;
}
- ~DotNetZipZipIterator()
+ ~ZipArchiveIterator()
{
Dispose();
}
public override bool HasNext()
{
- if (enumerator != null && enumerator.MoveNext())
+ if (_enumerator != null && _enumerator.MoveNext())
{
- zipEntry = enumerator.Current;
+ _currentPosition++;
+ _currentEntry = _enumerator.Current;
return true;
}
return false;
@@ -116,34 +82,23 @@ namespace XenCenterLib.Archive
public override string CurrentFileName()
{
- if (zipEntry == null)
- return String.Empty;
-
- return zipEntry.FileName;
+ return _currentEntry == null ? string.Empty : _currentEntry.FullName;
}
public override long CurrentFileSize()
{
- if (zipEntry == null)
- return 0;
-
- return zipEntry.UncompressedSize;
+ return _currentEntry?.Length ?? 0;
}
public override DateTime CurrentFileModificationTime()
{
- if (zipEntry == null)
- return new DateTime();
-
- return zipEntry.LastModified;
+ return _currentEntry == null ? new DateTime() : _currentEntry.LastWriteTime.DateTime;
}
public override bool IsDirectory()
{
- if (zipEntry == null)
- return false;
-
- return zipEntry.IsDirectory;
+ var attr = (FileAttributes)(_currentEntry.ExternalAttributes & 0xff);
+ return attr.HasFlag(FileAttributes.Directory);
}
public override void ExtractCurrentFile(Stream extractedFileContents, Action cancellingDelegate)
@@ -151,25 +106,21 @@ namespace XenCenterLib.Archive
if (IsDirectory())
return;
- zipEntry.Extract(extractedFileContents);
+ using (var entryStream = _currentEntry.Open())
+ StreamUtilities.BufferedStreamCopy(entryStream, extractedFileContents);
+
+ CurrentFileExtracted?.Invoke(_currentPosition, _zipArchive.Entries.Count);
}
protected override void Dispose(bool disposing)
{
- base.Dispose(disposing);
- if(disposing)
+ if (disposing && !_disposed)
{
- if(!disposed)
- {
- if (zipFile != null)
- {
- zipFile.ExtractProgress -= zipFile_ExtractProgress;
- zipFile.Dispose();
- }
-
- disposed = true;
- }
+ _zipArchive.Dispose();
+ _disposed = true;
}
+
+ base.Dispose(disposing);
}
}
}
diff --git a/XenCenterLib/Archive/ZipArchiveWriter.cs b/XenCenterLib/Archive/ZipArchiveWriter.cs
index 5b1238517..c6f262925 100644
--- a/XenCenterLib/Archive/ZipArchiveWriter.cs
+++ b/XenCenterLib/Archive/ZipArchiveWriter.cs
@@ -31,72 +31,58 @@
using System;
using System.IO;
-using System.Text;
-using Ionic.Zip;
+using System.IO.Compression;
+
namespace XenCenterLib.Archive
{
- class DotNetZipZipWriter : ArchiveWriter
+ internal class ZipArchiveWriter : ArchiveWriter
{
- private ZipOutputStream zip;
- private bool disposed;
+ private ZipArchive _zipArchive;
+ private bool _disposed;
- public DotNetZipZipWriter(Stream outputStream)
- {
- zip = new ZipOutputStream( outputStream ) {EnableZip64 = Zip64Option.AsNecessary};
- disposed = false;
- }
-
- public DotNetZipZipWriter()
+ public ZipArchiveWriter(Stream outputStream)
{
+ _zipArchive = new ZipArchive(outputStream, ZipArchiveMode.Create);
}
public override void SetBaseStream(Stream outputStream)
{
- zip = new ZipOutputStream(outputStream);
- disposed = false;
+ _zipArchive = new ZipArchive(outputStream, ZipArchiveMode.Create);
+ _disposed = false;
}
public override void AddDirectory(string directoryName, DateTime modificationTime)
{
- StringBuilder sb = new StringBuilder(directoryName);
-
//Need to add a trailing front-slash to add a directory
if (!directoryName.EndsWith("/"))
- sb.Append("/");
+ directoryName += "/";
- ZipEntry entry = zip.PutNextEntry(sb.ToString());
- entry.ModifiedTime = modificationTime;
+ var entry = _zipArchive.CreateEntry(directoryName);
+ entry.LastWriteTime = modificationTime;
}
- public override void Add(Stream filetoAdd, string fileName, DateTime modificationTime, Action cancellingDelegate)
+ public override void Add(Stream fileToAdd, string fileName, DateTime modificationTime, Action cancellingDelegate)
{
- ZipEntry entry = zip.PutNextEntry(fileName);
- entry.ModifiedTime = modificationTime;
+ var entry = _zipArchive.CreateEntry(fileName);
+ entry.LastWriteTime = modificationTime;
//You have to do this because if using a memory stream the pointer will be at the end it
//it's just been read and this will cause nothing to be written out
- filetoAdd.Position = 0;
+ fileToAdd.Position = 0;
- StreamUtilities.BufferedStreamCopy( filetoAdd, zip );
- zip.Flush();
+ using (var entryStream = entry.Open())
+ StreamUtilities.BufferedStreamCopy(fileToAdd, entryStream);
}
protected override void Dispose(bool disposing)
{
-
- if( !disposed )
+ if (disposing && !_disposed)
{
- if (disposing)
- {
- if( zip != null )
- {
- zip.Flush();
- zip.Dispose();
- }
- disposed = true;
- }
+ _zipArchive?.Dispose();
+ _disposed = true;
}
+
base.Dispose(disposing);
}
}
diff --git a/XenCenterLib/Compression/CompressionFactory.cs b/XenCenterLib/Compression/CompressionFactory.cs
index bb0e02c57..5365eb3b8 100644
--- a/XenCenterLib/Compression/CompressionFactory.cs
+++ b/XenCenterLib/Compression/CompressionFactory.cs
@@ -79,7 +79,7 @@ namespace XenCenterLib.Compression
public static CompressionStream Reader(Type compressionType, Stream compressedDataSource)
{
if (compressionType == Type.Gz)
- return new DotNetZipGZipInputStream(compressedDataSource);
+ return new GZipInputStream(compressedDataSource);
throw new NotSupportedException(String.Format("Type: {0} is not supported by CompressionStream Reader", compressionType));
}
@@ -94,7 +94,7 @@ namespace XenCenterLib.Compression
public static CompressionStream Writer(Type compressionType, Stream compressedDataTarget)
{
if (compressionType == Type.Gz)
- return new DotNetZipGZipOutputStream(compressedDataTarget);
+ return new GZipOutputStream(compressedDataTarget);
throw new NotSupportedException(String.Format("Type: {0} is not supported by CompressionStream Writer", compressionType));
}
diff --git a/XenCenterLib/Compression/GZipStreams.cs b/XenCenterLib/Compression/GZipStreams.cs
index f902f578b..96bd0546a 100644
--- a/XenCenterLib/Compression/GZipStreams.cs
+++ b/XenCenterLib/Compression/GZipStreams.cs
@@ -29,22 +29,17 @@
* SUCH DAMAGE.
*/
-using Ionic.Zlib;
using System.IO;
+using System.IO.Compression;
namespace XenCenterLib.Compression
{
///
/// A class that can compress a gzip data stream type
///
- class DotNetZipGZipOutputStream : CompressionStream
+ class GZipOutputStream : CompressionStream
{
- public DotNetZipGZipOutputStream()
- {
-
- }
-
- public DotNetZipGZipOutputStream(Stream outputStream)
+ public GZipOutputStream(Stream outputStream)
{
zipStream = new GZipStream(outputStream, CompressionMode.Compress);
}
@@ -58,14 +53,9 @@ namespace XenCenterLib.Compression
///
/// A class that can decompress a gzip data stream type
///
- class DotNetZipGZipInputStream : CompressionStream
+ class GZipInputStream : CompressionStream
{
- public DotNetZipGZipInputStream()
- {
-
- }
-
- public DotNetZipGZipInputStream(Stream inputStream)
+ public GZipInputStream(Stream inputStream)
{
zipStream = new GZipStream(inputStream, CompressionMode.Decompress);
}
diff --git a/XenCenterLib/XenCenterLib.csproj b/XenCenterLib/XenCenterLib.csproj
index 72f703bd7..85b979e2f 100644
--- a/XenCenterLib/XenCenterLib.csproj
+++ b/XenCenterLib/XenCenterLib.csproj
@@ -39,9 +39,6 @@
..\packages\ICSharpCode.SharpZipLib.dll
-
- ..\packages\Ionic.Zip.dll
-
..\packages\log4net.dll
@@ -49,6 +46,7 @@
3.5
+
@@ -94,4 +92,4 @@
-->
-
+
\ No newline at end of file
diff --git a/XenModel/Actions/Updates/DownloadAndUnzipXenServerPatchAction.cs b/XenModel/Actions/Updates/DownloadAndUnzipXenServerPatchAction.cs
index 8206c0e6a..aa11abd3e 100644
--- a/XenModel/Actions/Updates/DownloadAndUnzipXenServerPatchAction.cs
+++ b/XenModel/Actions/Updates/DownloadAndUnzipXenServerPatchAction.cs
@@ -186,17 +186,17 @@ namespace XenAdmin.Actions
private void ExtractFile()
{
ArchiveIterator iterator = null;
- DotNetZipZipIterator zipIterator = null;
+ ZipArchiveIterator zipIterator = null;
try
{
using (Stream stream = new FileStream(outputFileName, FileMode.Open, FileAccess.Read))
{
iterator = ArchiveFactory.Reader(ArchiveFactory.Type.Zip, stream);
- zipIterator = iterator as DotNetZipZipIterator;
+ zipIterator = iterator as ZipArchiveIterator;
if (zipIterator != null)
- zipIterator.CurrentFileExtractProgressChanged += archiveIterator_CurrentFileExtractProgressChanged;
+ zipIterator.CurrentFileExtracted += archiveIterator_CurrentFileExtracted;
while (iterator.HasNext())
{
@@ -232,7 +232,7 @@ namespace XenAdmin.Actions
finally
{
if (zipIterator != null)
- zipIterator.CurrentFileExtractProgressChanged -= archiveIterator_CurrentFileExtractProgressChanged;
+ zipIterator.CurrentFileExtracted -= archiveIterator_CurrentFileExtracted;
if (iterator != null)
iterator.Dispose();
@@ -302,10 +302,11 @@ namespace XenAdmin.Actions
MarkCompleted();
}
- void archiveIterator_CurrentFileExtractProgressChanged(long bytesTransferred, long totalBytesToTransfer)
+ private void archiveIterator_CurrentFileExtracted(int fileIndex, int totalFileCount)
{
- int pc = downloadUpdate ? 95 + (int)(5.0 * bytesTransferred / totalBytesToTransfer) : (int)(100.0 * bytesTransferred / totalBytesToTransfer);
- PercentComplete = pc;
+ PercentComplete = downloadUpdate
+ ? 95 + (int)(5.0 * fileIndex / totalFileCount)
+ : (int)(100.0 * fileIndex / totalFileCount);
}
void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
diff --git a/scripts/deps-map.json b/scripts/deps-map.json
index a8ee03ae5..f443302c7 100644
--- a/scripts/deps-map.json
+++ b/scripts/deps-map.json
@@ -25,11 +25,6 @@
"target": "xenadmin.git/packages/",
"flat": "true"
},
- {
- "pattern": "@REMOTE_DOTNET@/dotnet48/Ionic.Zip.dll",
- "target": "xenadmin.git/packages/",
- "flat": "true"
- },
{
"pattern": "@REMOTE_DOTNET@/dotnet48/log4net.dll",
"target": "xenadmin.git/packages/",
diff --git a/scripts/xenadmin-build.sh b/scripts/xenadmin-build.sh
index 1d635a84a..6f815d2a7 100644
--- a/scripts/xenadmin-build.sh
+++ b/scripts/xenadmin-build.sh
@@ -108,7 +108,6 @@ if [ -f "${SIGN_BAT}" ] ; then
cd ${REPO}/XenAdmin/bin/Release && ${SIGN_BAT} log4net.dll "Log4Net"
cd ${REPO}/XenAdmin/bin/Release && ${SIGN_BAT} ICSharpCode.SharpZipLib.dll "SharpZipLib"
cd ${REPO}/XenAdmin/bin/Release && ${SIGN_BAT} DiscUtils.dll "DiscUtils"
- cd ${REPO}/XenAdmin/bin/Release && ${SIGN_BAT} Ionic.Zip.dll "OSS"
cd ${REPO}/XenServerHealthCheck/bin/Release && ${SIGN_BAT} XenServerHealthCheck.exe "${BRANDING_BRAND_CONSOLE}"
else
@@ -116,7 +115,7 @@ else
fi
#copy files (signed accordingly) in XenServerHealthService folder
-cp ${REPO}/XenAdmin/bin/Release/{CommandLib.dll,CoreUtilsLib.dll,XenModel.dll,CookComputing.XmlRpcV2.dll,Newtonsoft.Json.CH.dll,log4net.dll,ICSharpCode.SharpZipLib.dll,Ionic.Zip.dll} \
+cp ${REPO}/XenAdmin/bin/Release/{CommandLib.dll,CoreUtilsLib.dll,XenModel.dll,CookComputing.XmlRpcV2.dll,Newtonsoft.Json.CH.dll,log4net.dll,ICSharpCode.SharpZipLib.dll} \
${REPO}/XenServerHealthCheck/bin/Release
#prepare wix