echo ON
set convertProgram=%0
set FRUAdesign=%1
echo FRUAdesign = %FRUAdesign%
set convertPath=%~dp0
set FRUAroot=%~dp1
echo FRUAroot = %FRUAroot%
set FRUAdir=%FRUAroot:~0,-1%
echo FRUAdir = %FRUAdir%
if EXIST "%FRUAroot%DUNGEON_CRAFT_DESIGN" rmdir/s/q %FRUAroot%DUNGEON_CRAFT_DESIGN
mkdir "%FRUAroot%DUNGEON_CRAFT_DESIGN"
mkdir "%FRUAroot%DUNGEON_CRAFT_DESIGN\data"
mkdir "%FRUAroot%DUNGEON_CRAFT_DESIGN\resources"
mkdir "%FRUAroot%DUNGEON_CRAFT_DESIGN\Editor"
REM copy "%convertPath%bin\default_monsters.dat" "%FRUAroot%*.*
"%convertPath%bin\FRUAExport" -d "%FRUAdesign%" -u "%FRUAdir%"
xcopy/q "%convertPath%data\*.*" "%FRUAroot%DUNGEON_CRAFT_DESIGN\data\*.*"
xcopy/q "%convertPath%resources\*.*" "%FRUAroot%DUNGEON_CRAFT_DESIGN\resources\*.*"
xcopy/q/s "%convertPath%\Editor" "%FRUAroot%DUNGEON_CRAFT_DESIGN\Editor"
move "%FRUAroot%*.json" "%FRUAroot%DUNGEON_CRAFT_DESIGN\data\FRUA.json"
REM copy "%convertPath%bin\ConvertFRUA.exe" "%FRUAroot%DUNGEON_CRAFT_DESIGN\data\*.*"
REM copy "%convertPath%bin\FRUAArtMap.txt" "%FRUAroot%DUNGEON_CRAFT_DESIGN\data\*.*"
"%convertPath%bin\ConvertFRUA.exe" "%FRUAroot%DUNGEON_CRAFT_DESIGN\data\FRUA.json"
"%FRUAroot%DUNGEON_CRAFT_DESIGN\Editor\DungeonCraftEditor.exe" "%FRUAroot%DUNGEON_CRAFT_DESIGN"
pause

