diff --git a/build.sh b/build.sh index b3ab9a9..3e01a8f 100755 --- a/build.sh +++ b/build.sh @@ -15,5 +15,15 @@ then else for model in ${MODELS[*]}; do wine $IAR drawhook.ewp -make $model + + if [[ -f ../elfloader3/ff/$model.bin ]]; then + wine postbuild/elf2vkp.exe VKP/$model/drawhook.elf VKP/$model/drawhook.vkp.tmp ../elfloader3/ff/$model.bin + else + wine postbuild/elf2vkp.exe VKP/$model/drawhook.elf VKP/$model/drawhook.vkp.tmp + fi + + cat postbuild/header.txt VKP/$model/drawhook.vkp.tmp > VKP/$model/drawhook.vkp + rm VKP/$model/drawhook.vkp.tmp + rm VKP/$model/drawhook.elf done fi diff --git a/drawhook.ewp b/drawhook.ewp index f245f79..4b7fcb4 100644 --- a/drawhook.ewp +++ b/drawhook.ewp @@ -534,7 +534,7 @@ 1 - $PROJ_DIR$\postbuild\postbuild.cmd $PROJ_DIR$ $EXE_DIR$ $PROJ_DIR$\config\S65v58.txt + @@ -1357,7 +1357,7 @@ 1 - $PROJ_DIR$\postbuild\postbuild.cmd $PROJ_DIR$ $EXE_DIR$ $PROJ_DIR$\config\CX70v56.txt + @@ -2180,7 +2180,7 @@ 1 - $PROJ_DIR$\postbuild\postbuild.cmd $PROJ_DIR$ $EXE_DIR$ $PROJ_DIR$\config\SL65v53.txt + @@ -3003,7 +3003,7 @@ 1 - $PROJ_DIR$\postbuild\postbuild.cmd $PROJ_DIR$ $EXE_DIR$ $PROJ_DIR$\config\CX75v25.txt + @@ -3826,7 +3826,7 @@ 1 - $PROJ_DIR$\postbuild\postbuild.cmd $PROJ_DIR$ $EXE_DIR$ $PROJ_DIR$\config\SK65v50.txt + @@ -4649,7 +4649,7 @@ 1 - $PROJ_DIR$\postbuild\postbuild.cmd $PROJ_DIR$ $EXE_DIR$ $PROJ_DIR$\config\C75v22.txt + diff --git a/postbuild/postbuild.cmd b/postbuild/postbuild.cmd deleted file mode 100644 index 73d780a..0000000 --- a/postbuild/postbuild.cmd +++ /dev/null @@ -1,13 +0,0 @@ -if exist %2\FF.bin %1\postbuild\elf2vkp.exe %2\drawhook.elf %2\temp.vkp %2\FF.bin -if not exist %2\FF.bin %1\postbuild\elf2vkp.exe %2\drawhook.elf %2\temp.vkp - -if exist %2\drawhook.vkp del %2\drawhook.vkp - -if exist %1\postbuild\header.txt copy /b %1\postbuild\header.txt+%2\temp.vkp %2\temp2.vkp -if exist %1\postbuild\header.txt if exist %3 copy /b %3+%2\temp2.vkp %2\drawhook.vkp -if exist %1\postbuild\header.txt if not exist %3 rename %2\temp2.vkp drawhook.vkp -if not exist %1\postbuild\header.txt rename %2\temp.vkp drawhook.vkp - -del %2\temp.vkp -del %2\temp2.vkp -del %2\drawhook.elf