
echo off

  rem   ROCK'N ROLL Installation Batch Program, Copyright 1991 by Rainbow Arts
  rem   -----------------------------------------------------------------------
  rem   This batch is called by ROCKINST.BAT.
  rem   Parameters used:
  rem   %1 - source-drive
  rem   %2 - destination, drive
  rem   %3 - what to install: EGA, CGA or ALL
  rem   %4 - directory (optinal for installation on harddisk)
  rem   -----------------------------------------------------------------------

  rem   Check command line arguments
  rem   -----------------------------------------------------------------------
  if "%3" == "CGA" goto PARAM_OK
  if "%3" == "EGA" goto PARAM_OK
  if "%3" == "ALL" goto PARAM_OK

  rem   To display help information: runs rockinst.bat
  rem   -----------------------------------------------------------------------

  if exist %1ROCKINST.BAT %1rockinst.bat -?
  echo  Please insert Original Disk #1 and press any key when ready
  %1_getkey
  %1rockinst.bat -?
  echo  %1ROCKINST.BAT not found, should be on Original Disk #1 !
  goto EOBATCH

:PARAM_OK

  rem   Reset diskbuffer to avoid problems with diskchanges
  rem   -----------------------------------------------------------------------
  %1_dskres

  cls
  echo ÿ
  echo  ROCK'N ROLL Installation, Copyright (C) 1989-1991 by Rainbow Arts
  echo  -----------------------------------------------------------------
  echo ÿ

  rem   If there's a directory to create and it doesn't exist, try to create it
  rem   -----------------------------------------------------------------------
  if "%4" == ""     goto DIR_OK
  echo  ÿ
  echo  Creating directory "%2%4"!
  echo  ÿ
  mkdir %2%4 > NUL
  rem   It's not a bug - it's a feature! The typical procedure to check for the
  rem   existence of a directory is something like
  rem   IF EXIST C:\ROCKROLL\NUL GOTO DIR_OK
  rem   because the NUL-device is - by definition - located anywhere. Unfortu-
  rem   nately, DR-DOS is exaggerating: the NUL device can even reside in non-
  rem   existing directories!
  rem   -----------------------------------------------------------------------
  echo  Testing Directory > %2%4\rocktemp.$$$
  cls
  if exist %2%4\rocktemp.$$$ goto DEL_TEMP
  echo  Error: couldn't create directory "%2%4"!
  echo  ÿ
  goto  EOBATCH

:DEL_TEMP:
  del %2%4\rocktemp.$$$

:DIR_OK

  rem   If destination is a harddisk, don't ask about 360k - disks
  rem   -----------------------------------------------------------------------
  if not "%4" ==  "" goto COPYBIG

  rem   Check for 360 Kb disk drive
  rem   -----------------------------------------------------------------------
  echo  ÿ
  echo  Do you want to install ROCK'N ROLL on 5¬"-360 Kb disks (Y/N) ? [N]
  echo  ÿ
  gk Yy Nn(cr)

  rem   Normal copy if destination is a high capacity disk (720 Kb or more)
  rem   -----------------------------------------------------------------------
  if errorlevel 3 goto COPYBIG

  rem   Installation of all video adapters not possible on 360K - disks
  rem   -----------------------------------------------------------------------
  if NOT %3 == ALL %1_copy360 %1 %2 %3

  echo  ÿ
  echo  Sorry, but the "all video adapters" version of ROCK'N ROLL needs a disk drive
  echo  capacity of at least 720 Kb. Please press any key to return to the video
  echo  selection and choose number 2 or number 3.
  echo  ÿ
  echo  ÿ
  gk

  %1rockinst %1 %2


:COPYBIG
  if not exist %1RRLEV.DAT %1_copy %1 %2 %3 %4
  if not exist %1RREGA.DAT %1_copy %1 %2 %3 %4
  %1_copybig %1 %2 %3 %4

:EOBATCH

