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:
+10
-10
@@ -10,14 +10,14 @@ $ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version Latest
|
||||
|
||||
$projectDir = Split-Path -Parent $PSScriptRoot
|
||||
$appProject = Join-Path $projectDir 'KillerPDF.csproj'
|
||||
$launcherProject = Join-Path $projectDir 'Packaging\KillerLauncher\KillerLauncher.csproj'
|
||||
$appProject = Join-Path $projectDir 'MmdPdf.csproj'
|
||||
$launcherProject = Join-Path $projectDir 'Packaging\MmdPdfLauncher\MmdPdfLauncher.csproj'
|
||||
$artifactRoot = Join-Path $projectDir "bin\$Configuration\net48\portable-package"
|
||||
$payloadDir = Join-Path $artifactRoot 'payload'
|
||||
$payloadZip = Join-Path $artifactRoot 'payload.zip'
|
||||
$launcherOutput = Join-Path $artifactRoot 'launcher'
|
||||
$publicDir = Join-Path $projectDir "bin\$Configuration\net48\publish"
|
||||
$publicExe = Join-Path $publicDir 'KillerPDF.exe'
|
||||
$publicExe = Join-Path $publicDir 'MmdPdf.exe'
|
||||
|
||||
if (-not $RepackOnly) {
|
||||
if ([IO.Directory]::Exists($artifactRoot)) { [IO.Directory]::Delete($artifactRoot, $true) }
|
||||
@@ -31,10 +31,10 @@ if ([IO.Directory]::Exists($launcherOutput)) { [IO.Directory]::Delete($launcherO
|
||||
$versionXml = [xml](Get-Content -Raw -LiteralPath $appProject)
|
||||
$versionNode = $versionXml.SelectSingleNode('/Project/PropertyGroup/Version')
|
||||
$version = if ($versionNode) { [string]$versionNode.InnerText } else { '' }
|
||||
if (-not $version) { throw 'KillerPDF.csproj has no Version.' }
|
||||
if (-not $version) { throw 'MmdPdf.csproj has no Version.' }
|
||||
|
||||
if (-not $RepackOnly) {
|
||||
Write-Host "==> Building loose KillerPDF payload $version..." -ForegroundColor Cyan
|
||||
Write-Host "==> Building loose MmdPdf payload $version..." -ForegroundColor Cyan
|
||||
& dotnet publish $appProject -c $Configuration `
|
||||
-p:KillerPayloadBuild=true `
|
||||
-p:PublishDir="$payloadDir\"
|
||||
@@ -49,7 +49,7 @@ if (-not $RepackOnly) {
|
||||
# The PDF file-type icon is a loose installed asset even though the application also embeds it.
|
||||
[IO.File]::Copy((Join-Path $projectDir 'Resources\pdf-file.ico'),
|
||||
(Join-Path $payloadDir 'pdf-file.ico'), $true)
|
||||
} elseif (-not [IO.File]::Exists((Join-Path $payloadDir 'KillerPDF.App.exe'))) {
|
||||
} elseif (-not [IO.File]::Exists((Join-Path $payloadDir 'MmdPdf.App.exe'))) {
|
||||
throw 'RepackOnly requested but the prepared payload is missing.'
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ if ($payloadDifference.Count -gt 0) {
|
||||
$details = ($payloadDifference | ForEach-Object { "$($_.SideIndicator) $($_.InputObject)" }) -join [Environment]::NewLine
|
||||
throw "Payload file set changed. Review dependencies and update build\payload-files.txt deliberately:`n$details"
|
||||
}
|
||||
foreach ($required in 'KillerPDF.App.exe', 'pdfium.dll', 'PdfSharpCore.dll', 'System.Text.Json.dll') {
|
||||
foreach ($required in 'MmdPdf.App.exe', 'pdfium.dll', 'PdfSharpCore.dll', 'System.Text.Json.dll') {
|
||||
if ($actualPayloadNames -notcontains $required) {
|
||||
throw "Required loose payload file is missing ($required). Costura/Fody may have run accidentally."
|
||||
}
|
||||
@@ -105,15 +105,15 @@ finally { $zipStream.Dispose() }
|
||||
|
||||
Write-Host "==> Building the public portable launcher..." -ForegroundColor Cyan
|
||||
& dotnet publish $launcherProject -c $Configuration `
|
||||
-p:LauncherAssemblyName=KillerPDF `
|
||||
-p:LauncherAssemblyName=MmdPdf `
|
||||
-p:LauncherVersion=$version `
|
||||
-p:LauncherIcon="$(Join-Path $projectDir 'Resources\kp-icon.ico')" `
|
||||
-p:LauncherIcon="$(Join-Path $projectDir 'Resources\mmd-icon.ico')" `
|
||||
-p:PayloadZip="$payloadZip" `
|
||||
-p:AllowUnsignedInstall="$(!$RequireSignature)" `
|
||||
-p:PublishDir="$launcherOutput\"
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Launcher build failed.' }
|
||||
|
||||
$builtLauncher = Join-Path $launcherOutput 'KillerPDF.exe'
|
||||
$builtLauncher = Join-Path $launcherOutput 'MmdPdf.exe'
|
||||
if (-not [IO.File]::Exists($builtLauncher)) { throw "Launcher output is missing: $builtLauncher" }
|
||||
[IO.File]::Copy($builtLauncher, $publicExe, $true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user