@echo off
rem ----------------------------------------------------------------------
rem    BUILD.BAT:  the install-shield release-build batch file, for BIND
rem    Author:  Paul Wren, Software.Com
rem    modified: l. kahn for freeware version
rem    Date:    11/21/95
rem
rem    Adapted to MIPS/Intel 12/19/95.  Switch by passing 'mips' on
rem        command line for MIPS machine.
rem
rem    NOTE:  Will default to Intel.
rem 
rem ----------------------------------------------------------------------

if (%1)==() goto :intel
set VERSION=MIPS_Rel
set INSTDIR=mips
set ZIP=zip
echo Building MIPS Version...

if (%1)==(mips) goto :skip_intel

:intel
set VERSION=WinRel
set INSTDIR=intel
set ZIP=zip
echo Building INTEL version...
:skip_intel

set IPRG=n:\ishield3\program
set INST=\bind\install\%INSTDIR%\data

echo ...Build components...
%IPRG%\compile setup.rul -g
copy setup.ins %INSTDIR%\disk1

echo ...Copy BIND stuff to data directory...

copy ..\readme.nt
COPY \bind\contrib\winnt-dist\*.*    %INST%

COPY \bind\todo		%INST%
COPY \bind\options      %INST%
COPY \bind\changes      %INST%

cd %INSTDIR%
	echo ...Compress release data...
	del data\data.z
	%IPRG%\icomp -i data\*.* data\data.z
	copy data\data.z disk1
	del data\data.z

	echo ...Make setup packing list...
        cd setup
	%IPRG%\packlist setup.lst
	copy setup.pkg ..\disk1
	copy setup.dbg ..\disk1
	cd ..

	echo ...Finish up disk contents with support files
	copy %IPRG%\_setup.lib  disk1
	copy %IPRG%\setup.exe   disk1
 	copy %IPRG%\_setup.dll  disk1

	echo ...And helper dll libraries


	echo ...And helper dll libraries
	%IPRG%\icomp ..\bind.bmp		        disk1\_setup.lib
	%IPRG%\icomp %IPRG%\ctl3d32.dll			disk1\_setup.lib
	%IPRG%\icomp %IPRG%\_isres.dll                  disk1\_setup.lib
	%IPRG%\icomp ..\license.txt                     disk1\_setup.lib
	%IPRG%\icomp ..\BINDDLL.DLL                     disk1\_setup.lib
	%IPRG%\icomp ..\readme.nt			disk1\_setup.lib

	rem Zip in separately so they're available BEFORE install runs
	copy ..\readme.nt  disk1
	copy %IPRG%\_INST32I.EX_ disk1 
        rem copy stupid program needed for nt
        rem that wasn't even installed by the
        rem freeware install shield had to get it
        rem off the vc++4.0 cd
	copy \bind\contrib\winnt-dist\bog.wri disk1
        copy ..\license.txt                   disk1

        rem split it up for floppies
        rem would like to make contiguous with the -c options but one file
        rem is too big... 
        cd disk1
        %IPRG%\split data.z -F1370 -D1@400
        cd ..
@echo on
        rem now copy parts to dist disks and remove from parent
        copy disk1\data.2 disk2
        erase disk1\data.2
        erase disk1\data.z
        copy disk1.id disk1
        copy disk2.id disk2

	rem Zip the whole enchilada into one file
        erase ntdns497relbin.zip
	%ZIP% ntdns497relbin.zip disk1\*.* disk2\*.*
cd ..

set BIND=
set INST=
set IPRG=

echo .
echo .
echo Completed.

