[WINDOWS] Launcher plugin for XBMC

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
WiSo Offline
Team-XBMC Developer
Posts: 2,695
Joined: Oct 2003
Reputation: 0
Location: Germany
Post: #46
I found a way to start an external process without the command prompt. The question is now should XBMC wait and do nothing until the process returns or shall it still run further.
I dunno about the side effects though but one can test both methods.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 9
Location: Sweden
Lightbulb   
Post: #47
WiSo Wrote:I found a way to start an external process without the command prompt. The question is now should XBMC wait and do nothing until the process returns or shall it still run further.
If you can't make it optional then I think XBMC should just pause/freeze everything and wait until the process returns, ...and if you can make optional then the default should still be to pause/freeze everything and wait until the process returns. Preferably it should be a setting per application that is added; I mean if I started an game from XBMC then I would want XBMC to pause/freeze everything and wait until the process returns but if I started a webbrowser then I would still want XBMC to keep running in the background.

Nod

By the way, how will that affect the other XBMC platforms (Linux, Mac, and Xbox)? Confused
...is it possible to somehow implement parts of it as unified/playform-independent code?

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
(This post was last modified: 2008-07-22 16:57 by Gamester17.)
find quote
kricker Offline
Team-XBMC QA Specialist
Posts: 3,419
Joined: Apr 2004
Reputation: 20
Location: Knoxville, TN
Post: #48
Gamester17 Wrote:If you can't make it optional then I think XBMC should just pause/freeze everything and wait until the process returns, ...and if you can make optional then the default should still be to pause/freeze everything and wait until the process returns. Preferably it should be a setting per application that is added; I mean if I started an game from XBMC then I would want XBMC to pause/freeze everything and wait until the process returns but if I started a webbrowser then I would still want XBMC to keep running in the background.

Nod

By the way, how will that affect the other XBMC platforms (Linux, Mac, and Xbox)? Confused
...is it possible to somehow implement parts of it as unified/playform-independent code?
I agree 100%. I use Meedio as my main frontend at the moment. I launch many different apps from it. One such thing is like Gamester17 said, launching a browser. Maybe I am listening to music or watching a tvshow in XBMC, then I think I need to go online really quick. Well, I don't want the music or tvshow to stop, they could keep playing. For dual monitor people, the browser opens on the second monitor not interfering with what XBMC is doing. Then there might be times where XBMC freezes like playing a game. Optional per item would be the best way to go if possible. Meedio has that as an option and it is quite nice to have.

Read this before using these builds.
XBMC win32 SVN builds
Changelog
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 9
Location: Sweden
Post: #49
kricker Wrote:Meedio has that as an option and it is quite nice to have.
Good point, GUI-wise we should maybe first check how MeediOS (not Meedio) and MediaPortal does to get some ideas.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
kricker Offline
Team-XBMC QA Specialist
Posts: 3,419
Joined: Apr 2004
Reputation: 20
Location: Knoxville, TN
Post: #50
WiSo Wrote:I found a way to start an external process without the command prompt. The question is now should XBMC wait and do nothing until the process returns or shall it still run further.
I dunno about the side effects though but one can test both methods.
I'd be happy to test the heck out of it, both ways.

Read this before using these builds.
XBMC win32 SVN builds
Changelog
find quote
WiSo Offline
Team-XBMC Developer
Posts: 2,695
Joined: Oct 2003
Reputation: 0
Location: Germany
Post: #51
Let's see. I would just implement it as python system command or as additional python command so the default behavior of XBMC won't change. What does XBMC does today if this plugin/script is started? Does it still play music? If yes not freezing it would play further (but of course needs to be tested).
@Gamester: the implementation would be similar to the already existing CUtil::Command for Linux (dunno if it's in use anywhere).
My implementation would be purely win32 unfortunately.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
kricker Offline
Team-XBMC QA Specialist
Posts: 3,419
Joined: Apr 2004
Reputation: 20
Location: Knoxville, TN
Post: #52
Would there be a way to have this tied to a menu item? So for example I can have a menu item called "SageTV" and when I select that item it opens SageTV?

Read this before using these builds.
XBMC win32 SVN builds
Changelog
find quote
Rand Al Thor Offline
Collect3 Project Manager
Posts: 916
Joined: Jul 2005
Post: #53
kricker Wrote:Would there be a way to have this tied to a menu item? So for example I can have a menu item called "SageTV" and when I select that item it opens SageTV?

You can quite easily write a python script to launch each app once they have all the bugs worked out. Then you can set a home button to execute for example firefox.py onclick. That is the way I currently have my linux XBMC box set up.
find quote
WiSo Offline
Team-XBMC Developer
Posts: 2,695
Joined: Oct 2003
Reputation: 0
Location: Germany
Post: #54
I'm not deep into python so I can't say how and if something might be possible but I can maybe offer two system commands (exec builtin) one waits for the script to exit and one just opening a shell (without the dos box).
Not sure if this will work but worth a try.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 9
Location: Sweden
Post: #55
I would prefer the basic adding and launching of executables from XBMC's program section to be a native code function just like it is on the Xbox version of XBMC.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Rand Al Thor Offline
Collect3 Project Manager
Posts: 916
Joined: Jul 2005
Post: #56
Gamester17 Wrote:I would prefer the basic adding and launching of executables from XBMC's program section to be a native code function just like it is on the Xbox version of XBMC.

I definitely agree with you there Wink I think it is inevitable but there are probably other things that are higher priority for the moment. It would be nice if xbmc could open an application inside xbmc as a sort of window manager. Similar to the way that linksbox worked on the original xbox. That way esc or back or whatever could always back out of the app to reveal xbmc's home screen. Not really sure about the inner workings of a project like this, my coding skills are very rusty. Anyway, just a few thoughts. Cheers.
find quote
WiSo Offline
Team-XBMC Developer
Posts: 2,695
Joined: Oct 2003
Reputation: 0
Location: Germany
Post: #57
Gamester17 Wrote:I would prefer the basic adding and launching of executables from XBMC's program section to be a native code function just like it is on the Xbox version of XBMC.

Agreed but I dunno what the actual plannings are according to it. In the meanwhile I can help out with functions which are easy to implement.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
kricker Offline
Team-XBMC QA Specialist
Posts: 3,419
Joined: Apr 2004
Reputation: 20
Location: Knoxville, TN
Post: #58
Rand Al Thor Wrote:...That way esc or back or whatever could always back out of the app to reveal xbmc's home screen...
That is what I am doing now with the help of EventGhost. It would be nice if it was like you mentioned though. Right now I am doing this:

XBMC:
home screen
-> apps
->-> plugins
->->-> launcher
->->->-> myTV
->->->-> recordings
->->->-> guide
->->->-> schedule

Each one of those launchers goes to a specific SageTV screen. Then in SageTV if I hit back or power in that screen, it sends a command to Eventghost to find the XBMC window and restore it and Sage minimizes.

As you can see above I have to go into 3 menus to the launch programs. Since I can't set launcher plugin as a 'default' I have to do that every time I run XBMC. It will be nice to simplify that menu structure.

Read this before using these builds.
XBMC win32 SVN builds
Changelog
find quote
WiSo Offline
Team-XBMC Developer
Posts: 2,695
Joined: Oct 2003
Reputation: 0
Location: Germany
Post: #59
I prepared a small testbuild: http://downloads.sourceforge.net/xbmc/XB...irror=osdn

system.exec: starts a shell without a dos box, XBMC runs further.
Problem: xbmc may not maximize after shell is closed. A way around has some tricky parts.

system.execwait: freezes XBMC until the shell returns. Since I can wait here for the shell to return I'm able to maximize XBMC again (at least it should work)

It's still not finalized because you can't pass arguments yet and you shouldn't use "" around the application path.
The shellexecuteex function allows it also to start a certain webpage with the default browser or do some other nice things which might be interesting (starting a process on another monitor :nodSmile.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
kricker Offline
Team-XBMC QA Specialist
Posts: 3,419
Joined: Apr 2004
Reputation: 20
Location: Knoxville, TN
Post: #60
Sorry for the dumb "not a coder" question. But how do I test with this .exe? Do we need to write a python script to use the new functions?

Read this before using these builds.
XBMC win32 SVN builds
Changelog
find quote
Post Reply