Output directory is now derived from the input .app path (without
extension) instead of the intermediate VHD filename.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace Set-VHD + Merge-VHD PowerShell cmdlets with a pure Rust
MergedVhdReader that overlays delta blocks on the base VHD using
the sector bitmap to decide which sectors come from which disk.
No actual merge to disk needed — reads directly from both files.
- No admin privileges or UAC prompts required
- No Hyper-V or PowerShell dependency
- Cross-platform (works on Windows and Unix)
- Remove #[cfg(windows)] from merge/extract path
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move VHD parsing and NTFS extraction to src/vhd.rs
- Replace all hardcoded magic values with named constants
- Extract shared progress bar style to constant
- Simplify main.rs merge/resolve logic with helper functions
- Condense formatting without changing behavior
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace PowerShell-based VHD mounting (Set-VHD/Mount-VHD/Copy-Item)
with a pure Rust implementation. New src/vhd.rs module:
- VhdReader<R> parses fixed and dynamic VHD formats
- Handles MBR partition tables and NTFS offset detection
- Dynamic VHD support with BAT (Block Allocation Table) parsing
- Recursive NTFS directory extraction with timestamp preservation
- No elevation, no Hyper-V, works cross-platform
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After decryption and merging, VHDs are now mounted via Hyper-V,
their contents copied to a same-named folder (excluding system
dirs), then dismounted and deleted. Handles partitions without
drive letters by assigning one temporarily. Uses a temp .ps1
script to avoid nested PowerShell quoting issues.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When no base VHD is found, fsdecrypt now also searches for the base
.app file ({game_id}_*_0.app) in the same directory, extracts its
VHD, and then merges the delta into it automatically.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When only a delta .app is provided without the base, fsdecrypt now
scans the same directory for an existing base VHD matching the
game ID pattern ({game_id}_*_0.vhd) before giving up.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When multiple APP files are provided (base seq=0 + delta seq>0),
fsdecrypt now automatically links and merges the differencing VHD
into the parent using Set-VHD + Merge-VHD (Windows/Hyper-V only).
Triggers a single UAC prompt for elevation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>