Skip to content

Let the user choose where temporary work files go - #3

Merged
itsmemac merged 1 commit into
itsmemac:mainfrom
kopihitam:feature/custom-temp-folder
Nov 12, 2026
Merged

itsmemac merged 1 commit into
itsmemac:mainfrom
kopihitam:feature/custom-temp-folder

Conversation

@kopihitam

Copy link
Copy Markdown
Contributor

Closes #2

Problem

Converting an image (for example exFAT to ZArchive), converting a package to an image, and editing the details of an FFPFSC image or a package all unpack the whole game first. Those work files always went to the system temporary folder, so a big game could fill the C: drive and the job failed with "disk full".

What changes

  • Settings > Output and naming > Temporary folder, with Browse. Blank keeps the system temporary folder, so nothing changes for people who don't set it.
  • "Keep temporary files next to the output instead": work files go in a .Packwright-<job>-<id> folder beside the output, on the same drive. This is the same naming the exFAT and FFPKG edit staging already use. Ticking it greys out the folder box.
  • Command line: jobs follow the saved setting, and --temp <folder> overrides it for one run (listed in help).
  • No silent fallback: if the chosen folder can't be created, the job fails with a message naming the folder instead of writing to the system drive. Only each job's own subfolder is deleted, never the folder the user chose.
  • Library scan: files inside .Packwright-* work folders are skipped, so a half-unpacked game or an image copy sitting next to an output isn't listed as a title. This also covers the existing .Packwright-exfat-edit- and .Packwright-ffpkg-edit- folders.
  • The setting takes effect as soon as Settings is saved, without a restart.

The shared helper is TemporaryFolders in Packwright.Containers. It's set up the same way as the key file: the app configures it from settings at startup and on every settings change, and the command line configures it before running a job.

Not changed: the unused ToolPreset.TempDirectory field is left in place so old settings files still load (presets never hold paths), and ProsperoPfsImage.VerifyRoundTrip still uses system temp because nothing calls it.

Testing

  • New smoke test, 13 checks, no game needed (it builds a small dump):
    dotnet run --project tests/Packwright.SmokeTests -c Release -- temp-folders <work folder>
    
    It covers where job folders are made, exFAT to ZArchive conversion with a chosen folder and next to the output (nothing left behind), conversion and details edit failing on an unusable folder, and the library scan skipping work folders.
  • Command line checked by hand with a good and a bad --temp, a saved folder, and the "next to the output" setting.
  • The Settings screen was rendered and driven offscreen with Avalonia.Headless (15 checks): the controls, the greying out, the full-path check, saving, applying straight away, and reopening.
  • Not tested: package-to-image conversion and editing a real package, because those need an actual PS5 package.

🤖 Generated with Claude Code

Converting an image, converting a package to an image, and editing the
details of an FFPFSC image or a package unpack the whole game first. That
always went to the system temporary folder, which could fill the C: drive.

- Settings > Temporary folder picks another folder; blank keeps the system
  temporary folder. "Keep temporary files next to the output instead" puts
  them in a .Packwright-* folder beside the output, on the same drive.
- The command line follows the setting, and --temp <folder> overrides it.
- A folder that cannot be created fails the job with a message naming it,
  instead of falling back to the system drive. Only each job's own
  subfolder is deleted, never the chosen folder.
- The library scan skips .Packwright-* work folders, so a half-unpacked
  game next to an output is not listed as a title.
- New smoke test: SmokeTests temp-folders <work folder>.

Closes itsmemac#2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@itsmemac
itsmemac merged commit db11329 into itsmemac:main Nov 12, 2026
itsmemac added a commit that referenced this pull request Nov 12, 2026
Each release now also ships Packwright-v<version>-linux-x64.pkg.tar.zst
(Arch, Manjaro, EndeavourOS) and a self-contained
Packwright-v<version>-linux-x64.AppImage that runs on any 64-bit
distribution. Closes #4.

- build-packages.sh builds the Arch package directly (.PKGINFO, .MTREE,
  root-owned files under fakeroot, zstd, license under
  /usr/share/licenses), the same layout makepkg writes, and the AppImage
  from a pinned, checksum-verified type 2 runtime plus a zstd squashfs.
- Every packaged file is made readable by everyone: a publish can leave
  libraries as rwxr--r--, which only root could load (affects the .deb
  and .rpm too).
- check-packages.sh installs the Arch package with pacman in an Arch
  container (pacman -Qkk, packwright version as a normal user, removal)
  and runs the AppImage before anything is published. The Build workflow
  gets a linux-packages job that runs the same build and checks without
  releasing.
- The update window offers the AppImage when running from one, the Arch
  package on Arch-based systems and the AppImage on any other
  distribution, and makes a downloaded AppImage executable.
- New smoke test: update-pick.
- Version 1.2.0 with release notes (also covers the temporary folder
  setting from #3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
itsmemac added a commit that referenced this pull request Nov 12, 2026
Each release now also ships Packwright-v<version>-linux-x64.pkg.tar.zst
(Arch, Manjaro, EndeavourOS) and a self-contained
Packwright-v<version>-linux-x64.AppImage that runs on any 64-bit
distribution. Closes #4.

- build-packages.sh builds the Arch package directly (.PKGINFO, .MTREE,
  root-owned files under fakeroot, zstd, license under
  /usr/share/licenses), the same layout makepkg writes, and the AppImage
  from a pinned, checksum-verified type 2 runtime plus a zstd squashfs.
- Every packaged file is made readable by everyone: a publish can leave
  libraries as rwxr--r--, which only root could load (affects the .deb
  and .rpm too).
- check-packages.sh installs the Arch package with pacman in an Arch
  container (pacman -Qkk, packwright version as a normal user, removal)
  and runs the AppImage before anything is published. The Build workflow
  gets a linux-packages job that runs the same build and checks without
  releasing.
- The update window offers the AppImage when running from one, the Arch
  package on Arch-based systems and the AppImage on any other
  distribution, and makes a downloaded AppImage executable.
- New smoke test: update-pick.
- Version 1.2.0 with release notes (also covers the temporary folder
  setting from #3).
itsmemac added a commit that referenced this pull request Nov 12, 2026
Each release now also ships Packwright-v<version>-linux-x64.pkg.tar.zst
(Arch, Manjaro, EndeavourOS) and a self-contained
Packwright-v<version>-linux-x64.AppImage that runs on any 64-bit
distribution. Closes #4.

- build-packages.sh builds the Arch package directly (.PKGINFO, .MTREE,
  root-owned files under fakeroot, zstd, license under
  /usr/share/licenses), the same layout makepkg writes, and the AppImage
  from a pinned, checksum-verified type 2 runtime plus a zstd squashfs.
- Every packaged file is made readable by everyone: a publish can leave
  libraries as rwxr--r--, which only root could load (affects the .deb
  and .rpm too).
- check-packages.sh installs the Arch package with pacman in an Arch
  container (pacman -Qkk, packwright version as a normal user, removal)
  and runs the AppImage before anything is published. The Build workflow
  gets a linux-packages job that runs the same build and checks without
  releasing.
- The update window offers the AppImage when running from one, the Arch
  package on Arch-based systems and the AppImage on any other
  distribution, and makes a downloaded AppImage executable.
- New smoke test: update-pick.
- Version 1.2.0 with release notes (also covers the temporary folder
  setting from #3).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change temp folder to the one I desire

2 participants