feat: rebrand to MMD PDF, single corporate theme, and remove original text under an edit
- Services/PdfRedactText.cs: strip text whose origin falls inside a CoverAnnotation from the page content stream at save time, hooked into PdfBurn.DrawAnnotationsIntoDoc. Fixes edited values staying recoverable by text extraction. - Themes/MMD.xaml replaces all thirteen themes; picker and accent strip removed; no dark mode. - Rename KillerPDF -> MMD PDF across code, resources, packaging and locale strings; new icon. - Remove the upstream author credit and the in-app install button.
This commit is contained in:
+32
-32
@@ -1,14 +1,14 @@
|
||||
#Requires -Version 5.1
|
||||
<#
|
||||
.SYNOPSIS
|
||||
KillerPDF release script: build payload → sign inner app → pack launcher → sign launcher → verify → publish.
|
||||
MmdPdf release script: build payload → sign inner app → pack launcher → sign launcher → verify → publish.
|
||||
.DESCRIPTION
|
||||
1. Locates pdfium.dll in the NuGet cache, hashes it, and writes BuildInfo.cs so the
|
||||
legacy woven development build's embedded integrity check knows the expected value.
|
||||
2. Builds the ordinary multi-file KillerPDF.App payload without Costura/Fody weaving.
|
||||
3. Signs KillerPDF.App.exe, regenerates its hash manifest, compresses that payload once,
|
||||
and embeds it in the public portable/installer KillerPDF.exe.
|
||||
4. Signs KillerPDF.exe. Prefers CertThumbprint (exact match) over CertName (CN match)
|
||||
2. Builds the ordinary multi-file MmdPdf.App payload without Costura/Fody weaving.
|
||||
3. Signs MmdPdf.App.exe, regenerates its hash manifest, compresses that payload once,
|
||||
and embeds it in the public portable/installer MmdPdf.exe.
|
||||
4. Signs MmdPdf.exe. Prefers CertThumbprint (exact match) over CertName (CN match)
|
||||
and retries the timestamp across three TSA endpoints.
|
||||
5. Runs "signtool verify /pa /v" as a post-sign gate - aborts if either signature chain
|
||||
is not trusted to an accepted root.
|
||||
@@ -48,13 +48,13 @@ param(
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version Latest
|
||||
|
||||
$proj = Join-Path $PSScriptRoot "KillerPDF.csproj"
|
||||
$proj = Join-Path $PSScriptRoot "MmdPdf.csproj"
|
||||
$buildInfoPath = Join-Path $PSScriptRoot "BuildInfo.cs"
|
||||
$publishDir = Join-Path $PSScriptRoot "bin\Release\net48\publish"
|
||||
$exe = Join-Path $publishDir "KillerPDF.exe"
|
||||
$exe = Join-Path $publishDir "MmdPdf.exe"
|
||||
$portableBuild = Join-Path $PSScriptRoot "build\build-portable.ps1"
|
||||
$payloadDir = Join-Path $PSScriptRoot "bin\Release\net48\portable-package\payload"
|
||||
$innerExe = Join-Path $payloadDir "KillerPDF.App.exe"
|
||||
$innerExe = Join-Path $payloadDir "MmdPdf.App.exe"
|
||||
|
||||
# TSA endpoints - tried in order; first success wins.
|
||||
$tsaList = @(
|
||||
@@ -189,7 +189,7 @@ if ($SkipSign) {
|
||||
|
||||
Write-Host "`n==> Writing BuildInfo.cs..." -ForegroundColor Cyan
|
||||
$buildInfoContent = @"
|
||||
namespace KillerPDF
|
||||
namespace MmdPdf
|
||||
{
|
||||
/// <summary>
|
||||
/// Build-time constants written or verified by release.ps1.
|
||||
@@ -253,7 +253,7 @@ if (-not $SkipSign) {
|
||||
$innerSigned = $false
|
||||
foreach ($tsa in $tsaList) {
|
||||
& $signtool sign /fd sha256 /tr $tsa /td sha256 @certArgs `
|
||||
/d "KillerPDF Application" /du "https://killerpdf.net" /v $innerExe
|
||||
/d "MmdPdf Application" /du "https://baobab-ts.com" /v $innerExe
|
||||
if ($LASTEXITCODE -eq 0) { $innerSigned = $true; break }
|
||||
Start-Sleep -Seconds 3
|
||||
}
|
||||
@@ -276,8 +276,8 @@ if (-not $SkipSign) {
|
||||
/tr $tsa `
|
||||
/td sha256 `
|
||||
@certArgs `
|
||||
/d "KillerPDF" `
|
||||
/du "https://killerpdf.net" `
|
||||
/d "MmdPdf" `
|
||||
/du "https://baobab-ts.com" `
|
||||
/v $exe
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
@@ -326,11 +326,11 @@ if (-not $SkipSign) {
|
||||
# Generate the GPL source artifact once, beside the final public launcher.
|
||||
$projectXml = [xml](Get-Content -Raw -LiteralPath $proj)
|
||||
$releaseVersionNode = $projectXml.SelectSingleNode('/Project/PropertyGroup/Version')
|
||||
if (-not $releaseVersionNode) { throw "Version missing from KillerPDF.csproj." }
|
||||
if (-not $releaseVersionNode) { throw "Version missing from MmdPdf.csproj." }
|
||||
$sourceBundleScript = Join-Path $PSScriptRoot 'build\bundle-source.ps1'
|
||||
$releaseBuildVersion = $releaseVersionNode.InnerText
|
||||
& powershell -NoProfile -ExecutionPolicy Bypass -File $sourceBundleScript `
|
||||
-ProjectDir $PSScriptRoot -Version $releaseBuildVersion -AppName 'KillerPDF' -PublishDir $publishDir
|
||||
-ProjectDir $PSScriptRoot -Version $releaseBuildVersion -AppName 'MmdPdf' -PublishDir $publishDir
|
||||
if ($LASTEXITCODE -ne 0) { throw "Source bundle failed." }
|
||||
|
||||
} else {
|
||||
@@ -346,7 +346,7 @@ if ($LASTEXITCODE -ne 0) { throw "Source bundle failed." }
|
||||
# ── 4. SHA256 (final EXE) ─────────────────────────────────────────────────
|
||||
Write-Host "`n==> Computing final EXE SHA256..." -ForegroundColor Cyan
|
||||
$exeHash = (Get-FileHash $exe -Algorithm SHA256).Hash
|
||||
Write-Host " KillerPDF.exe : $exeHash" -ForegroundColor Green
|
||||
Write-Host " MmdPdf.exe : $exeHash" -ForegroundColor Green
|
||||
if ($pdfiumPath) {
|
||||
Write-Host " pdfium.dll : $pdfiumHash" -ForegroundColor Green
|
||||
}
|
||||
@@ -362,7 +362,7 @@ if ($srcZip) {
|
||||
}
|
||||
|
||||
# ── 6. Write SHA256SUMS.txt ──────────────────────────────────────────────────
|
||||
# Written into the publish folder next to KillerPDF.exe and the -src.zip, so every file you
|
||||
# Written into the publish folder next to MmdPdf.exe and the -src.zip, so every file you
|
||||
# upload to the GitHub release is in one place. The updater reads this from the release assets.
|
||||
$sumsPath = Join-Path $publishDir "SHA256SUMS.txt"
|
||||
if ($PublishOnly -and (Test-Path $sumsPath)) {
|
||||
@@ -370,7 +370,7 @@ if ($PublishOnly -and (Test-Path $sumsPath)) {
|
||||
Write-Host "`n==> PublishOnly: keeping existing SHA256SUMS.txt." -ForegroundColor Yellow
|
||||
} else {
|
||||
$lines = [System.Collections.Generic.List[string]]::new()
|
||||
$lines.Add("KillerPDF.exe $exeHash")
|
||||
$lines.Add("MmdPdf.exe $exeHash")
|
||||
if ($pdfiumPath) { $lines.Add("pdfium.dll $pdfiumHash") }
|
||||
if ($srcZip) {
|
||||
$srcHash = (Get-FileHash $srcZip.FullName -Algorithm SHA256).Hash
|
||||
@@ -382,7 +382,7 @@ Write-Host "`n==> SHA256SUMS.txt written to: $sumsPath" -ForegroundColor Green
|
||||
|
||||
# ── 7. Summary ───────────────────────────────────────────────────────────────
|
||||
Write-Host "`n╔══════════════════════════════════════════════════════════════╗" -ForegroundColor Cyan
|
||||
Write-Host " KillerPDF release artifacts" -ForegroundColor White
|
||||
Write-Host " MmdPdf release artifacts" -ForegroundColor White
|
||||
Write-Host " EXE : $exe"
|
||||
if ($srcZip) { Write-Host " SRC : $($srcZip.FullName)" }
|
||||
Write-Host ""
|
||||
@@ -407,7 +407,7 @@ Write-Host "╚═════════════════════
|
||||
Write-Host "`n==> Publish preflight..." -ForegroundColor Cyan
|
||||
$csprojRaw = Get-Content -Path $proj -Raw
|
||||
if ($csprojRaw -notmatch '<Version>([0-9]+\.[0-9]+\.[0-9]+)</Version>') {
|
||||
throw "No <Version>x.y.z</Version> found in KillerPDF.csproj"
|
||||
throw "No <Version>x.y.z</Version> found in MmdPdf.csproj"
|
||||
}
|
||||
$Version = $Matches[1]
|
||||
$Tag = "v$Version"
|
||||
@@ -428,7 +428,7 @@ try {
|
||||
# ReadAllText/WriteAllText: UTF-8 no BOM, PS 5.1-safe (absolute paths).
|
||||
$readmePath = Join-Path $PSScriptRoot 'README.md'
|
||||
$readmeRaw = [System.IO.File]::ReadAllText($readmePath)
|
||||
$readmeNew = $readmeRaw -replace 'releases/download/v[0-9]+\.[0-9]+\.[0-9]+/KillerPDF-[0-9]+\.[0-9]+\.[0-9]+-src\.zip', "releases/download/v$Version/KillerPDF-$Version-src.zip"
|
||||
$readmeNew = $readmeRaw -replace 'releases/download/v[0-9]+\.[0-9]+\.[0-9]+/MmdPdf-[0-9]+\.[0-9]+\.[0-9]+-src\.zip', "releases/download/v$Version/MmdPdf-$Version-src.zip"
|
||||
if ($readmeNew -ne $readmeRaw) {
|
||||
if ($DryRun) {
|
||||
Write-Host " DryRun: README source link is stale, would update it to $Tag" -ForegroundColor Yellow
|
||||
@@ -443,8 +443,8 @@ try {
|
||||
|
||||
# ── Landing page release info (pdf-landing) ──────────────────────────────
|
||||
# Ported from Killendar's release.ps1 step 7 (the family standard - KillerNotes has it
|
||||
# too; KillerPDF was the odd one out and its hero went stale by hand every release).
|
||||
# killerpdf.net is a MANUAL Cloudflare Pages drop, so nothing here deploys - the hero
|
||||
# too; MmdPdf was the odd one out and its hero went stale by hand every release).
|
||||
# baobab-ts.com is a MANUAL Cloudflare Pages drop, so nothing here deploys - the hero
|
||||
# block (version, released, size, sha256), the verEgg footer on every page, and the ten
|
||||
# translated footers in kp-i18n.js are rewritten and committed BEFORE the tag.
|
||||
# Two site-specific differences from Killendar's copy: the hash is stored LOWERCASE
|
||||
@@ -454,7 +454,7 @@ try {
|
||||
# already checked against the CHANGELOG - Get-Date would stamp whatever day the script
|
||||
# happened to run.
|
||||
if ($csprojRaw -notmatch '<ReleaseDate>([0-9]{4}-[0-9]{2}-[0-9]{2})</ReleaseDate>') {
|
||||
throw "No <ReleaseDate>yyyy-MM-dd</ReleaseDate> found in KillerPDF.csproj"
|
||||
throw "No <ReleaseDate>yyyy-MM-dd</ReleaseDate> found in MmdPdf.csproj"
|
||||
}
|
||||
$releaseDate = $Matches[1]
|
||||
$hashLower = $exeHash.ToLower()
|
||||
@@ -464,7 +464,7 @@ try {
|
||||
$indexPath = Join-Path $siteDir 'index.html'
|
||||
$indexRaw = [System.IO.File]::ReadAllText($indexPath)
|
||||
$indexNew = $indexRaw
|
||||
$indexNew = $indexNew -replace '(<span class="k">version</span> <span class="v">)KillerPDF v[0-9]+\.[0-9]+\.[0-9]+', ('${1}' + "KillerPDF v$Version")
|
||||
$indexNew = $indexNew -replace '(<span class="k">version</span> <span class="v">)MmdPdf v[0-9]+\.[0-9]+\.[0-9]+', ('${1}' + "MmdPdf v$Version")
|
||||
$indexNew = $indexNew -replace '(<span class="k">released</span> <span class="v">)[0-9]{4}-[0-9]{2}-[0-9]{2}', ('${1}' + $releaseDate)
|
||||
$indexNew = $indexNew -replace '(<span class="k">size</span> <span class="v">)[^<]*', ('${1}' + "~$exeMB MB exe")
|
||||
$indexNew = $indexNew -replace '(<span class="v hash">)[0-9A-Fa-f]{32}<br>[0-9A-Fa-f]{32}', ('${1}' + $hashLower.Substring(0, 32) + '<br>' + $hashLower.Substring(32, 32))
|
||||
@@ -474,7 +474,7 @@ try {
|
||||
|
||||
if ($DryRun) {
|
||||
Write-Host " DryRun: would write these release facts to pdf-landing and commit:" -ForegroundColor Yellow
|
||||
Write-Host " version : KillerPDF v$Version"
|
||||
Write-Host " version : MmdPdf v$Version"
|
||||
Write-Host " released : $releaseDate"
|
||||
Write-Host " size : ~$exeMB MB exe"
|
||||
Write-Host " sha256 : $hashLower"
|
||||
@@ -500,7 +500,7 @@ try {
|
||||
git push origin $defaultBranch --quiet
|
||||
if ($LASTEXITCODE -ne 0) { throw "Landing page commit failed to push" }
|
||||
Write-Host " pdf-landing updated to v$Version and pushed"
|
||||
Write-Host " Remember: killerpdf.net does NOT auto-deploy. Drag pdf-landing/ into Cloudflare Pages." -ForegroundColor Yellow
|
||||
Write-Host " Remember: baobab-ts.com does NOT auto-deploy. Drag pdf-landing/ into Cloudflare Pages." -ForegroundColor Yellow
|
||||
} else {
|
||||
Write-Host " pdf-landing already current"
|
||||
}
|
||||
@@ -561,7 +561,7 @@ try {
|
||||
# something checks it - that something is here. It must equal the date on this
|
||||
# version's CHANGELOG section, which is the date the release actually goes out.
|
||||
if ($csprojRaw -notmatch '<ReleaseDate>([0-9]{4}-[0-9]{2}-[0-9]{2})</ReleaseDate>') {
|
||||
throw "No <ReleaseDate>yyyy-MM-dd</ReleaseDate> found in KillerPDF.csproj"
|
||||
throw "No <ReleaseDate>yyyy-MM-dd</ReleaseDate> found in MmdPdf.csproj"
|
||||
}
|
||||
$releaseDate = $Matches[1]
|
||||
if ($changelog -notmatch ('## \[' + [regex]::Escape($Version) + '\] - ([0-9]{4}-[0-9]{2}-[0-9]{2})')) {
|
||||
@@ -575,7 +575,7 @@ try {
|
||||
|
||||
# A red test cannot ship. Same gate as the date checks above - fail the release, not a reminder.
|
||||
Write-Host " Running unit tests..."
|
||||
dotnet test (Join-Path $PSScriptRoot 'KillerPDF.Tests\KillerPDF.Tests.csproj') -c Release --nologo -v quiet
|
||||
dotnet test (Join-Path $PSScriptRoot 'MmdPdf.Tests\MmdPdf.Tests.csproj') -c Release --nologo -v quiet
|
||||
if ($LASTEXITCODE -ne 0) { throw "Unit tests failed - fix them before releasing" }
|
||||
Write-Host " Unit tests passed" -ForegroundColor Green
|
||||
|
||||
@@ -592,19 +592,19 @@ try {
|
||||
if ($inSection) { $notes.Add($line) }
|
||||
}
|
||||
if ($notes.Count -eq 0) { throw "Could not extract [$Version] notes from CHANGELOG.md" }
|
||||
$notesFile = Join-Path $env:TEMP "KillerPDF-$Version-notes.md"
|
||||
$notesFile = Join-Path $env:TEMP "MmdPdf-$Version-notes.md"
|
||||
$notes -join "`r`n" | Set-Content -Path $notesFile -Encoding UTF8
|
||||
Write-Host " Notes written to $notesFile ($($notes.Count) lines)"
|
||||
|
||||
if ($DryRun) {
|
||||
Write-Host "`n==> DryRun: stopping before tag and release." -ForegroundColor Yellow
|
||||
Write-Host " Would tag $Tag, push it, and publish KillerPDF.exe, the -src.zip, and SHA256SUMS.txt."
|
||||
Write-Host " Would tag $Tag, push it, and publish MmdPdf.exe, the -src.zip, and SHA256SUMS.txt."
|
||||
exit 0
|
||||
}
|
||||
|
||||
# ── 10. Tag + push ───────────────────────────────────────────────────────
|
||||
Write-Host "`n==> Tagging $Tag..." -ForegroundColor Cyan
|
||||
git tag -a $Tag -m "KillerPDF $Tag"
|
||||
git tag -a $Tag -m "MmdPdf $Tag"
|
||||
git push origin $Tag
|
||||
if ($LASTEXITCODE -ne 0) { throw "Tag push failed" }
|
||||
|
||||
@@ -613,7 +613,7 @@ try {
|
||||
$assets = @($exe)
|
||||
if ($srcZip) { $assets += $srcZip.FullName }
|
||||
if (Test-Path $sumsPath) { $assets += $sumsPath }
|
||||
gh release create $Tag @assets --title "KillerPDF $Tag" --notes-file $notesFile --verify-tag
|
||||
gh release create $Tag @assets --title "MmdPdf $Tag" --notes-file $notesFile --verify-tag
|
||||
if ($LASTEXITCODE -ne 0) { throw "gh release create failed" }
|
||||
|
||||
Write-Host "`n==> Refreshing thekiller.net software page..." -ForegroundColor Cyan
|
||||
|
||||
Reference in New Issue
Block a user