-
-
Notifications
You must be signed in to change notification settings - Fork 1
02 getting started
- OS: Windows 10 / 11, x64 or ARM64
- Runtime: .NET 10.0 Desktop Runtime
-
Bundled executables (shipped with the app, must stay next to
BatchConvertToCHD.exe):- Windows:
chdman.exe/chdman_arm64.exe(0.289) — MAME CHD tool (primary encoder and extraction fallback);7za.exe/7za_arm64.exe— 7-Zip fallback extractor - Linux/macOS:
7zz(official 7-Zip 26.03 console build, copied fromtools/at publish time) — 7-Zip fallback extractor
- Windows:
- Built-in encoder: CHDSharp (CHDSharpLib 1.4.3) runs in-process on every platform — the automatic fallback behind chdman on Windows and the only encoder on Linux/macOS. Its output is byte-identical to chdman 0.289, and being a managed assembly there is no encoder executable to ship.
-
Nothing else to install — CSO, ISZ, ECM, Alcohol
.mds/.mdfand split volume sets are all handled inside the application, so x64 and ARM64 get the same feature set.
- .NET SDK 10.0.x (
global.jsonpins10.0.0withrollForward: latestMajor) - No Windows SDK required — Avalonia 12.1 and the Windows-only NAudio package are restored via NuGet, and the project sets
EnableWindowsTargetingfor the Windows TFM - No other global tools required
- Download the latest binary from the Releases page.
- Extract the contents to a permanent folder (do not run from a temp/Downloads folder if you want update/self-containment to behave).
-
Important (Windows): keep all
.exefiles (including ARM64 variants) in the same directory asBatchConvertToCHD.exe— tool discovery probes the app's base directory first, thenPATH(MainWindow.axaml.cs). On Linux and macOS,7zzships next to the app and other tools are discovered onPATH; the built-in CHDSharp encoder needs nothing on disk. - Launch
BatchConvertToCHD.exe.
# Clone
git clone https://github.com/purelogiccode/BatchConvertToCHD.git
cd CSharp_BatchConvertToCHD
# Build the whole solution
dotnet build CSharp_BatchConvertToCHD.sln -c Release
# Run the tests
dotnet test CSharp_BatchConvertToCHD.sln -c Release
# Or just the application
dotnet build BatchConvertToCHD/BatchConvertToCHD.csproj -c ReleaseThe solution contains seven projects:
| Project | Kind | Target framework |
|---|---|---|
BatchConvertToCHD |
Avalonia application (WinExe) | net10.0;net10.0-windows |
BatchConvertToCHD.Tests |
xUnit test suite | net10.0-windows |
MDSSharp |
class library (Alcohol 120% .mds/.mdf parsing) | net8.0;net9.0;net10.0 |
CCDSharp |
class library (CloneCD parsing) | net8.0;net9.0;net10.0 |
CSOSharp |
class library (CSO decompression) | net8.0;net9.0;net10.0 |
PBPSharp |
class library (PBP/SFO parsing) | net8.0;net9.0;net10.0 |
ISZSharp |
class library (ISZ decompression) | net8.0;net9.0;net10.0 |
Note: on Windows,
chdman.exeand7za.exeare copied to the output directory by the build (BatchConvertToCHD.csproj); on Linux and macOS the matchingtools/7zz*binary (official 7-Zip 26.03) is copied as7zz, while achdmanonPATHis only used for extraction fallback and never for encoding. The libraries are referenced as project references, not NuGet packages, exceptCHDSharp(NuGet 1.4.3) and other packages listed below.
| Package | Version | Purpose |
|---|---|---|
| CHDSharp | 1.4.3 | Pure C# CHD reading, verification, extraction, and creation (chdman byte-identical output) |
| Avalonia (+ Desktop, Fluent theme, DataGrid) | 12.1.x | Cross-platform Fluent Design UI framework and controls |
| SharpCompress | 0.50.x | Archive extraction (7z/rar), and bzip2 decompression for ISZ chunks |
| NAudio | 3.1.0 | MP3 decoding via Media Foundation |
| Serilog | 4.4.0 | Structured logging |
| Serilog.Sinks.File | 7.0.0 | Rolling file logs |
| Serilog.Sinks.Debug | 3.0.0 | Debugger sink |
| SharpZipLib | 1.4.2 | Reference-compatible inflater for PBP PSAR blocks (via PBPSharp) |
| Meziantou.Analyzer | 3.0.x | Roslyn analyzers (build-time only) |
| Roslynator.Analyzers | 5.0.0 | Roslyn analyzers (build-time only) |
The application accepts an optional folder path argument to pre-populate the Convert to CHD source folder:
BatchConvertToCHD.exe "C:\ROMs\MyGames"The path is applied in MainWindow_LoadedAsync via SetInputFolder (MainWindow.axaml.cs:148–153).
- The built-in CHDSharp encoder is always available, so a batch can never be refused for a missing encoder. On Windows only, when the bundled
chdman.exeis missing or fails the startup probe, a notice explains that every conversion will run on the built-in encoder (status bar indicators + a message box). - Usage statistics are recorded once (anonymous
{ applicationId, version }POST — see Services Reference). - An update check against GitHub releases runs in the background.
- Leftover temp directories from crashed sessions and legacy files are cleaned up after a short delay.
Only one instance can run: a global mutex Global\BatchConvertToCHD_SingleInstance is acquired at startup; a second launch shows "Another instance of BatchConvertToCHD is already running." and exits (App.axaml.cs:80–105).
- Open the Convert to CHD tab.
- Source Files → browse to your folder of images/archives.
- Output CHD → browse to your target folder.
- Click Start Conversion.
Files appear in the list pre-selected; uncheck any you want to skip. The log pane shows live chdman output; the status bar and stat cards show progress, speed, and elapsed time.
See the User Guide for all options and the other two workflows (extraction and verification).