First-run disc image installer: pick your ISO, everything else is automatic - #27
First-run disc image installer: pick your ISO, everything else is automatic#27Alexbeav wants to merge 3 commits into
Conversation
Extract the XDVDFS game partition of a user-supplied Xbox 360 disc image straight into game_data_root on first launch, so a fresh install is: run the game, pick your .iso, play. Redump (XGD2), XGD3, and bare game-partition images are supported; extraction resumes if interrupted and preserves already-extracted files. After extraction the wizard best-effort auto-stages Title Update 1 via the existing download path, so the usual first run needs exactly one user action. If TU staging fails (offline), the existing TU wizard still appears on next boot as the fallback. Also honor DOWNPOUR_INSTALL_ISO / DOWNPOUR_INSTALL_TU env overrides in OnFinalizePaths for headless installs (the TU override previously only existed in RunTitleUpdateInstallWizardBlocking, which the app never calls), and factor the post-install process relaunch into a shared RelaunchSelfOrResume helper.
default.xex is the install-complete marker (IsGameDataInstalled), so it must be the final file written: if extraction dies midway, the next launch re-opens the installer and the skip-existing logic finishes the remaining files in seconds instead of booting with a partial tree.
|
Thanks — this is a well-put-together PR. The XDVDFS reader is correct against the layouts I checked (Redump XGD2 base, XGD3, bare partition dumps), the resume-by-size + 1. Path traversal in extraction paths. 2. macOS branch is empty. 3. Unbounded directory recursion. Minor, non-blocking: No conflicts with anything in flight on our side. With 1–3 addressed I'm happy to merge. |
|
Thank you for the careful review. I accepted all of the comments and have submitted a correction that follows them, including the three requested fixes and the suggested XEX2 validation. Appreciate the clear, actionable feedback, and thank you for the project as a whole! |
First-run disc image installer: pick your ISO, everything else is automatic
What this does
Fresh installs currently require the user to produce the extracted
assets/tree themselves before the game will boot. This PR teachesdownpour.exeto do it: whenassets/default.xexis missing at startup, a wizard (sameAcquireWizardDialogpattern as the existing Title Update 1 installer) asks for the user's Silent Hill: Downpour Xbox 360 disc image and extracts the XDVDFS game partition straight intogame_data_root, with byte progress. After extraction it best-effort auto-stages TU1 through the existing download path, so the typical first run is exactly one user action:run
PlayDownpour.exe→ Play → select your.iso→ wait ~2 minutes → playing.If TU staging fails (offline, mirror down — see #19), the existing TU wizard still appears on the next boot, unchanged, as the fallback.
Details
src/downpour_iso_installer.{h,cpp}— new. A minimal read-only XDVDFS (GDF) reader in the same style as the existingStfsPackageReader: directory tables are AVL trees of 4-byte-aligned entries, files are contiguous sector runs, so extraction is a seek + copy per file, sorted by disc position for sequential reads. Supports Redump-style full images (game partition at0xFD90000), XGD3 (0x2080000), and bare game-partition dumps (offset0). Rejects images with nodefault.xexat the partition root with a clear message — separating "wrong/bad dump" from "broken install" at the earliest possible point (would have shortcut the diagnosis in disk read error need help #6).default.xex— the install-complete markerIsGameDataInstalledkeys off — is extracted last, so an interrupted extraction re-opens the installer on the next launch and finishes the remaining files in seconds instead of booting with a partial tree.OnFinalizePathsnow chains: game data missing → ISO wizard; TU missing → TU wizard (unchanged). It also honorsDOWNPOUR_INSTALL_ISO=<path>andDOWNPOUR_INSTALL_TU=<path|download>for headless installs — the TU env override previously lived only inRunTitleUpdateInstallWizardBlocking, which the app never calls, so it was dead code in practice.RelaunchSelfOrResume— the post-install process-restart block (the Win32 LaunchModule-hang workaround) is factored out of the TU wizard's completion lambda and shared by both wizards. No behavior change.Testing
Built against
rexglue-sdk-dpourdpour-main(public HEAD) with the merged TU1 XEX (produced with XenonRecomp'sXexPatcher, per thedownpour_manifest.tomlnote). All runs on Windows 11, i9-13900K + RTX 4070 Ti, USA/Europe Redump image (7.3 GiB, game partition 1331 files / 4.49 GiB):DOWNPOUR_INSTALL_ISO=<path>+DOWNPOUR_INSTALL_TU=download): emptyassets/→ full extraction in ~105 s → TU1 downloaded and staged (payload SHA-256 matches thekPayloadswhitelist) → runtime constructs → game boots to the main menu at 60 FPS. Fully unattended.default.xexand two other files removed to simulate a mid-extraction kill, relaunch restored exactly the missing files in 0.6 s (1329 files skipped by the size check) and booted.The selected file is not an Xbox 360 disc image (no XDVDFS game partition found)and falls through to the wizard; an image withoutdefault.xexat the partition root is rejected as not a Downpour disc.The XDVDFS layout handling (partition base detection, AVL walk, sector math) was additionally validated standalone against the real Redump image before being ported into the wizard. The interactive wizard path shares
InstallGameDataFromIsowith the headless path and uses the sameAcquireWizardDialogflow as the existing TU installer.