Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating LiveCode desktop app from the web

How would I build a LiveCode application that can update its component stacks with newer versions from a web server? I have seen this mentioned as "easy to do" but have been unable to locate specifics on how it can be down.

like image 224
JayC Avatar asked Apr 30 '26 00:04

JayC


1 Answers

It's just a few lines of code. Open the stack from the server and save it to disk:

go stack url ("http://path/to/server/file.livecode")
set the filename of this stack to <path on disk>
save this stack

If you don't want to actually display the stack, you can just load it into a variable and save that to disk. Be sure to use binary if you do that:

put url ("http://path/to/server/file.livecode") into myVar
put myVar into url ("binfile:" & <path on disk>)

The second method could be reduced to a single line of script.

There's a LiveCode lesson that explains the concepts here: http://lessons.runrev.com/s/lessons/m/4071/l/78702-opening-a-stack-from-the-server

like image 139
Jacque Avatar answered May 09 '26 02:05

Jacque



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!