RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - LakersFan - 2014-11-13
(2014-11-12, 23:12)bradwatson Wrote: (2014-11-12, 20:35)LakersFan Wrote: Brad,
Could I trouble you for your applaunch.sh and launcher.py files? I tried editing them as stated in the first post, but I get errors. Also, what version of RCB are you using? I'm on 2.0.17. Also, what version of Mupen are you using for N64? (I have a rooted FireTV.) And I know this is probably a really dumb question, but once I select the version of Mupen I use, does the program download it or do I need to sideload it manually and point to that?
I came to this thread from your XDA post on your awesome XBMC on Fire TV setup. So I know yours is working good.
Thank you! Traveling today, but should be able to get this info to you tomorrow.
Thank you, sir. No rush as I'm leaving tonight and will be back Friday afternoon...
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - bradwatson - 2014-11-14
(2014-11-13, 00:59)LakersFan Wrote: (2014-11-12, 23:12)bradwatson Wrote: (2014-11-12, 20:35)LakersFan Wrote: Brad,
Could I trouble you for your applaunch.sh and launcher.py files? I tried editing them as stated in the first post, but I get errors. Also, what version of RCB are you using? I'm on 2.0.17. Also, what version of Mupen are you using for N64? (I have a rooted FireTV.) And I know this is probably a really dumb question, but once I select the version of Mupen I use, does the program download it or do I need to sideload it manually and point to that?
I came to this thread from your XDA post on your awesome XBMC on Fire TV setup. So I know yours is working good.
Thank you! Traveling today, but should be able to get this info to you tomorrow.
Thank you, sir. No rush as I'm leaving tonight and will be back Friday afternoon...
Here is my applaunch.sh file:
Code: #!/bin/bash
# App Launch script - Quit XBMC to launch another program
# Thanks to rodalpho @ # http://xbmc.org/forum/showthread.php?t=34635
# By Redsandro 2008-07-07
# By ryosaeba87 2010-08-24 (Added support for MacOSX)
#
# Check for agruments
if [ -z "$*" ]; then
echo "No arguments provided."
echo "Usage:"
echo "launcher.sh [/path/to/]executable [arguments]"
exit
fi
#case "$(uname -s)" in
# Darwin)
# XBMC_PID=$(ps -A | grep XBMC.app | grep -v Helper | grep -v grep | awk '{print $1}')
# XBMC_BIN=$(ps -A | grep XBMC.app | grep -v Helper | grep -v grep | awk '{print $5}')
# ;;
# Linux)
# XBMC_PID=$(pidof xbmc.bin)
# XBMC_BIN="xbmc"
# ;;
# *)
# echo "I don't support this OS!"
# exit 1
# ;;
#esac
# Is XBMC running?
if [ -n $XBMC_PID ]
then
kill $XBMC_PID # Shutdown nice
echo "Shutdown nice"
else
echo "This script should only be run from within XBMC."
exit
fi
# Wait for the kill
# sleep
# Is XBMC still running?
if [ -n $XBMC_PID ]
then
kill -9 $XBMC_PID # Force immediate kill
echo "Shutdown hard"
fi
echo "$@"
# Launch app - escaped!
"$@"
# SOMETIMES xbmc starts too fast, and on some hardware if there is still a millisecond of sound being used, XBMC starts witout sound and some emulators say there is a problem with the sound hardware. If so, remove comment:
#sleep 1
# Done? Restart XBMC
$XBMC_BIN &
Here is my launcher.py file:
Code: # Copyright (C) 2009-2013 Malte Loepmann ([email protected])
#
# This program is free software; you can redistribute it and/or modify it under the terms
# of the GNU General Public License as published by the Free Software Foundation;
# either version 2 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with this program;
# if not, see <http://www.gnu.org/licenses/>.
# I have built this script from scratch but you will find some lines or ideas that are taken
# from other xbmc scripts. Some basic ideas are taken from Redsandros "Arcade Browser" and I often
# had a look at Nuka1195's "Apple Movie Trailers" script while implementing this one. Thanks for your work!
import os, sys, re
import xbmcaddon
# Shared resources
addonPath = ''
addon = xbmcaddon.Addon(id='script.games.rom.collection.browser')
addonPath = addon.getAddonInfo('path')
BASE_RESOURCE_PATH = os.path.join(addonPath, "resources" )
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib" ) )
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib", "pyparsing" ) )
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib", "pyscraper" ) )
# append the proper platforms folder to our path, xbox is the same as win32
env = ( os.environ.get( "OS", "win32" ), "win32", )[ os.environ.get( "OS", "win32" ) == "xbox" ]
# Check to see if using a 64bit version of Linux
if re.match("Linux", env):
try:
import platform
env2 = platform.machine()
if(env2 == "x86_64"):
env = "Linux64"
except:
pass
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "platform_libraries", env ) )
class dummyGUI():
useRCBService = True
player = xbmc.Player()
def writeMsg(self, message):
pass
def saveViewState(self, isOnExit):
pass
class Main():
def __init__(self):
print 'RCB: sys.argv = ' +str(sys.argv)
launchRCB = False
for arg in sys.argv:
param = str(arg)
print 'RCB: param = ' +param
if param == '' or param == 'script.games.rom.collection.browser':
print 'RCB: setting launchRCB = True'
launchRCB = True
#provide data that skins can show on home screen
if 'limit=' in param:
print 'RCB: setting launchRCB = False'
launchRCB = False
#check if RCB should be launched at startup (via RCB Service)
launchOnStartup = addon.getSetting('rcb_launchOnStartup')
if(launchOnStartup.lower() == 'true'):
print "RCB: RCB will be started via RCB service. Won't gather widget data on this run."
else:
self.gatherWidgetData(param)
if 'launchid' in param:
launchRCB = False
self.launchGame(param)
# Start the main gui
print 'RCB: launchRCB = ' +str(launchRCB)
if launchRCB:
import gui
def gatherWidgetData(self, param):
print 'start gatherWidgetData'
import util, helper
from gamedatabase import Game, GameDataBase, File
from config import Config, RomCollection
gdb = GameDataBase(util.getAddonDataPath())
gdb.connect()
doImport, errorMsg = gdb.checkDBStructure()
if(doImport) > 0:
print "RCB: No database available. Won't gather any data."
gdb.close()
return
#cache lookup tables
yearDict = helper.cacheYears(gdb)
publisherDict = helper.cachePublishers(gdb)
developerDict = helper.cacheDevelopers(gdb)
reviewerDict = helper.cacheReviewers(gdb)
genreDict = helper.cacheGenres(gdb)
limit = int(param.replace('limit=', ''))
games = Game(gdb).getMostPlayedGames(limit)
print 'most played games: %s' %games
config = Config(None)
statusOk, errorMsg = config.readXml()
settings = util.getSettings()
import xbmcgui
count = 0
for gameRow in games:
count += 1
try:
print "Gathering data for rom no %i: %s" %(count, gameRow[util.ROW_NAME])
romCollection = config.romCollections[str(gameRow[util.GAME_romCollectionId])]
#get artwork that is chosen to be shown in gamelist
files = File(gdb).getFilesByParentIds(gameRow[util.ROW_ID], gameRow[util.GAME_romCollectionId], gameRow[util.GAME_publisherId], gameRow[util.GAME_developerId])
fileDict = helper.cacheFiles(files)
files = helper.getFilesByControl_Cached(gdb, romCollection.imagePlacingMain.fileTypesForGameList, gameRow[util.ROW_ID], gameRow[util.GAME_publisherId], gameRow[util.GAME_developerId], gameRow[util.GAME_romCollectionId], fileDict)
if(files != None and len(files) != 0):
thumb = files[0]
else:
thumb = ""
files = helper.getFilesByControl_Cached(gdb, romCollection.imagePlacingMain.fileTypesForMainViewBackground, gameRow[util.ROW_ID], gameRow[util.GAME_publisherId], gameRow[util.GAME_developerId], gameRow[util.GAME_romCollectionId], fileDict)
if(files != None and len(files) != 0):
fanart = files[0]
else:
fanart = ""
description = gameRow[util.GAME_description]
if(description == None):
description = ""
year = helper.getPropertyFromCache(gameRow, yearDict, util.GAME_yearId, util.ROW_NAME)
publisher = helper.getPropertyFromCache(gameRow, publisherDict, util.GAME_publisherId, util.ROW_NAME)
developer = helper.getPropertyFromCache(gameRow, developerDict, util.GAME_developerId, util.ROW_NAME)
genre = genreDict[gameRow[util.ROW_ID]]
maxplayers = helper.saveReadString(gameRow[util.GAME_maxPlayers])
rating = helper.saveReadString(gameRow[util.GAME_rating])
votes = helper.saveReadString(gameRow[util.GAME_numVotes])
url = helper.saveReadString(gameRow[util.GAME_url])
region = helper.saveReadString(gameRow[util.GAME_region])
media = helper.saveReadString(gameRow[util.GAME_media])
perspective = helper.saveReadString(gameRow[util.GAME_perspective])
controllertype = helper.saveReadString(gameRow[util.GAME_controllerType])
originaltitle = helper.saveReadString(gameRow[util.GAME_originalTitle])
alternatetitle = helper.saveReadString(gameRow[util.GAME_alternateTitle])
translatedby = helper.saveReadString(gameRow[util.GAME_translatedBy])
version = helper.saveReadString(gameRow[util.GAME_version])
playcount = helper.saveReadString(gameRow[util.GAME_launchCount])
#get launch command
filenameRows = File(gdb).getRomsByGameId(gameRow[util.ROW_ID])
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Id" %count, str(gameRow[util.ROW_ID]))
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Console" %count, romCollection.name)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Title" %count, gameRow[util.ROW_NAME])
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Thumb" %count, thumb)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Fanart" %count, fanart)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Plot" %count, description)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Year" %count, year)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Publisher" %count, publisher)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Developer" %count, developer)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Genre" %count, genre)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Maxplayers" %count, maxplayers)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Region" %count, region)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Media" %count, media)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Perspective" %count, perspective)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Controllertype" %count, controllertype)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Playcount" %count, playcount)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Rating" %count, rating)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Votes" %count, votes)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Url" %count, url)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Originaltitle" %count, originaltitle)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Alternatetitle" %count, alternatetitle)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Translatedby" %count, translatedby)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Version" %count, version)
except Exception, (exc):
print 'RCB: Error while getting most played games: ' +str(exc)
gdb.close()
def launchGame(self, param):
import launcher, util
from gamedatabase import GameDataBase
from config import Config
gdb = GameDataBase(util.getAddonDataPath())
gdb.connect()
gameId = int(param.replace('launchid=', ''))
config = Config(None)
statusOk, errorMsg = config.readXml()
settings = util.getSettings()
gui = dummyGUI()
launcher.launchEmu(gdb, gui, gameId, config, settings, None)
if ( __name__ == "__main__" ):
print 'RCB started'
try:
Main()
except Exception, (exc):
message = 'Unhandled exception occured during execution of RCB:'
message2 = str(exc)
message3 = 'See xbmc.log for details'
print message
print message2
import xbmcgui
xbmcgui.Dialog().ok("Rom Collection Browser", message, message2, message3)
It looks like I'm running Mupen64 Plus AE - Version: 2.4.4 Version Code: 36. It will not automatically download this for you I don't think. Pretty sure you will have to sideload it. If you have the play store working, you can probably install it directly from there.
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - Shadow128 - 2014-11-15
In my case XBMC and RCB on a Fire TV are not working
XBMC and Snes Ex+ are working standalone prettygood, but with installed RCB and modified files I cannot start roms directly from RCB.
Here's a log from the start process of a rom:
PHP Code: 18:50:32 T:1518535688 NOTICE: RCB_INFO: Putting extracted file in /storage/emulated/0/Android/data/org.xbmc.xbmc/files/.xbmc/userdata/profiles/Stereo/addon_data/script.games.rom.collection.browser/tmp/Axelay.smc 18:50:32 T:1518535688 NOTICE: roms compressed = ['/storage/emulated/0/Android/data/org.xbmc.xbmc/files/.xbmc/userdata/profiles/Stereo/addon_data/script.games.rom.collection.browser/tmp/Axelay.smc'] 18:50:32 T:1518535688 NOTICE: RCB_INFO: No precmd created. 18:50:32 T:1518535688 NOTICE: RCB_INFO: No postcmd created. 18:50:32 T:1518535688 NOTICE: RCB_INFO: cmd: "/system/bin/am" start -n com.explusalpha.Snes9xPlus/com.imagine.BaseActivity -a android.intent.action.VIEW -eu Uri "file:///storage/emulated/0/Android/data/org.xbmc.xbmc/files/.xbmc/userdata/profiles/Stereo/addon_data/script.games.rom.collection.browser/tmp/Axelay.smc" 18:50:32 T:1518535688 NOTICE: RCB_INFO: precmd: 18:50:32 T:1518535688 NOTICE: RCB_INFO: postcmd: 18:50:32 T:1518535688 NOTICE: RCB_INFO: launchEmu on non-xbox 18:50:32 T:1518535688 NOTICE: RCB_INFO: screenMode: 1920x1080 @ 60.00 - Full Screen 18:50:32 T:1518535688 NOTICE: RCB_INFO: launch emu 18:50:33 T:1518535688 NOTICE: RCB_INFO: launch emu done 18:50:33 T:1512116448 NOTICE: Found 1 Lists of Devices 18:50:33 T:1512116448 NOTICE: Enumerated AUDIOTRACK devices: 18:50:33 T:1512116448 NOTICE: Device 1 18:50:33 T:1512116448 NOTICE: m_deviceName : AudioTrack 18:50:33 T:1512116448 NOTICE: m_displayName : android 18:50:33 T:1512116448 NOTICE: m_displayNameExtra: audiotrack 18:50:33 T:1512116448 NOTICE: m_deviceType : AE_DEVTYPE_HDMI 18:50:33 T:1512116448 NOTICE: m_channels : FL,FR 18:50:33 T:1512116448 NOTICE: m_sampleRates : 48000 18:50:33 T:1512116448 NOTICE: m_dataFormats : AE_FMT_S16LE,AE_FMT_AC3,AE_FMT_DTS 18:50:33 T:1512512352 INFO: CActiveAESink::OpenSink - initialize sink 18:50:33 T:1512512352 DEBUG: CActiveAESink::OpenSink - trying to open device AUDIOTRACK:AudioTrack 18:50:33 T:1512512352 DEBUG: CActiveAESink::OpenSink - AUDIOTRACK Initialized: 18:50:33 T:1512512352 DEBUG: Output Device : android 18:50:33 T:1512512352 DEBUG: Sample Rate : 48000 18:50:33 T:1512512352 DEBUG: Sample Format : AE_FMT_S16NE 18:50:33 T:1512512352 DEBUG: Channel Count : 2 18:50:33 T:1512512352 DEBUG: Channel Layout: FL,FR 18:50:33 T:1512512352 DEBUG: Frames : 1536 18:50:33 T:1512512352 DEBUG: Frame Samples : 3072 18:50:33 T:1512512352 DEBUG: Frame Size : 4 18:50:33 T:1512116448 DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted 18:50:33 T:1518535688 NOTICE: RCB_INFO: End launcher.launchEmu 18:50:33 T:1518535688 NOTICE: RCB_INFO: End launchEmu 18:50:33 T:1518535688 NOTICE: RCB_INFO: onAction: 7 18:50:34 T:1511097160 DEBUG: Keyboard: scancode: 0x04, sym: 0x0008, unicode: 0x0000, modifier: 0x0 18:50:34 T:1511097160 DEBUG: bool CApplication::OnKey(const CKey&): backspace (0xf008) pressed, action is Back 18:50:34 T:1518535688 NOTICE: RCB_INFO: onAction: 92 18:50:34 T:1518535688 NOTICE: RCB_INFO: onAction: ACTION_CANCEL_DIALOG 18:50:34 T:1518535688 NOTICE: RCB_INFO: exit 18:50:34 T:1518535688 NOTICE: RCB_INFO: Begin saveViewState 18:50:34 T:1518535688 NOTICE: RCB_INFO: Begin saveViewMode 18:50:34 T:1518535688 NOTICE: RCB_INFO: End saveViewMode 18:50:34 T:1518535688 NOTICE: RCB_INFO: Begin helper.saveViewState 18:50:34 T:1518535688 NOTICE: RCB_INFO: End helper.saveViewState 18:50:34 T:1518535688 NOTICE: RCB_INFO: End saveViewState
Are all changing of the files still necessary?
Cause I saw that I can directly choose the right emulator on my config, and the start parameter in config.xml is ok.
Thanks for your Help!
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - LakersFan - 2014-11-15
(2014-11-14, 18:16)bradwatson Wrote: (2014-11-13, 00:59)LakersFan Wrote: (2014-11-12, 23:12)bradwatson Wrote: Traveling today, but should be able to get this info to you tomorrow.
Thank you, sir. No rush as I'm leaving tonight and will be back Friday afternoon...
Here is my applaunch.sh file:
Code: #!/bin/bash
# App Launch script - Quit XBMC to launch another program
# Thanks to rodalpho @ # http://xbmc.org/forum/showthread.php?t=34635
# By Redsandro 2008-07-07
# By ryosaeba87 2010-08-24 (Added support for MacOSX)
#
# Check for agruments
if [ -z "$*" ]; then
echo "No arguments provided."
echo "Usage:"
echo "launcher.sh [/path/to/]executable [arguments]"
exit
fi
#case "$(uname -s)" in
# Darwin)
# XBMC_PID=$(ps -A | grep XBMC.app | grep -v Helper | grep -v grep | awk '{print $1}')
# XBMC_BIN=$(ps -A | grep XBMC.app | grep -v Helper | grep -v grep | awk '{print $5}')
# ;;
# Linux)
# XBMC_PID=$(pidof xbmc.bin)
# XBMC_BIN="xbmc"
# ;;
# *)
# echo "I don't support this OS!"
# exit 1
# ;;
#esac
# Is XBMC running?
if [ -n $XBMC_PID ]
then
kill $XBMC_PID # Shutdown nice
echo "Shutdown nice"
else
echo "This script should only be run from within XBMC."
exit
fi
# Wait for the kill
# sleep
# Is XBMC still running?
if [ -n $XBMC_PID ]
then
kill -9 $XBMC_PID # Force immediate kill
echo "Shutdown hard"
fi
echo "$@"
# Launch app - escaped!
"$@"
# SOMETIMES xbmc starts too fast, and on some hardware if there is still a millisecond of sound being used, XBMC starts witout sound and some emulators say there is a problem with the sound hardware. If so, remove comment:
#sleep 1
# Done? Restart XBMC
$XBMC_BIN &
Here is my launcher.py file:
Code: # Copyright (C) 2009-2013 Malte Loepmann ([email protected])
#
# This program is free software; you can redistribute it and/or modify it under the terms
# of the GNU General Public License as published by the Free Software Foundation;
# either version 2 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with this program;
# if not, see <http://www.gnu.org/licenses/>.
# I have built this script from scratch but you will find some lines or ideas that are taken
# from other xbmc scripts. Some basic ideas are taken from Redsandros "Arcade Browser" and I often
# had a look at Nuka1195's "Apple Movie Trailers" script while implementing this one. Thanks for your work!
import os, sys, re
import xbmcaddon
# Shared resources
addonPath = ''
addon = xbmcaddon.Addon(id='script.games.rom.collection.browser')
addonPath = addon.getAddonInfo('path')
BASE_RESOURCE_PATH = os.path.join(addonPath, "resources" )
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib" ) )
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib", "pyparsing" ) )
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "lib", "pyscraper" ) )
# append the proper platforms folder to our path, xbox is the same as win32
env = ( os.environ.get( "OS", "win32" ), "win32", )[ os.environ.get( "OS", "win32" ) == "xbox" ]
# Check to see if using a 64bit version of Linux
if re.match("Linux", env):
try:
import platform
env2 = platform.machine()
if(env2 == "x86_64"):
env = "Linux64"
except:
pass
sys.path.append( os.path.join( BASE_RESOURCE_PATH, "platform_libraries", env ) )
class dummyGUI():
useRCBService = True
player = xbmc.Player()
def writeMsg(self, message):
pass
def saveViewState(self, isOnExit):
pass
class Main():
def __init__(self):
print 'RCB: sys.argv = ' +str(sys.argv)
launchRCB = False
for arg in sys.argv:
param = str(arg)
print 'RCB: param = ' +param
if param == '' or param == 'script.games.rom.collection.browser':
print 'RCB: setting launchRCB = True'
launchRCB = True
#provide data that skins can show on home screen
if 'limit=' in param:
print 'RCB: setting launchRCB = False'
launchRCB = False
#check if RCB should be launched at startup (via RCB Service)
launchOnStartup = addon.getSetting('rcb_launchOnStartup')
if(launchOnStartup.lower() == 'true'):
print "RCB: RCB will be started via RCB service. Won't gather widget data on this run."
else:
self.gatherWidgetData(param)
if 'launchid' in param:
launchRCB = False
self.launchGame(param)
# Start the main gui
print 'RCB: launchRCB = ' +str(launchRCB)
if launchRCB:
import gui
def gatherWidgetData(self, param):
print 'start gatherWidgetData'
import util, helper
from gamedatabase import Game, GameDataBase, File
from config import Config, RomCollection
gdb = GameDataBase(util.getAddonDataPath())
gdb.connect()
doImport, errorMsg = gdb.checkDBStructure()
if(doImport) > 0:
print "RCB: No database available. Won't gather any data."
gdb.close()
return
#cache lookup tables
yearDict = helper.cacheYears(gdb)
publisherDict = helper.cachePublishers(gdb)
developerDict = helper.cacheDevelopers(gdb)
reviewerDict = helper.cacheReviewers(gdb)
genreDict = helper.cacheGenres(gdb)
limit = int(param.replace('limit=', ''))
games = Game(gdb).getMostPlayedGames(limit)
print 'most played games: %s' %games
config = Config(None)
statusOk, errorMsg = config.readXml()
settings = util.getSettings()
import xbmcgui
count = 0
for gameRow in games:
count += 1
try:
print "Gathering data for rom no %i: %s" %(count, gameRow[util.ROW_NAME])
romCollection = config.romCollections[str(gameRow[util.GAME_romCollectionId])]
#get artwork that is chosen to be shown in gamelist
files = File(gdb).getFilesByParentIds(gameRow[util.ROW_ID], gameRow[util.GAME_romCollectionId], gameRow[util.GAME_publisherId], gameRow[util.GAME_developerId])
fileDict = helper.cacheFiles(files)
files = helper.getFilesByControl_Cached(gdb, romCollection.imagePlacingMain.fileTypesForGameList, gameRow[util.ROW_ID], gameRow[util.GAME_publisherId], gameRow[util.GAME_developerId], gameRow[util.GAME_romCollectionId], fileDict)
if(files != None and len(files) != 0):
thumb = files[0]
else:
thumb = ""
files = helper.getFilesByControl_Cached(gdb, romCollection.imagePlacingMain.fileTypesForMainViewBackground, gameRow[util.ROW_ID], gameRow[util.GAME_publisherId], gameRow[util.GAME_developerId], gameRow[util.GAME_romCollectionId], fileDict)
if(files != None and len(files) != 0):
fanart = files[0]
else:
fanart = ""
description = gameRow[util.GAME_description]
if(description == None):
description = ""
year = helper.getPropertyFromCache(gameRow, yearDict, util.GAME_yearId, util.ROW_NAME)
publisher = helper.getPropertyFromCache(gameRow, publisherDict, util.GAME_publisherId, util.ROW_NAME)
developer = helper.getPropertyFromCache(gameRow, developerDict, util.GAME_developerId, util.ROW_NAME)
genre = genreDict[gameRow[util.ROW_ID]]
maxplayers = helper.saveReadString(gameRow[util.GAME_maxPlayers])
rating = helper.saveReadString(gameRow[util.GAME_rating])
votes = helper.saveReadString(gameRow[util.GAME_numVotes])
url = helper.saveReadString(gameRow[util.GAME_url])
region = helper.saveReadString(gameRow[util.GAME_region])
media = helper.saveReadString(gameRow[util.GAME_media])
perspective = helper.saveReadString(gameRow[util.GAME_perspective])
controllertype = helper.saveReadString(gameRow[util.GAME_controllerType])
originaltitle = helper.saveReadString(gameRow[util.GAME_originalTitle])
alternatetitle = helper.saveReadString(gameRow[util.GAME_alternateTitle])
translatedby = helper.saveReadString(gameRow[util.GAME_translatedBy])
version = helper.saveReadString(gameRow[util.GAME_version])
playcount = helper.saveReadString(gameRow[util.GAME_launchCount])
#get launch command
filenameRows = File(gdb).getRomsByGameId(gameRow[util.ROW_ID])
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Id" %count, str(gameRow[util.ROW_ID]))
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Console" %count, romCollection.name)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Title" %count, gameRow[util.ROW_NAME])
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Thumb" %count, thumb)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Fanart" %count, fanart)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Plot" %count, description)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Year" %count, year)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Publisher" %count, publisher)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Developer" %count, developer)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Genre" %count, genre)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Maxplayers" %count, maxplayers)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Region" %count, region)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Media" %count, media)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Perspective" %count, perspective)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Controllertype" %count, controllertype)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Playcount" %count, playcount)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Rating" %count, rating)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Votes" %count, votes)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Url" %count, url)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Originaltitle" %count, originaltitle)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Alternatetitle" %count, alternatetitle)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Translatedby" %count, translatedby)
xbmcgui.Window(10000).setProperty("MostPlayedROM.%d.Version" %count, version)
except Exception, (exc):
print 'RCB: Error while getting most played games: ' +str(exc)
gdb.close()
def launchGame(self, param):
import launcher, util
from gamedatabase import GameDataBase
from config import Config
gdb = GameDataBase(util.getAddonDataPath())
gdb.connect()
gameId = int(param.replace('launchid=', ''))
config = Config(None)
statusOk, errorMsg = config.readXml()
settings = util.getSettings()
gui = dummyGUI()
launcher.launchEmu(gdb, gui, gameId, config, settings, None)
if ( __name__ == "__main__" ):
print 'RCB started'
try:
Main()
except Exception, (exc):
message = 'Unhandled exception occured during execution of RCB:'
message2 = str(exc)
message3 = 'See xbmc.log for details'
print message
print message2
import xbmcgui
xbmcgui.Dialog().ok("Rom Collection Browser", message, message2, message3)
It looks like I'm running Mupen64 Plus AE - Version: 2.4.4 Version Code: 36. It will not automatically download this for you I don't think. Pretty sure you will have to sideload it. If you have the play store working, you can probably install it directly from there.
Thanks Brad. Is that the entire launcher code? It seems much smaller than the one that comes with RCB initially. Either way, I'm still having trouble getting it to work. I'll play around with it more before I bug you again. Thanks for posting these.
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - LakersFan - 2014-11-16
Just by installing it and using the default files (not updating applaunch.sh & launcher.py), I am able to get the emulator to run by clicking the game I want to play. However, all it is doing is launching the emulator to the home (Load game page) at which I select load game, then have to choose the game again. When I try to edit the files as stated in this initial post, it simply doesn't work.
I am using a rooted Amazon Fire TV with NES.emu as my emulator. Can anyone tell me which part I am missing to get the click of a game within RCB to directly launch the game I click and bypass the initial emulator home screen?
Here is my log if anyone needs it. http://pastebin.com/Q5eExPs2
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - kronusprime - 2014-12-04
For the people having the "cannot create backup" and "cannot create launchers.xml file" ....
It is some kind of permission or possibly the version of Python being used that makes the advanced launcher app unable to write to the launchers.xml file.
Only way I was able to get it working was manually inputting the meta data into the file myself.
The good news is if you have xbmc and advanced launcher on a pc you can just copy and paste most of the info in.
I have a laptop I use just for messing around with xbmc and emulators that was already set up, just had to modify a few things to get it working.
Now my little $50 android tv box has all the emulators and roms running with full artwork and descriptions.
Even plugged in a generic corded ps3 controller! I only need to figure out how to exit ePSXe and N64oid from the controller and my system will be complete!
I can provide my launchers.xml file if anyone wants to use it for a reference.
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - IgorT - 2014-12-09
(2014-11-16, 00:00)LakersFan Wrote: Just by installing it and using the default files (not updating applaunch.sh & launcher.py), I am able to get the emulator to run by clicking the game I want to play. However, all it is doing is launching the emulator to the home (Load game page) at which I select load game, then have to choose the game again. When I try to edit the files as stated in this initial post, it simply doesn't work.
I am using a rooted Amazon Fire TV with NES.emu as my emulator. Can anyone tell me which part I am missing to get the click of a game within RCB to directly launch the game I click and bypass the initial emulator home screen?
Here is my log if anyone needs it. http://pastebin.com/Q5eExPs2
Hello LakersFan,
I have the exact same problem! Did you find a fix?
Thanks
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - LakersFan - 2014-12-16
Sorry, I swear i answered this but it's not here ... Anyways, no I have no fixed it. Any suggestions would be great.
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - Ruinis - 2014-12-17
(2014-12-04, 06:36)kronusprime Wrote: For the people having the "cannot create backup" and "cannot create launchers.xml file" ....
It is some kind of permission or possibly the version of Python being used that makes the advanced launcher app unable to write to the launchers.xml file.
Only way I was able to get it working was manually inputting the meta data into the file myself.
The good news is if you have xbmc and advanced launcher on a pc you can just copy and paste most of the info in.
I have a laptop I use just for messing around with xbmc and emulators that was already set up, just had to modify a few things to get it working.
Now my little $50 android tv box has all the emulators and roms running with full artwork and descriptions.
Even plugged in a generic corded ps3 controller! I only need to figure out how to exit ePSXe and N64oid from the controller and my system will be complete!
I can provide my launchers.xml file if anyone wants to use it for a reference.
Can you please post your launchers.xml for reference. I too am getting the same errors.
Thank You
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - wdjoho - 2014-12-18
I been using the advanced launcher method and I have gotten it to work. But to upload thumbs and fanart, I have to do it manually by saving the pictures to my sd card.
1) Has anyone been able to get the auto-scaper to work in advanced laucher?
2) I been trying the logcat for a few other emulators like cps2emu. But I cannot figure out how to call the rom file to load automatically.
And last, for the rom collection browser I see that the code changes are different. The newest version of RCB has a slightly different structure and I cannot get any roms to load. I like the look of the RCB a bit better but had no luck getting it to take the code changes and modifications.
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - Ruinis - 2014-12-18
(2014-12-18, 05:19)wdjoho Wrote: I been using the advanced launcher method and I have gotten it to work. But to upload thumbs and fanart, I have to do it manually by saving the pictures to my sd card.
1) Has anyone been able to get the auto-scaper to work in advanced laucher?
2) I been trying the logcat for a few other emulators like cps2emu. But I cannot figure out how to call the rom file to load automatically.
And last, for the rom collection browser I see that the code changes are different. The newest version of RCB has a slightly different structure and I cannot get any roms to load. I like the look of the RCB a bit better but had no luck getting it to take the code changes and modifications.
How did you get Advance launcher working. Did you run into "cannot create backup" and "cannot create launchers.xml file" problem? Could you post your launcher.xml as reference? Advance launcher sees the roms and lists them for me but is not scrapping. It also is not launching the rom file. I am using a non-root fire tv stick.
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - LakersFan - 2014-12-19
Bradwatson– what version of RCB are you using and are you able to share that with us? I'm thinking changes ("improvements") have been made to the addon since this guide was introduced that now cause the information in it to be inaccurate and not work. I don't need the latest and greatest features. Just something that works like yours in your video over at XDA.
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - bradwatson - 2014-12-23
(2014-12-19, 19:39)LakersFan Wrote: Bradwatson– what version of RCB are you using and are you able to share that with us? I'm thinking changes ("improvements") have been made to the addon since this guide was introduced that now cause the information in it to be inaccurate and not work. I don't need the latest and greatest features. Just something that works like yours in your video over at XDA.
I'm using 2.0.17 according to the addon.xml file. Here are zip files of my add-on and user data directories. Use a program like beyond compare to compare them to your directories to see what is different. Remember that my Fire TV is rooted.
Add-On Directory
User Data
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - LakersFan - 2014-12-24
(2014-12-23, 23:21)bradwatson Wrote: (2014-12-19, 19:39)LakersFan Wrote: Bradwatson– what version of RCB are you using and are you able to share that with us? I'm thinking changes ("improvements") have been made to the addon since this guide was introduced that now cause the information in it to be inaccurate and not work. I don't need the latest and greatest features. Just something that works like yours in your video over at XDA.
I'm using 2.0.17 according to the addon.xml file. Here are zip files of my add-on and user data directories. Use a program like beyond compare to compare them to your directories to see what is different. Remember that my Fire TV is rooted.
Add-On Directory
User Data
Thanks so much for sharing these. Mine's rooted too, so we should be fairly identical. I'll give it a go once the holidays have died down.
Have a good one!
RE: HOW-TO Configure Advanced Launcher and Rom Collection Browser for emulators - fabeer - 2014-12-30
Still same problem here,i use minix x7,spmc version, not rooted.
Cannot create xml file error,auto scan doesnt work...
Fixing that bug would be really much appreciated
Thx
|