Meira Posted September 7, 2006 Share Posted September 7, 2006 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?) 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.. cd.. 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
Grim Squeaker Posted September 8, 2006 Share Posted September 8, 2006 @echo Installing audio... That will display the string 'Installing audio...'. Link to comment
WizWom Posted September 8, 2006 Share Posted September 8, 2006 '>>' is the redirect output and append token So echo "Log File of Unpack.bat" > unpack.log oggdec mxm#*.ogg >> unpack.log and so on. Link to comment
the bigg Posted September 8, 2006 Share Posted September 8, 2006 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
Meira Posted September 8, 2006 Author Share Posted September 8, 2006 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... Thanks for the help, though. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.