WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TCL/TK  (Read 6584 times)

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
TCL/TK
« on: October 07, 2015, 11:37:19 PM »
Anyone got TK working?

I want to do a GUI outside of Xwindows.
Installed tcl.tcz and tk.tcz
Seems to be a missing Xorg-7.7-lib.tcz

Tcl seems to work but I get errors when I add - package requires Tk

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: TCL/TK
« Reply #1 on: October 08, 2015, 12:50:03 AM »
Whoops it is in .....7.x/armv6/tcz
Still getting head around going from 6 to 7.

no libtk8.5.so ?

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: TCL/TK
« Reply #2 on: October 08, 2015, 12:55:51 AM »
Yep looks like libtk8.5.tcz is missing

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TCL/TK
« Reply #3 on: October 08, 2015, 01:46:19 AM »
Yep looks like libtk8.5.tcz is missing

Yes, there are no such extension.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TCL/TK
« Reply #4 on: October 08, 2015, 01:48:10 AM »
Whoops it is in .....7.x/armv6/tcz
Still getting head around going from 6 to 7.

no libtk8.5.so ?

Install tk.tcz

If you are looking for a file, use the 'Provide' function of package manager to identify which tcz extension has it.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: TCL/TK GUI
« Reply #5 on: October 08, 2015, 07:21:31 PM »
Hi Bela,

Have to manually copy tcz's, no internet access :(
tcl,tk loaded with most of their dependencies.
Lots of files, so not a simple install.

What I am looking for is some way make GUI's outside of X11.
Starting to realise tk is X11 based I think.

This is for simple instrument UI's on the LCDs everyone is looking at now.
There is even a nice little 2.4" LCD 320x240 with touch, low cost $45 AUD.

Looking at some way to accelerate the UI's.
OpenVG, dispmanx to framebuffer?

Think I will go back and explore this option in more detail.
http://forum.tinycorelinux.net/index.php?topic=18821.0
or this
https://williamaadams.wordpress.com/tag/raspberry-pi-2/

By off loading the UI to the GPUs I can still use the ARM for control and sensor data collecting.
Going to install rpi-videocore.tcz and have a play.
Hmm old rpi-videocore.tcz, will it work on 4.1.8 kernel?

Gavin

 

Offline andyj

  • Hero Member
  • *****
  • Posts: 1022
Re: TCL/TK
« Reply #6 on: October 08, 2015, 07:38:27 PM »
I'm currently using TCL/TK for a project using a 2.8" screen. Yes TK uses X. I don't know how you would do it otherwise. You want a framebuffer console display? I suppose it's technically possible, but why? What's wrong with X? Also, I had to compile TCL and TK 8.6 for myself. These versions are required for freewrap, and for PNG support. The display speed issues are probably related to the interface. HDMI is quite fast, GPIO seems OK, and USB is laggy but livable. I haven't tried the native display connecter yet.

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: TCL/TK
« Reply #7 on: October 08, 2015, 09:34:59 PM »
Hi Andyj,

Trying to reduce the OS footprint.

For the types of UI I am doing I don't need windowing on a small screen.
Just a couple of buttons and plot graphing output.

Direct to framebuffer would be one method.
But it would be nice to have something like SVG to framebuffer.
http://forum.tinycorelinux.net/index.php?topic=18192.0

Been looking at this, also has some direct to memory "(/dev/mem") GPIO toggling I might test for speed.
https://github.com/Wiladams/LJIT2RPi

Lua, like C can write to memory, to save CPU I would like the GPU's to handle that.
A SVG UI would be nice then easy to do local LCD display and/or webserver html.
Multiple screens /dev/fb0, /dev/fb1.....

This looks interesting
https://pythonhosted.org/fbpy/
Test it with Micropython?

Regards
Gavin


Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TCL/TK GUI
« Reply #8 on: October 08, 2015, 10:40:16 PM »
Hmm old rpi-videocore.tcz, will it work on 4.1.8 kernel?


No, but you can use the latest from RPi GITHUB repo:

https://github.com/raspberrypi/firmware
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: TCL/TK
« Reply #9 on: October 08, 2015, 11:09:47 PM »
Yep, I would if I could figure out how to wrap it up into a tcz:)

Offline jncl

  • Newbie
  • *
  • Posts: 38
Re: TCL/TK
« Reply #10 on: October 09, 2015, 06:47:17 AM »
Hi gavinmc42,

  Try the attached scripts, put them in ~/.local/bin and make them executable:
Code: [Select]
chmod +x ~/.local/bin/*.sh
  They require a defined directory structure:
Code: [Select]
mkdir -p ~/build/tmp
  The rpi-videocore.tcz will be created in ~/build/tmp.

HTH

  Jon

Offline andyj

  • Hero Member
  • *****
  • Posts: 1022
Re: TCL/TK
« Reply #11 on: October 10, 2015, 06:40:22 AM »
My TK app runs full screen, no windows, using X, and I've made some tweaks to the TC boot sequence so I can go from power on to full screen GUI in under 10 seconds. And I am running raspicam to do video capture. I'm still not seeing where you are having a problem.

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: TCL/TK
« Reply #12 on: October 11, 2015, 05:54:32 PM »
Hi Andyj,

Might end up using X but for a single page UI it seems like overkill.
X11 requires lots of extras that take up memory.
Trying to minimize the libraries etc.
By reducing code and resources hopefully reliability goes up.

The UI is mainly for the smaller TFT LCD, 2.4-3.5", don't have space to waste on windows borders etc.

Been reading up, there seems to be a trend towards HTML based UIs, Webkit etc.
This sort of makes sense as most IoT devices have webservers built in.
Use the same tools to make standalone UI.
HTML for structure, CSSS for skins, JS for functions.
Accelerated UI's using the GPUs looks like the future.

There is also a good case to have Text based UI using curses as this can used in a serial terminal interface.
Make device with built in USB uart on the RPi serial port, plug Tablet into device, serial CLI debug/configure.
Could even have just a 3 wire connector and external USB uart dongle.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1022
Re: TCL/TK
« Reply #13 on: October 12, 2015, 03:08:27 PM »
I don't have any windows or borders on my 2.8" screen. TK runs fullscreen. There is a USB 2.8" display from Robopeak as well and I've used it but it's a little laggy. You say you want stability, speed, a smaller memory footprint, and then want to lean towards a browser and JS and no windows or X. I'm still confused.

Offline gavinmc42

  • Sr. Member
  • ****
  • Posts: 301
Re: TCL/TK
« Reply #14 on: October 12, 2015, 06:26:44 PM »
Haha,

Want I want is not usually want I need:)
Here I am thinking about tcl/tk which is quite old tech and then the latest "just around the corner" accelerated html UI's.

I figure if I learn tcl/tk it will work on any linux box, so it won't hurt to learn the old way.
But as I have already learnt to make webpage UI's with HTML5, CSS3, SVG, JS, it would be useful to use that method for local UI's.

In keeping with the spirit of Tinycore I don't want a code bloated OS.
Most of my stuff is one off prototypes that must work for years.
Old shell script methods running on 700MHz+ cpus are not that slow, add dialog, micropython, lua and now tcl/tk and you can do useful stuff.
tk on top of x11 is code bloat and not that easy, because I use the standard SSH piCore installing tcz from behind the Uni firewire is not easy.
So any tcz must be installed manually until I make a local tcz mirror.