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)



- rausch101 - 2010-09-08 23:37

JustSomeUser Wrote:Just patched up my modified launcher to work with new XBMC
based on the release from CinPoU (thanks for that).

And Zerqent found out how to fix the lockup after adding a new launcher. (great work)
This seems to happen when the plug-in is calling itself with "ReplaceWindow" (also on windows).

Grab it here
plugin.programm.launcher_patched_v1.6.0_JustSomeUser.zip

Mediafire back up. This is working great for me...thanks for the contribution JustSomeUser (and CinPoU and Zerqent and leo2)


- kamikaze7100 - 2010-09-10 19:27

Well I finally got the launcher working and I was wondering if there was a way to ad thumbnails manually. Since the image scraper dose not work.


- butchabay - 2010-09-12 03:29

kamikaze7100 Wrote:Well I finally got the launcher working and I was wondering if there was a way to ad thumbnails manually. Since the image scraper dose not work.

In settings you can choose the folder where thumbs should be saved in. You just have to rename the new thumb you want.


- obtender - 2010-09-12 10:09

sorry, but where is the setting folder ? thanks


- Zerqent - 2010-09-12 12:28

JustSomeUser Wrote:Just patched up my modified launcher to work with new XBMC...

Ok. gave it a test now and seems to be working great!

However, shouldn't it be called plugin.program.launcher (and not plugin.programm.launcher)?

4 Changes needed for this:
- Rename folder of addon
- Rename in addon.xml
- 2 renames needed in resources/lib/launcher_plugin.py

Also - if you aleady have set up launcher in the past and want them to work with this addon you need to:
Move userdata\plugin_data\Launcher\Launchers.xml to
userdata\addon_data\plugin.programm.launcher\ (OR plugin.program.launcher if you renamed like I described over)


- butchabay - 2010-09-12 22:52

obtender Wrote:sorry, but where is the setting folder ? thanks

You have to press C when launcher is highlighted and so plugin settings should be avaible.


- dinozzo - 2010-09-15 20:53

Hi, im very close to getting zsnes working but am having issues with it not being the focus. At the moment when I launch a rom all I get is a black screen and I have to press the \ key to switch focus to zsnes which is working fine. I have the latest version of the launcher script (plugin.programm.launcher_patched_v1.6.0_JustSomeUser.zip) and am using the beta1 of xbmc for Linux. I have read some info that I need to edit launcher_plugin.py and add xbmc.executehttpapi("Action(199)") but its already included in this latest version. My launchers.xml looks like this:

Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<launchers>
    <launcher>
        <name>Zsnes</name>
        <application>/usr/bin/zsnes</application>
        <args>-m -s -v 22</args>
        <rompath>/home/xbmc/Media/Roms/Snes/</rompath>
        <romext>smc</romext>
        <thumb></thumb>
        <wait>true</wait>
        <roms></roms>
    </launcher>
</launchers>

Any ideas as to why it wont start and switch focus?

Thanks in advance,
Dan


- tinybilbo - 2010-09-16 01:43

Hi,

Is there any way that I can use this script/launcher to send a single command to the console?

I want to be able to toggle my VPN from the xbmc gui.

At the moment I have to ctrl-alt-f2 to get a console and the type a single command "pon VPN" to turn the Vpn on, and then "poff VPN" to turn it off.

A single click from xbmc itself would make this very wife-friendly Smile

Thanks


- zosky - 2010-09-16 07:20

dinozzo, action(199) needs to appear in 2 places in the launcher_plugin.py ...
i have this working & here's how mine looks:

Code:
[color=red]def _run_launcher[/color](self, launcherName):
... ... ...
                [color=Red]elif (sys.platform.startswith('linux')):[/color]
                    xbmc.executehttpapi("Action(199)")
                    os.system("%s %s" % (launcher["application"], launcher["args"]))
                    xbmc.executehttpapi("Action(199)")
... ... ...
[color=red]def _run_rom[/color](self, launcherName, romName):
... ... ...
                [color=Red]elif (sys.platform.startswith('linux')):[/color]
                    xbmc.executehttpapi("Action(199)")
                    os.system("\"%s\" %s \"%s\"" % (launcher["application"], launcher["args"], rom["filename"]))
                    xbmc.executehttpapi("Action(199)")
... ... ...

short of that you could force the issue with a man-in-the-middle script... ex, my launcher.xml
Code:
<name>SNES</name>
                <application>/home/xbmc/.bin/xbmcEMU.sh</application>
                <args>zsnes -m -y  -ad alsa</args>
cat ~/.bin/xbmcEMU.sh
Code:
#!/bin/bash
# toggle xbmc.FS
curl "http://localhost:8080/xbmcCmds/xbmcHttp?command=Action(199)"

# go
DISPLAY=:0.0 $@

# toggle xbmc.FS
curl "http://localhost:8080/xbmcCmds/xbmcHttp?command=Action(199)"


i originally had action(199) in here, but moved it in-line after the patch was posted, i still used this to delete my joystick-keymap file, refresh the key-bindings --action(203)-- play, then restore the key-maps again. otherwise xbmc continues to process buttons from my joysticks while im in the emu.
________________________________

tinybilbo sounds like you simple need to create 2 launchers... i find it easier to do manually rather then through the UI...

edit the file ~/.xbmc/userdata/plugin_data/programs/Launcher/launchers.xml
add something like

Code:
<launcher>
[color=Red]                <name>VPN ON</name>
                <application>pon</application>
                <args>VPN</args>
[/color]                <rompath></rompath>
                <romext></romext>
                <thumb></thumb>
                <wait>true</wait>
                <roms>
                </roms>
        </launcher>  
        <launcher>
[color=red]                <name>VPN OFF</name>
                <application>poff</application>
                <args>VPN</args>[/color]
                <rompath></rompath>
                <romext></romext>
                <thumb></thumb>
                <wait>true</wait>
                <roms>
                </roms>
        </launcher>

then when you go to > plugins > launcher you'll see 2 new ones
then i'd suggest you add them to your fav's
& just till wifee to hit them from the home-screen Big Grin


- tinybilbo - 2010-09-17 00:58

zosky Wrote:sounds like you simple need to create 2 launchers... i find it easier to do manually rather then through the UI...

edit the file ~/.xbmc/userdata/plugin_data/programs/Launcher/launchers.xml
add something like

then when you go to > plugins > launcher you'll see 2 new ones
then i'd suggest you add them to your fav's
& just till wifee to hit them from the home-screen Big Grin

Thanks for the help,

Unfortunately it does not seem to work,
Both the commands appear in the launcher, and the screen flashes when I select them, but the VPN does not turn on (or off).
This is from the log.
Any ideas? Thanks

02:49:09 T:3078051712 M:1452871680 DEBUG: OnKey: 11 pressed, action is Select
02:49:09 T:3078051712 M:1452871680 DEBUG: RunScriptWithParams - calling plugin Launcher('plugin://plugin.programm.launcher/','-1','?VPN ON')
02:49:09 T:3078051712 M:1452871680 INFO: initializing python engine.
02:49:09 T:3078051712 M:1452871680 DEBUG: new python thread created. id=2
02:49:09 T:2990742384 M:1452871680 DEBUG: thread start, auto delete: 0
02:49:09 T:2990742384 M:1452871680 DEBUG: Python thread: start processing
02:49:09 T:2990742384 M:1452875776 NOTICE: -->Python Interpreter Initialized<--
02:49:09 T:2990742384 M:1452875776 DEBUG: Process - The source file to load is /home/xbmc/.xbmc/addons/plugin.programm.launcher/default.py
02:49:09 T:2990742384 M:1452875776 DEBUG: Process - Setting the Python path to /home/xbmc/.xbmc/addons/plugin.programm.launcher:/home/xbmc/.xbmc/addons/script.module.simplejson/lib:/usr/lib/xbmc/addons/script.module.pil/lib:/usr/lib/xbmc/addons/script.module.pysqlite/lib:/usr/lib/xbmc/system/python/python24.zip:/usr/share/xbmc/system/python/lib/python24.zip:/usr/share/xbmc/system/python/lib/python2.4/:/usr/share/xbmc/system/python/lib/python2.4/plat-linux2:/usr/share/xbmc/system/python/lib/python2.4/lib-tk:/usr/share/xbmc/system/python/lib/python2.4/lib-dynload
02:49:09 T:2990742384 M:1452875776 DEBUG: Process - Entering source directory /home/xbmc/.xbmc/addons/plugin.programm.launcher
02:49:10 T:2990742384 M:1451859968 NOTICE: /home/xbmc/.xbmc/addons/plugin.programm.launcher
02:49:10 T:2990742384 M:1451859968 NOTICE: Mode AddOn ON
02:49:10 T:2990742384 M:1451859968 NOTICE: /home/xbmc/.xbmc/userdata/addon_data/plugin.programm.launcher
02:49:10 T:2990742384 M:1451859968 NOTICE: -1
02:49:10 T:2990742384 M:1451859968 NOTICE: Launcher: found 2 launchers




Note to the author. - wipmonkey - 2010-09-17 17:51

I submitted this issue and I got a response.

http://code.google.com/p/xbmc-launcher/issues/detail?id=28

The forum is nice but I like the google projects pages better. Would any one be interested if I set up a google code page for the fork?? I'm a want-to-be developer and could do the administrative crap(documentation and whatnot).

on a side note...
Have you guys seen
http://code.google.com/p/romcollectionbrowser/


- zosky - 2010-09-18 22:08

wipmonkey Wrote:The forum is nice but I like the google projects pages better. Would any one be interested if I set up a google code page for the fork?? I'm a want-to-be developer and could do the administrative crap(documentation and whatnot).

i've submitted a new 'issue' requesting leo's permission for us to take over.

wipmonkey: i do agree google project's is great for tracking issues and requests (rather then this MASSIVE thread), but like others on here i'd love to see this get into the add-on repo. i too am a want-to-be-dev Cool & ready to make things happen

JustSomeUser: thanks for the mediaFire.zip, but i noticed xbmc.executehttpapi("Action(199)") is only in _run_launcher & missing from _run_rom. is there a reason for that ?

i'll come back with an update as soon as i hear back from leo.


- zosky - 2010-09-18 22:18

zosky Wrote:i've submitted a new 'issue' requesting leo's permission for us to take over.

oh my gosh. while writing my previous post, leo responded. i now have ownership of the google project. EekShocked ... I guess i'll start by PM those who are making the magic happen & figuring out what the deal is with the add-on repo


- Robert de Clair - 2010-09-19 18:09

wipmonkey: romcollectionbrowser are at now IMO non user friendly plugin Smile

At current dev state im really prefering launcher, and if only there are a chance for keep staying alive this script ill be really glad.
some tallented programist who working and reading in/with this thread - prove great capability of this script/addon, and IMO there are really just few things to fix and this will be best addon ever Smile

sorry for my english

edit:

polish translation: put into [installationfolder]\portable_data\addons\plugin.programm.launcher\resources\language
ofcourse it's path for -p (portable version) if you are using regullar installation, seek it into user folder depend on OS and user name.

When im first time adding a any emulator a Launcher just crashed after import all files. second run and everything is ok (files/roms are imported properly)

edit:

what for is waitstate on/off
can someone explain me it with example of use?


launcher in the add-on repo - zosky - 2010-09-24 02:53

NEW RELEASE: v1.10.1
  • Initial code sync between forum-mods & google project (thnx Zerqent)
  • Polish translations added (thnx Robert de Clair)
  • Version numbering changed: (launcherVER).(xbmcVER).(launcherREV)
  • now in the xbmc add-ons repo

please use the google project's issues page for any issues/patches/suggestions

next up: refreshing the project's wiki pages