[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
Eatmeimadanish Offline
Junior Member
Posts: 18
Joined: Aug 2009
Reputation: 1
Post: #551
I doubt native launching will happen in XBMC. My suggestion is for people to use the launcher script (or a python script) and call a macro inside of eventghost.
find quote
nitesh201 Offline
Junior Member
Posts: 1
Joined: Oct 2009
Reputation: 0
Post: #552
What exactly does this application do? Somebody told me that on an xbox, this application would allow me to run Windows Executables, such as Hulu Desktop, however, this does not seem very likely. This isn't possible is it?
find quote
JackieBrown Offline
Member+
Posts: 228
Joined: Jan 2008
Reputation: 0
Location: San Antonio, TX
Post: #553
No. The architecher is different
find quote
rausch101 Offline
Fan
Posts: 580
Joined: Sep 2006
Reputation: 1
Location: Washington D.C.
Post: #554
nitesh201 Wrote:What exactly does this application do? Somebody told me that on an xbox, this application would allow me to run Windows Executables, such as Hulu Desktop, however, this does not seem very likely. This isn't possible is it?

definitely not possible

Have a question? First try the XBMC online-manual and FAQ. Also: How to submit a debug log
find quote
simphax Offline
Junior Member
Posts: 41
Joined: Jul 2009
Reputation: 0
Post: #555
Hi! Just wanted to share my solution to the fullscreen problem on Windows machines. If you have the problem that XBMC cannot minimize when in fullscreen and therefore you cannot use the launched application because xbmc is covering the screen, please follow these instructions:

Open launcher_plugin.py in
C:\Users\{your username}\AppData\Roaming\XBMC\plugins\Programs\Launcher\resources\lib
with a text editor and locate the function def _run_launcher(self, launcherName)

there you will see the line
Code:
xbmc.executebuiltin("%s(\"%s\" %s2\")" % (cmd, launcher["application"], launcher["args"]))
paste the following code before and after this line
Code:
xbmc.executehttpapi("Action(199)")

so it will look like

Code:
...
                if (sys.platform == 'win32'):
                    if (launcher["wait"] == "true"):
                        cmd = "System.ExecWait"
                    else:
                        cmd = "System.Exec"
            xbmc.executehttpapi("Action(199)")
                    xbmc.executebuiltin("%s(\"%s\" %s2\")" % (cmd, launcher["application"], launcher["args"]))
            xbmc.executehttpapi("Action(199)")
                elif (sys.platform.startswith('linux')):
...

This will switch XBMC to windowed mode before launching an application and switch back to fullscreen after the application is closed.
find quote
zosky Offline
Member+
Posts: 302
Joined: Dec 2008
Reputation: 1
Location: toronto. canada
Smile    Post: #556
simphax Wrote:Hi! Just wanted to share my solution to the fullscreen problem on Windows machines. If you have the problem that XBMC cannot minimize when in fullscreen and therefore you cannot use the launched application because xbmc is covering the screen, please follow these instructions:

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 ?

8 xbmc frodo's (rc3) ... atom/ion(xbmcBuntu) | amd3000/nVidia9800(mint12) | iphone4(5.1.1) | hpTouchPad(cyanogen9) ... and more
+ central mySQL db + 11TB mdadm raid6 (+transmission-daemon & flexGet)
+ maraschino + IRtoy.v2
[Image: widget]
(This post was last modified: 2009-10-31 10:16 by zosky.)
find quote
fmaesso Offline
Junior Member
Posts: 4
Joined: Nov 2009
Reputation: 0
Post: #557
Hi!
Here, I press the key '\' and the screen go to the 1/4 of normal size, but the keyboard and mouse set focus on the firefox. When I quit of firefox, I press \ again and the screen size come back to the normal size.

This is a stupid solution, but a solution.

Sorry for my bad english!

Fernando Maesso
find quote
desperz Offline
Junior Member
Posts: 21
Joined: Dec 2007
Reputation: 0
Post: #558
Hi,

When i try that simphax say about copy that line in to the launcher_plugin.py
i'll get som error when try to open launcher.

http://pastebin.com/m5509da2c
find quote
leo2 Offline
Skilled Python Coder
Posts: 176
Joined: Jun 2008
Reputation: 0
Post: #559
desperz Wrote:Hi,

When i try that simphax say about copy that line in to the launcher_plugin.py
i'll get som error when try to open launcher.

http://pastebin.com/m5509da2c

try to modify the line directly without copy-paste, you might have copied a tab or spaces that are not in the correct place.
python language is very strict about spaces and tabs.
find quote
desperz Offline
Junior Member
Posts: 21
Joined: Dec 2007
Reputation: 0
Post: #560
Now i get no error but xbmc is still in foreground any clue

http://pastebin.com/d42102e23
find quote
Post Reply