LC8.1.9 OSX 10.12.6
Trying to build a reliable Zipper and unzipped, using the RevZip commands, I built a simple stack using the scripts that Trevordevore so generously put on GitHub (https://gist.github.com/trevordevore/5246242).
After a few additions , I was able to zip and unzip, using all the Finder/Stack combinations (zip/unzip with the stack, zip with Finder, unzip with stack and viceversa).
The problem is the settings of permissions while UnZipping. Applications unzipped will not launch (the Finder reports: Unable to open the application).
I tried both setting the "pPerm" of "fileCreateAllFoldersInPath" to empty and to "shared".
Did not try on Windows.
Find here the sample stack.
1 - create a folder and put an App into it
2 - open the stack and zip the folder with it
3 - once zipped, unzip the zipped file of point 2, using the stack
4 - Try to launch the app inside the folder --doesn't work
Any help will be appreciated.
Trevix
Zip and Unzip: trevordevore script applied
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Zip and Unzip: trevordevore script applied
- Attachments
-
- TheRevZipper2.livecode.zip
- Just a stack
- (5.03 KiB) Downloaded 195 times
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Zip and Unzip: trevordevore script applied
A shell call to chmod can set the executable bit needed for apps on macOS and Linux.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Zip and Unzip: trevordevore script applied
Yes.
I don't know how to use the shell, but in the Trevordevore script, we have this line for every file path:
But doesn't fix (anymore?) the permissions so to be able to run a unzipped application.
Instead, this applescript works:
But we have to ask the user for username and password.
So I was wondering: something changed in the last 5 years about OSX security so that is not enough anymore to run the "chmod" but we also need to pass username/password (even if the application is not unzipped to a protected folder, but to the desktop) ?
Regards and thanks for your time.
I don't know how to use the shell, but in the Trevordevore script, we have this line for every file path:
Code: Select all
put shell(format("chmod %u%u%u %s ",7, 7, 7, pFilePath)) into theResult
Instead, this applescript works:
Code: Select all
do shell script "chmod -R 775 " & MyPathToFolder user name "MyUserName" password "MyPassword" with administrator privileges
So I was wondering: something changed in the last 5 years about OSX security so that is not enough anymore to run the "chmod" but we also need to pass username/password (even if the application is not unzipped to a protected folder, but to the desktop) ?
Regards and thanks for your time.
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
Re: Zip and Unzip: trevordevore script applied
Must again correct myself:
The applescript works even without obtaining the username and password
The applescript works even without obtaining the username and password
Code: Select all
set myPOSIX to quoted form of POSIX path of "<TheAppPath>"
try
do shell script "chmod -R 775 " & myPOSIX
on error TheErr
return TheErr
end try
Trevix
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>
OSX 14.3.1 xCode 15 LC 10 DP7 iOS 15> Android 7>