.KEY dest
.BRA {
.KET }

;
; Do the MediaShow installation:
;
; Inputs:
;    dest  Where stuff should go.


IF NOT EXISTS "{dest}MediaShow"
   ECHO "     Creating Directory {dest}MediaShow ..."
   MAKEDIR "{dest}MediaShow"
   COPY RAM:SMInstall/Drawer.info "{dest}MediaShow.info"
ENDIF

;
; Install the program itself.
;
ECHO "*N"
INSTUTIL ask -dy "Install the MediaShow program files [Y/N]? Y"
IF NOT WARN

   ECHO "*N     Copying MediaShow Program..."
   COPY SMInstPgm:MediaShow "{dest}MediaShow/MediaShow"
   COPY SMInstPgm:MediaShow.info "{dest}MediaShow/MediaShow.info"
   INSTUTIL reseticon "{dest}MediaShow/MediaShow"

   ECHO "*N     Copying MediaShow player ..."
   COPY SMInstPgm:Player "{dest}MediaShow/Player"
   COPY SMInstPgm:Player.info "{dest}MediaShow/Player.info"
   INSTUTIL reseticon "{dest}MediaShow/Player"

   COPY SMInstPgm:showme "{dest}MediaShow/showme"

   COPY SMInstPgm:Player_Read_Me "{dest}MediaShow/Player_Read_Me"
   COPY SMInstPgm:Player_Read_Me.info "{dest}MediaShow/Player_Read_Me.info"
   INSTUTIL reseticon "{dest}MediaShow/Player_Read_Me"

   COPY SMInstPgm:Read_Me_First! "{dest}MediaShow/Read_Me_First!"
   COPY SMInstPgm:Read_Me_First!.info "{dest}MediaShow/Read_Me_First!.info"
   INSTUTIL reseticon "{dest}MediaShow/Read_Me_First!"

   assign SMInstExamples:
   EXECUTE RAM:SMInstall/DiskMount Examples Examples: SMInstExamples:

   ECHO "*N     Copying MediaShow Example Files..."

   IF NOT EXISTS "{dest}MediaShow/Tutorial"
      MAKEDIR "{dest}MediaShow/Tutorial"
   ENDIF

   ECHO "*N     Copying Examples & Tutorial ..."
   COPY SMInstExamples:Tutorial "{dest}MediaShow/Tutorial" all quiet
   COPY SMInstExamples:Tutorial.info "{dest}MediaShow/Tutorial.info"
   INSTUTIL reseticon "{dest}MediaShow/Tutorial"

   ECHO "*N     Copying Instruments directory ..."
   COPY SMInstExamples:Instruments "{dest}MediaShow/Instruments" all quiet
   COPY SMInstExamples:Instruments.info "{dest}MediaShow"
   INSTUTIL reseticon "{dest}MediaShow/Instruments"

   ECHO "*N     Copying Songs directory ..."
   COPY SMInstExamples:Songs "{dest}MediaShow/Songs" all quiet
   COPY SMInstExamples:Songs.info "{dest}MediaShow"
   INSTUTIL reseticon "{dest}MediaShow/Songs"

   ECHO "*N     Copying Productions directory ..."
   COPY SMInstExamples:Productions "{dest}MediaShow/Productions" all quiet
   COPY SMInstExamples:Productions.info "{dest}MediaShow"
   INSTUTIL reseticon "{dest}MediaShow/Productions"

   ECHO "*N     Copying Pics directory ..."
   COPY SMInstExamples:Pics "{dest}MediaShow/Pics" all quiet
   COPY SMInstExamples:Pics.info "{dest}MediaShow"
   INSTUTIL reseticon "{dest}MediaShow/Pics"

   ECHO "*N     Copying Anims directory ..."
   COPY SMInstExamples:Anims "{dest}MediaShow/Anims" all quiet
   COPY SMInstExamples:Anims.info "{dest}MediaShow"
   INSTUTIL reseticon "{dest}MediaShow/Anims"

   ECHO "*N     Copying Sound_Effects directory ..."
   COPY SMInstExamples:Sound_Effects "{dest}MediaShow/Sound_Effects" all quiet
   COPY SMInstExamples:Sound_Effects.info "{dest}MediaShow"
   INSTUTIL reseticon "{dest}MediaShow/Sound_Effects"


ENDIF


;*************************************************************************
; Install fonts
;*************************************************************************

IF NOT EXISTS "{dest}MediaShow/MediaShowFonts"
    ECHO >"{dest}MediaShow/MediaShowFonts"
ENDIF

assign SMInstFandP:
ECHO "*N"
INSTUTIL ask -dy "Copy Video Fonts to FONTS: directory [Y/N]? Y"
IF NOT warn

   EXECUTE RAM:SMInstall/DiskMount "Fonts and Backgrounds" "Fonts & Pics:" SMInstFandP:

   FAILAT 21
   ECHO "*N     Copying Video fonts to FONTS:"
   COPY SMInstFandP:fonts FONTS: ALL QUIET

; make sure user has diamond font in FONTS: (tutorial uses it)
   IF NOT EXISTS Fonts:diamond.font
      COPY SMInstPgm:Fonts/Diamond.font FONTS:
      IF NOT EXISTS Fonts:Diamond
         MAKEDIR Fonts:Diamond
      ENDIF
      COPY SMInstPgm:Fonts/Diamond FONTS:Diamond all quiet
   ENDIF

   IF error
      ECHO "*N      Not enough room on the FONTS: directory*N"
   ENDIF
   FAILAT 10

   ECHO >"{dest}MediaShow/MediaShowFonts"

ELSE

   INSTUTIL ask -dy "Copy Video Fonts to {dest}MediaShow/Fonts [Y/N]? Y"
   IF NOT warn

      EXECUTE RAM:SMInstall/DiskMount "Fonts and Backgrounds" "Fonts & pics:" SMInstFandP:

      ECHO "*N     Copying Video Fonts to {dest}MediaShow/Fonts"
      IF NOT EXISTS "{dest}MediaShow/Fonts"
         MAKEDIR "{dest}MediaShow/Fonts"
      ENDIF
      COPY SMInstFandP:fonts "{dest}MediaShow/Fonts" ALL QUIET
      COPY SMInstPgm:Fonts/Diamond.font "{dest}MediaShow/Fonts"
      IF NOT EXISTS "{dest}MediaShow/Fonts/Diamond"
         MAKEDIR "{dest}MediaShow/Fonts/Diamond"
      ENDIF
      COPY SMInstPgm:Fonts/Diamond "{dest}MediaShow/Fonts/Diamond" all quiet

      ECHO >"{dest}MediaShow/MediaShowFonts" "ASSIGN FONTS: *"{dest}MediaShow/Fonts*""

   ENDIF

ENDIF

;*************************************************************************
; Install Backgrounds
;*************************************************************************

ECHO "*N"
INSTUTIL ask -dy "Install Video Backgrounds on {dest}MediaShow/Pics [Y/N]? Y"
IF NOT warn

   EXECUTE RAM:SMInstall/DiskMount "Fonts and Backgrounds" "Fonts & Pics:" SMInstFandP:

   ECHO "*N     Installing Video Backgrounds ..."
   COPY SMInstFandP:Pics "{dest}MediaShow/Pics" all quiet

ENDIF

ECHO "*N"
INSTUTIL ask -dy "Install Paint & Music Programs on {dest}MediaShow [Y/N]? Y"
IF NOT warn

   assign SMInstPandM:
   EXECUTE RAM:SMInstall/DiskMount "Paint & Music" "Paint & Music:" SMInstPandM:

   ECHO "*N     Installing Paint & Music ..."
   COPY SMInstPandM: "{dest}MediaShow" all quiet
   INSTUTIL reseticon "{dest}MediaShow/Paint"
   INSTUTIL reseticon "{dest}MediaShow/Music"

ENDIF

;
; The Assign commands for startup-sequence
;
CD RAM:SMInstall
ECHO >AsnSM1 "ASSIGN MediaShow: *"{dest}MediaShow*""
ECHO >AsnSM2 "EXECUTE *"{dest}MediaShow/MediaShowFonts*""

JOIN AsnSM1 AsnSM2 as S:MediaShow-Assign
COPY S:MediaShow-Assign "{dest}MediaShow/Assign_Me"
COPY RAM:SMInstall/Assign_Me.info "{dest}MediaShow/Assign_Me.info"
INSTUTIL reseticon "{dest}MediaShow/Assign_Me"

