diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e38a9c8..5beae95 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,26 +11,26 @@ jobs: runs-on: windows-latest steps: - - name: Checkout Code - uses: actions/checkout@v1 + - name: Checkout Code + uses: actions/checkout@v4 - - name: Setup MSBuild Path - uses: microsoft/setup-msbuild@v1.0.2 - - - name: Setup NuGet - uses: NuGet/setup-nuget@v1.0.5 - - - name: Restore NuGet Packages - run: msbuild -t:restore - - - name: Build - run: msbuild -t:build -p:Configuration=Release - - - name: Pack - run: msbuild -t:pack -p:Configuration=Release + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 4.6.2 + 4.8.1 + 6.0.x + 8.0.x + + - name: Restore NuGet Packages + run: dotnet restore /p:Platform="Any CPU" + + - name: Build + run: dotnet build --configuration Release /p:Platform="Any CPU" - - name: Configure nuget - run: nuget setapikey ${{secrets.NUGET_API_KEY}} + - name: Pack + run: dotnet pack --configuration Release /p:Platform="Any CPU" - - name: Publish - run: nuget push LibSquishNet\bin\Release\*.nupkg -SkipDuplicate -source https://api.nuget.org/v3/index.json + - name: Publish + run: dotnet nuget push LibSquishNet\bin\Release\*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --key ${{ secrets.NUGET_API_KEY }} \ No newline at end of file diff --git a/LibSquishNet.Tests/LibSquishNet.Tests.csproj b/LibSquishNet.Tests/LibSquishNet.Tests.csproj index e605a92..c14a10a 100644 --- a/LibSquishNet.Tests/LibSquishNet.Tests.csproj +++ b/LibSquishNet.Tests/LibSquishNet.Tests.csproj @@ -1,30 +1,29 @@  - - net46 + net462;net481;net6.0-windows;net8.0-windows + false + win + true + AnyCPU - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - + + + + + + + + + + + + - - - - Always - + - - + \ No newline at end of file diff --git a/LibSquishNet.sln b/LibSquishNet.sln index facbab8..be3a296 100644 --- a/LibSquishNet.sln +++ b/LibSquishNet.sln @@ -1,11 +1,11 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31229.75 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibSquishNet", "LibSquishNet\LibSquishNet.csproj", "{8B187D46-BC8E-4B5A-AE68-326958BC9AAA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibSquishNet", "LibSquishNet\LibSquishNet.csproj", "{8B187D46-BC8E-4B5A-AE68-326958BC9AAA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibSquishNet.Tests", "LibSquishNet.Tests\LibSquishNet.Tests.csproj", "{3C99A2A5-D011-402A-81D6-A11FFF790721}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibSquishNet.Tests", "LibSquishNet.Tests\LibSquishNet.Tests.csproj", "{3C99A2A5-D011-402A-81D6-A11FFF790721}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/LibSquishNet/LibSquishNet.csproj b/LibSquishNet/LibSquishNet.csproj index b3e9713..965f33b 100644 --- a/LibSquishNet/LibSquishNet.csproj +++ b/LibSquishNet/LibSquishNet.csproj @@ -1,103 +1,43 @@ - - + + Library + net462;net481;net6.0;net8.0 + false + Any CPU MaxxWyndham + LibSquishNet + LibSquishNet LibSquishNet - libsquish in .net! + 2.1.0 + + A .net port of Simon Brown's libsquish + README.md LICENSE https://github.com/MaxxWyndham/LibSquishNet - - v2.0.0 - - Now with parallelism! - + v2.1.0 - Parallelism and broader framework support + true + C# by Maxx Wyndham, original by Simon Brown + 2.1.0.0 + 2.1.0.0 + - false - $(GenerateNuspecDependsOn);ReadPackageVersionFromOutputAssembly + true + $(GenerateNuspecDependsOn);PackageInfo - - - - - - %(PackAssembly.Version) - + + + - - - Debug - AnyCPU - {8B187D46-BC8E-4B5A-AE68-326958BC9AAA} - Library - Properties - LibSquishNet - LibSquishNet - v4.6 - 512 - - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - + - - - - - - - - + + + + - - - - - - - - - - - - - + + - - - 5.10.0-preview.2.7185 - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - \ No newline at end of file + diff --git a/LibSquishNet/Properties/AssemblyInfo.cs b/LibSquishNet/Properties/AssemblyInfo.cs deleted file mode 100644 index 8b63b9b..0000000 --- a/LibSquishNet/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("LibSquishNet")] -[assembly: AssemblyDescription("A .net port of Simon Brown's libsquish")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("C# by Maxx Wyndham, original by Simon Brown")] -[assembly: AssemblyProduct("LibSquishNet")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("89ede28a-3261-4b7f-a8e9-619cc7bd31ee")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.0.0")] -[assembly: AssemblyFileVersion("2.0.0.0")] diff --git a/README.md b/README.md index e623a73..863ad55 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,15 @@ ![Nuget](https://img.shields.io/nuget/v/LibSquishNet) -A partial port of Simon Brown's v1.11 libsquish to .NET Framework 4.6 +A partial port of Simon Brown's v1.11 libsquish to .NET Original project is available here https://code.google.com/p/libsquish/ **Changelog** +**v2.1.0** +Updated to .NET 4.6.2, and added support for .NET 4.8.1, 6.0, and 8.0. + **v2.0.0** Parallism! A basic implementation using Parallel.For on the primary loop. Reduces compression time considerably. Pass true into `CompressImage` for the new `parallel` parameter. Default is false. Code-style. The code is more modern C# style now.