::复制下面内容到批处理文件:
::将本批处理放到游戏存放目录中执行
::本批处理需要dos2unix.exe和iconv.exe来执行文件重新编码,请网上自行下载
@璐村惂鐢ㄦ埛_000076K馃惥 off & color 0A
echo ^<?xml version="1.0"?^>> gamelist.txt
echo ^<gameList^>>> gamelist.txt
::将下面的*.zip改为你rom的后缀,例如:*.nes、*.gba等等
for /f "delims=" %%B in ('dir /a-d /b /on *.zip') do (
echo ^<game^>>> gamelist.txt
echo ^<path^>./%%B^</path^>>>gamelist.txt
for %%a in ("%%B") do echo ^<name^>%%~na^</name^>>> gamelist.txt
for %%a in ("%%B") do echo ^<image^>./images/%%~na.jpg^</image^>>> gamelist.txt
for %%a in ("%%B") do echo ^<video^>./images/%%~na.mp4^</video^>>> gamelist.txt
echo ^</game^>>> gamelist.txt
)
echo ^</gameList^>>> gamelist.txt
dos2unix gamelist.txt
iconv -c -f gbk -t utf-8 gamelist.txt> gamelist.xml
del gamelist.txt
del dos2unix.exe
del iconv.exe
del del %0
::如果游戏的游戏文件为英文文件名,在生成的gamelist.xml文件中可将 <name>和</name> 中间的内容改为游戏的中文名称
::例如: <name>超级马里奥</name>
::将本批处理放到游戏存放目录中执行
::本批处理需要dos2unix.exe和iconv.exe来执行文件重新编码,请网上自行下载
@璐村惂鐢ㄦ埛_000076K馃惥 off & color 0A
echo ^<?xml version="1.0"?^>> gamelist.txt
echo ^<gameList^>>> gamelist.txt
::将下面的*.zip改为你rom的后缀,例如:*.nes、*.gba等等
for /f "delims=" %%B in ('dir /a-d /b /on *.zip') do (
echo ^<game^>>> gamelist.txt
echo ^<path^>./%%B^</path^>>>gamelist.txt
for %%a in ("%%B") do echo ^<name^>%%~na^</name^>>> gamelist.txt
for %%a in ("%%B") do echo ^<image^>./images/%%~na.jpg^</image^>>> gamelist.txt
for %%a in ("%%B") do echo ^<video^>./images/%%~na.mp4^</video^>>> gamelist.txt
echo ^</game^>>> gamelist.txt
)
echo ^</gameList^>>> gamelist.txt
dos2unix gamelist.txt
iconv -c -f gbk -t utf-8 gamelist.txt> gamelist.xml
del gamelist.txt
del dos2unix.exe
del iconv.exe
del del %0
::如果游戏的游戏文件为英文文件名,在生成的gamelist.xml文件中可将 <name>和</name> 中间的内容改为游戏的中文名称
::例如: <name>超级马里奥</name>