Jump to content

An debug log for the unpack.bat


Recommended Posts

Like many others, I use a separate .bat file to handle the unpacking of the area tilesets and ogg files.


Is it possible to have the .bat file to print an debugfile or a log of what it did, like WeiDU does? From time to time I have got error reports from players that seem to be connected to the .bat file not launching at all or not doing what it's supposed to do when launched.


I have already ensured for the next version that an user related error (closing the command prompt window too early) is not so likely, by switching AT_INTERACTIVE_EXIT command to AT_NOW.


I tried to google for bat commands, but all pages I hit seemed to assume that actually knew what I was doing! (How silly is that?) :blush:




Here's the current contents of the bat:

@echo off
md Music\mxm#am
copy Amber\Music\*.ogg Music\mxm#am
copy Amber\Music\snd2acm.exe Music\mxm#am
copy Amber\sounds\oggdec.exe Music\mxm#am
cd Music\mxm#am
oggdec mxm#*.ogg
del mxm#*.ogg
del oggdec.exe
snd2acm.exe -wav mxm#amA.wav mxm#amA.acm
snd2acm.exe -wav mxm#amB1.wav mxm#amB1.acm
snd2acm.exe -wav mxm#amB2.wav mxm#amB2.acm
snd2acm.exe -wav mxm#amC.wav mxm#amC.acm
snd2acm.exe -wav mxm#amD.wav mxm#amD.acm
snd2acm.exe -wav mxm#amE1.wav mxm#amE1.acm
snd2acm.exe -wav mxm#amZ.wav mxm#amZ.acm
snd2acm.exe -wav mxm#amZC.wav mxm#amZC.acm
snd2acm.exe -wav mxm#amZD.wav mxm#amZD.acm
snd2acm.exe -wav mxm#amZE.wav mxm#amZE.acm
del mxm#*.wav
del snd2acm.exe
cd override
oggdec m#*.ogg
del m#*.ogg
del oggdec.exe
tisunpack m#ar*.tiz
del m#ar*.tiz
del tisunpack.exe

Link to comment

However, that will prevent the user from actually viewing the printout. Further, Sox and Oggdec use ncurses (or Windows Console calls) to display a nicer progress bar, rather than simple stdio functions, which means that you can't simply redirect their output to a pipe or to a file (otherwise, I could hack WeiDU so that batchs are displayed on screen AND on the debug).

Link to comment

Okay, it's not possible then... The point of this exercise was that I would not have to ask the player to run the setup-mymod.exe in command prompt or to add pauses to the unpack.bat in order to be able to view and report the (error) messages. I could have simply asked the player to post the log file... :blush:


Thanks for the help, though. :hm:

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...