Unzipping in Mac C++

Joined
Dec 1, 2009
Messages
4
Reaction score
0
Points
1
Hi again. I have a cross platform application, where i'm unzipping a zip folder.

in the folder i have a xxx.app. Inside xxx.app/contents/macos/ there is another file xxx, which has no extension. originally, it should be a linux executble. but after i unzip the file through my program using a opensource sdk, it extracts as a plain text file (because there is no extention) and the app cannot be run already!.

Do you know any way around this ?

I also tried extracting using 'unzip' in the terminal, and i get the same problem.. the only method that works is extracting with the "Archive Utility" but i need to be able to extract the folder programmatically in c++..
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
Perhaps the Zip format has bits to notify the extracting program what permissions need to be applied to each extracted file. You'll need to look into Zip structure. Admittedlly I would have then expected unzip to figure that out.

Maybe 'Archive Utility' is taking liberties by analyzing the extraction when it is a .app container folder. This would seem risky to me.
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
whether something is executable in linux is a matter of perms, not extensions (same thing in OS X to be honest)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top