diff --git a/QuickLook.Common/LICENSE b/QuickLook.Common/LICENSE new file mode 100644 index 0000000..2b80392 --- /dev/null +++ b/QuickLook.Common/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software 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/QuickLook.Common/QuickLook.Common.csproj b/QuickLook.Common/QuickLook.Common.csproj index aa0b59d..7eef276 100644 --- a/QuickLook.Common/QuickLook.Common.csproj +++ b/QuickLook.Common/QuickLook.Common.csproj @@ -1,59 +1,80 @@  - - Library - net462 - QuickLook.Common - QuickLook.Common - AnyCPU;x64 - true - false - true - true - latest - false - {85FDD6BA-871D-46C8-BD64-F6BB0CB5EA95} - + + Library + net462 + QuickLook.Common + QuickLook.Common + AnyCPU;x64 + true + false + true + true + latest + false + {85FDD6BA-871D-46C8-BD64-F6BB0CB5EA95} + QL-Win + QL-Win + This repository holds the common library of QuickLook. The library is shared among all QuickLook projects. + https://github.com/QL-Win/QuickLook + https://github.com/QL-Win/QuickLook + git + QuickLook + MIT + README.md + app.png + - - true - full - false - ..\Build\Debug\ - DEBUG;TRACE - 4 - + + true + full + false + ..\Build\Debug\ + DEBUG;TRACE + 4 + - - true - full - false - ..\Build\Debug\ - DEBUG;TRACE - 4 - + + true + full + false + ..\Build\Debug\ + DEBUG;TRACE + 4 + - - pdbonly - true - ..\Build\Release\ - TRACE - 4 - + + pdbonly + true + ..\Build\Release\ + TRACE + 4 + - - pdbonly - true - ..\Build\Release\ - TRACE - 4 - + + pdbonly + true + ..\Build\Release\ + TRACE + 4 + - - - - + + + + - - powershell -ExecutionPolicy Bypass -file "$(SolutionDir)Scripts\update-version.ps1" - + + + Properties\GitVersion.cs + + + + + + + + + + powershell -ExecutionPolicy Bypass -file "$(SolutionDir)Scripts\update-version.ps1" + diff --git a/QuickLook.Common/README.md b/QuickLook.Common/README.md new file mode 100644 index 0000000..2225e74 --- /dev/null +++ b/QuickLook.Common/README.md @@ -0,0 +1,3 @@ +# QuickLook.Common + +This repository holds the common library of QuickLook. The library is shared among all QuickLook projects. diff --git a/QuickLook.Common/app.png b/QuickLook.Common/app.png new file mode 100644 index 0000000..5a8238c Binary files /dev/null and b/QuickLook.Common/app.png differ diff --git a/Scripts/pack-all.ps1 b/Scripts/pack-all.ps1 index 2483b69..3447dbf 100644 --- a/Scripts/pack-all.ps1 +++ b/Scripts/pack-all.ps1 @@ -1,4 +1,5 @@ # Please build the msi installation package in advance +powershell -file "pack-nuget.ps1" powershell -file "pack-7z.ps1" powershell -file "pack-setup.ps1" powershell -file "pack-appx.ps1" diff --git a/Scripts/pack-nuget.ps1 b/Scripts/pack-nuget.ps1 new file mode 100644 index 0000000..9f68e3b --- /dev/null +++ b/Scripts/pack-nuget.ps1 @@ -0,0 +1,29 @@ +Write-Host @" +███╗ ██╗██╗ ██╗ ██████╗ ███████╗████████╗ +████╗ ██║██║ ██║██╔════╝ ██╔════╝╚══██╔══╝ +██╔██╗ ██║██║ ██║██║ ███╗█████╗ ██║ +██║╚██╗██║██║ ██║██║ ██║██╔══╝ ██║ +██║ ╚████║╚██████╔╝╚██████╔╝███████╗ ██║ +╚═╝ ╚═══╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝ +"@ + +$revision = git describe --always --tags --exclude latest + +if ($revision -match '^(\d+\.\d+\.\d+)-(\d+)(?:-g[0-9a-f]+)?$') { + $baseVersion = $matches[1] + $commitCount = $matches[2] + $revision = "$baseVersion-preview$commitCount" +} else { + $revision = $gitVersion # fallback +} + +Write-Host "NuGet Package Version: $revision" + +Set-Location ..\ # Move to the root of the project + +powershell -ExecutionPolicy Bypass -File "Scripts\update-version.ps1" +dotnet pack -c Release -p:PackageVersion=$revision -o .\Build -p:PreBuildEvent="" QuickLook.Common\QuickLook.Common.csproj +dotnet pack -c Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PackageVersion=$revision -o .\Build -p:PreBuildEvent="" QuickLook.Common\QuickLook.Common.csproj + +# Write-Host "`nPress any key to exit..." +# [void][System.Console]::ReadKey($true)