471,349 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

Create Mac OSX DMG files from C# on Windows?


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
------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.
Aug 14 '08 #1
4 5434
On Thu, 14 Aug 2008 09:27:59 -0700, Samuel R. Neff <sa********@nomail.com>
wrote:
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.
There wouldn't be any built-in support for that. But assuming you can
manage writing the format explicitly yourself, of course .NET has the
FileStream and BinaryWriter classes that would be useful in doing that.

Of course, it begs the question: if you're targeting the Mac OS, why not
write your tool in Cocoa and run it on the Mac. But since you're here in
the C# newsgroup, I suppose you've already been through that and have
decided against it. :)

Pete
Aug 14 '08 #2
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
On Thu, 14 Aug 2008 09:31:14 -0700, "Peter Duniho"
<Np*********@nnowslpianmk.comwrote:
>On Thu, 14 Aug 2008 09:27:59 -0700, Samuel R. Neff <sa********@nomail.com>
wrote:
>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.

There wouldn't be any built-in support for that. But assuming you can
manage writing the format explicitly yourself, of course .NET has the
FileStream and BinaryWriter classes that would be useful in doing that.

Of course, it begs the question: if you're targeting the Mac OS, why not
write your tool in Cocoa and run it on the Mac. But since you're here in
the C# newsgroup, I suppose you've already been through that and have
decided against it. :)

Pete
------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.
Aug 14 '08 #3
On Aug 14, 9:02*pm, Samuel R. Neff <samueln...@nomail.comwrote:
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.
Aug 14 '08 #4

Thanks for the corrections and info.

Sam
On Thu, 14 Aug 2008 10:24:14 -0700 (PDT), Pavel Minaev
<in****@gmail.comwrote:
>On Aug 14, 9:02*pm, Samuel R. Neff <samueln...@nomail.comwrote:
>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.
------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.
Aug 14 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by James Proctor | last post: by
9 posts views Thread by fishbaugher | last post: by
1 post views Thread by James Proctor | last post: by
2 posts views Thread by Auddog | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.