Skip to content

Add directory input support to dumpsxiso and extract XML writer#74

Open
N4gtan wants to merge 44 commits intoLameguy64:masterfrom
N4gtan:mkxml
Open

Add directory input support to dumpsxiso and extract XML writer#74
N4gtan wants to merge 44 commits intoLameguy64:masterfrom
N4gtan:mkxml

Conversation

@N4gtan
Copy link
Contributor

@N4gtan N4gtan commented Jan 27, 2026

This will be my last PR since I don't think there is much more to do on the tool.

This PR enables dumpsxiso to generate XML projects if a directory path is given.
I opted for a polymorphic approach where the tool automatically detects if the input is a directory or a file, instead of adding a specific argument for directory inputs.

The XML generation logic has been moved from main.cpp into a new dedicated xmlwriter module for better organization.

This PR depends on:

N4gtan added 30 commits January 13, 2026 05:15
Files and subdirectories now automatically inherit the base path from their
parent entry. This allows omitting the `source` attribute, as paths will
be resolved relative to the current directory context.
This introduces the `date` attribute in the XML schema.
- dumpsxiso: Exports the ISO file timestamps into the XML output.
- mkpsxiso: Parses the date from the XML. If not present, it fallsback to the source file's timestamps.
Since IsoReader is utilized in practically all program functions, it made more sense to handle it globally rather than passing it as a parameter everywhere.
…ctions

- Convert signatures to `void` to reflect "fire-and-forget" logic.
- Remove defensive checks for `srcfiles` already validated by `Stat()` upstream.
The previous implementation added unnecessary complexity by handling relative offsets and multiple seek origins (SET/END/CUR) individually.

Normalizing all seek requests to an absolute position reduces code duplication and eliminates fragile relative arithmetic.
The `new_type` attribute was vague. Research confirmed that some late PS1 games (~2003) were built using the Sony CD/DVD-ROM Generator engine logic.

`cdvd_style` accurately describes this behavior.
Rewrite the DA file normalization loop to correctly identify and reuse existing tracks, preventing conflicts between `trackid` and `source` attributes.
Dropped support for prehistoric 32-bit compilers; they wouldn't even be capable of compiling C++20 in the first place.
Since the project is strictly C++, the C support was redundant and unused.
- Rename 'entry' and 'parent' to 'm_entry' and 'm_parent'.
- Remove redundant 'name' member; use m_entry->id instead.
- Move WriteDescriptor to be a member function of DirTreeClass.
- Update WriteDirectoryRecords to rely on internal state.
- Adjust main.cpp to match the updated class constructor and methods.
- Merge GenPathTableSub into GeneratePathTable.
- Remove the unused recursive 'sub' pointer from PathEntryClass.
- Move implementation next to GenTableData to improve code locality and debugging flow.
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.

mkisoxml is missing

1 participant