Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / April 2006



Tip: Looking for answers? Try searching our database.

Re-package an app into a 'self extracting/installing' file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Blaze - 26 Apr 2006 01:33 GMT
Hello,
I need to re-package an application which I have the CD for and make it
available as a download.  What I would like is something similar to a
self extracting exe but of course exe for MAC.  What's the best way to
do this?  I'm currently testing DropDMG which will create it into a
disk image.  Any help would be really appreciated!  Thanks!
Michael Ash - 26 Apr 2006 04:07 GMT
> Hello,
> I need to re-package an application which I have the CD for and make it
> available as a download.  What I would like is something similar to a
> self extracting exe but of course exe for MAC.  What's the best way to
> do this?  I'm currently testing DropDMG which will create it into a
> disk image.  Any help would be really appreciated!  Thanks!

Self-extracting files cannot be downloaded over the internet on a Mac
because Macs don't use file extensions when determining whether a file is
executable. Anything that can be executed has to be archived first,
otherwise it will not appear executable on the receiving system.

However, never fear, because the Mac natively supports a bunch of archive
formats with no third-party programs. So you get the same effect, but with
less overhead and less pain.

Making a dmg is the generally accepted way of distributing an application.
You can make a normal dmg which will appear on the desktop when
double-clicked or when opened by the user's browser (if they set that
option), and the user can then drag your application out of it to wherever
they want to install it. You can also make an internet-enabled dmg which
automatically copies the application into the same directory as the dmg
and then puts the dmg in the trash.

Another possibility is to distribute a .zip. This will work on anything
from 10.3 and up, and behaves much like an internet-enabled dmg. This is
generally considered to be less Mac-like, but since the effect is the same
I don't really see why. But then again there's no real reason not to make
a dmg.

Signature

Michael Ash
Rogue Amoeba Software

Blaze - 26 Apr 2006 18:43 GMT
> > Hello,
> > I need to re-package an application which I have the CD for and make it
[quoted text clipped - 29 lines]
> Michael Ash
> Rogue Amoeba Software

The program i'm testing right now seems like it will do exactly what
you mention.
But just to be clear, the app I want to repackage is already made to be
installed on MACs and I have that on a CD which I received from the
vendor.  I need to take the contents of that CD and package it so it
can be downloaded.  I'm mainly a Windows guy, so that's why I mentioned
the self-installing exe.  So creating the .dmg with DropDMG looks like
my best bet right now.  I've also heard of PackageMaker, any pros/cons
on that program and where would I get that?  Thanks! :)
Michael Ash - 27 Apr 2006 03:56 GMT
> The program i'm testing right now seems like it will do exactly what
> you mention.
[quoted text clipped - 5 lines]
> my best bet right now.  I've also heard of PackageMaker, any pros/cons
> on that program and where would I get that?  Thanks! :)

PackageMaker comes with the developer tools, at:

/Developer/Applications/Utilities/PackageMaker.app

However, it creates an installer, and installers are highly un-recommended
for Macintosh applications. The packages created by PackageMaker are
bundles, meaning you have to archive them anyway, so there's no gain.

Using DropDMG to create a .dmg is definitely a right way to go.

Signature

Michael Ash
Rogue Amoeba Software

matt neuburg - 26 Apr 2006 19:08 GMT
> Another possibility is to distribute a .zip. This will work on anything
> from 10.3 and up, and behaves much like an internet-enabled dmg.

Actually, no. There are major bugs with BOMArchiveHelper. If you zip my
MemoryStick app using the Finder (File > Archive), you will not be able
to unzip it. That is why I distribute it as a zipped .dmg, rather than
zipping it directly.

m.
Signature

matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt/
Tiger - http://www.takecontrolbooks.com/tiger-customizing.html
AppleScript - http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart. http://www.tidbits.com

Michael Ash - 27 Apr 2006 03:59 GMT
>> Another possibility is to distribute a .zip. This will work on anything
>> from 10.3 and up, and behaves much like an internet-enabled dmg.
>
> Actually, no. There are major bugs with BOMArchiveHelper. If you zip my
> MemoryStick app using the Finder (File > Archive), you will not be able
> to unzip it.

I have never heard of this before. Can you give specifics? What exactly
breaks?

> That is why I distribute it as a zipped .dmg, rather than
> zipping it directly.

Using a zipped dmg is kind of an odd choice. The dmg will already be
compressed if you create it in a reasonable fashion, and zipping is
unlikely to gain you much beyond an extra step for users who have disabled
automatic unarchiving in their browser.

Signature

Michael Ash
Rogue Amoeba Software

matt neuburg - 27 Apr 2006 05:55 GMT
> >> Another possibility is to distribute a .zip. This will work on anything
> >> from 10.3 and up, and behaves much like an internet-enabled dmg.
[quoted text clipped - 5 lines]
> I have never heard of this before. Can you give specifics? What exactly
> breaks?

Well, I think I just gave a case in point. Download MemoryStick and try
it for yourself. It seems to be due to the combination of symlinks and
unwritable directories (it all started when I installed the Growl
framework). It's clearly a bug, though, because the command-line zip /
unzip has no problem with the same file.

> > That is why I distribute it as a zipped .dmg, rather than
> > zipping it directly.
>
> Using a zipped dmg is kind of an odd choice.

You're telling me. By the time I discovered the problem I'd already
posted the download URL to versiontracker. A zip it had been, so by
prestidigitation, a zip it had to remain. m.

Signature

matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt/
Tiger - http://www.takecontrolbooks.com/tiger-customizing.html
AppleScript - http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart. http://www.tidbits.com

Michael Ash - 27 Apr 2006 15:34 GMT
>> >> Another possibility is to distribute a .zip. This will work on anything
>> >> from 10.3 and up, and behaves much like an internet-enabled dmg.
[quoted text clipped - 8 lines]
> Well, I think I just gave a case in point. Download MemoryStick and try
> it for yourself.

I was being lazy because I'm stuck on dialup, but my curiosity won out.
First, may I suggest a name change? :) Google only wants to find the Sony
flash memory product unless I actually put your name in. But in any case,
it works exactly as advertised.

> It seems to be due to the combination of symlinks and
> unwritable directories (it all started when I installed the Growl
> framework). It's clearly a bug, though, because the command-line zip /
> unzip has no problem with the same file.

As I understand it, the command-line tools are the standard UNIX tools and
know nothing about Apple's extensions to properly record resource forks
and all of the filesystem metadata. But then, I don't know what metadata
it would be recording. But the fact that it deals with such data probably
means it's a fairly different codebase.

Obvious question, have you filed a bug?

>> > That is why I distribute it as a zipped .dmg, rather than
>> > zipping it directly.
[quoted text clipped - 4 lines]
> posted the download URL to versiontracker. A zip it had been, so by
> prestidigitation, a zip it had to remain. m.

Ah yes, I see. I just wanted to make sure you weren't under the impression
it was necessary in general. (And, I suppose, other readers.)

You could probably change the URL in the listing now and just stick two
copies on your site, although I'm sure you've pondered that yourself.

Signature

Michael Ash
Rogue Amoeba Software

matt neuburg - 27 Apr 2006 20:04 GMT
> I was being lazy because I'm stuck on dialup, but my curiosity won out.
> First, may I suggest a name change?

Sure, as soon as you change the name of Rogue Amoeba. I've got six years
of name recognition built into this puppy.

> :) Google

Versiontracker.

> As I understand it, the command-line tools are the standard UNIX tools and
> know nothing about Apple's extensions to properly record resource forks

Not sure I believe this, but (in general) not sure. Anyway, I don't care
at this point. StuffIt, OpenUp, and unzip can all inflate the zipped
file perfectly; BOMArchiveHelper (the default, which zipped the file in
the first place) can't do it at all.

> Obvious question, have you filed a bug?

Yep.

m.

Signature

matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt/
Tiger - http://www.takecontrolbooks.com/tiger-customizing.html
AppleScript - http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart. http://www.tidbits.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.