2011-11-07, 10:41
Angelscry Wrote:
- %rompath% will define current directory path of each rom file.
- and %romspath% will define the parent directory path (defined into launcher) of all the rom files.
Does this mean I can combine two variables like below?
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<launchers>
<launcher>
<id>62d00337e887d0f3683bc176f900af00</id>
<name>Game Boy</name>
<application>/usr/games/mednafen</application>
<args>-path_sav /media/media/Games/GBA/Saves/ [b]"%romspath%""%romfile%"[/b]</args>
<rompath>[b]/media/media/Games/GBA/Roms/[/b]</rompath>
<thumbpath>smb://XBMC/Games/GBA/Artwork/Thumbs/</thumbpath>
<fanartpath>smb://XBMC/Games/GBA/Artwork/Fanart/</fanartpath>
<extrafanartpath></extrafanartpath>
<romext>gb|gbc|gba</romext>
<platform>Game Boy</platform>
<thumb>smb://XBMC/Games/GBA/thumb.jpg</thumb>
<fanart>smb://XBMC/Games/GBA/fanart.jpg</fanart>
<genre></genre>
<release>1989</release>
<publisher></publisher>
<launcherplot></launcherplot>
<minimize>true</minimize>
<lnk></lnk>
<roms>
<rom>
<id>4cded2ef5b611a512d63d95f23d9adf1</id>
<name>Boxxle</name>
<filename>[b]smb://XBMC/Games/GBA/Roms/Boxxle.gb[/b]</filename>
<platform>Game Boy</platform>
<thumb>smb://XBMC/Games/GBA/Artwork/Thumbs/Boxxle.jpg</thumb>
<fanart>smb://XBMC/Games/GBA/Artwork/Fanart/Boxxle.jpg</fanart>
<extrafanart></extrafanart>
<genre>Puzzle</genre>
<release>1990</release>
<publisher>Atelier Double</publisher>
<gameplot></gameplot>
</rom>
I've marked the relevant parts bold. You see I'm using SMB paths where possible, however emulators won't work with SMB so I have to use hardcoded path in the args variable. Right now I've hardcoded paths in the filename of each game. After the switch from XBMC Live to OpenELEC the paths were different and so I had to change all of them. With the modification shown above I would only need to change the path once per emulator.