Would using Python work as an alternative scripting language to the Ant Build Scripts? If I could use Python, I am almost certain I could get munging working. The batch files seem dumb and awkward to me, and re-writing bits and pieces has done nothing.
On a different note, it appears that LocalizeMunge.exe is not being called correctly (or at all) from the Munge.bat located in BF2_ModTools/Data_ABC/_BUILD/Common. Relevant code below, no modifications from my end.
Contents of MergeLocalize.bat, which is called from previously mentioned munge.bat
It looks like the line of code right below REM Perform Munging is supposed to run the LocalizeMunge.exe program located in BF2_ModTools/ToolsFL/bin/. However, it is failing to do so. Invoking the LocalizeMunge.exe by itself causes a bunch of scrolling text which, after a hastily taken screenshot, seems to be usage information regarding textures (which I find odd). Sadly I am an idiot and forgot to save the screenshot but with trial and error I can get another one if needed. The point is the localizemunge.exe does run by itself. Now I have been trying to get it to run with the arguments in the batch file. Manually expanding the variables hasnt worked, and start C:/BF2_ModTools/ToolsFL/bin/LocalizeMunge.exe <the arguments here> didnt work either. Will post back if I figure anything else out.
EDIT: It has occurred to me that the LocalizeMunge.exe may not the the problem. The problem may be the more %%i >> %TempDir%\%%~ni%%~xi line of code found in MergeLocalize.bat, which occurs after printing out that it is merging. Now to find out what all that means/does...