compiler bat files

Nirran

Vault Senior Citizen
Modder
these bat files will cycle through all ssl files in the directory and compile them all,put compile.bat in the directory that has the ssl files you want to compile(works from any directory),change CompilerDirectory= to the directory that has your compiler files in it,change wcc386 entry to your pre-compiler

compile.bat
Code:
set CurrentDirectory=%CD\%
set CompilerDirrectory=C:\Game Files\Fallout 2\Scripting\sFall\compile\
for %%X in (*.ssl) do (
call "%CompilerDirrectory%p.bat" %%X
)

p.bat
Code:
if not exist %1 goto DONE

del %CurrentDirrectory%temp.c 
del %CurrentDirrectory%temp.i 
del %CurrentDirrectory%temp.ssl 
del %CurrentDirrectory%temp.int 
del %CurrentDirrectory%temp.err
del %CurrentDirrectory%errors.log

copy %1 %CurrentDirrectory%temp.c 

"%CompilerDirrectory%wcc386" %CurrentDirrectory%temp.c /pc /fo=temp.i /w4

copy %CurrentDirrectory%temp.i %CurrentDirrectory%temp.ssl 

"%CompilerDirrectory%compile.exe" %CurrentDirrectory%temp.ssl 
IF errorlevel 1 goto PAUSE

copy "%CurrentDirrectory%temp.int" "%CompilerDirrectory%"

rename "%CompilerDirrectory%temp.int" %1

for %%X in (*.ssl) do (
rename "%CompilerDirrectory%*.ssl" *.int
)

copy "%CompilerDirrectory%*.int" %CurrentDirrectory%

del "%CompilerDirrectory%*.int"
del %CurrentDirrectory%temp.c 
del %CurrentDirrectory%temp.i 
del %CurrentDirrectory%temp.ssl 
del %CurrentDirrectory%temp.int 
del %CurrentDirrectory%temp.err
del %CurrentDirrectory%errors.log
 
goto DONE

:PAUSE
pause

:DONE

these were written in win7

figured maybe some other people will find them useful

Nirran
 
For us laymen out there who don’t know what you’re talking about, but want to, what is happening here? How does this help in regards to Fallout modding, etc. Please excuse my ignorance Nirran, I’m assuming that these are good things, but don’t understand how. :wink:
 
I wouldn't want to speak for Nirran, but it seems the purpose of these batch files is to allow his new script compiler to bulk-compile all the .ssl files in a a given directory into finished .int files, if a person is also using the watcom "pre-compiler."

In other words, you can use the batch files in this thread to conveniently compile all your changed scripts at once rather than one at a time.
 
If I was a scriptor I would have a big smile on my face right now, knowing that this will save me potentially hours of my life. Good work Nirran. Thanks for the explanation Endocore.
 
Back
Top