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.
- 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?
<setting id="thumbs_path" type="folder" source="files" label="30001" default="Q:\UserData\Thumbnails\Programs" />
- Within "launcher_plugin.py" you use an if/else statement to determine what platform we are using.
I discovered a fatal flaw with using
as the xbox returns it's system platform as "win32" instead of "xbox".
if (sys.platform == 'win32'):
if (launcher["wait"] == "true"):
cmd = "System.ExecWait"
cmd = "System.Exec"
xbmc.executebuiltin("%s(\"%s\" %s \"%s\")" % (cmd, launcher["application"], launcher["args"], rom["filename"]))
os.system("%s %s %s" % (launcher["application"], launcher["args"], rom["filename"]))
I noticed that within the Apple Movie Trailer script they use a similiar check to determine what platform we are using
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.
environment = os.environ.get( "OS", "xbox" )
if ( environment == "Linux" or environment == "OS X" ):
ext = ".so"
environment = "win32"
ext = ".pyd"
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".
- 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.
- 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"
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.
filepath = "%s\%s" % (path, os.path.basename(url))
It seems that most of these problems stem from checking what platform we are using.