@echo off
rem This is a batch mode install for use on Japanese system since
rem the GUI install does not support DBCS characters
rem
if "%1" == "" goto Usage
if "%2" == "" goto Usage
rem
rem check to see if the specified directory already exists
if exist %1\%2 goto Error2
rem create the specified directory
md %1\%2
echo test for file existence > %1\%2\deleteme.txt
if not exist %1\%2\deleteme.txt goto Error1
del %1\%2\deleteme.txt
md %1\%2\docs
rem md %1\%2\examples
rem md %1\%2\examples\packet
if "%3" == "32" goto Win32
if "%3" == "16" goto Win16
goto CopyFiles
:Win16
md %1\%2\acrobat
md %1\%2\acrobat\Win16
goto CopyFiles
:Win32
md %1\%2\acrobat
md %1\%2\acrobat\Win32
goto CopyFiles
:CopyFiles
rem
rem copy the files
rem
copy readme.txt %1\%2
copy ghost4nw.exe %1\%2
copy GHOST4NW.HLP %1\%2
copy RECV.EXE %1\%2
rem copy RECVNOV.EXE %1\%2
copy recvw32.exe %1\%2
copy RECVPKT.EXE %1\%2
copy SEND.EXE %1\%2
rem copy SENDNOV.EXE %1\%2
copy sendw32.exe %1\%2
copy SENDPKT.EXE %1\%2
copy tcpipw.gll %1\%2
rem copy tcpipn.gll %1\%2
copy system.gll %1\%2
copy ghost4nw.cfg $1\$2
copy docs\ghost4nw.pdf %1\%2\docs
copy commands.txt %1\%2
rem copy docs\TCPIP.PDF %1\%2\docs
rem copy docs\WATTCP.PDF %1\%2\docs
rem copy examples\packet\startnet.bat %1\%2\examples\packet
rem copy examples\packet\wattcp.cfg %1\%2\examples\packet
copy ghost4nw.jp\ghostui.gll %1\%2
copy ghost4nw.jp\ngui.gll %1\%2
if "%3" == "32" goto 32BIT
if "%3" == "16" goto 16BIT
goto End
:16BIT
copy acrobat\Win16\rs16e301.exe %1\%2\acrobat\Win16
goto End
:32BIT
copy acrobat\Win32\AR302.EXE %1\%2\acrobat\Win32
goto End
echo **  
echo ** Ghost for NetWare Install completed successfully
echo **  
goto End
:Usage
echo **  
echo ** Incorrect usage
echo **  
echo ** Install usage is:
echo **
echo ** %0 Install-Drive Install-Path Acrobat-Type
echo **
echo ** Install-Drive represents the drive letter to install to
echo **
echo ** Install-Path represents the directory to install to
echo **
echo ** Acrobat-Type specifies the version of Adobe Acrobat Reader
echo ** to install.  32 will install the 32-bit version of
echo ** Adobe Acrobat reader.  16 will install the 16-bit version.
echo ** Leaving it blank will not install either version.
echo **
echo ** E.g.:
echo **
echo ** %0 c: g4nw 16
echo **
goto End
:Error1
echo **  
echo ** An invalid Drive or directory has been specified.  Note the drive
echo ** letter must include a colon. E.g. C:
echo ** directories should not include a leading backslash
echo **  
echo ** Install usage is:
echo **
echo ** %0 install-drive install-path
echo **
echo ** Where install-drive represents the drive letter to install to and
echo ** install-path represents the directory to install to
echo ** E.g.:
echo **
echo ** %0 c: g4nw
echo **
goto End
:Error2
echo ** 
echo ** %1\%2 already exists.  Please try a new directory.
echo **
goto End
:End

