.KEY dest,help/s
.BRA {
.KET }

;RUN NoFastMem
;IF IsMem512 
;  ECHO "*nMemory is 512k.*n"
;ELSE
;  ECHO "*More Memory than 512k.*n"
;ENDIF

IF {dest} EQ ""
   ECHO "*nYou must enter the Hard Disk name or Subdirectory.*n"
   ECHO "*nExample: 'Execute HDInstall DH0:Languages/'*n"
   ECHO "*nDon't forget the '/' ending mark if copying to a Subdirectory.*n"
   QUIT
ENDIF

IF NOT EXISTS {dest}
  ECHO "*N ******** Unable to find {dest} ************"
  ECHO "*N ********** Leaving HDInstall program **********"
  QUIT
;  Makedir {dest}
;  ECHO "*N ********** Making Hard Disk Drawer {dest} **********"
;  Copy SpanishGallery:Empty.info to {dest}.info
ENDIF

; makes .info icon for directory selected
; this will skip if writing to DH0:, because DH0:.info will already exist.
IF NOT EXISTS {dest}.info
  SpanishGallery:SetSlash {dest}
  ;Copy SpanishGallery:Empty.info to {dest}.info
  ; ^ makes AG/.info, not AG.info
ENDIF
IF NOT EXISTS {dest}
  ECHO "*N ********** Unable to make {dest}, Leaving HDInstall program **********"
  QUIT
ENDIF
;If NOT Exists "HardDiskName" 
;  echo "*nYou must enter the Hard Disk name or Subdirectory.*n"
;  echo "*nExample: 'HDInstall DH0:Languages/'*n"
;  quit
;EndIf

; Make sure he's running WB 1.3!
; Under 1.3, the "1 gt 2" test fails; we proceed to "FAILAT 10".
; Under 1.2, however, the IF command itself dies, since GT is not defined; 
; execution is not suspended, and the ECHO and SKIP are seen.
FAILAT 21
IF >NIL: 1 gt 2
	ECHO "*NVersion 1.3 of the Amiga Workbench software *E[;1mmust*E[m be"
	ECHO "present before this installation can proceed.*N"
   SKIP wrapup
ENDIF
FAILAT 10

Echo "Spanish Audio Gallery will now be installed on {dest}"
Ask "Do you want to proceed? (y/n)"
IF WARN
  Echo "Be sure the Spanish Audio Gallery System Disk is in drive df0:"
  ECHO " "
  Ask "Press any key to continue"
  CD "{dest}"
  ECHO " "
  ECHO "Making SpanishGallery Directory"
  ECHO " "
  IF NOT EXISTS {dest}SpanishGallery
    Makedir SpanishGallery
    Copy SpanishGallery:Empty.info to {dest}SpanishGallery.info
  ELSE
    ECHO "SpanishGallery directory found..."  
    ECHO " "
  ENDIF
  IF NOT EXISTS {dest}SpanishGallery.info
    Copy SpanishGallery:Empty.info to {dest}SpanishGallery.info
  ENDIF
  ECHO "Copying Spanish Audio Gallery files to {dest}SpanishGallery"
    Copy SpanishGallery: all to {dest}SpanishGallery 
  ECHO " "
  ECHO "Spanish Audio Gallery copied to {dest}"
  ECHO " "
  ECHO "Please insert Spanish1 in any drive:"
  ECHO " "
  ASK "Press any key to continue..."
  ECHO " "
  IF NOT EXISTS {dest}Spanish1
    Makedir {dest}Spanish1
  ENDIF
  Copy Spanish1: all to {dest}Spanish1 
  ECHO " "
  ECHO "Please insert Spanish2 in any drive:"
  ECHO " "
  ASK "Press any key to continue..."
  ECHO " "
  IF NOT EXISTS {dest}Spanish2
    Makedir {dest}Spanish2
  ENDIF
  Copy Spanish2: all to {dest}Spanish2 
  ECHO " "
  ECHO "Please insert Spanish3 in any drive:"
  ECHO " "
  ASK "Press any key to continue..."
  ECHO " "
  IF NOT EXISTS {dest}Spanish3
    Makedir {dest}Spanish3
  ENDIF
  Copy Spanish3: all to {dest}Spanish3 
  ECHO " "
  ECHO "Please insert Spanish4 in any drive:"
  ECHO " "
  ASK "Press any key to continue..."
  ECHO " "
  IF NOT EXISTS {dest}Spanish4
    Makedir {dest}Spanish4
  ENDIF
  Copy Spanish4: all to {dest}Spanish4 
  ECHO " "
  ECHO "Please insert Spanish5 in any drive:"
  ECHO " "
  ASK "Press any key to continue..."
  ECHO " "
  IF NOT EXISTS {dest}Spanish5
    Makedir {dest}Spanish5
  ENDIF
  Copy Spanish5: all to {dest}Spanish5 
  ECHO " "
  ECHO "Please insert SpanishExtras in any drive:"
  ECHO " "
  ASK "Press any key to continue..."
  ECHO " "
  IF NOT EXISTS {dest}SpanishExtras
    Makedir {dest}SpanishExtras
  ENDIF
  Copy SpanishExtras: all to {dest}SpanishExtras 
  ECHO " "
  ECHO "   (1) Remove all disks and enter the following lines from the CLI "
  ECHO " each time before running Spanish Audio Gallery, or " 
  ECHO " "
  ECHO "   (2) Add the following lines to your Hard Disk startup-sequence file:"
  ECHO " "
  ECHO " Assign SpanishGallery: {dest}SpanishGallery "
  ECHO " Assign Spanish1: {dest}Spanish1 "
  ECHO " Assign Spanish2: {dest}Spanish2 "
  ECHO " Assign Spanish3: {dest}Spanish3 "
  ECHO " Assign Spanish4: {dest}Spanish4 "
  ECHO " Assign Spanish5: {dest}Spanish5 "
  ECHO " Assign SpanishExtras: {dest}SpanishExtras "
  ECHO " "

ENDIF
