Start any commandline application?

A nice (keyboard based) front end for Arcade / Console game emulators.

Moderator: battlecat

Start any commandline application?

Postby AzaIndustries » Tue Jan 13, 2015 7:58 am

Hey, I was wondering how I can set up one of the emulators to just be a list of command-line apps.

For example Kodi.

But I can't work out how to get it to launch without needing an application location for the 'emulator' that I've used for the list.

I thought that if I left the application location blank it would just run the command line part by itself which I've setup to just be [name] but no dice.

Any ideas?
AzaIndustries
 
Posts: 21
Joined: Mon Apr 28, 2014 5:04 am

Re: Start any commandline application?

Postby Zombie » Tue Jan 13, 2015 9:23 am

I do that using a file called run.sh that Parses KDE Shortcuts.

Code: Select all
#!/bin/bash -
# workdir=$(cat "$1" | awk -F'=' '/^Path=/ {print $2}')
# workdir=$(sed -n 's,^Path[^/]*,,p' < "$1")
# runapp=$(cat "$1" | awk -F'=' '/^Exec=/ {print $3}')
# runapp=$(sed -n 's,^Exec[^/]*,,p' < "$1")
# pushd $workdir
# $runapp

unset runapp workdir
while read -r line
do case $line in Exec*) runapp=${line#*=};; Path*) workdir=${line#*=};; esac

done < "$1"
# runapp=$(sed -n '/^Exec/s,^[^=]*=,,p' $1);
# workdir=$(sed -n '/^Path/s,^[^=]*=,,p' $1);
cd "$workdir";
$runapp;


You can then define a Windows/DOS/Linux Section with the shortcut like so:

Code: Select all
[Desktop Entry]
Name=Steelstorm
Comment=A Shooter
Exec=/opt/var/public/Linux/steelstorm/steelstorm64
Path=/opt/var/public/Linux/steelstorm/
Icon=steelstorm
Terminal=false
StartupNotify=false
Type=Application
Categories=Game;Arcade;


I use this for Wine, DosBox, and Linux Applications. I don't think I'd use it for XBMC/Kodi however as WahCade can lock Kodi out of your Sound card.
It makes me wish WahCade had an "Exit and run XBMC/Kodi option.
User avatar
Zombie
 
Posts: 791
Joined: Mon Oct 06, 2008 2:52 pm

Re: Start any commandline application?

Postby AzaIndustries » Tue Jan 13, 2015 12:13 pm

Ok thanks, I'll try it out.

I'm only using kodi because it's the only controller solution I could think of to be able to play music without a keyboard/mouse.
AAAND it's the only media player that I can get to still output audio when the TV is off.

Maybe I'll test some more media players out..
Might have to end up just using DLNA and my android phone as a remote.
AzaIndustries
 
Posts: 21
Joined: Mon Apr 28, 2014 5:04 am

Re: Start any commandline application?

Postby sairuk » Tue Jan 13, 2015 12:23 pm

Providing you pass the absolute path to a desktop file you can leave the emulator line empty and the desktop file plugin will pick it up and execute it


Code: Select all
emulator_title                          PCGAMES

### List Generation Settings ###
rom_path                                /usr/share/applications/
rom_extension                           desktop
dat_file                                                             
nms_file
catver_ini_file                                                   
list_generation_method                  rom_folder           

### Execution Settings ###
emulator_executable                                       
commandline_format                      [rompath]/[name].[romext]
alt_commandline_format_1                [name]
alt_commandline_format_2                [name]
game_specific_config_path
mameau - My random bits | Wah!Ki - A Wah!Cade wiki | Mah!Cade - Experimental Wah!cade Branch | ListGen | Lazarus
User avatar
sairuk
 
Posts: 432
Joined: Sat May 22, 2010 12:37 am

Re: Start any commandline application?

Postby AzaIndustries » Wed Jan 14, 2015 5:06 am

Great that helps a lot.

I'm having a different problem now, unrelated to this though.

Wahcade doesn't play any of the background music unless something else is playing sound before I start wahcade.
And if I run wahcade first nothing else will output audio.

This is frustrating I had everything working perfectly and I'm not sure what changed and now it doesn't.
And I'm sick of bothering you guys for stupid little problems all the time.
Man this week has just been 1 think breaking after the next for me.

So this is with youtube running before I start wahcade:
Image

And this is wahcade running first:
Image
AzaIndustries
 
Posts: 21
Joined: Mon Apr 28, 2014 5:04 am

Re: Start any commandline application?

Postby Zombie » Wed Jan 14, 2015 6:37 am

Do you use Pulse Audio?
User avatar
Zombie
 
Posts: 791
Joined: Mon Oct 06, 2008 2:52 pm

Re: Start any commandline application?

Postby AzaIndustries » Wed Jan 14, 2015 10:29 am

ALSA, with pulse?
Isn't pulse just software between also and programs and ALSA?

I wanted to use just ALSA but I switch between a USB Dac, S/PDIF, HDMI and 3.5mm analog. It was getting frustrating manually switching between the various outputs.

EDIT: Just tried it without pulse using just ALSA, the same thing happens. =/
AzaIndustries
 
Posts: 21
Joined: Mon Apr 28, 2014 5:04 am

Re: Start any commandline application?

Postby AzaIndustries » Sun Jan 18, 2015 1:35 am

I solved it by reinstalling gstreamer. -_-

Not sure what would have effected it.

EDIT: NVM,still not working.
But I discovered if I start wahcade by itself then change the audio output to something else and back to HDMI it works.
AzaIndustries
 
Posts: 21
Joined: Mon Apr 28, 2014 5:04 am

Re: Start any commandline application?

Postby Zombie » Sun Jan 18, 2015 6:26 am

I have an asoundrc file for this issue. My Mame Console has Banana Plug red and white connections that are the default audio out path for ALSA.
User avatar
Zombie
 
Posts: 791
Joined: Mon Oct 06, 2008 2:52 pm

Re: Start any commandline application?

Postby AzaIndustries » Sun Jan 18, 2015 6:56 am

Yeah I don't think I can make it work.
It mustn't like HDMI audio very much.

I don't really want to use analog audio because it's connected to an AVR.

So I'm going to just try optical out instead, using on board audio instead of GPU HDMI.

This will actually make it easier to do several other things, like play audio without the TV being on.

Just have to wait for a short optical cable I ordered to test it.
AzaIndustries
 
Posts: 21
Joined: Mon Apr 28, 2014 5:04 am


Return to Wah!Cade

Who is online

Users browsing this forum: No registered users and 3 guests

cron