lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 12 Jan, 2014, at 17:09 , Enrico Colombini <erix@erix.it> wrote:

> Reading the thread about LuaRocks, LuaDist and binaries...
> 
> I plan to write a portable script using serial communication, as part of a larger microcontroller educational project.
> So that script would just be a corollary that should 'just work' without distracting my readers from the main task.
> 
> I'd rather use Lua than Python (also because data preprocessing is already done in Lua) but I am a bit lost in the libraries forest.
> Is there a simple way for (mostly) clueless users to just install a single binary package on Windows/Linux/OSX and be able to execute a Lua script using RS-232 communication?
> 
> Or is there a better simple way to get that capability?
> (where 'simple' = just run the installer and press OK)

Hello Enrico,
the simplest way on Windows and Mac is to silly download the following binaries and unpack their contents into a single directory

Windows:
https://github.com/LuaDist/librs232/tree/1.0.3-Windows-x86
https://github.com/LuaDist/lua/tree/5.1.5-Windows-x86

Mac:
https://github.com/LuaDist/librs232/tree/1.0.3-Darwin-x86_64
https://github.com/LuaDist/lua/tree/5.1.5-Darwin-x86_64

Downloading the “batteries" from luadist.org would also work, however there is a bug in the Windows binary which renders librs232 unusable so you would have to update the package on windows with the following commands

luadist remove librs232
luadist install librs232

Linux:

On linux the recommended way is to simply bootstrap LuaDist using the following one-liner:

echo "$(curl -fksSL https://tinyurl.com/luadist)" | bash

LuaDist itself is lua-5.2.3 based so to get lua-5.1.5 and librs232 we need to use it to install into separate directory, e.g. into “_tutorial"

./LuaDist/bin/luadist _tutorial install librs232

Once installed you can use _tutorial/bin/lua as usual.

Sorry, no magic “install” button .. yet.

pd