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

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



[RELEASE] Launcher - application launcher plugin for Linux, Mac, Windows, and Xbox - leo2 - 2008-08-10

Hello,

This (open source) plugin is able to launch (start) Linux, Mac, Windows, and Xbox applications from within the XBMC GUI.

Help to debug and troubleshoot it under Mac OS X would be appreciated as I do not own a Mac myself.

The plugin has been tested and working under XBMC 8.10 (Atlantis).

Download Link:
http://code.google.com/p/xbmc-launcher/downloads/list

Image

Image

SVN Access:
svn checkout http://xbmc-launcher.googlecode.com/svn/trunk/ xbmc-launcher-read-only

Wiki:
http://code.google.com/p/xbmc-launcher/wiki/Main

Plugin Features:
- Run an application with arguments.
- Run a file from directory using given application.
- Search & Download images for applications and files using Yahoo search engine.
- Full work with the GUI with. (add application, remove, add files, etc..)

Installation:
1. unzip the file into Plugins/Program directory.
2. (linux users only): create a symlink for /usr/lib/libcurl.so.4 named /usr/lib/libcurl.so (run: "sudo ln -sf /usr/lib/libcurl.so.4 /usr/lib/libcurl.so" in terminal)
3. Run XBMC:
3.1. Switch to MC360 Skin (or some other skin that has "Programs" Section)
3.2. Go to Games -> Applications -> Add Source -> Browse -> Program Plugins
3.3. Select Launcher and Click "OK"
3.4. Click OK Again.
3.5. Right Click on "Launcher" Icon
3.6. Choose "Add to Favorites"
3.7. Switch back to PMIII Skin.
3.8. Click on the Arrow in the bottom right corner
3.9. Choose "Launcher"

Known Bugs:
1. Got stuck if no images were found on Yahoo service.
2. (Windows Only) Minimizing and not maximizing back the XBMC after program finished.
3. Need to exit & re-enter directory to see changes (like adding & removing files)

I'll be happy to get feedback about it, you may also open bugs in :
http://code.google.com/p/xbmc-launcher/issues/list


Enjoy!

Regards / leo


- marlboroman1 - 2008-08-10

thanks for creating this plugin its much appreciated this version seems to work well very polished

for any one trying to get this to work on a newer build of XBMC that is fresh installed as opposed to upgraded. You will need manually create the programs folder in C:\Program Files\XBMC\plugins

ps dose this build work on xbox and will it be going in the plugin svn


- leo2 - 2008-08-11

marlboroman1 Wrote:ps dose this build work on xbox
maybe, I didn't have an xbox to try it on.
it should.

marlboroman1 Wrote:and will it be going in the plugin svn
depends on the xbmc team.


Xbox? - Gamester17 - 2008-08-12

leo2 Wrote:I've working last few weeks on a plugin that is able to run windows or linux applications within the XBMC GUI.
The plugin has been tested and working under:
Windows XP - XBMC Rev14676
Ubuntu 8.04 - XBMC Rev14725
is it backwards compatible with XBMC for Xbox as well?

Huh


- leo2 - 2008-08-15

Gamester17 Wrote:is it backwards compatible with XBMC for Xbox as well?

Huh
don't know, don't have an xbox so I can't test it.


- jitterjames - 2008-08-19

is it possible to use this to launch movies from the main interface? I would love to be able to use xbmc as a front end, but currently I'm not too happy with xbmc for playing back HD content. Ideally, I'd like to be able to browse through media as I normally would, but have the option to launch movies in an alternate application (like media player classic).

I have set up the beta of launcher and it works great, but I can only use it to launch a preset file. Any ideas on how I could pass the file path and name to the launcher on the fly?

btw I think this feature should be a standard element of xbmc (as it is for media portal)and I don't understand why more people aren't interested in it!


Just Given it a try on a xbox. - DigiNews - 2008-08-20

I know you never intended for it to work on Xbox, just reporting it that it indeed for me at least does not work. Reports a network error. Smile Great plugin however, I'm sure it will be extremely easy to use.


- Aenima99x - 2008-08-25

Thanks a lot for this, excellent work! I'm surprised more people haven't jumped on this.


- us1111 - 2008-08-27

I Probably don't get this..Tried to add a firefox script once and did it wrong.. Now when I try to add a launcher, I can't redo the firefox script..

browse -> Program Plugins -> Launcher -> Firefox Folder(Huh) -> Import Files From Path? ->

Yes -> Hangs on dialog "Loading Directory"
No -> Empty Directory

How can I make a new launcher and erase the "old" firefox settings? And another question, can I make multiple launchers?


- leo2 - 2008-08-28

us1111 Wrote:I Probably don't get this..Tried to add a firefox script once and did it wrong.. Now when I try to add a launcher, I can't redo the firefox script..

browse -> Program Plugins -> Launcher -> Firefox Folder(Huh) -> Import Files From Path? ->

Yes -> Hangs on dialog "Loading Directory"
No -> Empty Directory

How can I make a new launcher and erase the "old" firefox settings? And another question, can I make multiple launchers?

just delete it, and recreate it.


- leo2 - 2008-08-28

DigiNews Wrote:I know you never intended for it to work on Xbox, just reporting it that it indeed for me at least does not work. Reports a network error. Smile Great plugin however, I'm sure it will be extremely easy to use.

can you send me the log file please?


Launcher script for Xbox - micster - 2008-09-15

I was looking for a way to get emuLauncher to work with more modern skins (like Aeon and MediaStream) when I came across Leo2's modified version called "Launcher" that he wrote for Windows and Linux flavors of XBMC. According to Leo2 it should work for xbox, but he didn't have one to test it on.

I'm happy to say that I got it to work on my xbox, which is fantatstic because now I can have a single launcher script for my emulators for all platforms (Linux, Windows, and Xbox).

Here are a few of the problems I ran into and how I worked around them to get this script working on the xbox console. I'm not really a coder (I've never even used Python before this), so I'm sure there are much more elegant solutions that will hopefully be integrated into the final version of this script.

  1. Line #3 of "settings.xml" had to change the default thumbnails path. The other path was causing an error that said "Network Path Could not be found". I also received this error message whenever I had a typo or misconfiguaration with "launcher_plugin.py"... Perhaps a better error routine is needed?
    Code:
    <setting id="thumbs_path" type="folder" source="files" label="30001" default="Q:\UserData\Thumbnails\Programs" />
  2. Within "launcher_plugin.py" you use an if/else statement to determine what platform we are using.
    Code:
    if (sys.platform == 'win32'):
                        if (launcher["wait"] == "true"):
                            cmd = "System.ExecWait"
                        else:
                            cmd = "System.Exec"
                        xbmc.executebuiltin("%s(\"%s\" %s \"%s\")" % (cmd, launcher["application"], launcher["args"], rom["filename"]))
                    elif (sys.platform.startswith('linux')):
                        os.system("%s %s %s" % (launcher["application"], launcher["args"], rom["filename"]))
                    else:
    I discovered a fatal flaw with using
    Code:
    sys.platform
    as the xbox returns it's system platform as "win32" instead of "xbox".
    I noticed that within the Apple Movie Trailer script they use a similiar check to determine what platform we are using
    Code:
    environment = os.environ.get( "OS", "xbox" )
        if ( environment == "Linux" or environment == "OS X" ):
            ext = ".so"
        else:
            environment = "win32"
            ext = ".pyd"
    This statement appeared to work a little better. I tested it on my xbox and it properly replied with the environment equal to "xbox" and then I tested the same code on my Windows installation and it properly returned "win32". I didn't get a chance to test it on Ubuntu 8.04 but I imagine it would return "Linux" as the environment.

    I tried to replace your If Statements with the above code from the Apple Trailers Script throughout your "launcher_plugin.py", but it failed. I ended up just declaring a variable at the very top of the script called "platform" and set it equal to "xbox".


  3. I ran into another problem within "launchers.xml" where all of my roms had double quotes around their paths. I couldn't find where in your code they were getting this so I just searched and replaced "launchers.xml" for the double quotations and removed them.


  4. The final problem I have detected is when grabbing thumbnails the path is written with a forward slash "/" and for me to get them to display on my xbox with the thumb path I set above I had to switch this to a back slash "\". I'm not sure what part of the code needs to be changes because I found lots of calls to thumbnails and "/" but the one spot that seemed to work for me was on line #377 of "launcher_plugin.py"
    Code:
    filepath = "%s\%s" % (path, os.path.basename(url))
    I still ran into a problem with some images not displaying when I select them from them from the thumbnail search, but I have not had time to diagnose this problem yet.
It seems that most of these problems stem from checking what platform we are using.


- micster - 2008-09-15

Hey Leo2,
I got your script running on my xbox! It is pretty awesome so I just wanted to thank you for your effort in this script.

If you wanna take a look at what I did and perhaps you might be able to integrate some fixes into the final version of this script... check my thread here: http://forum.xbmc.org/showthread.php?p=220168#post220168

I don't really understand too much of what I did, it was mostly trial and error, but I'd like to hear your thoughts on better solutions Smile

-Mic


- leo2 - 2008-09-15

I'll try to insert your changes into the main version.
I'll be happy if you'll test it again after my changes.


- leo2 - 2008-09-15

thanks, I'll try to insert your changes into the main version.


This forum uses Lukasz Tkacz MyBB addons.