Xbmc Launch Pnds


Regardless it does work...

Now as to the print statements this is what I got at the end of the log file

Code:
before minimize

after minimize

EGL minimizing

after application launch

Of course that isn't a direct quote but it appears the script runs through everything just fine.

I'm going to try it without actually quitting the app (Pnd + power switch) to see if the after application launch never gets triggered...
 
sebt3 said:
You don't have sound because XBMC is not releasing the sound system.
Even while quitting XBMC : You start the apps then stop XBMC. So when the app start, it try and fail to get Audio, then XBMC stop and release the audio system.
You should add some delay in the app starting.

I'm definatly surprised that you manage to minimize XBMC as my own tests didn't ended so well.

Oh and restauration function look like this :
bool CWinSystemEGL::Restore()
{
return false;
}

I'm expecting it to not work ;)

How would I go about adding a delay?
 
Last edited by a moderator:
Okay... and when I restart before actually quitting the pnd app "after application launch" is never inserted into the log file

Woopee!
 
YES! I added a 2 second delay and sound works now!

Just before the app launches in the script I added this

Code:
import time
time.sleep(2)
 
Ok. We're very close now.

The XBMC python script obviously cannot restart XBMC as it shuts down along with it.

What is it you're launching now? pnd_run? If so, wrap it with a shell script of your own to add a layer of indirection and launch that script instead.

Script should do something like this:
- start pnd_run passing all the shell scripts parameters and wait for it to finish
- restart xbmc

<edit>By the way, due to some comments Gruso made in the other thread, I decided to work on a custom pnd_launcher script in the future that also takes the categories defined in the pxml / .desktop files into account to present a structured list of pnd applications instead. </edit>
 
I'm not too good with shell scripts and passing arguments along with them...

But if you tell me what to put in the file I can do it!
 
HackModford said:
I'm not too good with shell scripts and passing arguments along with them...

But if you tell me what to put in the file I can do it!
Neither am I, that's why I intentionally left it out :p

<edit>What exactly are you invoking right now? I.e. what does the following statement yield?
print "%s %s" % (launcher["args"], launcher["application"])
</edit>
 
Last edited by a moderator:
args = the arguments you specify (in my case I type "pnd_run "
application = yields the pathname of the file you specificy
 
HackModford said:
args = the arguments you specify (in my case I type "pnd_run "
application = yields the pathname of the file you specificy
I'm guessing xbmc itself needs to be launched by pnd_run as well?
Don't know exactly what you need there, probably something as pnd_run <path>/xbmc

I think that info should be located in the Exec line of '~/Desktop/xbmc.desktop' or something similar.
So determine what <start xbmc> should be first.

Then:
Code:
#!/bin/bash
pnd_run $1
<start xbmc>
or (I think this passes all the scripts parameters, correct me if I'm wrong)
Code:
#!/bin/bash
pnd_run $@
<start xbmc>

Wait...pnd_run is an argument? I would expect you to have specified pnd_run as the "emulator" to launch and the applications as the roms (with arguments left empty).
 
Last edited by a moderator:
It's just the only way I know how to get pnd_run in the beginning...

So yeah to run xbmc you have to type in a terminal or something

pnd_run <path to xbmc>xbmc.pnd

the same thing for any other pnd.

So the message that the python plugin script is sending to the OS is this

pnd_run /media/PANDORASD/pandora/desktop/picodrive.pnd
 
Ah, ok. No problem. We can always clean things up a bit later ;)

For now, change the argument (where you typed "pnd_run ") into the name of the shell script with complete path e.g. (/home/user/<scriptname>.sh).

Put the following code into the shell script (assuming that's where xbmc.pnd resides):
Code:
#!/bin/bash
pnd_run $1
pnd_run /media/PANDORASD/pandora/desktop/xbmc.pnd
And then try again.
Don't forget to make the shell script executable (chmod +x <scriptname>) and test it once
 
It launched the app fine but didn't seem to launch xbmc... is there any way we can clear the framebuffer inbetween? Like just color the screen black after "pnd_run $1"?

Edit: Makes me wonder if xbmc has truly quitted...

Is there a way we can just kill xbmc in this shell script? i bet that would do the trick.

I tried adding a delay between the two commands in the script but that didn't help either.

I just changed the second line to launch another app (gpSP.pnd) and that worked so I think xbmc is not quitting. How would you kill xbmc from the shell script?
 
Weird... just running the script from a file manager (with the change above) launched xbmc... but when I exit an app xbmc still will not start :(

Edit: have not tried killall

Edit: just tried it and it did not work either... why is xbmc being such a pain :rolleyes:

So just for reference this is what I have

Code:
#!/bin/bash
killall xbmc
sleep 1
pnd_run $1
sleep 1
pnd_run /media/PANDORASD/pandora/desktop/xbmc.pnd
 
HackModford said:
Weird... just running the script from a file manager (with the change above) launched xbmc... but when I exit an app xbmc still will not start :(

Edit: have not tried killall
killall is just an alternative option, I don't think it will make any real difference.

So you're saying when you launch:
./<scriptname>.sh /media/PANDORASD/pandora/desktop/picodrive.pnd
Then it starts picodrive and upon exiting of picodrive xbmc starts.
But when you launch this script from xbmc then picodrive starts but upon closing picodrive it does not start xbmc.

Am I correct? Or are you starting the script from the file manager without providing any arguments?
In the latter case 'run_pnd $1' would fail and xbmc would start immediately.
 
Last edited by a moderator:
Okay here's how it goes

When I launch it from xbmc
1)picodrive starts and works
2)when I exit picodrive nothing happens...
3)if I change the .sh to launch another program instead of xbmc it will launch it

When I launch it from a file manager with no arguments
1)xbmc will start because like you said there are no arguments present for the first pnd_run so it skips it and launches xbmc directly and it works...

You gave me an idea so I'm going to provide my own arguments (per say) and launch the script froma file manager to see what happens...

Edit: Yep when I provided my own arguments for the first pnd it launched fine. Then when I quit the app xbmc launched...

So it's as if xbmc is still running IMHO
 
HackModford said:
So it's as if xbmc is still running IMHO
Let's verify. You can use 'ps aux | grep xbmc' (without the quotes) to see if xbmc is still running.

Replace the line to start xbmc with:
ps aux | grep xbmc > ~/test-file

to store those results in a file named test-file in your home directory.
 
Last edited by a moderator:
sebt3 said:
Let me fix that for you :
HackModford said:
Code:
  #!/bin/bash
  killall xbmc.bin
  ...
I thought killall used partial matching as it appears to have an -e (exact) option, but I'll take your word for it :)
 
Last edited by a moderator:
Back
Top