2008-07-05, 12:29
hello,
I'm trying to improve emuLauncher script so it could be used under windows platform to run an emulator's roms.
all I did is to replace those lines :
with those lines:
unfortunately the xbmc does nothing when reached to os.spawnv line.
the log output :
and nothing more. (the "ended" line is never reached)
I also tried it with os.execv function, but nothing works.
the os.spanv command works good on python console.
I would be happy to get some help with this...
thanks,
leo
I'm trying to improve emuLauncher script so it could be used under windows platform to run an emulator's roms.
all I did is to replace those lines :
Code:
SHORTCUT = HOME_DIR + CUT_FILE
f=open(SHORTCUT, "wb")
f.write("<shortcut>\n")
f.write(" <path>" + self.emupath[self.index] + "</path>\n")
f.write(" <custom>\n")
f.write(" <game>" + title + '.' + self.romext[self.index] + "</game>\n")
f.write(" </custom>\n")
f.write("</shortcut>\n")
f.close()
xbmc.executebuiltin('XBMC.Runxbe(' + SHORTCUT + ')')
Code:
if sys.platform == 'win32':
print "launching..." + self.emupath[self.index] + " " + title + '.' + self.romext[self.index]
os.spawnv(self.emupath[self.index], [self.emupath[self.index], title + '.' + self.romext[self.index]])
print "ended"
else:
SHORTCUT = HOME_DIR + CUT_FILE
f=open(SHORTCUT, "wb")
f.write("<shortcut>\n")
f.write(" <path>" + self.emupath[self.index] + "</path>\n")
f.write(" <custom>\n")
f.write(" <game>" + title + '.' + self.romext[self.index] + "</game>\n")
f.write(" </custom>\n")
f.write("</shortcut>\n")
f.close()
xbmc.executebuiltin('XBMC.Runxbe(' + SHORTCUT + ')')
the log output :
Code:
12:22:21 T:3440 M:1098502144 INFO: launching...D:\Games\Mame\ZetaMAME32\ZetaMAME32en.exe D:\Games\Mame\Roms\amidar.zip
12:22:21 T:3440 M:1098502144 INFO:
I also tried it with os.execv function, but nothing works.
the os.spanv command works good on python console.
I would be happy to get some help with this...
thanks,
leo