IUP deb and pet packages for use with small Lua interpreter

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#21 Post by fredx181 »

wiak wrote:Could you test it in dutch with that inserted.

assert(os.setlocale('C'))
I've put that on top and works well.

Fred

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

IUP/Lua translation of gifenc-sel

#22 Post by wiak »

Sorry, I couldn't resist... ;-) Just for practice I made an IUP/Lua close copy version of Fred's gifenc-sel more advanced version from here:

http://murga-linux.com/puppy/viewtopic. ... 724#948724

I haven't tested either version much, but seems to be working as intended. Also works if video file given as first commandline argument.

You just need to copy this code into a text file called gifenc-iup.lua and make it executable with:

Code: Select all

chmod +x gifenc-iup.lua
Well, you also need to install a copy of Lua version 5.3 on your system (say in /usr/bin/lua5.3 and install the iuplua-core dotpet or deb package found in the first post of this thread (Lua and iupluacore come to less than 1MB download, so not a big install...). Once you have that installed you can use Lua with IUP for all sort of other apps too. Lua with IUP is just as easy to program as yad (I'd say slightly easier actually), much easier than bash/gtkdialog and much more powerful than both:

http://www.murga-linux.com/puppy/viewto ... 611#987611

wiak

Code: Select all

#!/usr/bin/lua5.3
-- gifenc-iup.lua: translated by wiak from fredx181's gifenc-sel yad code
require( "iuplua" )

-- set initial values
assert(os.setlocale('C'))
VIDFILE = arg[1] or ""; SIZE = 100; START = 0; DUR = 0; NUM = 0; LOWQUAL = 0

if os.execute("command -v ffmpeg >/dev/null")~=true then
  iup.Message("gifenc-iup.lua", "No ffmpeg found, please install ffmpeg")
  os.exit(1)
end

function do_convert()
  print("LOWQUAL", LOWQUAL)
  if LOWQUAL == 1 then
    print("Low quality selected...")
    filters="fps=4,scale="..SIZE..":-1"
    result = os.execute("ffmpeg -ss "..START.." -t "..DUR.." -v warning -i "..VIDFILE.." -loop "..NUM.." -vf \""..filters.."\" -y "..VIDFILE:match("(.+)%..+")..".gif")
  else  
    palette = "/tmp/palette.png"
    filters = "fps=10,scale="..SIZE..":-1:flags=lanczos"                
    ffmpeg_args1 = "-ss "..START.." -t "..DUR.." -v warning -i "..VIDFILE.." -loop "..NUM.." -vf \""..filters..",palettegen\" -y "..palette
    result = os.execute("ffmpeg "..ffmpeg_args1)
    ffmpeg_args2 = "-ss "..START.." -t "..DUR.." -v warning -i "..VIDFILE.." -i "..palette.." -loop "..NUM.." -lavfi \""..filters.." [x]; [x][1:v] paletteuse\" -y "..VIDFILE:match("(.+)%..+")..".gif"
    result = os.execute("ffmpeg "..ffmpeg_args2)  
  end
  os.execute("xterm -T 'PLEASE WAIT FOR GIF ENCODE' -e sleep 3")
end

function param_action(dialog, param_index) --this function not actually required for gifenc
  if (param_index == iup.GETPARAM_OK) then
    print("OK pressed")
  elseif (param_index == iup.GETPARAM_CANCEL) then
    print("Cancel pressed")
    os.exit(3)
  end
  return 1
end

ret, VIDFILE, SIZE, START, DUR, NUM, LOWQUAL =
      iup.GetParam("GifenC-iuplua", param_action,
                  "Convert (portion of) short video to animated gif%t\n"..
                  "The new .gif will be in the same folder as the video%t\n"..
                  "Select video: %f\n"..
                  "   Please set the desired .gif size%t\n"..
                  "Size: %i[0,2000,10]\n"..
                  "   Set start time and duration: %t\n"..
                  "Start at (seconds): %r[0,20000,.01]\n"..
                  "Duration (seconds) (0=all): %r[0,20000,.01]\n"..
                  "Do not loop (just once): %b\n"..
                  "Low quality (much smaller gif size): %b\n",
                  VIDFILE, SIZE, START, DUR, NUM, LOWQUAL)
         
result = do_convert()
iup.Message("gifenc-iup.lua", VIDFILE:match("(.+)%..+")..".gif has been created")
os.exit(0)
if (iup.MainLoopLevel()==0) then
  iup.MainLoop()
end
Attachments
Screenshot gifenc_sel_iuplua.jpg
Screenshot gifenc-sel IUP/Lua version
(33.38 KiB) Downloaded 406 times

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#23 Post by wiak »

1. To create a GUI dialog with IUPLua you can use one of the pre-defined dialogs, such as the very versatile yad-like dialog created using iup.GetParam(), or some other pop-up dialog such iup.filedlg for selecting files or directories. An exemplar for this yad-like dialog method, using iup.GetParam() function is given via the link below:

http://www.murga-linux.com/puppy/viewto ... 818#988818

with more sophisticated version here:

http://www.murga-linux.com/puppy/viewto ... 877#988877

As described, the above is an IUPLua translation of fredx181's gifenc-sel bash/yad program.
----------

2. Alternatively, you can build your own dialogs from scratch (in similar, but easier fashion, to Puppy's favourite gtkdialog), using 'Reference' dialog widgets such as iup.dialog, which you can fill with, for example, iup.tabs{}, iup.frame{}, iup.vbox{}, iup.hbox{} containers and fill these with components of type iup.button{}, iup.label{}, iup.radio{}, iup.toggle{}, iup.text{} and so on.

What follows is an exemplar showing the creation of a IUPLua dialog that has the look and feel of the GUI dialog used in makepup bash/gtkdialog program. Note that the example below only creates the GUI dialog; for makepup functionality the additional code required to process and use the woof-CE scripts would have to be added. First I show the gtkdialog code extract from original bash/gtkdialog makeput, then the IUPLua code translation, followed by an alternative IUPLua code translation (which illustrates how to break dialogs up in IUPLua).

IUPLua dialogs are much easier to put together than the equivalent gtkdialog pseudo-xml constructs, I find, and have the advantage of being able to be easily broken up using that second bottom-up piecemeal build approach. As you can see, you can also insert comments directly into IUP constructs, which makes documentation and debugging significantly easier.

Owing to the amount of illustrative code, this is a very long post. I suggest opening it up in two browser tabs so that you can compare the gtkdialog version more easily with that of IUPLua. Hope this example is helpful to others who would like to enjoy developing GUI apps with IUPLua, which is as simple as using yad, but with all the power (and much more) of gtkdialog scripting (in addition to providing the speed, power, clean coding style, and flexibility of Lua programming, which means there is no limit to the simplicity or sophistication of the apps you can write with IUPLua):

This is gtkdialog dialog-creation code used in makepup programme of http://www.murga-linux.com/puppy/viewto ... 541#965541 where you can find a screenshot of the result:

Code: Select all

simplegui () {
export SIMPLEGUI="
<window title=\"makepup $programversion\">
<vbox>
 <notebook labels=\"$(gettext 'Basic|Advanced')\">
 <vbox>
  <frame $(gettext 'Settings')>
   <hbox>
    <text><label>$(gettext 'woof-CE-branch [-w]: ')</label></text>
    <combobox>
     <variable>WOOFBRANCH</variable>
      $(combobox_list woof-CE-testing woof-CE-rationalise)
     </combobox>
   </hbox>
   <hbox>
    <text><label>$(gettext 'target architecture [-t]: ')</label></text>
	<combobox>
     <variable>TARGETARCH</variable>
     $(combobox_list 2:x86 1:arm 2:x86 3:x86_64)
    </combobox>
   </hbox>
   <hbox>
    <text><label>$(gettext 'distro base [-d]: ')</label></text>
    <combobox>  
     <variable>COMPATDISTRO</variable>
     $(combobox_list 3:slackware 1:debian 2:devuan 3:slackware 4:trisquel 5:ubuntu)
    </combobox>
   </hbox>
   <hbox>
    <text><label>$(gettext 'release version [-r]: ')</label></text>
    <combobox>  
     <variable>COMPATVERSION</variable>
     $(combobox_list 3:Slackware14.2 1:DebianStretch 1:DevuanAscii 1:Slackware14.0 1:UbuntuArtful32 1:UbuntuTahr64 1:TrisquelBelenos 2:Slackware14.1 2:UbuntuTahr32 2:UbuntuXenial64 3:Slackware14.2 3:UbuntuXenial32)
    </combobox>
   </hbox>
   <hbox>
    <text><label>$(gettext 'Huge kernel [-H]: ')</label></text>
    <combobox>  
     <variable>HUGEKERNEL</variable>
     ${HKERNEL_ITEMS}
    </combobox>
   </hbox>
  </frame> 
  <hbox>
   <text><label>$(gettext 'Check your settings and then:')</label></text>
   <button>
    <label>$(gettext 'Build your Pup!')</label>
    <action type=\"exit\">BUILD</action>
   </button>
  </hbox>
 </vbox>
 <vbox>
  <frame $(gettext 'makepup optional switches')>
   <checkbox>
    <label>$(gettext '[-D] also build devx')</label>
    <variable>DEVX</variable>
   </checkbox>
   <checkbox>
    <label>$(gettext '[-k] keep previous woof-CE branch')</label>
    <variable>KEEPBRANCH</variable>
    <default>$KEEPBRANCH</default>
   </checkbox>
   <checkbox>
    <label>$(gettext '[-R] REBUILD ALL_PACKAGES (post-install scripts etc)')</label>
    <variable>REBUILDALL</variable>
   </checkbox>
   <checkbox>
    <label>$(gettext '[-T] allow pop-up "choose-THEMES" gui during build')</label>
    <variable>POPUPTHEMES</variable>
   </checkbox>
   <checkbox>
    <label>$(gettext '[-p] pause makepup soon after 0setup routine')</label>
    <variable>PAUSE</variable>
   </checkbox>
   <checkbox>
    <label>$(gettext '[-a] adds pets from local-repositories/pets2add/')</label>
    <variable>ADDPETS</variable>
   </checkbox>
   <checkbox>
    <label>$(gettext '[-A] adds packages from local-repositories/pkgs2add/')</label>
    <variable>ADDPKGS</variable>
   </checkbox>
   <checkbox>
    <label>$(gettext '[-i] interactive mode (like woof-CE manual build)')</label>
    <variable>INTERACTIVE</variable>
   </checkbox>
   <radiobutton> 
    <label>$(gettext 'Use woof-CE default extra rootfs-packages')</label>
    <variable>DEFAULTEXTRA</variable>
   </radiobutton>
   <radiobutton> 
    <label>$(gettext 'Use makepup_extra.conf for extra rootfs-packages')</label>
    <variable>EXTRACONF</variable>
   </radiobutton>
   <radiobutton> 
    <label>$(gettext 'allow pop-up "choose extra rootfs-packages" gui')</label>
    <variable>POPUPEXTRA</variable>
   </radiobutton>
  </frame>
  <hbox>
   <text><label>$(gettext 'Check your settings and then:')  </label></text>
   <button>
    <label>$(gettext 'Build your Pup!')</label>
    <action type=\"exit\">BUILD</action>
   </button>
  </hbox>
 </vbox>
 </notebook>
 <hbox>
  <button tooltip-text=\"$(gettext 'Opens filemanager at local-repositories/pets2add directory')\">
   <label>$(gettext 'pets2add')</label>
   <action>$FMANAGER local-repositories/pets2add</action>
  </button>
  <button tooltip-text=\"$(gettext 'Opens filemanager at local-repositories/pkgs2add directory')\">
   <label>$(gettext 'pkgs2add')</label>
   <action>$FMANAGER local-repositories/pkgs2add</action>
  </button>
  <button tooltip-text=\"$(gettext 'Opens filemanager at local-repositories/huge_kernels directory')\">
   <label>$(gettext 'kernel2add')</label>
   <action>$FMANAGER local-repositories/kernel2add</action>
  </button>
  <button><label>$(gettext 'QUIT')</label></button>
 </hbox>
</vbox>
</window>
"
There follows an almost exact IUPLua translation of the above, which you can try by putting it in a text file, making that executable with chmod +x and then executing it with lua5.3:

Code: Select all

-- Program: makepup-iup.lua (GUI part as iuplua exemplar)
-- Version 1.0a: one big dialog...
-- Author: wiak (https://github.com/wiake). Licence: MIT

require( "iuplua" )

programversion = "1.0a"

-- Creates dialog
simplegui = iup.dialog{
  iup.vbox -- start of outermost container
  {
    iup.tabs -- start of tabs
    {
      iup.frame -- start of main frame1
      {
        iup.vbox -- start of main vbox1
        {
          iup.hbox
          {
            iup.fill{},
            -- note that I haven't managed to get label to align with dropdown list
            -- alignment="ARIGHT:ACENTER" didn't work (nor did ":ACENTER")
            iup.label{title="woof-CE-branch [-w]: "},
            iup.list {"woof-CE testing", "woof-CE rationalise"; dropdown="YES", value=1, bgcolor="255 255 0", size="80x"}
            
          },
          iup.hbox
          {
            iup.fill{},
            iup.label{title="target architecture [-t]: "},
            iup.list {"1:arm", "2:x86", "3x86_64"; dropdown="YES", value=2, size="80x"}
          },
          iup.hbox
          {
            iup.fill{},
            iup.label{title="distro base [-d]: "},
            iup.list {"1:debian", "2:devuan", "3:slackware", "4:trisquel", "5:ubuntu"; dropdown="YES", value=3, size="80x"}
          },
          iup.hbox
          {
            iup.fill{},
            iup.label{title="release version [-r]: "},
            iup.list {"1:DebianStretch", "1:DevuanAscii", "1:Slackware14.0", "1:UbuntuArtful32", "1:UbuntuTahr64", "1:TrisquelBelenos", "2:Slackware14.1", "2:UbuntuTahr32", "2:UbuntuXenial64", "3:Slackware14.2", "3:UbuntuXenial32"; dropdown="YES", bgcolor="255 0 128", fgcolor="255 0 128", value=10, size="80x"}
          },
          iup.hbox
          {
            iup.fill{},
            iup.label{title="Huge kernel [-H]: "},
            iup.list {"hugekernel_list"; dropdown="YES", value=1, size="80x"}
          },
          iup.fill{},
          iup.frame
          {
            iup.hbox{
              iup.fill{},
              iup.label{title="Check your settings and then: "},
              iup.button{title="Build your Pup!"}
            }
          }
        }; -- end of main vbox1
        title = "Settings", -- attribute of main frame1
        tabtitle = "Basic"
      }, -- end of main frame1
      iup.frame -- start of main frame2
      {
        iup.vbox -- start of main vbox2
        {
          iup.toggle{title = "[-D] also build devx"},
          iup.toggle{title = "[-k] keep previous woof-CE branch", value="ON"},
          iup.toggle{title = "[-R] REBUILD ALL_PACKAGES (post-install scripts etc)"},
          iup.toggle{title = '[-T] allow pop-up "choose-THEMES" gui during build'},
          iup.toggle{title = "[-p] pause makepup soon after 0setup routine"},
          iup.toggle{title = "[-a] adds pets from local-repositories/pets2add/"},
          iup.toggle{title = "[-A] adds packages from local-repositories/pkgs2add/"},
          iup.toggle{title = "[-i] interactive mode (like woof-CE manual build)"},
          iup.radio
          {  
            iup.vbox
            {
              iup.toggle{title="Use woof-CE default extra rootfs-packages"},
              iup.toggle{title="Use makepup_extra.conf for extra rootfs-packages"},
              iup.toggle{title='allow pop-up "choose extra rootfs-packages" gui'}
            };
            value=1
          },
          iup.fill{},
          iup.frame
          {
            iup.hbox{
              iup.fill{},
              iup.label{title="Check options and then: "},
              iup.button{title="Build your advanced Pup!"}
            }
          }
        }; -- end of main vbox2
        title = "makepup optional switches", -- attribute of main frame2
        tabtitle = "Advanced",
        fgcolor = "0 0 255"
      } -- end of main frame2
    }, -- end of tabs
    iup.vbox
    {
    iup.hbox{
      iup.fill{},
      iup.button{title="pets2add", tip='Opens filemanager at local-repositories/pets2add directory'},
      iup.button{title="pkgs2add", tip='Opens filemanager at local-repositories/pkgs2add directory'},
      iup.button{title="kernel2add", tip='Opens filemanager at local-repositories/huge_kernels directory'},
      iup.button{title="QUIT"}
    }
    }
  }; -- end of outermost container
  title="makepup-iuplua " .. programversion
}

-- Shows dialog in the center of the screen
simplegui:showxy(iup.CENTER, iup.CENTER)

if (iup.MainLoopLevel()==0) then
  iup.MainLoop()
end
IUPLua (unlike gtkdialog) can be very easily broken down into smaller parts in bottom-up design fashion, which makes debugging easier in larger dialog creations. Here is the above partially re-written in that bottom-up coding fashion, which is a IUP recommended approach:

Code: Select all

-- Program: makepup-iup.lua (GUI part as iuplua exemplar)
-- Version 1.0b: partially broken into bottom-up design pieces
-- Author: wiak (https://github.com/wiake). Licence: MIT

require( "iuplua" )

programversion = "1.0b"

-- Create main frames
frame1_bottom = iup.frame
{
  iup.hbox
  {
    iup.fill{},
    iup.label{title="Check your settings and then: "},
    iup.button{title="Build your Pup!"}
  }
}

frame2_bottom = iup.frame
{
  iup.hbox
  {
    iup.fill{},
    iup.label{title="Check options and then: "},
    iup.button{title="Build your advanced Pup!"}
  }
}

frame1 = iup.frame{
        iup.vbox -- start of main vbox1
        {
          iup.hbox
          {
            iup.fill{},
            -- note that I haven't managed to get label to align with dropdown list
            -- alignment="ARIGHT:ACENTER" didn't work (nor did ":ACENTER")
            iup.label{title="woof-CE-branch [-w]: "},
            iup.list {"woof-CE testing", "woof-CE rationalise"; dropdown="YES", value=1, bgcolor="255 255 0", size="80x"}
            
          },
          iup.hbox
          {
            iup.fill{},
            iup.label{title="target architecture [-t]: "},
            iup.list {"1:arm", "2:x86", "3x86_64"; dropdown="YES", value=2, size="80x"}
          },
          iup.hbox
          {
            iup.fill{},
            iup.label{title="distro base [-d]: "},
            iup.list {"1:debian", "2:devuan", "3:slackware", "4:trisquel", "5:ubuntu"; dropdown="YES", value=3, size="80x"}
          },
          iup.hbox
          {
            iup.fill{},
            iup.label{title="release version [-r]: "},
            iup.list {"1:DebianStretch", "1:DevuanAscii", "1:Slackware14.0", "1:UbuntuArtful32", "1:UbuntuTahr64", "1:TrisquelBelenos", "2:Slackware14.1", "2:UbuntuTahr32", "2:UbuntuXenial64", "3:Slackware14.2", "3:UbuntuXenial32"; dropdown="YES", bgcolor="255 0 128", fgcolor="255 0 128", value=10, size="80x"}
          },
          iup.hbox
          {
            iup.fill{},
            iup.label{title="Huge kernel [-H]: "},
            iup.list {"hugekernel_list"; dropdown="YES", value=1, size="80x"}
          },
          iup.fill{},
          frame1_bottom
        }; -- end of main vbox1
        title = "Settings", -- attribute of main frame1
        tabtitle = "Basic"
}

--[[ or after frame1 already defined, could here instead now use:
frame1.title = "Settings"
frame1.tabtitle = "Basic"
]]

frame2 = iup.frame{
        iup.vbox -- start of main vbox2
        {
          iup.toggle{title = "[-D] also build devx"},
          iup.toggle{title = "[-k] keep previous woof-CE branch", value="ON"},
          iup.toggle{title = "[-R] REBUILD ALL_PACKAGES (post-install scripts etc)"},
          iup.toggle{title = '[-T] allow pop-up "choose-THEMES" gui during build'},
          iup.toggle{title = "[-p] pause makepup soon after 0setup routine"},
          iup.toggle{title = "[-a] adds pets from local-repositories/pets2add/"},
          iup.toggle{title = "[-A] adds packages from local-repositories/pkgs2add/"},
          iup.toggle{title = "[-i] interactive mode (like woof-CE manual build)"},
          iup.radio
          {  
            iup.vbox
            {
              iup.toggle{title="Use woof-CE default extra rootfs-packages"},
              iup.toggle{title="Use makepup_extra.conf for extra rootfs-packages"},
              iup.toggle{title='allow pop-up "choose extra rootfs-packages" gui'}
            };
            value=1
          },
          iup.fill{},
          frame2_bottom
        }; -- end of main vbox2
        title = "makepup optional switches", -- attribute of main frame2
        tabtitle = "Advanced",
        fgcolor = "0 0 255"
}

--[[ or after frame2 is already defined, could here instead now use:
frame2.title = "makepup optional switches"
frame2.tabtitle = "Advanced"
frame2.fgcolor = "0 0 255"
]]

-- Creates tabs 
tabs = iup.vbox{iup.tabs{frame1, frame2}}

-- Creates dialog
makepup_dlg = iup.dialog{
  iup.vbox -- start of outermost container
  {
    tabs,
    iup.hbox{ -- this horizontal panel will be identical in both tabs
      iup.fill{},
      iup.button{title="pets2add", tip='Opens filemanager at local-repositories/pets2add directory'},
      iup.button{title="pkgs2add", tip='Opens filemanager at local-repositories/pkgs2add directory'},
      iup.button{title="kernel2add", tip='Opens filemanager at local-repositories/huge_kernels directory'},
      iup.button{title="QUIT"}
    }
  }; -- end of outermost container
  title="makepup-iuplua " .. programversion
}

-- Shows dialog in the center of the screen
makepup_dlg:showxy(iup.CENTER, iup.CENTER)

if (iup.MainLoopLevel()==0) then
  iup.MainLoop()
end
You can find the reference for all the containers and controls you can use to produce IUP GUI dialogs in the left-most panel here, which also gives you all the attribute information you can add for each control:

http://webserver2.tecgraf.puc-rio.br/iup/

A summary of some of the available controls can be found here:

http://www.allbasic.info/forum/index.ph ... 35#msg2435

and examples for most of the widget/controls here:

https://webserver2.tecgraf.puc-rio.br/iup/examples/Lua/

Note that I haven't manage to get label alignment working quite as I'd like (I tried alignment="ACENTER:ACENTER" attribute). It's a minor issue in practice, but please let me know if you find how to do that, or any other improvements (or other example code) that I and others might find useful.

wiak
Attachments
screenshot_tab1.jpg
screenshot tab1 - makepup Basic Settings tab
(28.67 KiB) Downloaded 372 times
screenshot_tab2.jpg
screenshot tab2 - makepup advanced options tab
(48.66 KiB) Downloaded 376 times

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#24 Post by wiak »

Tecgraf released a new version (3.25) of IUP on 28 May 2018 so I'm busy compiling a GTK2 version of that now (all now successfully compiled - just need to package before trying it out). IupLua offers far more than just GUI dialog capability of course - can program more or less anything with it including OpenGL graphics (with its OpenGL Controls library), general drawing with IupCanvas, graph plotting with IupPlot, image processing and whatever including full power of Lua. If you want to get into a bit 'real' programming and away from rather weird bash manipulations, IupLua is a relatively easy way to do it without also having to master complex Graphics toolkits like Qt, WxWidgets, or GTK itself.

http://webserver2.tecgraf.puc-rio.br/iu ... tory3.html

https://sourceforge.net/p/iup/iup/4962/

My old compile notes helped alot, but these were far from perfect so I'm refining them a bit too since IUP needs a few tricks to compile it correctly (and I had to relearn some of these tricks despite my previous 'very' rough notes...).

Actually there has been quite a lot of very recent development activity on IUP (ongoing apparently) so I'm compiling the latest from SVN trunk, which contains a new container called IUPMultiBox which should help with complex layouts I imagine.

The previous downloads are fine just now though so I'll probably not upload new version until development work on the latest version has settled down a bit (last commit was just a dozen hours or so ago...).

Following my recent work on gtkwialog and more recently wiagit, I'm really keen to focus for a bit on IUPLua programming now since I see a lot of promise in it for future DebianDog/Puppy programming and more. (Pity it uses an SVN repo rather that Git since I need some more practice with wiagit and Git more generally...).

Main thing with IupLua will be to learn a bit Lua, but I'm also interested to see how well I could integrate IUP use with bash or shell programming generally. Can use IUP with straight C of course, and there are bindings for various other programming languages, not just Lua (though IupLua is the principal one continually developed). I'm not imagining a bash binding per se - just want to see how well I could use IupLua itself alongside shells scripting - might well be possible to pass dialogs onto child IupLua program via environment variable or some other mechanism. But it may be well be better to program more in Lua and less in shell...

I already know that it is easier to program nice dialogs with IUPLua than with GtkDialog, and one of its pre-defined controls (iupGetParam) is at least as easy as YAD with --fields etc (and iupGetParam is more powerful), as I demonstrated at following link:

http://murga-linux.com/puppy/viewtopic. ... 818#988818

wiak

Post Reply