@echo off
rem Compile the DTA file using Apple Computer Rez tool
rem Usage : BuildDTA Debug ExtensionName, or BuildDTA Release ExtensionName


if not exist ..\..\..\Tools\Rez\tools\Rez.exe (
    echo you need to install rez in the tools folder
)

call ..\..\..\Tools\Rez\tools\Rez.exe -I ..\..\..\Tools\Rez\Cincludes -I ..\..\..\Tools\Rez\Rincludes -I ..\..\..\Include\Common\ -I ..\..\..\Include\Carrara\ -d "WIN=1" -o %1\%2 %2.r
if exist %1\%2.dta del %1\%2.dta
move %1\%2.qtr %1\%2.dta

call ..\..\..\Tools\ResExtracter\Win\ResExtracter.exe %1\%2.dta