How to write "Hello World" with S*park plugin

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • How to write "Hello World" with S*park plugin

      Based on API plugin tools v1.03 prerelease 4
      Prerequisites: Linux and STLinux stm23 cross-compile environment and some good will combined with sound patience (beer does help…)
      Installing such a setup is beyond this feeble post, but it is quite well documented elsewhere. Anyway, in a brief attempt to describe the basic options, you could:
      1. Install all the stuff from stlinux.com/install/distribution for sh4 on your existing Linux box, real or virtual ( you’ll have least problems with Fedora, but with little effort other distributions are just fine including omnipresent Ubuntu, check info on stlinux web)
      2. Use TDT git for E2 and chose stm23-123 build, although it is very likely that you don’t have to read this if you choose that path:)
      3. Take advantage of ready made virtual boxes, probably the easiest way to happiness…
      In case that you are unsure about the whole thing, the last option – 3.2 could be the most amicable solution.
      Some subjective notes, as always YMMV:
      • If using Linux as a guest on a VM do not be trigger happy with kernel updates, or at least check on web whether VM guest additions, or VM Tools, really work with desired combination. This could save you few hours and some nerves.
      • Choice between Oracle VM VirtualBox, VMware Wrkst, Player or something else is up to you, but free VirtualBox seems to work just fine except ‘slight’ annoyances with shared folders. You may end with running MC or something as root, if editing mount in rc.local with your id and rw rights does not work.
      • Gnome-commander or tuxcmd can come handy when moving files to Alien. Of course, if you write 3D rendering applications in awk, ignore this with deepest contempt.
      • You might encounter problems with stmyum (e.g. running ‘stmyum update’ to get the latest stm23 patches) as it’s written with old Python 2.3. Problem is ‘with’ that became a statement in newer Pythons, and stmyum uses it as variable. If you are skeptical towards cold-blooded animals like me, you’ll have great fun fixing that nuisance. On the other hand, updates (in this case) are not really crucial and can be cause of major screwup. See stlinux.com/faq?q=node/391
      • See here stlinux.com/install/distribution/directories for brief orientation.
      • To save your time by changing x rights for your plugin, there is simple script for telnet that sets execute rights on Alien-STB. It can be invoked by ‘./755’, better and faster version with ‘expect’ untried as it needs additional package. Of course you can set mounts, but it could turn out to be slower procedure than plain ftp, again, ymmv.
      Unpack HelloWsp.tgz in your favorite directory, newly created directory HelloWorldSP holds sources, includes, and sh4 executable is to be placed in ReadyPlugin (including premade ‘-Helloword’) . 2 Makefiles are provided , one for install from scratch or ready made VM (option 3.2 – octaMakefile and other standard STLinux instalments in /opt..) and the other for E2 TDT build (option 2) - tdtMakefile. Copy the right xxxMakefile to a Makefile, type ‘make’ and, very probable, things won’t work:) Check Makefile, modify it, check environment, see if attached ‘.bashrc’ makes can help you.
      File cMain.cpp is commented with enough descriptions, so even I can understand what is going on and that is definitively something. Plugin actions are from line 71 to 122, consisting of three trivial functions. First one writes ‘Hello World!’ in a window, second one does pretty much the same but via built in OSDmessage, and third displays mounts via popen() in the main plugin window. Line 136 c_menu->SetItmes( mItem, 3); establishes 3 menu items defined by struct mItem in line 55. RcuCtrl is dispatcher at line 150. File cMenu.cpp is the other where your modifications should come to life, e.g. to improve visuals, add or remove max menuitems, etc. Beware that remote control codes here become STB dependent, so choose wisely if you plan to cover all the members in Fulan family. Colors and additional OSD functions are in osd.h.
      Please do not be destructive:)
      Dateien
      • HelloWsp.rar

        (1 MB, 102 mal heruntergeladen, zuletzt: )

    Flag Counter