; $VER: DMC-2-HTML Installer Script

(complete 0)
(user 1)

(set #bad-kick "DMC-2-HTML needs Amiga-OS 2.0 or higher")

(set SelectDir1Msg
     (cat "Please select a directory\nto install DMC-2-HTML in"
     )
)

 (set CPU1Msg "68000")
 (set CPU2Msg "68020+")

 (set CPUMsg "What CPU does the machine have that you are installing DMC-2-HTML?")

(if (> (* 36 65536) (getversion "exec.library" (resident)))
        (abort #bad-kick)
)


;(welcome)
(set old_level @user-level)

(user 2)

(set target (askdir
        (prompt SelectDir1Msg)
        (help #which-dir-help)
        (default "SYS:")
))
(set @default-dest        (tackon target "DMC-2-HTML"))

(user old_level)

  (set CPU
      (askchoice
      (prompt CPUMsg)
      (help   @askchoice-help)
      (choices CPU1Msg CPU2Msg)
      (default 1)
      )
  )

  (if ( < (exists @default-dest (noreq) ) 2)
    (makedir @default-dest
        (prompt "Creating DMC-2-HTML directory...")
        (help @makedir-help)
        (infos)
    )
  )

  (complete 20)

(If (= CPU 0)
 (
  (copyfiles
    (prompt "Installing DMC-2-HTML...")
    (help @copyfiles-help)
    (source "Files/DMC-2-HTML.000")
    (dest @default-dest)
    (newname "DMC-2-HTML")
    (confirm)
  )
 )
)

(If (= CPU 1)
 (

  (copyfiles
    (prompt "Installing DMC-2-HTML...")
    (help @copyfiles-help)
    (source "Files/DMC-2-HTML.020")
    (dest @default-dest)
    (newname "DMC-2-HTML")
    (confirm)
  )

(complete 40)

 )
)

  (copyfiles
    (prompt "Installing DMC-2-HTML Icon...")
    (help @copyfiles-help)
    (source "Files/DMC-2-HTML.info")
    (dest @default-dest)
    (confirm)
  )

(complete 60)

  (if (= default_lang 4)
  (
      (copyfiles
          (prompt "Copying AmigaGuide instructions...")
          (help @copyfiles-help)
          (source "DMC-2-HTML.guide")
          (dest @default-dest)
          (infos)
          (all)
          (confirm)
      )

(complete 80)

      (copyfiles
          (prompt "Copying AmigaGuide instructions icon...")
          (help @copyfiles-help)
          (source "DMC-2-HTML.guide.info")
          (dest @default-dest)
          (infos)
          (all)
          (confirm)
      )
  )
)

(complete 100)

(exit)