Zipping Up an LC standalone program
Phil Davis
revdev at pdslabs.net
Tue Apr 10 22:23:30 EDT 2012
Pete,
I wonder if your revZip issue comes from the fact that a .app file is really a
folder in disguise.
To pick an app via dialog on OS X, you must say "answer file" but then
immediately you must treat the .app "file" you picked as a folder containing
subfolders and files.
Consider this button code:
on mouseUp
answer file "Pick an app to zip"
if it = empty then exit to top
set the defaultFolder to it
put the defaultFolder & cr & the folders
end mouseUp
When you run this, the defaultFolder is now indeed the selected .app "file" and
it contains a "Contents" folder which contains all the app parts. So you'll need
to drill down into the .app folder and add each file to your zip file.
Then when it's restored at installation time, you may have to turn on the .app
folder's bundle bit, I'm not really sure. I think someone on the list told how
to do this some time ago but I couldn't tell you who or how. There's probably a
line command for it.
Food for thought.
Phil Davis
On 4/9/12 5:19 PM, Pete wrote:
> Been putting together a litte script to get all my files ready for a
> release and used the revZIPxxx commands to make a zip file of the LC
> standalone program - this all on a Mac. The resulting zip file is only 4kb
> in size, obvioulsy not correct.
>
> The code is pretty straightfroward:
>
> revZipOpenArchive myZipFile,"write"
>
> *if* the result is not empty *then* *answer* the result
>
> *answer* file "Zip file"
>
> revZipAddItemWithFile myZipFile,"myApp.app",it
>
> *if* the result is not empty *then* *answer* the result
>
> revZipCloseArchive myZipFile
>
> Zipping the same file with the built-in OS X compress function works fine
> and so does the CleanARchiver utitlity.
>
> ANy ideas?
>
--
Phil Davis
PDS Labs
Professional Software Development
http://pdslabs.net
More information about the use-livecode
mailing list