mwainwright
Posts: 13
Joined: Tue Sep 11, 2012 10:48 am

programming a frontend launcher program

Mon Feb 25, 2013 12:54 pm

Hi all,

I want to program my own frontend program launcher to run over the comand line/terminal. somewhat like what raspBmc does, in nature though not in functionality.. i`ll outline what i want to do and would like input as to what programming language i`d be best to use, and what is the best approach etc..

so..

i`d like to launch emulators like c64 and spectrum, with the following process-

boot the pi, and it boots to my own menu screen, very simple screen (press 1 for c64, 2 for spectrum and so on) id like to not need the raspbian gui even loaded if possible, just run straight from boot over the top of the terminal, and if you kill the gui, it drops to terminal.

pressing the chosen emulator will save a string of the launch command of said emulator
and the screen will move on to a selection of games you can choose to launch,

selecting a game (by pressing 0-9) will save another string of the filename of the game to launch
and launch the game fullscreen, something like executing "vice -fullscreen /home/games/ghostsngoblins.tap"
or whatever the syntax would be.

when you quit the game it will drop back to my first menu screen

i dont want to ever see raspbian or any linux gui, just the terminal if its needed or quit.

does this sound relatively straightforward?

as i go on, i may make more complex menus and fancy options etc, but for now i just want to launch the games from a simple interface.

cheers,

Mark

-rst-
Posts: 1316
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: programming a frontend launcher program

Mon Feb 25, 2013 2:07 pm

You could look at how the raspi-config tool in Raspbian has been implemented...

Bash scripting and the dialog library http://linux.die.net/man/1/dialog or maybe curses http://linux.die.net/man/3/ncurses

Python has an interface for curses http://docs.python.org/2/library/curses.html http://docs.python.org/2/howto/curses.html
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'

User avatar
ro6er
Posts: 24
Joined: Fri Oct 19, 2012 6:26 pm

Re: programming a frontend launcher program

Tue Feb 26, 2013 8:38 am

Nice little menu:
https://gist.github.com/Mjiig/2481733

Auto login and instead of startx run your python.
http://elinux.org/RPi_Debian_Auto_Login

scrapheap
Posts: 20
Joined: Wed Feb 13, 2013 5:13 pm

Re: programming a frontend launcher program

Tue Feb 26, 2013 11:03 am

Pretty much any scripting language would be suitable for this (BASH; Perl; Python; etc.). If you know one of them then use that. On the other hand, if you are looking to use this as a project to learn a language from then I would suggest Perl or Python (knowledge of either will put you in a good position for almost any project).

Don't get me wrong, BASH is great and very capable, but it isn't the best environment to be learning programming in (though once you have learnt the basics of programming it will be easy enough to learn BASH).

mwainwright
Posts: 13
Joined: Tue Sep 11, 2012 10:48 am

Re: programming a frontend launcher program

Tue Feb 26, 2013 11:17 am

yep, i`m using it as a learning excercise as much as anything.. as a side note, can python be used to program apps for smartphones? LUA was mentuioned to me and that will compile to linux executables.

Return to “General programming discussion”