Kodi Community Forum

Full Version: [RELEASE] Launcher - application launcher plugin for Linux, Mac, Windows, and Xbox
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
zosky Wrote:leo there must have been a change to the way XBMC handles this on screen...

im using 2 systems
> build 18324 shows n64 / snes / xterm
> build 19538 shows launcher / launcher / xterm

im not overly concerned about this
'cause all my launchers are in sources.xml
( where i can set a different name and icon )
and i can still call each 1 with plugin://programs/Launcher/?[name]
It seems that in some build of xbmc it broke the launcher labels.
maybe something was changed in the Python plugins API.
It happened to me in another plugin also.
But I don't see a reason to work on it now, soon Launcher plugin won't be necessary anymore.
leo2 Wrote:But I don't see a reason to work on it now, soon Launcher plugin won't be necessary anymore.


?

are they coding launching features into xbmc?
rudeboyx Wrote:?
are they coding launching features into xbmc?
working on it. see http://forum.xbmc.org/showthread.php?tid...to=newpost and http://xbmc.org/ticket/6434 for updates.
leo2 Wrote:working on it. see http://forum.xbmc.org/showthread.php?tid...to=newpost and http://xbmc.org/ticket/6434 for updates.

wow dude, you've been busy. this is exciting stuff

please let us know when launcher is officially retired
so we can give it a proper send-off :p
.
I got this plugin to launch MAME roms on the mac, here's how:

First, open resources/lib/launcher_plugin.py and in the function _run_launcher, change
Code:
else:
    pass;
    # unsupported platform
to
Code:
else:
    os.system("\"%s\" %s" % (launcher["application"], launcher["args"]))
and in _run_rom, change
Code:
else:
    pass
    # unsupported platform
to
Code:
else:
    os.system("\"%s\" %s \"%s\"" % (launcher["application"], launcher["args"], rom["filename"]))
(i.e. mac launching code is the same as on linux, but the application and filename need to be quoted, as spaces-in-paths are common on the mac)

Now you can launch programs, you have to point Launcher at the binary inside the app bundle (e.g. /Applications/Something.app/Contents/MacOS/something instead of just /Applications/Something.app).

To launch a game in MAME OS X from the command line, you want to run "/Applications/MAME OS X.app/Contents/MacOS/MAME OS X" -Game pacman. Unfortunately Launcher wants to pass the full filename (/Users/foo/Library/Application Support/MAME OS X/ROMs/pacman.zip rather than just pacman). So we write a little shell script that takes the ROM filename and launches MAME with the correct parameters.

Create a file /Applications/MAME OS X.app/Contents/MacOS/cmdlauncher with the following content:
Code:
#!/bin/sh
"$(dirname "$0")/MAME OS X" -Game $(basename -s .zip "$1")

Mark this file executable (chmod 755 cmdlauncher). Now configure Launcher so that the emulator is cmdlauncher (with no arguments), and your ROMs folder is ~/Library/Application Support/MAME OS X/ROMs and it should all work.

Finally, I like to have the full names for the roms (not just filenames) and to have thumbnails showing. The following script will generate the XML with this information, just run it as: generate_romlist.sh "/path/to/MAME OS X.app", and stick the output between <roms> and </roms> in ~/Library/Application Support/XBMC/userdata/plugin_data/programs/Launcher/launchers.xml, replacing what's already there.

Code:
#!/bin/sh

mame="$1"
mamedir="$2"

if [[ ! -d "$mame" ]]
then
    echo "First parameter should be MAME app"
    exit 1
fi
if [[ ! -d "$mamedir" ]]
then
    mamedir="/Users/$USER/Library/Application Support/MAME OS X"
fi


for i in $(ls "$mamedir/ROMs")
do
    b=$(basename -s .zip $i)
    n="$("$mame/Contents/MacOS/mameosx-util" -l $b | tail -n 1 | cut -c 12- | sed s/.$//)"
    t="$mamedir/Screenshots/$b/0000.png"
    echo "<rom>"
    echo "\t<name>$n</name>"
    echo "\t<filename>$mamedir/ROMs/$b.zip</filename>"
    if [[ -e "$t" ]]
    then
        echo "\t<thumb>$t</thumb>"
    else
        echo "\t<thumb></thumb>"
    fi
    echo "</rom>"
done
great, please open an issue in: http://code.google.com/p/xbmc-launcher/issues/list, and I'll add it to the main version.
leo2 Wrote:great, please open an issue in: http://code.google.com/p/xbmc-launcher/issues/list, and I'll add it to the main version.

Leo i thought you where done with the launcher, because of the work you did to integrate this into the programs section of XBMC ?
the mac support is really minor change for Launcher, and the integrated solution will be ready only in the next version of XBMC (I hope). so meanwhile I would like to add this support.
is there anyway you could fix the display name thingy at the same time where Lanucher is displayed as a title for every emulator.

could be a final release for the XBMC Babylon version
rudeboyx Wrote:is there anyway you could fix the display name thingy at the same time where Lanucher is displayed as a title for every emulator.

could be a final release for the XBMC Babylon version

im seems to have fixed itself on SVN 19929
(installed from the ubuntu PPAs)
Hi,
forgive my English, I had a question ...

Someone has managed to integrate and operate any PC game in XBMC through the Launcher plugin?

is that I've only managed to run the SNES emulator and the Firefox browser

greetings.



Image
alright the latset build does fix the displayed titles but whenever i add a neww laucher/emulator, i get a special\\path error, then the xbox freezes. however when i reboot the xbox, launcher has created the new emulator correctly and everything works fine. also when i try and download thumbs via the search fot thumb function i get the same speciall\\path error. and xbox freezes
can anyone give me some help. Finally got the plugins menu to show up in xbmc. Don't know how but now its there. Tried adding launcher manually, to favourites, chucking it in the scripts folder. All gives the same results, "Python Script Failed". special://home/plugins/programs/Launcher/default.py. I do think its installed correctly as when i go to "plugin settings" im able to change the thumbnail path and the search engine(although its fixed).

Im running the latest xbmc svn build as of around 3hours ago. I've tried with 9.04 stable aswell, no luck either. Both were compiled manually on debian 5.
edit: after getting the error and pushing ok. Launcher comes up, says loading directory and is blank then gives another error
edit2: The exact same thing happens with the XBMC Zone plugin installer, python/xbmc issue?
edit3: same thing with videomonkey, ill post another thread for this as its unrelated to launcher, sorry for the waste of space Tongue
in the meantime i've set up some buttons in the programs section of mediastream so i can just launch freevo and get it to do the work....quite a bit uglier tho