1@echo off
2
3set PATH=%CD%;%PATH%
4set /p unique_id="Insert cia Unique ID [0-9, A-F] (Example: AAAAAA): "
5set /p title="Insert Game Title: "
6set /p author="Insert Game Author: "
7cd app
8echo Creating icon and banner files...
9mkdir ..\tmp
10bannertool makebanner -i ../assets/banner.png -a ../assets/audio.wav -o ../tmp/banner.bin
11bannertool makesmdh -s "%title%" -l "%title%" -p "%author%" -i ../assets/icon.png -o ../tmp/icon.bin
12echo Creating romfs file...
133dstool -cvtf romfs ../tmp/romfs.bin --romfs-dir ../romfs
14echo Building cia file...
15powershell -Command "(gc cia_workaround.rsf) -replace '(UniqueId\s+:)\s*.*$', '${1} 0x%unique_id%' | Out-File cia_workaround.rsf"
16makerom -f cia -o ../my_game.cia -elf easyrpg-player.elf -rsf cia_workaround.rsf -icon ../tmp/icon.bin -banner ../tmp/banner.bin -exefslogo -target t -romfs ../tmp/romfs.bin
17cd ..
18echo Deleting temp files...
19rmdir /s /q tmp
20echo Finished! Enjoy EasyRPG Player!
21set /p dummy="Press ENTER to exit"
22