Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 04-11-2016, 11:07 PM   #16
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by piika View Post
hi knc1

attached the Lua lib tekUI for GUI.
It's compiled on kt2 with default options. All its external dependencies are already on the kindle.

There are 2 changes made:

1. fontsizes (variable) in tek/ui/class/display.lua have all values doubled.

2. src/display_x11/display_x11_api.c (attached) only add 1 line: else { XStoreName(..) }

As the installed path is different from the paths in your esys.lua , I update the esys.lua to add the new paths. (attached)
Thanks for the work and the contribution.

The esys thing is a collapsed version of the Linux FHS -
but it will not hurt having a couple more paths in the search list.
It is explained in the old BitBucket repo. but not in the new GitHub repo. - - my bad for not getting that done.

I don't do GUI stuff myself, but if you have something that would serve as an example . . . .

Thanks again.

= = = =

PS: Should I add your work into the github repo? Or do you already have it in a repo somewhere?

Last edited by knc1; 04-11-2016 at 11:14 PM.
knc1 is offline   Reply With Quote
Old 04-12-2016, 05:09 AM   #17
piika
pikachu
piika began at the beginning.
 
piika's Avatar
 
Posts: 6
Karma: 10
Join Date: Apr 2016
Device: k3, kt2
Quote:
Originally Posted by knc1 View Post
Thanks for the work and the contribution.

The esys thing is a collapsed version of the Linux FHS -
but it will not hurt having a couple more paths in the search list.
there is a minor variation of path component "lua5.1" into "lua/5.1"

Quote:
Originally Posted by knc1 View Post
I don't do GUI stuff myself, but if you have something that would serve as an example . . . .
There are demos examples in the source download at http://tekui.neoscientists.org/

Quote:
Originally Posted by knc1 View Post
PS: Should I add your work into the github repo? Or do you already have it in a repo somewhere?
It's not my work. I only compile it. The original source does seems to have a github repo.

I am still learning lua
piika is offline   Reply With Quote
Old 04-12-2016, 07:36 AM   #18
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by piika View Post
there is a minor variation of path component "lua5.1" into "lua/5.1"


There are demos examples in the source download at http://tekui.neoscientists.org/



It's not my work. I only compile it. The original source does seems to have a github repo.

I am still learning lua
Historically, both pathname conventions have been used for Lua.
It is the way it is here due to restrictions on the length of rpath that the patchelf utility can handle.
See: ARMhf on the Kindle thread.

None of the demos have been run on a Kindle.
Note:
X11 is only available on the series 5.x (KT .. KV) devices (and in the K4's diagnostics mode).
Framebuffer (or the poorly supported DirectFB) is available on all models, K2 .. KV.
The almost grayscale screenshot of 11-Jan-2014 gives a hint of what might be possible on a Kindle:
http://tekui.neoscientists.org/screenshots.html

So if you have even a simple, do nothing but paint the screen, example on a Kindle - that would be nice.
Even better, if you can get it working on your K3.
Note: You may have to patch or enhance the framebuffer support to deal with the framebuffer layout on Kindles - not all models are the same.
Geekmaster has posted a lot on that subject here.
Ah, and getting it to work with the K4's idea of a keyboard ...
You can probable find ideas on that in the KOreader repository (which is mostly Lua).

It is in a Mercurial repository:
http://hg.neoscientists.org/tekui/summary

And the non-commercial version (which I am assuming you used - correct me if I am wrong) is MIT licensed:
http://hg.neoscientists.org/tekui/fi...b56c/COPYRIGHT

So I will assume that your code changes are intended to be covered by the same license.

Last edited by knc1; 04-12-2016 at 07:39 AM.
knc1 is offline   Reply With Quote
Old 04-12-2016, 10:48 AM   #19
piika
pikachu
piika began at the beginning.
 
piika's Avatar
 
Posts: 6
Karma: 10
Join Date: Apr 2016
Device: k3, kt2
Quote:
Originally Posted by knc1 View Post
None of the demos have been run on a Kindle.
Note:
X11 is only available on the series 5.x (KT .. KV) devices (and in the K4's diagnostics mode).
Framebuffer (or the poorly supported DirectFB) is available on all models, K2 .. KV.
The almost grayscale screenshot of 11-Jan-2014 gives a hint of what might be possible on a Kindle:
http://tekui.neoscientists.org/screenshots.html

So if you have even a simple, do nothing but paint the screen, example on a Kindle - that would be nice.
Even better, if you can get it working on your K3.
Note: You may have to patch or enhance the framebuffer support to deal with the framebuffer layout on Kindles - not all models are the same.
Geekmaster has posted a lot on that subject here.
Ah, and getting it to work with the K4's idea of a keyboard ...
You can probable find ideas on that in the KOreader repository (which is mostly Lua).

So I will assume that your code changes are intended to be covered by the same license.
I have run the demos on my kt2.
Its compiled with the x11 driver only, so it can only be used for kindle touch devices 5.x

framebuffer support will be too difficult for me!

I will try to package a demo into a kual extension.

and no change in license, I dun think I will touch any other codes.
piika is offline   Reply With Quote
Old 04-12-2016, 11:38 AM   #20
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by piika View Post
I have run the demos on my kt2.
Its compiled with the x11 driver only, so it can only be used for kindle touch devices 5.x

framebuffer support will be too difficult for me!

I will try to package a demo into a kual extension.

and no change in license, I dun think I will touch any other codes.
Ah, good.

If people can easily see it on their Kindle, we might generate some interest in having other things done with that package.

The Kindles also support GTK+ applications - but that is a bit of over-kill I think.

That is one of the things KUAL lacks - is the ability to get user input.
knc1 is offline   Reply With Quote
Old 04-13-2016, 09:13 AM   #21
piika
pikachu
piika began at the beginning.
 
piika's Avatar
 
Posts: 6
Karma: 10
Join Date: Apr 2016
Device: k3, kt2
Quote:
Originally Posted by knc1 View Post
Ah, good.

If people can easily see it on their Kindle, we might generate some interest in having other things done with that package.

The Kindles also support GTK+ applications - but that is a bit of over-kill I think.

That is one of the things KUAL lacks - is the ability to get user input.
Demo attached.

@knc1: can you test it on your kindle touch? others are welcomed to.

pre-requisite: install the tekUI library first.

I have not done any GTK development, ..

thanks
Attached Files
File Type: gz tekui-demo.tar.gz (30.7 KB, 123 views)
piika is offline   Reply With Quote
Old 04-13-2016, 10:13 AM   #22
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by piika View Post
Demo attached.

@knc1: can you test it on your kindle touch? others are welcomed to.

pre-requisite: install the tekUI library first.

I have not done any GTK development, ..

thanks
Sha-bang line is wrong on the first script I looked at.
You need to hardcode it to:
Code:
#!/usr/bin/lua -lesys
Take a look at my cpu report script in the 'cpu governor' subject thread.
You will find a few more KUAL 'tricks' in it.

But hey, thanks,
that was pretty good for a first try at a KUAL extension.
knc1 is offline   Reply With Quote
Old 04-13-2016, 11:01 AM   #23
piika
pikachu
piika began at the beginning.
 
piika's Avatar
 
Posts: 6
Karma: 10
Join Date: Apr 2016
Device: k3, kt2
Quote:
Originally Posted by knc1 View Post
Sha-bang line is wrong on the first script I looked at.
You need to hardcode it to:
Code:
#!/usr/bin/lua -lesys
Take a look at my cpu report script in the 'cpu governor' subject thread.
You will find a few more KUAL 'tricks' in it.

But hey, thanks,
that was pretty good for a first try at a KUAL extension.
Good, it works.

I have hardcoded as you writtern. but only in 1 script.

All demos are passed as argument to that script, can check menu.json

yes, I have seen your cpu script. and a few other extensions I have installed.

but I got to admit, lua is more difficult than python.
piika is offline   Reply With Quote
Old 04-13-2016, 11:13 AM   #24
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Recorded for public consumption:
https://github.com/janetizzy/KUAL-buttons

You can do the usual 'git dance':
You can fork that, clone the fork, make your changes, push the changes and issue a 'pull request'.
If you don't have an account there, its free (for the uses we put it to):
https://github.com/

Or I'll just edit in the changes to the demo extension when I get time.
Your choice.

Last edited by knc1; 04-13-2016 at 11:28 AM.
knc1 is offline   Reply With Quote
Old 04-13-2016, 08:29 PM   #25
piika
pikachu
piika began at the beginning.
 
piika's Avatar
 
Posts: 6
Karma: 10
Join Date: Apr 2016
Device: k3, kt2
Quote:
Originally Posted by knc1 View Post
Recorded for public consumption:
https://github.com/janetizzy/KUAL-buttons

You can do the usual 'git dance':
You can fork that, clone the fork, make your changes, push the changes and issue a 'pull request'.
If you don't have an account there, its free (for the uses we put it to):
https://github.com/

Or I'll just edit in the changes to the demo extension when I get time.
Your choice.
looks ok. if I will to make any further changes, I will clone that.
thanks.
piika is offline   Reply With Quote
Old 04-14-2016, 02:49 AM   #26
Hanspeter
Connoisseur
Hanspeter doesn't litterHanspeter doesn't litter
 
Posts: 77
Karma: 150
Join Date: Jul 2014
Device: Kindel PW1, Voyager
After some read and searching I found out what you are talking about and what Lua is.
It could be a good idea to add the Links to the two about pages to the first post.
http://tekui.neoscientists.org/index.html
http://www.lua.org/about.html

I was not aware that Lua is used as part of the kindle operation systems.

Hanspeter
Hanspeter is offline   Reply With Quote
Old 04-27-2016, 09:36 AM   #27
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by NiLuJe View Post
Nice!

For those crazy people who actually like the Lua syntax... ;p.
It could be worse, I might be porting m4 to the Kindles.

I think "AutoTools" is the only thing left in C.S. that is programmed in m4 macros (configure.ac and Makefile.am).

I am off on a small side-journey of 'AutoTooling Argon2' -
https://github.com/janetizzy/phc-win.../tree/autotool
(The 'NEWS' file has an example from yesterday - it will: ./configure, make, make install, and run - although far from being done.)

The Lua binding for Argon2 will also need a small shot of "AutoTool" before it installs.
knc1 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Host Multiple Virtual Libraries On Single System With Reverse Proxy Support bzowk Related Tools 1 08-04-2015 07:38 PM
support for IBM/360/370/S-390 code on the Kindles (KUAL) knc1 Kindle Developer's Corner 63 01-08-2014 06:02 PM
PRS-300 Chinese support in Prs+ system snoo Sony Reader Dev Corner 0 08-17-2012 08:13 AM
iLiad Lua: scripting for Iliad hansel iRex Developer's Corner 3 12-14-2008 06:51 PM


All times are GMT -4. The time now is 09:57 PM.


MobileRead.com is a privately owned, operated and funded community.