_MACOSX folder in zip file

Here’s an interesting one. I’ve been searching and trying different zip tools with no luck.

I know that the Mac puts the _MACOSX folder in the zip file but it’s hidden on the Mac. When I unzip on Windows or Linux, the folder shows up. It’s not needed and will confuse users.

I’ve tried some other ZIP tools on the Mac and the _MACOSX folder isn’t there, but so far testing with Linux, the unzipped files don’t run. When I copy the app’s build folder over directly, it runs.

Has anyone seen this? And of course if so, what’s the best solution?

Can you post an example of a non-working zip file?

Yes, Apple’s archive utility, as I’ve seen myself, gives you the unwanted folder. However, if I understand you (again, per my experience), functionality is okay and it is with the third-party tool that things break.

I’m guessing (and I think it’s a good guess) that the other tool is stripping the necessary permissions from the Linux .exe, and perhaps also from the .so files in the Libraries folder. This can be fixed in the Linux terminal with some chmod commands.

I do my zipping on the target platforms. In the case of Windows, that’s where I do my code-signing and installer-building anyway, prior to compressing. I’m using Fusion VMs, so dragging the uncompressed build folders into the VM is easy.


Let me test a few more things and try it on another Linux system. Thanks! :slight_smile:

That makes sense. I need to make sure things work on the target machine without doing any special tweaks. I’ll try zipping from the Linux box and see if that helps Thanks!

1 Like

I rebuilt the zip file on Linux and problem solved. Since I have to test on the target OS anyway, not a big deal.

1 Like

I wrote a drag and drop Xojo app that would read/write the contents of the Zip file and not copy across the ‘_MACOSX’ files, if anyone wants it.

1 Like

Thanks for sharing, but I wouldn’t recommend using it for distributing Mac apps to be run on Mac systems. While Apple’s code sign doesn’t like extended meta data, it sometimes uses it and apps may not run on a Mac if the hidden resources are removed from the zip file.

I’ve been using an app called YemuZip which strips out the _MACOSX stuff. It was free years ago, but now I see it is on the Mac App Store for $4.99.

get KEKA, it is still free when downloaded from developer site.

1 Like

Thanks all for the responses. I think I’ll stick with zipping the packages on each target system after testing to eliminate problems. It’s simple, I’m already on the system and it’s free! :smiley:

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.