How to best distribute a game? dmg, zip, etc., and details

Moderator
Posts: 370
Joined: 2002.08
Post: #1
I am running into unexpected problems distributing a new version of my game with a zipped dmg. Namely, the compressed file size is not as small as it should be.

Here's the specific problem I'm encountering:
1) Create new 14MB dmg image in Disk Utility
2) copy my files including 9.8MB .app, prepare the disk image with a background
3) unmount image, zip the .dmg file, resulting in a .zip file approximately 6.9MB
4) I then re-mount the image, trash the .app and replace it with a newer build that is 11MB, bigger than before
5) unmount, zip the .dmg, and resulting .zip file is 8.7MB
6) re-mount the image, trash the big 11MB .app, replace it with the original 9.8MB .app
7) unmount, zip, resulting in a... 8.7MB file!

For some reason, the free space on the disk is not compressed down even after I trash the big file and empty the trash. What's going on?

Other questions I'm less concerned with are:
Is a zipped .dmg file really the best way to distribute it?
Is a dmg with a background image containing quick install instructions ("Drag to Applications Folder") better than an image that just shows a plain .app and leaves no trace behind?

Opinions - and someone to shine some help on the poorly-zipping dmg file - would be appreciated.

KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
Quote this message in a reply
Luminary
Posts: 5,125
Joined: 2002.04
Post: #2
The free space on the disk won't be zeroed, so won't compress as well. Secure remove trash might do the trick or might not. Really, you should make a new disk image each time, large enough only for what you want to put on it.

There's no reason to zip the dmg, you should instead use the built-in gzip compression of dmg. If you're 10.4-only, you can use the built-in bzip compression instead.
Quote this message in a reply
Member
Posts: 196
Joined: 2003.10
Post: #3
The absolute worst thing is when you download GreatGame.dmg.zip.tar.bz2.sitx

Takes 15 hours to uncompress and saves, oh, about 6Kb.
Quote this message in a reply
Moderator
Posts: 370
Joined: 2002.08
Post: #4
OneSadCookie Wrote:The free space on the disk won't be zeroed, so won't compress as well. Secure remove trash might do the trick or might not. Really, you should make a new disk image each time, large enough only for what you want to put on it.

This is pretty bothersome for me, since I set up a background image for the disk image... just way too many steps than I'd like. Is there a way to simplify this setup?

Quote:There's no reason to zip the dmg, you should instead use the built-in gzip compression of dmg. If you're 10.4-only, you can use the built-in bzip compression instead.
The built-in bzip compression meaning the compression in the "Convert" option inside Disk Utility? It appears that properly compresses the file.
But will a plain vanilla .dmg file be acceptable to most download clients and web hosts? I don't want a bunch of junk characters to appear in browser windows, but I don't know of anything that doesn't properly download a plain .dmg.

KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
Quote this message in a reply
Luminary
Posts: 5,125
Joined: 2002.04
Post: #5
Whether the browser copes properly with a plain .dmg is up to the web server, not the browser. If the web server sets the mime type to something sensible like application/octet-stream, the browser will cope fine.
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #6
Why don't you create a 'template' dmg so that when you want to make a new release, you simply copy it and add the application?

And I think Secure Empty Trash writes random data (all other secure removers I have seen do that - a bunch of zeros is a dead giveaway that you've either hidden something or have a bunch of nulls, at least on a hard drive)

Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Quote this message in a reply
Moderator
Posts: 370
Joined: 2002.08
Post: #7
A template dmg is a good idea.

Does anyone have an opinion of dmg with installation instructions in the background vs. just the application directly on the desktop?

KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #8
My opinion is good, but please make the image file called .somthing.jpg so its inivisible.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #9
That makes it rather difficult to select to be the background picture. Rasp When I made one, I just made the icon of the same color as some place in the background and put it there, and named it " .jpg". (hiding the extension, of course)
Quote this message in a reply
Moderator
Posts: 370
Joined: 2002.08
Post: #10
You can make the background image hidden using the SetFile utility on the command line, like so:

Code:
/Developer/Tools/SetFile -V /MyDMG/bg-image.jpg

That should set it to inVisible. Using a lower case -v will make the file visible again.

KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
Quote this message in a reply
Founder
Posts: 1,133
Joined: 2002.04
Post: #11
Quote:Whether the browser copes properly with a plain .dmg is up to the web server, not the browser. If the web server sets the mime type to something sensible like application/octet-stream, the browser will cope fine.
OSC, I noticed you had a dmg for your OMG entry. I don'T recall adding dmg to Apache, so I'm worried that we aren't serving dmgs correctly. Can someone check?

Carlos A. Camacho,
Founder
iDevGames
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #12
I downloaded it and it worked, I may have renamed it dmg from download.php or somthing, but it worked.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Luminary
Posts: 5,125
Joined: 2002.04
Post: #13
I've downloaded it successfully both from Safari and from Firefox, so I don't think there's an issue.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Custom Project Templates: Tweaking Details TythosEternal 1 2,336 Oct 12, 2009 11:59 PM
Last Post: TythosEternal