; Install script for IconManager v37.1
; © 1994 Alex Taylor
; $VER : 7.2.94

(set @default-dest "SYS:WBStartup")

(if  (< (/ (getversion) 65536) 37)
  (abort "Sorry, you need Kickstart V37+ to use IconManager.")
)

(set destdir
  (askdir
    (help @askdir-help)
    (prompt "Where do you want to install IconManager?")
    (default @default-dest)
    (newpath)
  )
)

(set @default-dest destdir)

(copyfiles
  (help @copyfiles-help)
  (prompt "Copying IconManager...")
  (source "IconManager")
  (infos)
  (dest @default-dest)
)

(set @doc-dest "SYS:Docs")

(set destdir
  (askdir 
    (help @askdir-help)
    (prompt "Where do you want to put the IconManager doc files?")
    (default @doc-dest)
    (newpath)
  )
)

(set @doc-dest destdir)

(copyfiles
  (help @copyfiles-help)
  (prompt "Copying IconManager doc files...")
  (source "")
  (dest @doc-dest)
  (choices "IconManager.doc" "IconManager.guide")
  (infos)
)

(set @icon-dest "SYS:Icons")

(set destdir
  (askdir
    (help @askdir-help)
    (prompt "Where do you want to install the icons?")
    (default @icon-dest)
    (newpath)
  )
)

(set @icon-dest destdir)

(copyfiles
  (help @copyfiles-help)
  (prompt "Copying icons...")
  (source "Icons/")
  (pattern "#?.info")
  (dest @icon-dest)
)

(copylib
  (help @copylib-help)
  (prompt "Installing whatis.library to LIBS:")
  (source "Libs/whatis.library")
  (dest "libs:")
  (confirm)
)

(copyfiles
  (help @copyfiles-help)
  (source "s/FileTypes")
  (dest "s:")
  (prompt "Copying FileTypes to S:...")
  (confirm)
)

(startup "IconManager"
  (help @startup-help)
  (prompt "Adding lines to S:User-Startup...")
  (command "Assign Icons: " @icon-dest "\n")
  (command "Makedir RAM:Icons\n")
  (command "Copy Icons:#? RAM:Icons QUIET\n")
)  
  
(makeassign "Icons" @icon-dest)
