Page 1 of 1

A zipped bundle app: no executable after unzipping

Posted: Sun Apr 28, 2013 8:02 am
by giovanni_c
Hi all
I've a little question for you LC forumers!
Here is my problem: I've a zipped ".app" bundle that I want to extract and execute.
Everything goes well with the extraction as my ".app" bundle file is correctly extracted but when I try to launch it... it doesn't start.
Trying to extract it with system tools it extracts and starts correctly.
So analyzing the bundle after Livecode extraction comparing with the other I can see that the executable file "myapp.app/Contents/MacOS/myapp" has no execution rights. Why this happens? Where am I wrong?!

Thank you for your replies!

Re: A zipped bundle app: no executable after unzipping

Posted: Sun Apr 28, 2013 8:29 am
by CoffeeCone
giovanni_c wrote:Hi all
I've a little question for you LC forumers!
Here is my problem: I've a zipped ".app" bundle that I want to extract and execute.
Everything goes well with the extraction as my ".app" bundle file is correctly extracted but when I try to launch it... it doesn't start.
Trying to extract it with system tools it extracts and starts correctly.
So analyzing the bundle after Livecode extraction comparing with the other I can see that the executable file "myapp.app/Contents/MacOS/myapp" has no execution rights. Why this happens? Where am I wrong?!

Thank you for your replies!

What did you use to compress the app?

Re: A zipped bundle app: no executable after unzipping

Posted: Sun Apr 28, 2013 9:34 am
by giovanni_c
CoffeeCone wrote:What did you use to compress the app?
Hi CoffeeCone
Simply compressed with Mac compress utility.

Re: A zipped bundle app: no executable after unzipping

Posted: Mon Apr 29, 2013 9:26 pm
by mwieder
What's "LiveCode extraction"? Are you trying to extract and launch an app from a compressed archive at runtime from a LiveCode script? If so, how are you doing this? Are you shelling out to the OS or are you using LC's builtin zip or decompress functions?

Re: A zipped bundle app: no executable after unzipping

Posted: Mon Apr 29, 2013 10:00 pm
by giovanni_c
mwieder wrote:Are you trying to extract and launch an app from a compressed archive
Yes, I'm trying to do exactly this!
I've a "myapp.zip" containing "myapp.app". When I extract the zip using the built-in LC extracion tools the file "myapp" inside the bundle has no more the "x" attribute.

Anyway I've solved my probs in another way using LC built-in zip function in "Win32" platform, "ditto" command line on "MacOS" and "unzip" under "Linux".

But I think Livecode should preserve the right rights (ops... sorry!) when unzipping...

Thank you for your replies guys!

Re: A zipped bundle app: no executable after unzipping

Posted: Mon Apr 29, 2013 10:47 pm
by mwieder
Aha! Yes, I think you've come across a long-standing bug in the internal libraries regarding the executable bit. Hopefully with the open-source rework this can get fixed up. I do the same thing you do, shelling out to the OS to do zip functions. You'll also find that the internal routines can't handle folders.

But stay tuned - there's lot of fun to come in the next few months.