Rev as Linux Shell Script
Peter W A Wood
peterwawood at gmail.com
Thu Oct 28 10:23:28 CDT 2010
On 28 Oct 2010, at 22:39, Bill Andersen wrote:
> I'm sorry this is so long winded. I'm hoping it will help you understand my motivation...
> ... snip ....
> I've read how to get the runtime working as a CGI and played around enough that I 'can' (seemingly) make it work from a shell with the "#!revolution -ui" declaration on the first line. However, when I get to some of the higher level features (FTP, ODBC, etc) I start getting errors. I was researching how to possibly resolve these issues (need libraries, etc) when I found that Rev 3.5 is the last version to support the ability to run as a CGI.
I also am keen to use LiveCode to write "shell" programs and believe that it is possible by adopting a slightly different approach. I believe that if you build a "standalone" of your script, you can run the 'standalone" program with the -ui argument.
I performed a small test under Revolution 4.0. I created a new stack and added the following handler to the stack:
put "Hello Console"
I created a standalone and then ran the executable from a shell console using the -ui option :
Rodney:MacOS peter$ ./CLTest -ui
It's not much of a test but it did work. I would expect the technique to work just as well under Linux.
It would be even better if there was an option to build a GUI-less program when building a standalone in LiveCode though.
More information about the use-livecode