livecode in terminal ; path in linux as alternative to bash?

Mark Wieder ahsoftware at sonic.net
Mon Sep 9 02:59:51 EDT 2019


On 9/8/19 7:32 PM, Eric A. Engle via use-livecode wrote:
>   I am learning bash (bourne again shell) on linux; i would like to know if it is possible to 1) invoke livecode from the command line 2) how to install livcode into my path 3) whether livecode can be used as an alternative to bash?

<g>

1. (if installed for all users) /opt/livecode/<version>/<release>
where <version> is the product you want to launch and <release> is 
whether it's 32-bit or 64-bit (you'll only have one installed.
For instance with 64-bit engines installed:
/opt/livecode/livecodecommunity-9.5.0.x86_64/LiveCode Community.x86_64
/opt/livecode/livecodeindy-9.0.4.x86_64/LiveCode Indy.x86_64

But if you're asking this in connection with #2 and #3, ignore this and 
read on.

2. That depends on your linux distribution. Assuming you're asking this 
in connection with #3, you can temporarily put LiveCode server in your 
path from the commandline (here I've got the server in my Downloads folder)
PATH=$PATH:~/Downloads/servertest/

If you want it to be more permanent, you'll have to edit one of your 
configuration files. Depending on your linux distro it might be .bashrc 
or .bash_profile or /etc/environment, etc.

3. I use the LiveCode server as an alternate bash shell. Set the path as 
in #2, then write .lc script files (and chmod +x them before running)

Here's a test.lc:

#!livecode-community-server
include "test1.lc"
local x, y
put 3 into x
put x into y
put "-- environment --" & cr
put "libraries=" && the libraries & cr
put "frontscripts=" && the frontscripts & cr
put "backscripts=" && the backscripts & cr
put "stacks=" && the stacks & cr
put "stacksinuse=" && the stacksinuse & cr

put "the version=" && the version & cr
put "the environment=" && the environment & cr
put "the editionType=" && the editionType & cr
put "the defaultFolder=" && the defaultFolder & cr
put "the defaultStack=" && the defaultStack & cr

put "-- dateItem test --" & cr
put 1489755600 into tVar
convert tVar to dateitems
put "fixed time (dateItems)=" & tVar & cr
get the time
convert it to dateitems
put "current time (dateItems)=" & it & cr
put the screenrect & cr


-- 
  Mark Wieder
  ahsoftware at gmail.com




More information about the use-livecode mailing list