-----
Lots of learn Lua related links, tutorials, and IDE information, in these thread posts:
http://www.murga-linux.com/puppy/viewto ... 625#988625
http://www.murga-linux.com/puppy/viewto ... 238#988238
iuplua-core-xenialdog64-gtk2 64-bits deb package (size 344 KiBytes) for Xenial 64bits OS google drive download link here (IUPLUA has liberal tecgraf-MIT opensource licence so is fully GPL compatible). Just two small packages to install for sophisticated GUI programming environment (you will NOT need any devx to be loaded): i.e. apt-get install lua5.3 and then download and install uiplua-core deb package from google drive link here:
64-bit Deb on google-drive here:
https://drive.google.com/open?id=1ggyc3 ... ZE87_S5U2W
64-bit Dotpet on google-drive here:
A dotpet of iuplua-core, which I tested on Slacko64 v6.9.9.9 (kernel 4.9) here:
https://drive.google.com/open?id=1-CHe7 ... OfPzuMEmSh
That dotpet should also work in Puppy Xenial64 and Quirky Xenial64 and likely also fine for any 64-bit Artful or 64-bit Bionic builds.
Deb for xenialdog32/bionicdog32 and dotpet for 32bit Pups (slacko32 ver 6.9.9.9 should be okay as should XenialPup32 or Artful/BionicPup32 or any 32-bit version of Quirky Xerus). Won't work on slacko32 ver 6.3.2 cos too old libs and repository:
32-bit Deb on google-drive here:
https://drive.google.com/open?id=19UaHn ... APEGiRlUMI
32-bit Dotpet on google-drive here:
https://drive.google.com/open?id=1bYe_9 ... 0atDbJndVf
For Puppy system use you first need to install Lua version 5.3.x from the Puppy Package Manager (IT HAS TO BE VERSION 5.3 FOR THIS IUPLUA LIBRARY). In Slacko64 ver. 6.9.9.9 that was from slackware 14.2 official repo. Note that in Puppy the command to run lua is 'lua' rather than the default 'lua5.3' in the Dogs.
Then simply try out the examples linked to in second post of this thread (explanation of howto run them given in detail below if you need it).
The above gtk2-compiled uiplua-core deb package along with official apt-get installed lua deb package (104 kB download; 379 kB installed) is all you need for programming basic (simple widgets) GUI apps and utilities in Lua script-interpreting programming language. Note that the alternative version of iuplua system libs provided on tecgraf iup download site (google it...) are compiled for gtk3. I have here recompiled for gtk2 in case more useful on Puppy/Dogs.
Lua with IUP is a very powerful GUI app-building combination, with a small install size. IUP offers far more functionality than gtkdialog or yad and I find it even easier to build GUIs with it than either of those others (just look at the dotlua scripts example code in the links provided in post two below...).
Lua itself is actually much easier to program in than in bash (though many on the forum are already quite fluent in bash of course so may doubt my statement...) and is actually a very full-featured, yet tiny, programming language (interpreter). You can also run bash commandline utilities (such as sed) from within Lua, and more particularly if you add-on a lua-module such as maybe lua-sh by Serge Zaitsev (google it later). Learning to program the GUI part is almost trivial (certainly easier than learning gtkdialog for the first time) - just run and then read the simple program examples in the second post of this thread to see how to do it. Later you'll want to learn a bit more Lua of course.
Lua used to be provided in some early Pups, by the way, in the form of Murga-Lua by John Murga, which was a (discontinued?) mod of Lua with bindings to modified FLTK graphical toolkit. However, IUP has the advantage of using native widgets (GTK in Linux and Windows API widgets in Windoze) rather than the unique widgets FLTK draws itself (which some say don't look good alongside native widgets). Note that you can also program your GUIs in C as an alternative to Lua, but, as I said above, with what is provided here, no devx is additionally required for Lua programming, and Lua is a logical simple-to-learn language for beginners too:
Serge wrote:Lua is one of my favourite languages. It's tiny, it's fast, it has simple grammar and is very easy to learn.
...
I had an experience in the past when Bash script became hard to maintain. Then we moved to Lua, and it was a big relief. Logic became transparent, code became more readable. However, we had to wrap shell command invocations into hand-written functions to make them look nice. So I made a library that brings the joy of shell scripting into Lua.
INSTALLATION AND USAGE STEPS
If it's Puppy (xenial or bionic anyway), just install the dotpets, else if its a Dog:
1. Using IUPLUA via iuplua-core-xenialdog64-gtk2 installation only requires lua5.3 (104 kB download; 379 kB installed) to first be installed, which you can install on XenialDog with:
Code: Select all
apt-get update && apt-get install lua5.3
2. Then install the attached iuplua-core-xenialdog64-gtk2 deb package (in pcmanfm on XenialDog you just need to right click it and choose to install.debs).
3. Running provided example lua scriptsE:
a. Links to a whole host of example scripts, that are tested as working with iuplua-core-xenialdog64-gtk2, are provided in the second post of this thread linked below along with some documentation for IUPLUA. Please let me know if any don't run afterall and I'll re-test:
http://www.murga-linux.com/puppy/viewto ... 612#987612
Note that these example scripts just produce the sample GUIs - extra code would need to be added to them to complete their functionality.
To try these examples, simply click on the particular example link and the lua script text will appear in your webbrowser. Then save the page thus displayed, in any directory you like on your system, with the filename as provided at the end of the link (for example "alarm.lua"). To then run the example, simply open a terminal at the download directory and enter the command:
Code: Select all
lua5.3 <filename> (e.g. lua5.3 alarm.lua)
Code: Select all
#!/usr/bin/lua5.3
Code: Select all
chmod +x <filename>
./<filename> (e.g. ./alarm.lua) just as you would were it an executable bash script... On my XenialDog64 system no exec nor lib paths environment variables needed to be changed.
That's it! Should hopefully all be working for simple GUI Lua programming now. What follows is for more complex GUI building and additional functionality, which will require additional iuplua modules to be installed as described.
----------
Note that the other more complex GUIs examples (yet still easy to program), such as matrix(*).lua, provided at:
https://webserver2.tecgraf.puc-rio.br/iup/examples/Lua/
generally 'require' the additional iup libraries provided by iupluacontrols-xenialdog64-gtk2_3.24_amd64, which I am providing as a single (399 KiBytes) deb package in post three below. Note that some of these other examples require even more iuplua library modules (such as libiup-plot.so and libiuplua-plot53.so for plotting graphs), some of which I will attach as deb packages to later posts.
Soonish/later, however, I want to create some examples that show how to interface with bash shell commands such as sed, and general shell pipeline commands so I can experiment with converting existing bash/gtkdialog scripts as exemplars of using Lua with IUP. I will also try to make XenialDog32 bit deb versions and also dotpets for Puppy Xenial sometime in nearish future, but any developer could probably easily manage to convert the attached deb packages to dotpets anyway (but for 32 bit systems, iuplua will need re-compiled so DO NOT attempt to use the 64 bit debs on 32 bit Linux...). Getting this far was a lot of work so I'm intending to take a bit of a rest just now albeit whilst continuing to play/experiment with this iuplua system...
I also intend to make same gtk2-based IUPLUA packages for Ubuntu Bionic (debs and dotpets) some time after BIONIC becomes stable. I do not guarantee any support for other distributions or earlier Puppies at this stage. The usual disclaimers apply to what is provided.
Some of you may also be interested in seeing my murga-forum development thread for IUPLUA compiling/packaging here (which is basically a scratchpad of reminders for my own use):
http://www.murga-linux.com/puppy/viewtopic.php?t=113013
Regarding UIP and Lua more generally for bigger apps like painting/image-manipulation:
https://webserver2.tecgraf.puc-rio.br/i ... rial4.html
http://compasstech.com.au/TNS_Authoring ... rials.html
http://compasstech.com.au/TNS_Authoring ... _tut7.html
wiak