DotnetPackaging.Formats.Dmg.Iso
0.0.9
dotnet add package DotnetPackaging.Formats.Dmg.Iso --version 0.0.9
NuGet\Install-Package DotnetPackaging.Formats.Dmg.Iso -Version 0.0.9
<PackageReference Include="DotnetPackaging.Formats.Dmg.Iso" Version="0.0.9" />
<PackageVersion Include="DotnetPackaging.Formats.Dmg.Iso" Version="0.0.9" />
<PackageReference Include="DotnetPackaging.Formats.Dmg.Iso" />
paket add DotnetPackaging.Formats.Dmg.Iso --version 0.0.9
#r "nuget: DotnetPackaging.Formats.Dmg.Iso, 0.0.9"
#:package DotnetPackaging.Formats.Dmg.Iso@0.0.9
#addin nuget:?package=DotnetPackaging.Formats.Dmg.Iso&version=0.0.9
#tool nuget:?package=DotnetPackaging.Formats.Dmg.Iso&version=0.0.9
Dotnet.Dmg
Pure .NET tooling to craft macOS DMG images without external macOS tooling.
Highlights
- Build ISO9660 layouts with Rock Ridge entries in memory and wrap them into UDIF DMGs
- Dual compression support: UDBZ (bzip2) and UDZO (zlib) - 100% managed code via SharpCompress
- Minimal Mach-O ad-hoc signer to stamp executables and dylibs during packaging
- CLI helper to turn a published folder into a
.appbundle inside a DMG, includingInfo.plistandPkgInfo - Targets .NET 10; no native dependencies or platform-specific tooling required
- Structurally compatible with industry-standard DMGs (verified against Parcel output)
Quick start
Publish your app for macOS:
dotnet publish -c Release -r osx-arm64 -p:PublishSingleFile=true -p:SelfContained=true -o ./publishBuild the DMG (app name is optional; defaults to the input folder name with
.appappended):dotnet run --project Dotnet.Dmg.App -- ./publish ./MyApp.dmg MyGreatAppThe tool uses bzip2 compression by default for optimal file size.
Mount
MyApp.dmgon macOS to verify the bundle layout and ad-hoc signatures.
Projects
Dotnet.Dmg.App: Console entry point that wires the builders together and emits the final DMG from a publish folder.Dotnet.Dmg.Iso: ISO9660 + Rock Ridge builder with directory, file, and symlink support.Dotnet.Dmg.Udif: UDIF writer that produces compressed DMG streams from an ISO image.Dotnet.Dmg.MachO: Lightweight Mach-O parser and ad-hoc code signer used by the CLI.Dotnet.Dmg.Tests: xUnit test suite covering the core libraries.
NuGet packaging
- Shared package metadata (authors, license, repo URL, tags, README) lives in
Directory.Build.propsand is picked up by every packable project. - The root
README.mdis packed into the generated.nupkgfiles viaPackageReadmeFile. - Build packages locally with
dotnet pack -c Release;Dotnet.Dmg.Testsis excluded viaIsPackable=false.
Features
Compression
- UDBZ (bzip2): Default compression, better ratios (~4% smaller than zlib)
- UDZO (zlib): Alternative compression, faster but larger output
- Both implemented as 100% managed code (no P/Invoke or native dependencies)
Programmatic Usage
using Dotnet.Dmg.Udif;
var writer = new UdifWriter
{
CompressionType = CompressionType.Bzip2 // or CompressionType.Zlib
};
writer.Create(isoStream, dmgStream);
Known gaps
- Large file support is limited by the ISO builder using 32-bit lengths (roughly 2 GB per entry)
- Only Rock Ridge extensions are emitted; Joliet and El Torito are not implemented
- DMG signing of the container itself is not implemented; only ad-hoc signing of Mach-O binaries occurs
- Optional metadata (checksums, size info) not yet implemented
Contributing
- Run
dotnet testto validate changes. - Open issues or PRs with ideas for better compression, real code signing, or broader ISO support.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Zafiro.DivineBytes (>= 44.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DotnetPackaging.Formats.Dmg.Iso:
| Package | Downloads |
|---|---|
|
DotnetPackaging.Formats.Dmg.Udif
Pure .NET tooling to craft macOS DMG images (ISO9660 + UDIF) without external dependencies. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Commit: 0cc3178fa68386e267be495dbe4ca96cc65e766b\nSummary: Merge branch 'add-rockridge-er-entry'\nChanges since 0.0.8 (356a25a7c1da7b2d5d4c7ac5adb2bb3485912886):\n\- 0cc3178 Merge branch 'add-rockridge-er-entry'\n\- 8549c98 Add Rock Ridge ER entry to root record