> On 7 May 2022, at 2:00 am, [email protected] wrote:
> 
> This sounds like this enhancement request
> https://quality.livecode.com/show_bug.cgi?id=9642 
> <https://quality.livecode.com/show_bug.cgi?id=9642>

Thanks Panos for pointing out this is a duplicate to bug 9642, an enhancement 
request since 2011. I did do a quick search but clearly not very thoroughly.

The comments in that request hint that it is an OSX specific thing to include 
the execute permission flag in the zip files, and maybe the revZip tools are 
just following the zip specs as Matthias says, but I’m not sure about either. 
The original zip description said it included a copy of the file directory, but 
that was in the context of MSDOS which didn’t have an execute flag. Whether 
permissions are included in the archive does depend on the tool used to create 
the zip file and the platform. There is a long and confuseing thread on 
Stackoverflow about producing zip files which include execute permissions.

Recall my objective was to use LC to post-process the standalone build to 
produce a compressed file of each of the Mac, Windows and Linux standalones 
created by LC, and to do this whether the development platform was a Mac, 
Windows or a Linux box. At the time zip appeared to be the obvious choice.

I haven’t checked what the OSX shell command zip produces, but the Mac version 
produced by the default archiver (in effect the shell command ditto) does 
include the x flag. As Matthias notes one can check this using zipInfo or its 
equivalent unzip -Z on any platform. But it is not just Mac specific in the 
sense that Linux will happily decompress the Mac-created Linux standalone into 
an executable – at least on Ubuntu unzip -Z reports that x is set to true. On 
Windows unzip -Z looks at the .exe extension to decide if the file is 
executable rather than looking at unix permissions, so the Windows standalone 
will decompress into a launchable app (and I guess that is the reasoning behind 
TheUnarchiver and Keka setting the permission when unzipping a file with .app 
file extension on a Mac, even if the permission is not set in the archive 
itself). 

So I can achieve my objective if the development platform is a Mac using a 
shell command from LC.

On Linux I don’t know what shell command would work. Windows not being 
unix-based clearly requires something more than just zip to set the permissions 
in the archives of the two non-Windows standalones. The clever people at LC 
know how to set unix permissions for the unix standalones themselves from the 
Windows IDE but it's beyond my skillset I’m afraid. 

I had hoped this could all be done in LC without going to platform-specific 
tools. So the requested enhancement would be nice. But I won’t hold my breath.


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to