@echo off

rem This uses Digital Mars' C++ compiler to compile our new Go!.exe.

rem This commented-out section uses Borland C++ 5.5's brc32 to compile res.rc to res.res. You'd need to change the path. You don't need to uncomment this unless you change the icon for Go or something.
rem mode con: cols=80 lines=50
rem set path=c:\rich\borland\bcc55\bin;c:\windows\system32;c:\windows;c:\windows\command
rem brc32 -fores.res -32 res.rc
rem del *.$$$

set path=c:\dm\bin;c:\windows\system32;c:\windows;c:\windows\command;c:\winnt\system32;c:\winnt;c:\winnt\command
set lib=c:\dm\lib
set include=c:\dm\include
cls
del wnoctis.exe
cls
echo Lib is [%lib%] Include is [%include%] Path is [%path%]
echo Compiling release version of WNoctis...
dmc.exe -ownoctis.exe -DALL -DWINDOWS -DDDRAWLINKEDIN noctis.cpp noctis-0.cpp noctis-1.cpp noctis-2.cpp win.cpp randalg.cpp noctis-ng.cpp mt.cpp noctis.def gdi32.lib shell32.lib miniddraw.lib -mn -5 -L/DELEXECUTABLE | more
if exist "wnoctis.exe" goto good
goto x
:good
copy wnoctis.exe "..\WNoctis.exe"

echo Compiling debug version of WNoctis...
dmc.exe -D -L/co/DETAILEDMAP/LINENUMBERS -oDWnoctis.exe -DALL -DWINDOWS -DDEBUG -DDDRAWLINKEDIN -D -g -s noctis.cpp randalg.cpp noctis-0.cpp noctis-1.cpp noctis-2.cpp win.cpp noctis-ng.cpp mt.cpp dnoctis.def gdi32.lib shell32.lib miniddraw.lib -mn -5 -L/DELEXECUTABLE | more
if exist "DWnoctis.exe" goto good2
goto x
:good2
copy DWnoctis.exe "..\DWNoctis.exe"
copy DWnoctis.map "..\DWNoctis.map"
:x
del *.obj
del wnoctis.exe
del Dwnoctis.exe
pause