[RELEASE] Launcher - application launcher plugin for Linux, Mac, Windows, and Xbox

  Thread Rating:
  • 7 Votes - 4.86 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
desperz Offline
Junior Member
Posts: 21
Joined: Dec 2007
Reputation: 0
Post: #561
It's working Smile
When i delete xbmc in roaming and start all over it work.
Thanks

/TT
find quote
arosequi Offline
Senior Member
Posts: 111
Joined: Nov 2008
Reputation: 0
Post: #562
zosky Wrote:Many thanks for this tip. + the steps are not much different for xbmcLive / ubuntu / linux...
  1. EDIT ~/.xbmc/plugins/programs/Launcher/resources/lib/launcher_plugin.py
  2. FIND TWO elif (sys.platform.startswith('linux')):
  3. WRAP BOTH with xbmc.executehttpapi("Action(199)")...ex1...
    Code:
    elif (sys.platform.startswith('linux')):
    [color=Red]                        xbmc.executehttpapi("Action(199)")[/color]
                            os.system("\"%s\" %s \"%s\"" % (launcher["application"], launcher["args"], rom["filename"]))
    [color=Red]                        xbmc.executehttpapi("Action(199)")
    [/color]
  4. Bingo Bango


EDIT: i originally did this by creating a BASH script (like a BAT file in windows)
EDIT 2 > now i've moved action(199) to the launcher_plugin.py, thanks simphax.
EDIT 3 > Still need BASH-fu Wink to HIDE the control from XBMC when playing games ...
(otherwise event server continues passing command to xbmc [without focus] while launcher is running emu's)
  1. delete /userdata/keymap/logtitech.xml
  2. refresh keymaping ... Action(203)
  3. launch
  4. restore keymap
  5. refresh key list ... Action(203)


Code:
[color=DarkOrange]  rm /home/xbmc/.xbmc/userdata/keymaps/LogitechRumble.xml # remove keymap[/color]
    [color=Red]curl "http://localhost:8080/xbmcCmds/xbmcHttp?command=Action(203)" # reload Keys[/color]
    $@
[color=DarkOrange]    cp /home/xbmc/.xbmc/userdata/keymaps/LogitechRumble.xml~ \
       /home/xbmc/.xbmc/userdata/keymaps/LogitechRumble.xml     # restore keys[/color]
[color=Red]    curl "http://localhost:8080/xbmcCmds/xbmcHttp?command=Action(203)" # relaod keys
[/color]

in the userdata/plugin_data/programs/Launcher/launchers.xml

  1. point each <launcher> <application> @ your scipt (BAT or SH)
  2. point ARG1 to your EMU/APP
  3. put [arg1] [arg2] [arg3] as [2,3,4]...


Code:
    <launcher>
        <name>nes</name>
        <application>[b]/path/to/the/scipt[/b]</application>
        <args>mednafen -nes.stretch 1 -nes.input.port1 gamepad  -nes.special scale4x -nes.pixshader scale4x -vdriver sdl -fs 1 -nes.xres 1920 -nes.yres 1080 </args>
        <rompath>/home/xbmc/links/gameISOs/NES/</rompath>
        <romext>nes</romext>

Is it possible to do this in the launcher_plugin.py ?

Did you have to do anything to get Launcher working in Linux? It won't even load up for me. Kinda sucks that development has stopped on it -- having a good method of playing games would be great to have in XBMC.
find quote
leo2 Offline
Skilled Python Coder
Posts: 176
Joined: Jun 2008
Reputation: 0
Post: #563
Launcher works on linux without any change, just download the latest version and unzip it into programs plugins directory. (see first post for details)
find quote
JustSomeUser Offline
Junior Member
Posts: 16
Joined: Dec 2008
Reputation: 0
Post: #564
Quote:I've found a method of launching from directories that contain spaces that works for me. Using latest build on XP.

I created a Shortcuts dir at the root of my drive containing a .bat file for each app that I want a launcher for.

To launch firefox I point Launcher at the following file:

D:\Shortcuts\firefox.bat

The contents of which are:

cd d:\program files\mozilla firefox\
start firefox.exe

Seems to work okay, I haven't tried any other apps/games or emulators yet though.

The problems with spaces seems related to this http://trac.xbmc.org/ticket/7337

To fix it just open "XBMC\plugins\Programs\Launcher\resources\lib\launcher_plugin.py"

search for "def _run_launcher(self, launcherName)"
look for "xbmc.executebuiltin" and escape the quotes like this
Code:
xbmc.executebuiltin("%s(\\\"%s\\\" \\\"%s\\\")" % (cmd, launcher["application"], launcher["args"]))

repeat this for "def _run_rom(self, launcherName, romName)" (few lines below)
and save the file
now delete "XBMC\plugins\Programs\Launcher\resources\lib\launcher_plugin.pyo" and try it out.

Tested with Launcher 1.04 and XBMC 9.11-a2 on WinXP64
find quote
fidoboy Offline
Fan
Posts: 404
Joined: Oct 2008
Reputation: 0
Post: #565
Hi all, i want to report here that this plugin is not working fine with latest alpha2 release on Linux. Until now i've been using the plugin with no problems but after the alpha2 update, when i launch firefox (or other apps) from XBMC live the app launches but i can't get it on focus, so i am unable to use the mouse or keyboard to perform any action on the app...

regards,
find quote
fablog Offline
Junior Member
Posts: 19
Joined: Nov 2009
Reputation: 0
Post: #566
What a frustration...

This is a super plugin but now it's not working for lack of support/integration in XBMC. For my system it's a master piece and now I must use the xbmc stable version to get this plugin working because with the last SVN it's not!!
I hope some will work on it.
JustSomeUser, thanks for your help, but it doesn't work for the ver. 24114.
find quote
JustSomeUser Offline
Junior Member
Posts: 16
Joined: Dec 2008
Reputation: 0
Post: #567
@fablog
You should try the alpha "XBMC 9.11-a2" it has rev24542 which is newer than your SVN 24114, as mentioned in my last post it's working with it.



Now about that sorting problem,
to get launcher to sort the roms and launchers alphabetically and not randomly.


To fix it just open "XBMC\plugins\Programs\Launcher\resources\lib\laun cher_plugin.py"

search for
PHP Code:
def _get_romsselflauncherName ):
...
            if (
len(roms) > 0) :
                for 
index in roms :
                    
rom roms[index]
                    
self._add_rom(launcherNamerom["name"], rom["filename"], rom["thumb"], len(roms))
            else:
... 
change to
PHP Code:
def _get_romsselflauncherName ):
...
            if (
len(roms) > 0) :
                for 
key in sorted(roms.iterkeys()):
                    
self._add_rom(launcherNameroms[key]["name"], roms[key]["filename"], roms[key]["thumb"], len(roms))
            else:
... 

search for
PHP Code:
def _get_launchersself ):
...
        if (
len(self.launchers) > 0):
            for 
index in self.launchers:
                
launcher self.launchers[index]
                
self._add_launcher(launcher["name"], launcher["application"], launcher["rompath"], launcher["romext"], launcher["thumb"], launcher["wait"], launcher["roms"], len(self.launchers))
            
xbmcplugin.endOfDirectoryhandle=intself._handle ), succeeded=TruecacheToDisc=False )
... 
change to
PHP Code:
def _get_launchersself ):
...
        if (
len(self.launchers) > 0):
            for 
key in sorted(self.launchers.iterkeys()):
                
self._add_launcher(self.launchers[key]["name"], self.launchers[key]["application"], self.launchers[key]["rompath"], self.launchers[key]["romext"], self.launchers[key]["thumb"], self.launchers[key]["wait"], self.launchers[key]["roms"], len(self.launchers))
            
xbmcplugin.endOfDirectoryhandle=intself._handle ), succeeded=TruecacheToDisc=False )
... 

and save the file
now delete "XBMC\plugins\Programs\Launcher\resources\lib\laun cher_plugin.pyo" and try it out.

Tested with Launcher 1.04 and XBMC 9.11-a2 on WinXP64
find quote
leo2 Offline
Skilled Python Coder
Posts: 176
Joined: Jun 2008
Reputation: 0
Post: #568
is this sort solution is backward compatible? I mean, will it work on XBMC 8.10?
find quote
leo2 Offline
Skilled Python Coder
Posts: 176
Joined: Jun 2008
Reputation: 0
Post: #569
fix commited to svn
find quote
fablog Offline
Junior Member
Posts: 19
Joined: Nov 2009
Reputation: 0
Post: #570
Thanks for the advice JustSomeUser Smile
find quote
Post Reply