Commit Graph

1605 Commits

Author SHA1 Message Date
gmipf
9e39a0cf16 Close the cabinet files opened for a cabinet set (#105)
* Close the cabinet files opened for a cabinet set

MicrosoftCabinet.Extract opened the cabinet file again for the set,
together with the previous and next cabinets, and never closed any of
them, so they stayed open until their streams were finalized.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep the original comment on the previous cabinet

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:19:16 -04:00
gmipf
36a67139d9 Add the UDF models (#108)
The ECMA-167 and UDF structures that the UDF reader fills in, split out
of #100. The only change is that the notes on Volume moved from the
summary into the remarks.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 13:31:46 -04:00
gmipf
33caf06bc1 Read ISO 9660 directories in volume order and add a path lookup (#99)
* Read directory extents in volume order

ParseDirectoryDescriptors now keeps one worklist of directory extents for
all volume descriptors, sorted by offset, and always reads the next
extent at or after the last one, wrapping around at the end. Each extent
is read once. The record loop moves to a shared helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add a path lookup for ISO 9660 directory records

FindDirectoryRecords follows a path from the root directory of one
volume descriptor and reads only the directories on that path. Names
are compared case-insensitively, without the version suffix or a
trailing period. A file recorded in several extents returns all of its
records.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 11:00:54 -04:00
Matt Nadareski
f639f7ac24 Strip out MS-CAB extraction test even further
This will make it so that exceptions are surfaced directly into the test log and cancel right away. It effectively does the same thing as capturing the error log and redirecting it, but with many less steps.
2026-10-26 09:52:32 -04:00
gmipf
11f9bf9fd9 Stop writing after the last file of a cabinet folder (#107)
* Stop writing after the last file of a cabinet folder

When the last data block of a folder held the end of two or more files,
WriteData still wrote the rest of the block after EndFile had closed the
last file, which threw an ObjectDisposedException. It now returns there,
as it already does when the first file in a block ends the folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Simplify the console check in the cabinet extraction test

Extract catches the ObjectDisposedException and only writes it to
Console.Error, so the test still reads the console, but without the
try/finally. It now fails with the whole exception as its message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:46:10 -04:00
gmipf
373cf2d752 Replace invalid filename characters in Wise dialog names (#106)
The file of a custom dialog is named after the dialog name from the
script, which is free text. On Windows, a name like "Install under NT?"
is not a valid filename, so writing the file threw an IOException and
stopped the extraction.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 21:32:34 -04:00
gmipf
dc18951d0b Close the Wise script and the multipart file after extraction (#104)
* Look for the Wise overlay header before opening the file again

ExtractWiseOverlay (and ExtractWise for NE) opened a second stream on
the executable for multi-part Wise installers before checking for a
Wise overlay header at all. For any other executable that stream was
never closed, so the file stayed open until the stream was finalized.
On Windows such a file cannot be deleted, so an extraction folder that
contains it is left behind in TEMP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Close the Wise script and the multipart file after extraction

ExtractWiseOverlay (and ExtractWise for NE) never closed WiseScript.bin,
which it opens from the output directory, nor the stream with the
installer and its parts, so these files stayed open until their streams
were finalized.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep the original block that opens the multipart file

Close the multipart stream with a separate using declaration after the
block instead of rewriting it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 21:30:32 -04:00
gmipf
29b9d27c33 Look for the Wise overlay header before opening the file again (#103)
ExtractWiseOverlay (and ExtractWise for NE) opened a second stream on
the executable for multi-part Wise installers before checking for a
Wise overlay header at all. For any other executable that stream was
never closed, so the file stayed open until the stream was finalized.
On Windows such a file cannot be deleted, so an extraction folder that
contains it is left behind in TEMP.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 09:50:21 -04:00
gmipf
f6ade446c6 Locate the PKZIP file data instead of reading it into the model (#102)
* Locate the PKZIP file data instead of reading it into the model

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep only the offset of the PKZIP file data

The length is the compressed size from the local file header or the ZIP64
extended field, which the printer already shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep the file data property as a comment for documentation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 21:04:01 -04:00
gmipf
6238fcbb46 Format refresh and freq with the invariant culture (#101)
The DAT writers and the filter formatted Refresh and Freq with the
current culture, so a German or French system wrote "123,450000".
SabreTools.IO parses these values with the invariant culture.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 19:49:12 -04:00
gmipf
2f6698edac Parse the big-endian directory extent only when ambiguous (#98)
ParseDirectory parsed the big-endian extent when the extent location
was valid (both values equal) instead of when it was ambiguous, so
every directory was parsed again, once per directory level.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 21:16:14 -04:00
Matt Nadareski
04e8751f9b Update packages 2026-10-12 09:56:31 -04:00
Matt Nadareski
7262f74f7f Enable versions in publish script 2026-09-21 09:17:22 -04:00
Matt Nadareski
0b6af978ff Check for "null" literal string cases 2026-09-18 11:01:40 -04:00
Matt Nadareski
2cacaac9fd Make size an optional output for CMP and Logiqx 2026-09-18 10:56:30 -04:00
Matt Nadareski
d39d8f9b61 Allow sizeless ROMs if there's a SHA-1 or SHA-256 2026-09-18 10:54:32 -04:00
Matt Nadareski
09fd38e776 Allow sizeless ROMs if there's a SHA-1 or SHA-256 2026-09-18 10:47:36 -04:00
Matt Nadareski
db2a6f63ff Allow sizeless ROMs if there's a SHA-1 or SHA-256 2026-09-18 10:44:56 -04:00
Matt Nadareski
d9dd16fbb9 Fix OpenMSX rom attribute parsing 2026-09-18 10:34:40 -04:00
Matt Nadareski
3c0c31cf10 Use SHA-1 as placeholder name for OpenMSX 2026-09-18 10:27:46 -04:00
Matt Nadareski
d9bf16deef OpenMSX has changed a bit 2026-09-18 10:15:54 -04:00
Matt Nadareski
3798dbcb47 Bump version 3.2.0 2026-08-31 19:15:36 -04:00
Matt Nadareski
2a70a9a20e Update IO to 2.3.0 2026-08-28 13:11:31 -04:00
Matt Nadareski
6f92f85f5d Convert BFPK writing to use GrindCore zlib 2026-08-27 14:01:50 -04:00
Matt Nadareski
b7851601a4 Convert GCZ writing to use GrindCore zlib 2026-08-27 13:59:38 -04:00
Matt Nadareski
cb2a96c413 Convert GCZ to use GrindCore zlib 2026-08-27 13:57:49 -04:00
Matt Nadareski
69c0843a0d Convert GZip to use GrindCore zlib 2026-08-27 13:56:09 -04:00
Matt Nadareski
0171ea9da7 Convert IS-CAB to use GrindCore zlib 2026-08-27 13:53:23 -04:00
Matt Nadareski
e493af25e0 Convert CExe to use GrindCore zlib 2026-08-27 12:37:26 -04:00
Matt Nadareski
62427576e9 Convert SGA to use GrindCore zlib 2026-08-27 12:30:01 -04:00
Matt Nadareski
e80ea00872 Update packages 2026-08-27 09:36:42 -04:00
Matt Nadareski
ce1cd15978 Fix locking issues with item dictionary implementation 2026-08-11 22:04:32 -04:00
HeroponRikiBestest
2a604bd73a Ensure that the data being read is actually large enough to have a debug directory entry parsed from it (#96) 2026-07-30 20:44:49 -04:00
Matt Nadareski
bcc0a5bd1e Add set type RomVault game extension field 2026-07-23 17:03:14 -04:00
Matt Nadareski
32d9e8a09d Add dir RomVault header extension field 2026-07-23 16:45:12 -04:00
Matt Nadareski
d0f5ac322d Add subset RomVault header extension field 2026-07-23 16:15:27 -04:00
Matt Nadareski
05c86e4c24 Add support for BLAKE3 2026-07-23 11:36:54 -04:00
Matt Nadareski
1d76967a08 Ignore bad IS-CAB group names 2026-07-19 21:09:59 -04:00
Matt Nadareski
b9ffd61252 Bump version 3.1.0 2026-07-10 13:29:35 -04:00
Matt Nadareski
b4e1f6b729 Update packages, relax requirements 2026-07-10 11:23:17 -04:00
Matt Nadareski
451fc0b394 Bump version 3.0.1 2026-07-06 09:57:11 -04:00
HeroponRikiBestest
79ca9f617e Add sim parsing for Steam2 sim/sid installers (#95)
* Add model for sim file

* Add sim parsing for steam2 installer set

* First round of fixes
2026-07-06 09:21:17 -04:00
Matt Nadareski
a602686551 Trim path separators from start of filenames on extract 2026-07-05 23:28:24 -04:00
Matt Nadareski
4083aed12f Some filenames in MS-CAB start with one or more separators 2026-07-01 10:18:20 -04:00
Matt Nadareski
717de3608c Add Logiqx serial and version machine fields 2026-06-22 16:35:03 -04:00
Matt Nadareski
88aae0dd26 Bump version 3.0.0 2026-06-12 08:56:35 -04:00
Matt Nadareski
499fc44004 Ensure a 2-byte read is possible 2026-06-07 21:56:17 -04:00
Matt Nadareski
07325be930 Clean up parameter 2026-05-29 22:27:27 -04:00
Matt Nadareski
481020bd08 Move useful helper to a better place 2026-05-22 09:24:03 -04:00
Matt Nadareski
5642f601a3 Minor cleanup 2026-05-21 10:38:38 -04:00