View Single Post
Old 09-18-2024, 07:09 PM   #4
elinkser
Addict
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 242
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
Compiling a Qt app for Kobo seems to be more challenging than it used to be:

User Szybet documented the process:
https://github.com/Szybet/nickel-qt-...main/README.md
* Since build process at https://github.com/Aryetis/qt5-kobo-platform-plugin was broken when last I checked, may need to compile plugin as Qt app as in:
https://github.com/Szybet/niAudio/bl...bo/qt-setup.md

Until somebody takes on that task, you can (* try to * - only tested on Clara HD, though versions of fbkeyboard/fbpad compiled to shared fbink lib are provided in https://www.mobileread.com/forums/sh...7&postcount=12 ) play with:
https://www.mobileread.com/forums/sh...62&postcount=8


* Not to imply that it couldn't be done in Rust, Python, Golang, Rmkit, or Koreader toolkit etc...
https://www.mobileread.com/forums/sh...74&postcount=4

But how many of these platforms have been updated to the newest devices? Just fbink/Koreader?
May require a dev with a device (or a dev and a user with a device.able to help with testing)

https://github.com/NiLuJe/FBInk
https://www.mobileread.com/forums/sh...06&postcount=7



***
***
***

Here's a simple chess game to try.

Use similar build steps as for PONG ON SDL ON SIXEL ON YAFT ON KOBO CLARA:
https://www.mobileread.com/forums/sh...3&postcount=20


https://sourceforge.net/projects/mpchess/

$ wget https://downloads.sourceforge.net/pr...s-1.2.1.tar.gz

$ tar zxvf mpchess-1.2.1.tar.gz

$ cd mpchess-1.2.1/

$ cd src/

$ source ~/koxtoolchain/refs/x-compile.sh kobo env bare

$ mkdir include

$ cp ../../libsixel-1.8.6/include/sixel.h include/

$ mkdir include/SDL

$ cp ../../SDL1.2-SIXEL-sixel/include/*.h include/SDL/

$ mkdir lib

$ cp ../../libsixel-1.8.6/src/.libs/libsixel.a lib/

$ cp ../../libsixel-1.8.6/src/.libs/libsixel.so.1.0.6 lib/libsixel.so.1

$ cp ../../SDL1.2-SIXEL-sixel/build/.libs/libSDL.a lib/

$ cp ../../SDL1.2-SIXEL-sixel/build/.libs/libSDL-1.2.so.0.11.4 lib/libSDL.so
$ cp ../../SDL1.2-SIXEL-sixel/build/.libs/libSDL-1.2.so.0.11.4 lib/libSDL-1.2.so.0

(Actually, all necessary files were included in files attached to Posts #19 and #20 of Crosscompile a web browser for the KOReader terminal https://www.mobileread.com/forums/sh...d.php?t=350054 )


$ nano -l chess.c
Code:
...
 26 #include <SDL/SDL.h>
...

$ nano -l makefile
Code:
 1 mpchess: chess.o 
 2         arm-kobo-linux-gnueabihf-gcc -o mpchess -Llib -lSDL -lm chess.o 
 3
 4 chess.o: chess.c
 5         arm-kobo-linux-gnueabihf-gcc -g -Iinclude -c chess.c
 6
 7 clean: 
 8         rm -f mpchess chess.o

$ make

$ file mpchess
mpchess: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.33, with debug_info, not stripped


On the desktop you would have compiled with corresponding versions of gcc and libs, and run in a sixel- enabled terminal like:
$ xterm -ti vt340


But on Kobo, you can run in Yaft, but you will need a keyboard like fbkeyboard2 (mentioned above), unless you run from SSH.


Copy the libsixel.a, libsixel.so.1, libSDL.a, and libSDL-1.2.so.0 libs to the /mnt/onboard/.adds/kordir/libs/ folder of your kobo.


Copy the mpchess binary to the /mnt/onboard/.adds/kordir/ folder on the Kobo:

To set the path and library path as in Post #14:
# . /korenv.sh

Run yaft terminal, leaving space for keyboard:
# YAFT_PERCENT=58 yaft

# . /korenv.sh

From a YAFT terminal:

# mpchess


Whoa, everything is tiny - that's a nice project to work on (for someone else )
Had to pkill mpchess from a separate session.


***
***
***

*UPDATE - A couple of ugly hacks to make it bigger (* new one is mpchess-build.zip, not mpchess.zip)
Inexplicably, I always have to turn on networking, start USB networking, start Dropbox server, then Yaft terminal, then Oskansi2 keyboard, THEN korenv.sh and mpchess, to get reliable operation...
Attached Files
File Type: zip mpchess.zip (32.8 KB, 401 views)
File Type: zip mpchess-build.zip (702.8 KB, 39 views)

Last edited by elinkser; 03-21-2025 at 12:25 PM. Reason: current,mpchess, update bigger in mpchess-build.zip attachment only
elinkser is offline   Reply With Quote