.key target
.def target RAM:
FAILAT 40
PATH ram: add
COPY c:COPY ram:
COPY c:ECHO ram:
COPY c:ASSIGN ram:
COPY c:IF ram:
COPY c:ELSE ram:
COPY c:ENDIF ram:
COPY c:ASK ram:
COPY c:DELETE ram:
IF FAIL
    ECHO "Sorry, Can't find ASK on your boot disk, find a standard Workbench"
    ECHO "disk and COPY c/ask TO C: for this script to work."
    QUIT
ENDIF
COPY AmigaPlus7:LHARC ram:
COPY AMIGAPlus7:MORE ram:

ECHO "[33m AMIGA [3mPlus[0m[33m DecompressFiles script.[0m"
ECHO ""
ECHO "[41m[34mIf you have two disk drives or a hard disk, start this script by clicking "
ECHO "once on the DecompressFiles icon, holding the shift key down, and double- "
ECHO "clicking on the disk or drawer where you want your files to go!           [0m"
ECHO "Otherwise the script will decompress the files to RAM:, and then ask you"
ECHO "to enter the destination disk."
ECHO ""
ECHO "  This script will decompress the Bars & Pipes Demo, Pha$ar 1989 tax forms,"
ECHO "ProDraw Clip-Art, the C language source code for the IFF utility programs,"
ECHO "the assembly language source code for the AmiBarCode printer, miscellaneous"
ECHO "VirusX files, and instructions for LHARC."
ECHO "  All together there is so much material packed onto this disk, that you "
ECHO "will need more than one blank floppy to decompress ALL these files onto."
ECHO "  For each section, the script will ask you if you want the installation done."
ECHO "If you don't want to decompress a particular section, type 'N' to its prompt."
ECHO "Your AMIGA [3mPlus[0m disk should be named AMIGAPlus7."
ECHO ""
ASK "[33mDo you want to continue ? (Click here and type Y or N) (N to exit)[0m"

IF WARN
  ECHO ""
  ECHO "NOTE: You need at least 1MB of RAM to run the Bars&Pipes Demo!"
  ASK "[33mDecompress Bars&Pipes Demo? (Y or N) (N to skip)[0m"
  IF WARN
   ASK "The destination selected is <target>.[33m Is it Ready? (Y or N) (N to abort)[0m"
   IF WARN
      ECHO "Beginning Decompression, please be patient."
      ASSIGN BARS: "<target>"
      ram:LHARC -x -r -m x AMIGAPlus7:barp BARS: B&PDemo/#? B&PDemo.info
      ram:LHARC -m x AMIGAPlus7:barp ram: generic.doc.info
      COPY ram:generic.doc.info BARS:B&PDemo/B&PDemo.doc.info
      IF "<target>" EQ "RAM:"
        ECHO "Ready to copy the Bars&Pipes Demo to a floppy."
        ASK "[33mInsert a BLANK disk in DF0: (Y to continue, N to abort)[0m"
        IF WARN
          COPY BARS:B&PDemo df0:B&PDemo ALL
          COPY BARS:B&PDemo.info df0:
          DELETE >nil: ram:B&PDemo ALL
          ASSIGN BARS: df0:
        ENDIF
      ENDIF
      IF NOT "<target>" EQ "RAM DISK:"
        COPY ram:MORE BARS:
      ENDIF
    ENDIF
  ENDIF

  ECHO ""
  ASK "[33mDecompress VirusX and LHarc files? (Y or N) (N to skip)[0m"
  IF WARN
    ASK "The destination selected is <target>.[33m Is it Ready? (Y or N) (N to abort)[0m"
    IF WARN
      ASSIGN VIRUS: "<target>"
      ram:LHARC -x -r -m x AMIGAPlus7:barp VIRUS: VirusKillers/#? VirusKillers.info
      ram:LHARC -m x AMIGAPlus7:barp ram: generic.doc.info
      COPY ram:generic.doc.info VIRUS:VirusKillers/LHARC.doc.info
      COPY ram:generic.doc.info VIRUS:VirusKillers/KV.doc.info
      COPY ram:generic.doc.info VIRUS:VirusKillers/VirusX_4.0.doc.info
      IF "<target>" EQ "RAM:"
        ECHO "Ready to copy the decompressed files to a floppy."
        ASK "[33mInsert the DESTINATION disk in DF0: (Y to continue, N to abort)[0m"
        IF WARN
          COPY VIRUS:VirusKillers df0:VirusKillers ALL
          COPY VIRUS:VirusKillers.info df0:
          DELETE >nil: ram:VirusKillers ALL
          DELETE >nil: ram:VirusKillers.info
          ASSIGN VIRUS: df0:
        ENDIF
      ENDIF
      IF NOT "<target>" EQ "RAM DISK:"
        COPY ram:MORE VIRUS:
      ENDIF
    ENDIF
  ENDIF

  ECHO ""
  ECHO "[33mDecompress C language IFF utility source code and assembly language"
  ASK "ABC source code? (Y or N) (N to skip)[0m"
  IF WARN
    ASK "The destination selected is <target>.[33m Is it Ready? (Y or N) (N to abort)[0m"
    IF WARN
      ASSIGN SOURCE: "<target>"
      ram:LHARC -x -r -m x AMIGAPlus7:barp SOURCE: IFFSource/#?
      COPY AmigaPlus7:Baffle.info SOURCE:IFFSource.info
      IF "<target>" EQ "RAM:"
        ECHO "Ready to copy the decompressed files to a floppy."
        ASK "[33mInsert the DESTINATION disk in DF0: (Y to continue, N to abort)[0m"
        IF WARN
          COPY SOURCE:IFFSource df0:IFFSource ALL
          COPY SOURCE:IFFSource.info df0:
          DELETE >nil: ram:IFFSource ALL
          DELETE >nil: ram:IFFSource.info
        ENDIF
      ENDIF
    ENDIF
  ENDIF

  ECHO ""
  ASK "[33mDecompress Pha$ar 1989 tax forms? (Y or N) (N to skip)[0m"
  IF WARN
    ASK "The destination selected is <target>.[33m Is it Ready? (Y or N) (N to abort)[0m"
    IF WARN
      ASSIGN TAX: "<target>"
      ram:LHARC x AMIGAPlus7:barp TAX: phasar.tax  PHASAR.TAX.info
      IF "<target>" EQ "RAM:"
        ECHO "Ready to copy the Pha$ar tax forms to a floppy."
        ASK "[33mInsert your Pha$ar disk in DF0: (Y to continue, N to abort)[0m"
        IF WARN
          COPY TAX:PHASAR#? df0:
          DELETE >nil: ram:phasar#?
        ENDIF
      ENDIF
    ENDIF
  ENDIF

  ECHO ""
  ASK "[33mDecompress ProDraw clip-art? (Y or N) (N to skip)[0m"
  IF WARN
    ASK "The destination selected is <target>.[33m Is it Ready? (Y or N) (N to abort)[0m"
    IF WARN
      ASSIGN ART: "<target>"
      ram:LHARC x AMIGAPlus7:barp ART: HOCKEY GUITAR FOLK-ORNAMENT
      IF "<target>" EQ "RAM:"
        ECHO "Ready to copy the ProDraw clip-art to a floppy."
        ASK "[33mInsert the DESTINATION disk in DF0: (Y to continue, N to abort)[0m"
        IF WARN
          COPY ART:HOCKEY df0:
          COPY ART:GUITAR df0:
          COPY ART:FOLK-ORNAMENT df0:
          DELETE >nil: ram:HOCKEY
          DELETE >nil: ram:GUITAR
          DELETE >nil: ram:FOLK-ORNAMENT
        ENDIF
      ENDIF
    ENDIF
  ENDIF
ENDIF

ECHO "[42m[33m   Exiting AMIGA [3mPlus[0m[42m[33m DecompressFiles script.[0m"

ASSIGN BARS:                           ; clear old assigns
ASSIGN VIRUS:
ASSIGN SOURCE:
ASSIGN TAX:
ASSIGN ART:

DELETE >nil: ram:generic.doc.info      ; and clean up!
DELETE >nil: ram:MORE
DELETE >nil: ram:ASSIGN
DELETE >nil: ram:ASK
DELETE >nil: ram:LHARC
DELETE >nil: ram:ECHO
DELETE >nil: ram:ELSE
DELETE >nil: ram:IF
DELETE >nil: ram:ENDIF
DELETE >nil: ram:COPY
DELETE >nil: ram:DELETE


