Downloading a MAC file
kevin at runrev.com
Sun Feb 3 19:35:54 EST 2002
On 31/1/02 10:40 pm, Marcus Bointon <marcus at synchromedia.co.uk> wrote:
>> In my application, I want to include a "Check for Updates Online..." option
>> (much like that in Revolution). If I release a new version of my
>> application, my users can get it easily.
>> Here's the problem. If I post a file with a resource fork, like an
>> application created by the "Distribution Builder", the resource fork is not
>> going to be present anymore and the download will not function. So...
>> Do I do some kind of compression first? If so, what would I use so that
>> Revolution will be able to uncompress it?
> If it's to be downloaded, then compression is a good idea anyway.
> Safest/easiest way is to do a custom version check within your Rev app that
> opens a direct http connection to your server where it can find if a new
> version is available (e.g. Download a text file that contains a string of
> the latest version number), then hand off downloading to their web browser
> (openURL/GetURL or whatever). For a Mac you should stuff and
> binhex/macbinary the file. All current web browsers will decode binhex and
> macbinary, so you could even make it a self extractor.
Actually, you can handle the last part in Revolution itself. Revolution has
built in .gz compression, so simply compress the data fork into one file on
the server and the resource fork into another (using the resfile and binfile
URL types) and then reconstruct the two on download in the other direction.
Kevin Miller <kevin at runrev.com> <http://www.runrev.com/>
Runtime Revolution Limited - Power to the Developer!
Tel: +44 (0) 870 747 1165. Fax: +44 (0)1639 830 707.
More information about the Use-livecode