ZIPing a TAR file is possible?

I’m not a MacOS user so probably I’m asking something trivial.

When I compile my application for OS X it produces a file MyApplication.app.tar of 22 Mb
If I ZIP it, it takes only 5.5 Mb

Is it save to distribute this ZIP file or must I use the 22 Mb one?

[quote=128380:@Ramon SASTRE]I’m not a MacOS user so probably I’m asking something trivial.

When I compile my application for OS X it produces a file MyApplication.app.tar of 22 Mb
If I ZIP it, it takes only 5.5 Mb

Is it save to distribute this ZIP file or must I use the 22 Mb one?[/quote]

I just checked. Double clicking on a zip file which contains a .tar archive extracts the app fine. You can go ahead.

Why .tar it? Just zip it, MyApplication.app.zip

.tar does not compress anything, it simply combined several files into 1 file. Typically when you tar something, you also gzip or bzip the file, i.e. .tar.gz or .tar.bz2, but I see a lot of apps (far more than .tar.gz/bz) distributed as .app.zip files.

Thanks Michel,

In fact I’ve done it for some time, but I’m not sure if it is something dangerous ans some day I can have a problem.
The truth is that 5.5Mb is much handier than 22 Mb. Internet connections are not equal everywhere.

Jeremy,
How do I change TAR for ZIP? Xojo produces TAR.

What in Xojo produces the .tar file? When I compile an app, I am left with a .app file directory. Of course, I am building on OS X, maybe that is the difference?

Any more experienced Windows based developers around who can answer this question?

Yes. Sure that’s the difference.
Let’s see if someone knows how to do it.

[quote=128384:@Ramon SASTRE]In fact I’ve done it for some time, but I’m not sure if it is something dangerous ans some day I can have a problem.
The truth is that 5.5Mb is much handier than 22 Mb. Internet connections are not equal everywhere.
[/quote]

The only thing worse than fear is fear itself… If you won’t take the word of a 30 years+ Apple developer, do not use zip.

Windows does not manage bundles. If Xojo Windows generated simply folders as a bundle is internally built, it would break it. So Xojo packages the Mac app in a Tar archive, to preserve all needed information. If someone was to extract the tar on Windows and zip it, then move that to Mac to extract, the thing on arrival would look like the pig monster after going through the transporter in Galaxy Quest : inside out garbage.

[quote=128388:@Ramon SASTRE]Yes. Sure that’s the difference.
Let’s see if someone knows how to do it.[/quote]

Please do not butcher on Windows the tar archive Xojo carefully prepared to make sure it works on the Mac. Others have tried, and it is the best way to deliver a non working Mac app.

Thanks again, Michel.
So, I understand pretty well that I must not open a TAR and make a ZIP.
But can I ZIP a TAR file MyApplication.app.tar.zip?
Theoretically unzipping a file should produce the same original file. But if I zip it on Windows and unzip it on Mac, can it produce any problem?

[quote=128398:@Ramon SASTRE]But can I ZIP a TAR file MyApplication.app.tar.zip?
Theoretically unzipping a file should produce the same original file. But if I zip it on Windows and unzip it on Mac, can it produce any problem?[/quote]

The right way is to zip the tar file. When the user gets the zip file on Mac, he double clicks on it, and Mac OS X automatically recursively extract everything to produce the app bundle with all needed Mac OS X specificities. As long as the tar file gets on the Mac intact, naked or within a zip, everything is fine.

Just zip up the tar and you are good. I usually rename my files to MyApplication.app.tgz which means a zipped tar file.

.tgz is usually a .tar file gzipped, not a .tar file zipped. .gz and .zip are different.

The best way is to use exactly the same naming convention as what Mac OS X does when compressing a tar archive :
MyApplication.app.tar.zip

If anyone needs to have their app repackaged, I’m happy to put it on a disk image (.dmg) for you.
Drop me a private message (or an email from my website) and I’ll help you out :slight_smile:

Disk images are one of the ways Mac users receive software, and the cool thing is you can have background images and such. As an example, this is what the Google Chrome disk image looks like:

[quote=128464:@Michel Bujardet]The best way is to use exactly the same naming convention as what Mac OS X does when compressing a tar archive :
MyApplication.app.tar.zip[/quote]
Good to know. It has been years since I last had a Mac.

TAR is needed because it preserve permissions, while ZIP it doesn’t (if not crafted with the Apple extensions).
if you just plain zip an OS X application, and you move it to a noter Mac, it won’t start for lacking of the executable permission.

But TAR (coming from Tape ARchive) is just a way to build a stream which was used long ago to be saved on tape backups. It doesn’t compress data, just pack them.
Therefore, it’s perfectly fine to zip a tar archive. And OS X, expanding the zip, will also expand the TAR.

Thanks to all of you.
I think I have it very clear now.