Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/release/licenses/Avalonia-MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) AvaloniaUI OÜ
All Rights Reserved

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.
101 changes: 101 additions & 0 deletions .github/release/licenses/DejaVu-font-notices.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved.
Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
DejaVu changes are in public domain


Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. Glyphs imported from Arev fonts are (c) Tavmjung Bah (see below)

Bitstream Vera Fonts Copyright
------------------------------

Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
a trademark of Bitstream, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of the fonts accompanying this license ("Fonts") and associated
documentation files (the "Font Software"), to reproduce and distribute the
Font Software, including without limitation the rights to use, copy, merge,
publish, distribute, and/or sell copies of the Font Software, and to permit
persons to whom the Font Software is furnished to do so, subject to the
following conditions:

The above copyright and trademark notices and this permission notice shall
be included in all copies of one or more of the Font Software typefaces.

The Font Software may be modified, altered, or added to, and in particular
the designs of glyphs or characters in the Fonts may be modified and
additional glyphs or characters may be added to the Fonts, only if the fonts
are renamed to names not containing either the words "Bitstream" or the word
"Vera".

This License becomes null and void to the extent applicable to Fonts or Font
Software that has been modified and is distributed under the "Bitstream
Vera" names.

The Font Software may be sold as part of a larger software package but no
copy of one or more of the Font Software typefaces may be sold by itself.

THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
FONT SOFTWARE.

Except as contained in this notice, the names of Gnome, the Gnome
Foundation, and Bitstream Inc., shall not be used in advertising or
otherwise to promote the sale, use or other dealings in this Font Software
without prior written authorization from the Gnome Foundation or Bitstream
Inc., respectively. For further information, contact: fonts at gnome dot
org.

Arev Fonts Copyright
------------------------------

Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining
a copy of the fonts accompanying this license ("Fonts") and
associated documentation files (the "Font Software"), to reproduce
and distribute the modifications to the Bitstream Vera Font Software,
including without limitation the rights to use, copy, merge, publish,
distribute, and/or sell copies of the Font Software, and to permit
persons to whom the Font Software is furnished to do so, subject to
the following conditions:

The above copyright and trademark notices and this permission notice
shall be included in all copies of one or more of the Font Software
typefaces.

The Font Software may be modified, altered, or added to, and in
particular the designs of glyphs or characters in the Fonts may be
modified and additional glyphs or characters may be added to the
Fonts, only if the fonts are renamed to names not containing either
the words "Tavmjong Bah" or the word "Arev".

This License becomes null and void to the extent applicable to Fonts
or Font Software that has been modified and is distributed under the
"Tavmjong Bah Arev" names.

The Font Software may be sold as part of a larger software package but
no copy of one or more of the Font Software typefaces may be sold by
itself.

THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Except as contained in this notice, the name of Tavmjong Bah shall not
be used in advertising or otherwise to promote the sale, use or other
dealings in this Font Software without prior written authorization
from Tavmjong Bah. For further information, contact: tavmjong @ free
. fr.
94 changes: 94 additions & 0 deletions .github/release/licenses/Inter-OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
Copyright (c) 2016-2020 The Inter Project Authors.
"Inter" is trademark of Rasmus Andersson.
https://github.com/rsms/inter

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL

-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION AND CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
23 changes: 23 additions & 0 deletions .github/release/licenses/PDFsharp-MIT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Copyright (c) 2001-2026 empira Software GmbH, Troisdorf (Cologne Area), Germany

http://docs.pdfsharp.net

MIT License

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.
141 changes: 141 additions & 0 deletions .github/release/package.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
#requires -Version 7
<#
Архив релиза SignService для Windows x64:
SignService-<версия>-win-x64.zip — SignService.exe, README.txt, CHANGELOG.md,
LICENSE.txt, licenses/, SHA256SUMS.txt;
SignService-<версия>-win-x64.sha256 — SHA-256 архива и exe;
RELEASE_NOTES.md — раздел версии из CHANGELOG.md для описания релиза.
Лицензии пакетов NuGet берутся из графа восстановления после dotnet publish
(включая пакет среды выполнения), тексты без файла в пакете — из licenses/ рядом.
Запуск: pwsh .github/release/package.ps1 -PublishDir publish -OutputDir dist [-Tag v1.2.0]
#>
param(
[Parameter(Mandatory)] [string] $PublishDir,
[Parameter(Mandatory)] [string] $OutputDir,
# Тег релиза: должен совпадать с версией проекта (иначе автообновление зациклится).
[string] $Tag = ''
)

$ErrorActionPreference = 'Stop'
$root = (Resolve-Path (Join-Path $PSScriptRoot '..' '..')).Path
$project = Join-Path $root 'src' 'SignService' 'SignService.csproj'
$version = ([xml](Get-Content $project -Raw)).Project.PropertyGroup.Version |
Where-Object { $_ } | Select-Object -First 1
if (-not $version) { throw "В $project не указана версия." }
if ($Tag -and $Tag -ne "v$version") { throw "Тег $Tag не совпадает с версией проекта $version." }

$exe = Join-Path $PublishDir 'SignService.exe'
if (-not (Test-Path $exe)) { throw "Не найден $exe — сначала выполните dotnet publish." }

$name = "SignService-$version-win-x64"
New-Item -ItemType Directory -Force $OutputDir | Out-Null
$OutputDir = (Resolve-Path $OutputDir).Path
$stage = Join-Path $OutputDir $name
if (Test-Path $stage) { Remove-Item $stage -Recurse -Force }
$licenses = Join-Path $stage 'licenses'
New-Item -ItemType Directory -Force $licenses | Out-Null

function Write-Text([string] $path, [string[]] $lines) {
# UTF-8 с BOM и CRLF — корректно открывается Блокнотом любой версии Windows.
[IO.File]::WriteAllText($path, ($lines -join "`r`n") + "`r`n", [Text.UTF8Encoding]::new($true))
}

function Get-Sha256([string] $path) { (Get-FileHash -Algorithm SHA256 $path).Hash.ToLowerInvariant() }

Copy-Item $exe $stage
Copy-Item (Join-Path $root 'CHANGELOG.md') $stage
Copy-Item (Join-Path $root 'LICENSE') (Join-Path $stage 'LICENSE.txt')
Copy-Item (Join-Path $PSScriptRoot 'licenses' '*') $licenses

# Лицензии пакетов NuGet из графа восстановления: библиотеки и загруженные
# пакеты (среда выполнения win-x64 для самодостаточного exe).
$assets = Get-Content (Join-Path $root 'src' 'SignService' 'obj' 'project.assets.json') -Raw | ConvertFrom-Json
$packagesRoot = $assets.project.restore.packagesPath
$packages = [Collections.Generic.List[object]]::new()
foreach ($library in $assets.libraries.PSObject.Properties) {
if ($library.Value.type -ne 'package') { continue }
$id, $packageVersion = $library.Name -split '/', 2
$packages.Add([pscustomobject]@{ Id = $id.ToLowerInvariant(); Version = $packageVersion; Path = $library.Value.path })
}
foreach ($framework in $assets.project.frameworks.PSObject.Properties) {
foreach ($download in @($framework.Value.downloadDependencies)) {
if (-not $download) { continue }
$id = $download.name.ToLowerInvariant()
$packageVersion = $download.version.Trim('[', ']', ' ').Split(',')[0].Trim()
$packages.Add([pscustomobject]@{ Id = $id; Version = $packageVersion; Path = "$id/$packageVersion" })
}
}

$copied = 0
foreach ($package in $packages | Sort-Object Id, Version -Unique) {
$directory = Join-Path $packagesRoot $package.Path
if (-not (Test-Path $directory)) { Write-Warning "Нет каталога пакета $directory"; continue }
Get-ChildItem $directory -File |
Where-Object { $_.Name -match '^(licen[cs]e|copying|notice|third-?party-?notices|thirdpartynotices)' } |
ForEach-Object {
Copy-Item $_.FullName (Join-Path $licenses "$($package.Id)-$($package.Version)-$($_.Name)")
$copied++
}
}
if ($copied -eq 0) { throw 'Не найдено ни одной лицензии пакетов NuGet — проверьте восстановление.' }

$repository = 'https://github.com/zaynullinmi/SignService'
Write-Text (Join-Path $stage 'README.txt') @(
"SignService $version — Windows x64",
'',
'Запустите SignService.exe. Установка .NET не требуется.',
'Подписание: перетащите файлы в окно, выберите сертификат и нажмите «Подписать».',
'Проверка ЭЦП: «Инструменты → Проверить ЭЦП…» или ПКМ по файлу → «Подписанты и проверка ЭЦП…».',
'Для откреплённой подписи нужен исходный документ.',
'Проверка ГОСТ и операции с готовыми подписями работают без КриптоПро.',
'Для создания новой ГОСТ-подписи требуется КриптоПро CSP и закрытый ключ.',
'Результаты доверия, отзыва сертификатов и TSA указаны в отчёте проверки отдельно.',
'',
"Исходный код версии: $repository/tree/v$version",
"Релиз: $repository/releases/tag/v$version",
'Лицензии используемых компонентов находятся в каталоге licenses.'
)
# Формат sha256sum (без BOM): проверка — sha256sum -c SHA256SUMS.txt.
[IO.File]::WriteAllText((Join-Path $stage 'SHA256SUMS.txt'), "$(Get-Sha256 $exe) SignService.exe`n",
[Text.UTF8Encoding]::new($false))

$zip = Join-Path $OutputDir "$name.zip"
if (Test-Path $zip) { Remove-Item $zip -Force }
Compress-Archive -Path (Join-Path $stage '*') -DestinationPath $zip -CompressionLevel Optimal
$zipHash = Get-Sha256 $zip
$exeHash = Get-Sha256 $exe
[IO.File]::WriteAllText((Join-Path $OutputDir "$name.sha256"),
"$zipHash $name.zip`n$exeHash SignService.exe`n", [Text.UTF8Encoding]::new($false))

# Описание релиза — раздел этой версии из истории изменений.
$changelog = Get-Content (Join-Path $root 'CHANGELOG.md')
$start = [Array]::FindIndex([string[]] $changelog, [Predicate[string]] { param($line) $line -like "## v$version*" })
if ($start -lt 0) {
if ($Tag) { throw "В CHANGELOG.md нет раздела «## v$version»." }
$section = @("## v$version")
}
else {
$end = [Array]::FindIndex([string[]] $changelog, $start + 1, [Predicate[string]] { param($line) $line -like '## *' })
$last = if ($end -lt 0) { $changelog.Count - 1 } else { $end - 1 }
while ($last -gt $start -and -not $changelog[$last].Trim()) { $last-- }
$section = $changelog[$start..$last]
}
$notes = @($section) + @(
'',
'**Файлы**',
'',
'- `SignService.exe` — программа (Windows x64, установка .NET не требуется); этот файл скачивает автообновление;',
"- ``$name.zip`` — программа с README, историей версий и лицензиями компонентов;",
"- ``$name.sha256`` — контрольные суммы SHA-256.",
'',
'```',
"$zipHash $name.zip",
"$exeHash SignService.exe",
'```'
)
[IO.File]::WriteAllText((Join-Path $OutputDir 'RELEASE_NOTES.md'), ($notes -join "`n") + "`n", [Text.UTF8Encoding]::new($false))

Write-Host "Архив: $zip"
Write-Host "Лицензий пакетов NuGet: $copied"
Write-Host "SHA-256: $zipHash $name.zip"
Write-Host "SHA-256: $exeHash SignService.exe"
Loading
Loading