First-run disc image installer: pick your ISO, everything else is automatic - #4
Open
Alexbeav wants to merge 2 commits into
Open
First-run disc image installer: pick your ISO, everything else is automatic#4Alexbeav wants to merge 2 commits into
Alexbeav wants to merge 2 commits into
Conversation
Fresh installs no longer need a manual extract-xiso/xdvdfs run: when Assets/default.xex is missing at startup, an installer wizard asks for the user's Condemned 2: Bloodshot disc image and extracts its XDVDFS game partition into the Assets folder, then restarts into the game. - Minimal read-only XDVDFS (GDF) reader; accepts Redump full images (game partition at 0xFD90000), XGD3 images (0x2080000), and bare partition dumps. - Resumable: files already present with the right size are skipped, and default.xex is written last so it doubles as the install-complete marker. - Skips the disc's $SystemUpdate dashboard payload and validates free disk space before extracting. - CONDEMNED2_INSTALL_ISO env var installs headlessly for unattended setups. - Wizard UI (wizard_screen, acquire_wizard_dialog) vendored from the ReXGlue SDK overlay used by other recomps; drop once the stock SDK ships it. Mirrors the disc image installer of LittleBitUA/DownpourRecomp and mchughalex/skate3recomp.
The stock SDK only registers a 10 px bitmap font, which upscales poorly to the wizard's heading sizes. Load the platform UI font (Segoe UI on Windows, DejaVu/Noto/Liberation on Linux) through the OnConfigureFonts hook, falling back to the default font when none is found. Also drop a non-ASCII dash the default font cannot render from the wizard intro.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 (extract-xiso / xdvdfs) before the game will boot. This PR teachescondemned2recomp.exeto do it: whenAssets/default.xexis missing at startup, a full-screen wizard asks for the user's Condemned 2: Bloodshot Xbox 360 disc image and extracts the XDVDFS game partition straight intogame_data_root, with byte progress. The typical first run becomes exactly one user action:run
condemned2recomp.exe→ select your.iso→ wait ~2 minutes → playing.Same first-run installer pattern as LittleBitUA/DownpourRecomp (LittleBitUA/DownpourRecomp#27) and mchughalex/skate3recomp — Condemned 2 is simpler since there is no Title Update step to chain.
Details
src/condemned2recomp_iso_installer.{h,cpp}— new. A minimal read-only XDVDFS (GDF) reader: 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— what Condemned 2's XGD2 disc uses), 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.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 under a second instead of booting with a partial tree.$SystemUpdateskipped — the disc's dashboard update payload is meaningless to the recomp, so it never lands inAssets/.OnConfigurePathsnow defaultsgame_data_roottoAssets/even when the game files are not there yet, so the installer knows where to extract;OnFinalizePathsgates the boot: game data present → boot, missing → wizard. It also honorsCONDEMNED2_INSTALL_ISO=<path>for headless/unattended installs.src/ui/wizard_screen.{h,cpp},src/ui/acquire_wizard_dialog.{h,cpp}— the wizard UI, vendored from the ReXGlue SDK overlay the other recomps use (mchughalex/rexglue-skate3,LittleBitUA/rexglue-sdk-dpour). This repo builds against the stock SDK 0.9.0, which doesn't ship it yet; the files are kept inrex::uiwith attribution notes so they can be dropped verbatim once the stock SDK gains the overlay. Two local changes: the stockImGuiDrawerhas noui_font*()accessors, and the stock SDK only registers a 10 px bitmap font — soConfigureWizardFonts()(wired through the existingOnConfigureFontshook) loads the platform UI font (Segoe UI on Windows, DejaVu/Noto/Liberation on Linux) with a clean fallback to the default font.Testing
Built against the prebuilt
rexglue-sdkv0.9.0 win-amd64 release package with Clang 22, Windows 11, RTX 4070 Ti, USA/Europe Redump image (7.3 GiB, game partition 86 files / 6.78 GiB):CONDEMNED2_INSTALL_ISO=<path>, emptyAssets/): full extraction — 85 files, 6935 MiB in ~110 s ($SystemUpdatecorrectly skipped) — then the runtime constructs and the game boots straight to gameplay. Fully unattended.default.xexand one other file removed to simulate a mid-extraction kill, relaunch restored exactly the missing files in 0.5 s (83 files skipped by the size check) and booted.CONDEMNED2_INSTALL_ISOat a non-ISO file logsThe selected file is not an Xbox 360 disc image (no XDVDFS game partition found)and falls through to the wizard, which shows the pick-your-ISO screen with the install directory row.InstallGameDataFromIsowith the headless path.