Create Mac OSX DMG files from C# on Windows?

S

Samuel R. Neff

Does anyone have a suggestion for how to create a Mac OSX .DMG file
from a C# app running on Windows? Searching online is not turning up
a lot of options.

Or is there some better alternative format? We're looking for
something like a self extracting zip for mac? Problem with a plain
zip by itself is user would have to extract all the files somewhere to
run and have relative file references resolve properly.

Thanks,

Sam
 
S

Samuel R. Neff

We're not targeting Mac entirely--only a small subset of users are on
the mac. We have an app that runs in ASP.NET on a Windows server and
would like to be able to serve up some files packaged together as a
dmg.

The spec for DMG is not available/public, so a custom writer is not
really feasible.

The only thing I've found is MagicISO which has a command line tool
that can create dmg's. However, they don't have a redistribution or
even volume license listed on their site so it may not be an option to
include that in an application.

Thanks,

Sam
 
P

Pavel Minaev

We're not targeting Mac entirely--only a small subset of users are on
the mac.  We have an app that runs in ASP.NET on a Windows server and
would like to be able to serve up some files packaged together as a
dmg.

The spec for DMG is not available/public, so a custom writer is not
really feasible.

A .dmg file is just a snapshot of an HFS+ file system, which is
extensively documented by Apple itself:

http://developer.apple.com/technotes/tn/tn1150.html

Also, the actual HFS+-related code in Mac OS X seems to be included in
Darwin (http://developer.apple.com/opensource/), which is released
under a BSD-like license, so with some effort you could probably just
lift it from there, and either port it to VC++ and do a managed
wrapper in C++/CLI, or compile it on MinGW or Cygwin and access that
via P/Invoke.
 
S

Samuel R. Neff

Thanks for the corrections and info.

Sam


A .dmg file is just a snapshot of an HFS+ file system, which is
extensively documented by Apple itself:

http://developer.apple.com/technotes/tn/tn1150.html

Also, the actual HFS+-related code in Mac OS X seems to be included in
Darwin (http://developer.apple.com/opensource/), which is released
under a BSD-like license, so with some effort you could probably just
lift it from there, and either port it to VC++ and do a managed
wrapper in C++/CLI, or compile it on MinGW or Cygwin and access that
via P/Invoke.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top