Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
Fixed some issues related to GitHub Actions migration.
Browse files Browse the repository at this point in the history
  • Loading branch information
squid-box committed Mar 22, 2023
1 parent 9868d31 commit 3ec77d6
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 85 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
branches: [ "master" ]

env:
VERSION: '1.5.1.${{ github.run_number }}'
VERSION: '1.5.2.${{ github.run_number }}'

jobs:
build:
Expand All @@ -23,13 +23,13 @@ jobs:

- name: Compile solution
run: |
dotnet build -c Release /p:AssemblyVersion=$env:VERSION /p:Version=$env:VERSION
dotnet build -c LiteRelease /p:AssemblyVersion=$env:VERSION /p:Version=$env:VERSION
dotnet build -c Release /p:AssemblyVersion=${{ env.VERSION }} /p:Version=${{ env.VERSION }}
dotnet build -c LiteRelease /p:AssemblyVersion=${{ env.VERSION }} /p:Version=${{ env.VERSION }}
- name: Pack NuGets
run: |
nuget pack package.regular.nuspec -version $env:VERSION
nuget pack package.lite.nuspec -version $env:VERSION
nuget pack package.regular.nuspec -version ${{ env.VERSION }}
nuget pack package.lite.nuspec -version ${{ env.VERSION }}
- name: Push NuGet packages
run: nuget push Squid-Box.SevenZipSharp*.nupkg -ApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json
4 changes: 2 additions & 2 deletions SevenZip/COM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Globalization;
using System.IO;
using System.Runtime.InteropServices;
#if NET45 || NETSTANDARD2_0
#if NET472 || NETSTANDARD2_0
using System.Security.Permissions;
#endif
using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
Expand Down Expand Up @@ -122,7 +122,7 @@ public object Object
{
get
{
#if NET45 || NETSTANDARD2_0
#if NET472 || NETSTANDARD2_0
var sp = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode);
sp.Demand();
#endif
Expand Down
8 changes: 4 additions & 4 deletions SevenZip/LibraryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace SevenZip
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
#if NET45 || NETSTANDARD2_0
#if NET472 || NETSTANDARD2_0
using System.Security.Permissions;
#endif
using System.IO;
Expand Down Expand Up @@ -345,7 +345,7 @@ public static LibraryFeature CurrentLibraryFeatures
/// <param name="format">Archive format</param>
public static void FreeLibrary(object user, Enum format)
{
#if NET45 || NETSTANDARD2_0
#if NET472 || NETSTANDARD2_0
var sp = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode);
sp.Demand();
#endif
Expand Down Expand Up @@ -423,7 +423,7 @@ public static IInArchive InArchive(InArchiveFormat format, object user)
{
if (_inArchives[user][format] == null)
{
#if NET45 || NETSTANDARD2_0
#if NET472 || NETSTANDARD2_0
var sp = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode);
sp.Demand();
#endif
Expand Down Expand Up @@ -480,7 +480,7 @@ public static IOutArchive OutArchive(OutArchiveFormat format, object user)
{
if (_outArchives[user][format] == null)
{
#if NET45 || NETSTANDARD2_0
#if NET472 || NETSTANDARD2_0
var sp = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode);
sp.Demand();
#endif
Expand Down
10 changes: 3 additions & 7 deletions SevenZip/SevenZip.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>SevenZipSharp</AssemblyName>
<TargetFrameworks>netstandard2.0;net472;net6.0-windows</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net472;netcoreapp3.1</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>SevenZip.snk</AssemblyOriginatorKeyFile>
<AssemblyTitle>SevenZipSharp</AssemblyTitle>
<Company>Markovtsev Vadim</Company>
<Product>SevenZipSharp</Product>
<ProductVersion>1.0.0.0</ProductVersion>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<InformationalVersion>1.0.0.0</InformationalVersion>
<Description>7-zip native library wrapper</Description>
<Copyright>Copyright (C) Markovtsev Vadim 2009, 2010, licensed under LGPLv3</Copyright>
<IntermediateOutputPath>..\Stage\obj\$(Configuration)\</IntermediateOutputPath>
Expand Down Expand Up @@ -76,11 +72,11 @@
<EmbeddedResource Include="arch\Test.zip" />
</ItemGroup>
<ItemGroup>
<PackageReference Condition="'$(TargetFramework)' != 'net45'" Include="System.Configuration.ConfigurationManager" Version="4.5.0" />
<PackageReference Condition="'$(TargetFramework)' != 'net472'" Include="System.Configuration.ConfigurationManager" Version="4.5.0" />
<PackageReference Condition="'$(TargetFramework)' == 'netstandard2.0'" Include="System.Security.Permissions" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Configuration" Condition="'$(TargetFramework)' == 'net45'">
<Reference Include="System.Configuration" Condition="'$(TargetFramework)' == 'net472'">
<HintPath>C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll</HintPath>
</Reference>
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions SevenZip/SevenZipCompressor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace SevenZip
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
#if NET45 || NETSTANDARD2_0
#if NET472 || NETSTANDARD2_0
using System.Security.Permissions;
#endif

Expand Down Expand Up @@ -311,8 +311,8 @@ private void SetCompressionProperties()
var names = new List<IntPtr>(2 + CustomParameters.Count);
var values = new List<PropVariant>(2 + CustomParameters.Count);

#if NET45 || NETSTANDARD2_0
var sp = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode);
#if NET472 || NETSTANDARD2_0
var sp = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode);
sp.Demand();
#endif

Expand Down
9 changes: 7 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Changelog

## 1.5.0 (2021-05-xx)
- Added .NET 5.0 (Windows only) variant.
## 1.5.2 (2023-03-22)
- Fixed an issue when seeking in streams with SeekOrigin.End, thanks to GitHub user bneidhold.
- Fixed an issue when checking multi-volume 7z archives, thanks to GitHub user panda73111.
- Changed CI from AppVeyor to GitHub Actions.
- .NET Framework version bumped from 4.5 to 4.7.2.

## 1.5.0 (2021-08-15)
- Added separate NuGet (Lite) excluding creation of self-extracting archives.

## 1.4.0 (2021-04-12)
Expand Down
69 changes: 39 additions & 30 deletions package.lite.nuspec
Original file line number Diff line number Diff line change
@@ -1,33 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>Squid-Box.SevenZipSharp.Lite</id>
<version>1.0.0</version>
<authors>Joel Ahlgren</authors>
<summary>Managed 7-zip library written in C# that provides data extraction and compression (all 7-zip formats are supported).</summary>
<description>Wraps 7z.dll or any compatible one and makes use of LZMA SDK. Excludes creation of self-extracting executables, reducing file size.</description>
<language>en-US</language>
<license type="expression">LGPL-3.0-only</license>
<projectUrl>https://github.com/squid-box/SevenZipSharp</projectUrl>
<tags>7z sevenzip sevenzipsharp 7-zip</tags>
<dependencies>
<group targetFramework="net472" />
<group targetFramework="netstandard2.0">
<dependency id="System.Configuration.ConfigurationManager" version="4.5.0" />
<dependency id="System.Security.Permissions" version="4.5.0" />
</group>
<group targetFramework="net6.0">
<dependency id="System.Configuration.ConfigurationManager" version="4.5.0" />
</group>
</dependencies>
</metadata>
<files>
<file src="Stage\LiteRelease\netstandard2.0\SevenZipSharp.dll" target="lib\netstandard2.0" />
<file src="Stage\LiteRelease\netstandard2.0\SevenZipSharp.xml" target="lib\netstandard2.0" />
<file src="Stage\LiteRelease\net6.0\SevenZipSharp.dll" target="lib\net6.0" />
<file src="Stage\LiteRelease\net6.0\SevenZipSharp.xml" target="lib\net6.0" />
<file src="Stage\LiteRelease\net472\SevenZipSharp.dll" target="lib\net472" />
<file src="Stage\LiteRelease\net472\SevenZipSharp.xml" target="lib\net472" />
<file src="license" />
</files>
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>Squid-Box.SevenZipSharp.Lite</id>
<version>1.0.0</version>
<authors>Joel Ahlgren</authors>
<summary>Managed 7-zip library written in C# that provides data extraction and compression (all 7-zip formats are supported).</summary>
<description>Wraps 7z.dll or any compatible one and makes use of LZMA SDK. Excludes creation of self-extracting executables, reducing file size.</description>
<readme>docs\readme.md</readme>
<language>en-US</language>
<license type="expression">LGPL-3.0-only</license>
<projectUrl>https://github.com/squid-box/SevenZipSharp</projectUrl>
<tags>7z sevenzip sevenzipsharp 7-zip</tags>
<releaseNotes>
Fixed an issue when seeking in streams with SeekOrigin.End, thanks to GitHub user bneidhold.
Fixed an issue when checking multi-volume 7z archives, thanks to GitHub user panda73111.
</releaseNotes>
<dependencies>
<group targetFramework="netstandard2.0">
<dependency id="System.Configuration.ConfigurationManager" version="4.5.0" />
<dependency id="System.Security.Permissions" version="4.5.0" />
</group>
<group targetFramework="net472" />
<group targetFramework="netcoreapp3.1">
<dependency id="System.Configuration.ConfigurationManager" version="4.5.0" />
</group>
</dependencies>
</metadata>
<files>
<file src="Stage\LiteRelease\netstandard2.0\SevenZipSharp.dll" target="lib\netstandard2.0" />
<file src="Stage\LiteRelease\netstandard2.0\SevenZipSharp.xml" target="lib\netstandard2.0" />
<file src="Stage\LiteRelease\netstandard2.0\SevenZipSharp.pdb" target="lib\netstandard2.0" />
<file src="Stage\LiteRelease\net472\SevenZipSharp.dll" target="lib\net472" />
<file src="Stage\LiteRelease\net472\SevenZipSharp.xml" target="lib\net472" />
<file src="Stage\LiteRelease\net472\SevenZipSharp.pdb" target="lib\net472" />
<file src="Stage\LiteRelease\netcoreapp3.1\SevenZipSharp.dll" target="lib\netcoreapp3.1" />
<file src="Stage\LiteRelease\netcoreapp3.1\SevenZipSharp.xml" target="lib\netcoreapp3.1" />
<file src="Stage\LiteRelease\netcoreapp3.1\SevenZipSharp.pdb" target="lib\netcoreapp3.1" />
<file src="license" />
<file src="readme.md" target="docs\" />
</files>
</package>
69 changes: 39 additions & 30 deletions package.regular.nuspec
Original file line number Diff line number Diff line change
@@ -1,33 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>Squid-Box.SevenZipSharp</id>
<version>1.0.0</version>
<authors>Joel Ahlgren</authors>
<summary>Managed 7-zip library written in C# that provides data (self-)extraction and compression (all 7-zip formats are supported).</summary>
<description>Wraps 7z.dll or any compatible one and makes use of LZMA SDK, includes self-extraction functionality.</description>
<language>en-US</language>
<license type="expression">LGPL-3.0-only</license>
<projectUrl>https://github.com/squid-box/SevenZipSharp</projectUrl>
<tags>7z sevenzip sevenzipsharp 7-zip</tags>
<dependencies>
<group targetFramework="net472" />
<group targetFramework="netstandard2.0">
<dependency id="System.Configuration.ConfigurationManager" version="4.5.0" />
<dependency id="System.Security.Permissions" version="4.5.0" />
</group>
<group targetFramework="net6.0">
<dependency id="System.Configuration.ConfigurationManager" version="4.5.0" />
</group>
</dependencies>
</metadata>
<files>
<file src="Stage\Release\netstandard2.0\SevenZipSharp.dll" target="lib\netstandard2.0" />
<file src="Stage\Release\netstandard2.0\SevenZipSharp.xml" target="lib\netstandard2.0" />
<file src="Stage\Release\net6.0\SevenZipSharp.dll" target="lib\net6.0" />
<file src="Stage\Release\net6.0\SevenZipSharp.xml" target="lib\net6.0" />
<file src="Stage\Release\net472\SevenZipSharp.dll" target="lib\net472" />
<file src="Stage\Release\net472\SevenZipSharp.xml" target="lib\net472" />
<file src="license" />
</files>
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>Squid-Box.SevenZipSharp</id>
<version>1.0.0</version>
<authors>Joel Ahlgren</authors>
<summary>Managed 7-zip library written in C# that provides data (self-)extraction and compression (all 7-zip formats are supported).</summary>
<description>Wraps 7z.dll or any compatible one and makes use of LZMA SDK, includes self-extraction functionality.</description>
<readme>docs\readme.md</readme>
<language>en-US</language>
<license type="expression">LGPL-3.0-only</license>
<projectUrl>https://github.com/squid-box/SevenZipSharp</projectUrl>
<tags>7z sevenzip sevenzipsharp 7-zip</tags>
<releaseNotes>
Fixed an issue when seeking in streams with SeekOrigin.End, thanks to GitHub user bneidhold.
Fixed an issue when checking multi-volume 7z archives, thanks to GitHub user panda73111.
</releaseNotes>
<dependencies>
<group targetFramework="netstandard2.0">
<dependency id="System.Configuration.ConfigurationManager" version="4.5.0" />
<dependency id="System.Security.Permissions" version="4.5.0" />
</group>
<group targetFramework="net472" />
<group targetFramework="netcoreapp3.1">
<dependency id="System.Configuration.ConfigurationManager" version="4.5.0" />
</group>
</dependencies>
</metadata>
<files>
<file src="Stage\Release\netstandard2.0\SevenZipSharp.dll" target="lib\netstandard2.0" />
<file src="Stage\Release\netstandard2.0\SevenZipSharp.xml" target="lib\netstandard2.0" />
<file src="Stage\Release\netstandard2.0\SevenZipSharp.pdb" target="lib\netstandard2.0" />
<file src="Stage\Release\net472\SevenZipSharp.dll" target="lib\net472" />
<file src="Stage\Release\net472\SevenZipSharp.xml" target="lib\net472" />
<file src="Stage\Release\net472\SevenZipSharp.pdb" target="lib\net472" />
<file src="Stage\Release\netcoreapp3.1\SevenZipSharp.dll" target="lib\netcoreapp3.1" />
<file src="Stage\Release\netcoreapp3.1\SevenZipSharp.xml" target="lib\netcoreapp3.1" />
<file src="Stage\Release\netcoreapp3.1\SevenZipSharp.pdb" target="lib\netcoreapp3.1" />
<file src="license" />
<file src="readme.md" target="docs\" />
</files>
</package>
6 changes: 4 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ This is a fork from [tomap's fork](https://github.com/tomap/SevenZipSharp) of th
## Changes from original project
As required by the GNU GPL 3.0 license, here's a rough list of what has changed since the original CodePlex project, including changes made in tomap's fork.

* Target .NET framework changed from 2.0 to .NET 4.5, .NET Core 3.1 and .NET Standard 2.0 (ie. .NET Framework 4.5+, .Net Core 2.0+, Mono 5.4+, UWP 10.0.16299+, Unity 2018.1+).
* Produces two multi-framework NuGet packages, one full-feature package and a `Lite` variant without SFX support (and significantly smaller size).
* Target .NET version changed from .NET Framework 2.0 to .NET Standard 2.0, .NET Framework 4.7.2 and .NET Core 3.1.
* Produces two NuGet packages, one full-feature package and a `Lite` variant without SFX support (and significantly smaller size).
* Continous Integration added, both building and deploying.
* Tests re-written to NUnit 3 test cases.
* General code cleanup.

As well as a number of improvements and bug fixes.

-------------------------------------------------------------

Original project information below, some information might be outdated or won't apply to this fork:
Expand Down

0 comments on commit 3ec77d6

Please sign in to comment.