XBMC Community Forum
[RELEASE] Launcher - application launcher plugin for Linux, Mac, Windows, and Xbox - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Add-ons Help and Support (/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (/forumdisplay.php?fid=151)
+---- Thread: [RELEASE] Launcher - application launcher plugin for Linux, Mac, Windows, and Xbox (/showthread.php?tid=35739)



- JackieBrown - 2009-09-28 06:05

launcher developement has stopped

From zosky's bug report
http://code.google.com/p/xbmc-launcher/issues/detail?id=19&can=1

Quote:I'm sorry, Launcher plugin development has been stopped. I've developed a native application launcher in xbmc, I hope XBMC guys will add it to the main branch sometime.



- Raketemensch - 2009-10-01 04:03

Ah, bummer, so there's no way to launch external programs with the current build?


- stoli - 2009-10-01 04:08

Launcher 1.04 still works the the latest builds - at least on Win7.


- zosky - 2009-10-01 11:58

1.04 confired working in XBMClive too. It's far from perfect, but It's the best we have untill this becomes native, I guess. (Thanks Leo)


- steve1977 - 2009-10-02 08:53

Anyone ever get it working on Mac? I can tell from this thread that it is supposed, but never get it running. Can someone post "step-by-step".


- JackieBrown - 2009-10-10 08:09

I tried using it with the new hulu destop plugin. It launchs but xbmc keeps control of my remote

Nevermind - it is a problem with huludestop, itself.


- dbldown768 - 2009-10-10 18:24

I receive the following error when trying to start the launcher application...

http://pastebin.com/m6435fb77


- Qjimbo - 2009-10-11 07:15

Hi, can anyone tell me how to fix the sorting on this? I put everything in the order I want in the launchers.xml file, but when going to the script, it messes up and puts everything in a seemingly random order?

Is this possible to fix?


- Qjimbo - 2009-10-12 21:33

Ok I managed to come up with a solution to this, you simply change the indexing in the python script.

Open up C:\Program Files\XBMC\plugins\programs\Launcher\resources\lib\launcher_plugin.py

Find:
Code:
self._path = sys.argv[ 0 ]

# get users preference

Change it to:
Code:
self._path = sys.argv[ 0 ]
        
        # New Global Index
        global newIndex
        newIndex = 0

        # get users preference

Find:
Code:
# add launcher to the launchers list (using name as index)
            self.launchers[name] = launcherdata

Change it to:
Code:
# add launcher to the launchers list (using name as index)
            # Qj edit, changed this to an incremental index
            global newIndex
            newIndex += 1
            self.launchers[newIndex] = launcherdata

Then save the file and copy it to:
C:\Documents and Settings\*YOURUSERNAME*\Application Data\XBMC\plugins\Programs\Launcher\resources\lib

Delete launcher_plugin.pyo in that folder.

Start XBMC and you should now have everything in the same order as it is in your launchers.xml file. Good day!

EDIT: Oh dear, that broke a lot of stuff, working on resolving the issues caused by changing the index key... I might look at simply sorting the array instead, but I don't know how as I'm a python noob...


- arosequi - 2009-10-17 18:58

Qjimbo Wrote:EDIT: Oh dear, that broke a lot of stuff, working on resolving the issues caused by changing the index key... I might look at simply sorting the array instead, but I don't know how as I'm a python noob...

I haven't started looking through the python source yet, but what array needs sorting?

I'm definitely interested in getting this to a usable state, since native launching is probably a ways away.


- Eatmeimadanish - 2009-10-19 21:47

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.


- nitesh201 - 2009-10-26 00:24

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?


- JackieBrown - 2009-10-26 15:49

No. The architecher is different


- rausch101 - 2009-10-26 16:25

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


- simphax - 2009-10-30 17:07

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.