Issue #157: the Windows portable zip keeps settings, logs and recovery beside pdfcraft.exe (#325)

* Issue #157: the Windows portable zip keeps settings, logs and recovery beside pdfcraft.exe

The portable zip had no portable.txt, and the app had no portable mode: it always wrote %APPDATA%\PdfCraft and %LOCALAPPDATA%\PdfCraft. Now portable.txt (or PdfCraft.portable) beside the executable puts the settings, log files, crash recovery and new digital IDs in PdfCraftData next to it, as PhotoCraft does, and the zip ships portable.txt. An unwritable PdfCraftData falls back to the per-user folders and says so.

* Issue #157: update ATTRIBUTION.toml SHA-256 for the translation catalogs this PR changes

---------

Co-authored-by: Brandon Thomas <echelon@gmail.com>
This commit is contained in:
MarekSpodBiedry
2026-10-08 17:29:59 -04:00
committed by GitHub
co-authored by Brandon Thomas
parent acb8e96aff
commit 2f42c743b9
18 changed files with 239 additions and 18 deletions
+5 -1
View File
@@ -5,7 +5,7 @@
.DESCRIPTION
Produces, in $env:DIST (default: dist/release):
pdfcraft-<version>-windows-<arch>.msi per-machine installer (WiX v5)
pdfcraft-<version>-windows-<arch>-portable.zip pdfcraft.exe + pdfcraft-cli.exe
pdfcraft-<version>-windows-<arch>-portable.zip pdfcraft.exe + pdfcraft-cli.exe + portable.txt
The binaries link the C runtime statically (+crt-static), so neither the MSI nor the portable
zip needs the Visual C++ redistributable. Signing is delegated to sign.ps1 (skipped with a
@@ -122,6 +122,10 @@ if ($env:CRAFT_FONTS_DIR) {
if (Test-Path $ofl) { Copy-Item $ofl (Join-Path $Portable "OFL-$($_.Name).txt") }
}
}
# portable.txt beside pdfcraft.exe switches on portable mode: settings, logs, recovery files and new
# digital IDs go to PdfCraftData\ next to the exe instead of %APPDATA% (#157; see
# crates/ui-egui/src/portable.rs).
Copy-Item (Join-Path $PSScriptRoot 'portable.txt') $Portable
$Zip = Join-Path $Dist "pdfcraft-$Version-windows-$Arch-portable.zip"
Remove-Item -Force $Zip -ErrorAction SilentlyContinue
Compress-Archive -Path $Portable -DestinationPath $Zip
+9
View File
@@ -0,0 +1,9 @@
PdfCraft portable mode
While this file sits next to pdfcraft.exe, PdfCraft keeps its settings, log files, crash-recovery
autosaves and new digital IDs in the PdfCraftData folder beside it, and writes nothing to
%APPDATA% or %LOCALAPPDATA%. Copy the whole folder to move PdfCraft with its settings.
Delete this file to use the normal per-user folders (%APPDATA%\PdfCraft and
%LOCALAPPDATA%\PdfCraft) instead. If PdfCraftData can't be written (for example on a read-only
drive), PdfCraft says so and uses the per-user folders instead.