mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-13 02:08:50 +01:00
add dosbox
This commit is contained in:
parent
4acacaf736
commit
bd71c64a5c
BIN
Menu/GameShell/20_Retro Games/.bsv
Normal file
BIN
Menu/GameShell/20_Retro Games/.bsv
Normal file
Binary file not shown.
8
Menu/GameShell/20_Retro Games/DOSBOX/action.config
Normal file
8
Menu/GameShell/20_Retro Games/DOSBOX/action.config
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
ROM=/home/cpi/games/DOSBOX
|
||||||
|
ROM_SO=/home/cpi/apps/emulators/dosbox_libretro.so
|
||||||
|
EXT=GAMESHELL.BAT
|
||||||
|
FILETYPE=dir
|
||||||
|
LAUNCHER=retroarch -L
|
||||||
|
TITLE=DOS games
|
||||||
|
SO_URL=http://buildbot.libretro.com/nightly/linux/armhf/latest/dosbox_libretro.so.zip
|
||||||
|
RETRO_CONFIG=/home/cpi/apps/launcher/Menu/GameShell/20_Retro\ Games/DOSBOX/retroarch.cfg
|
||||||
2880
Menu/GameShell/20_Retro Games/DOSBOX/retroarch.cfg
Normal file
2880
Menu/GameShell/20_Retro Games/DOSBOX/retroarch.cfg
Normal file
File diff suppressed because it is too large
Load Diff
@ -133,14 +133,12 @@ class RomListPage(Page):
|
|||||||
|
|
||||||
for i ,v in enumerate(files_path):
|
for i ,v in enumerate(files_path):
|
||||||
dirmap = {}
|
dirmap = {}
|
||||||
#if os.path.isdir(v):
|
if os.path.isdir(v) and self._Emulator["FILETYPE"] == "dir": ## like DOSBOX
|
||||||
# dir_base_name = os.path.basename(v)
|
gameshell_bat = self._Emulator["EXT"][0]
|
||||||
# if dir_base_name == ".Trash" or dir_base_name == ".Fav":
|
if FileExists(v+"/"+gameshell_bat):
|
||||||
# pass
|
dirmap["gamedir"] = v.decode("utf8")
|
||||||
# else:
|
ret.append(dirmap)
|
||||||
# dirmap["directory"] = v
|
if os.path.isfile(v) and self._Emulator["FILETYPE"] == "file":
|
||||||
# ret.append(dirmap)
|
|
||||||
if os.path.isfile(v):
|
|
||||||
stats = os.stat(v)
|
stats = os.stat(v)
|
||||||
if stats.st_gid == self._Parent._FavGID:
|
if stats.st_gid == self._Parent._FavGID:
|
||||||
continue
|
continue
|
||||||
@ -199,6 +197,8 @@ class RomListPage(Page):
|
|||||||
li.Init(v["directory"])
|
li.Init(v["directory"])
|
||||||
elif "file" in v:
|
elif "file" in v:
|
||||||
li.Init(v["file"])
|
li.Init(v["file"])
|
||||||
|
elif "gamedir" in v:
|
||||||
|
li.Init(v["gamedir"])
|
||||||
else:
|
else:
|
||||||
li.Init("NoName")
|
li.Init("NoName")
|
||||||
|
|
||||||
@ -336,16 +336,25 @@ class RomListPage(Page):
|
|||||||
self._Screen._MsgBox.SetText("Launching...")
|
self._Screen._MsgBox.SetText("Launching...")
|
||||||
self._Screen._MsgBox.Draw()
|
self._Screen._MsgBox.Draw()
|
||||||
self._Screen.SwapAndShow()
|
self._Screen.SwapAndShow()
|
||||||
print("Run ",cur_li._Path)
|
|
||||||
|
if self._Emulator["FILETYPE"] == "dir":
|
||||||
|
path = cur_li._Path +"/"+self._Emulator["EXT"][0]
|
||||||
|
else:
|
||||||
|
path = cur_li._Path
|
||||||
|
|
||||||
|
print("Run ",path)
|
||||||
|
|
||||||
# check ROM_SO exists
|
# check ROM_SO exists
|
||||||
if FileExists(self._Emulator["ROM_SO"]):
|
if FileExists(self._Emulator["ROM_SO"]):
|
||||||
escaped_path = CmdClean( cur_li._Path)
|
if self._Emulator["FILETYPE"] == "dir":
|
||||||
|
escaped_path = CmdClean(path)
|
||||||
|
else:
|
||||||
|
escaped_path = CmdClean(path)
|
||||||
|
|
||||||
custom_config = ""
|
custom_config = ""
|
||||||
if self._Emulator["RETRO_CONFIG"] != "" and len(self._Emulator["RETRO_CONFIG"]) > 5:
|
if self._Emulator["RETRO_CONFIG"] != "" and len(self._Emulator["RETRO_CONFIG"]) > 5:
|
||||||
custom_config = " -c " + self._Emulator["RETRO_CONFIG"]
|
custom_config = " -c " + self._Emulator["RETRO_CONFIG"]
|
||||||
|
|
||||||
cmdpath = " ".join( (self._Emulator["LAUNCHER"],self._Emulator["ROM_SO"], custom_config, escaped_path))
|
cmdpath = " ".join( (self._Emulator["LAUNCHER"],self._Emulator["ROM_SO"], custom_config, escaped_path))
|
||||||
pygame.event.post( pygame.event.Event(RUNEVT, message=cmdpath))
|
pygame.event.post( pygame.event.Event(RUNEVT, message=cmdpath))
|
||||||
return
|
return
|
||||||
|
|||||||
@ -406,6 +406,7 @@ class MainScreen(object):
|
|||||||
obj["ROM"] = ""
|
obj["ROM"] = ""
|
||||||
obj["ROM_SO"] =""
|
obj["ROM_SO"] =""
|
||||||
obj["EXT"] = []
|
obj["EXT"] = []
|
||||||
|
obj["FILETYPE"] = "file"
|
||||||
obj["LAUNCHER"] = ""
|
obj["LAUNCHER"] = ""
|
||||||
obj["TITLE"] = "Game"
|
obj["TITLE"] = "Game"
|
||||||
obj["SO_URL"] = ""
|
obj["SO_URL"] = ""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user