How to compress files on the fly
Josh Mellicker
josh at dvcreators.net
Fri May 30 16:42:31 EDT 2008
On Nov 22, 2006, at 9:21 AM, Stephen Barncard wrote:
> Hi gang,
>
> I'm messing around with the compress() function.
> My goal is to compress an .app package then upload it to an ftp
> server.
> Right now the below code works on small files but seems to choke on
> a 300mb file.
>
> I have a few questions:
> 1. in order to compress a MacOSX 'package',do I have to devise a
> 'walker' to identify and compress each file separately inside? yikes.
We just ran into this same problem, and here's how we solved it:
Compress the app and upload to your server
Have Rev download the zipped app as you would any file
then:
set the defaultFolder to whereYouWantYourApp
put "unzip" && yourZippedAppPathAndFile into tCmd
get shell(tCmd)
This works great on OS X, have not tested elsewhere.
NOTE: Because compressing with the OS X function puts some weird stuff
in the archive as well as your app, it's best to unzip to a temp
folder, then move your app where you want it.
More information about the use-livecode
mailing list