
;*************************************
;*                                   *
;* Install Script for AddIcon 2.0    *
;* Program and script by:            *
;* ScoTT/Inferno&BlaBla              *
;*                                   *
;* BLABLA - it means system friendly *
;*                                   *
;*************************************

(if 
   (askchoice
   (prompt "Select language:  /   Wybierz jzyk:")
   (help @askchoice-help)
   (choices
   "English"
   "Polski"
   )
   )
   (
   (set executabledir "Gdzie chcesz zainstalowa plik wykonywalny programu AddIcon (katalog C: jest preferowany)?")
   (set docbool "Czy chcesz zainstalowa dokumentacj do programu (AmigaGuide)?")
   (set yes "Tak, prosz")
   (set no "Nie")
   (set docdir "Gdzie chcesz nagra plik z dokumentacj?")
   (set whaticons "Czy chcesz zainstalowa przykadowy zestaw ikon?")
   (set iconchoice1 "Nie instaluj adnych ikon")
   (set iconchoice2 "Zainstaluj ikonki MagicWB")
   (set iconchoice3 "Zainstaluj ikonki standardowe")
   (set iconsdir1 "Gdzie chciaby nagra ikony? \n(Szuflada 'Ikony' bdzie stworzona)")
   (set iconsdir2 "Gdzie w takim razie trzymasz wasny zestaw ikon?")
   (set iconsdirname "Ikony")
   (set fmconfig "Czy chcesz zainstalowa w katalogu ENVARC: przykadow konfiguracj FileMaster'a?")
   )
   
   (
   (set executabledir "Where do you want to install AddIcon executable file? (C: is prefered)")
   (set docbool "Do you want to install documentation (AmigaGuide)?")
   (set yes "Yes, please")
   (set no "No")
   (set docdir "Where do you wish me to copy documentation?")
   (set whaticons "What about installing a sample set of icons?")
   (set iconchoice1 "Do not install any icons")
   (set iconchoice2 "Install MagicWB icons")
   (set iconchoice3 "Install standard icons")
   (set iconsdir1 "Where do you wish the icons to be copied to? \n(a drawer 'Icons' will be created)")
   (set iconsdir2 "Where do you have your own icons stored then?")
   (set iconsdirname "Icons")
   (set fmconfig "Do you want to install in your ENVARC: directory an example of FileMaster configuration file?")
   )
)

(copyfiles
(source "AddIcon")
(dest
   (askdir
   (prompt executabledir)
   (help @askdir-help)
   (default "C:")
   )
)
)

(complete 20)

(if
(askbool
(prompt docbool)
(help @askbool-help)
(choices
yes
no
)
)
   (
   (copyfiles
   (source "AddIcon.guide")
   (dest
      (askdir
      (prompt docdir)
      (help @askdir-help)
      (default @default-dest)
      )
   )
   (infos)
   )
)
)
(complete 40)

(set whichicons
   (askchoice
   (prompt whaticons)
   (help @askchoice-help)
   (choices
   iconchoice1
   iconchoice2
   iconchoice3
   )
   (default 1)
   )
)

(if whichicons
   (
   (set iconspath
      (askdir
      (prompt iconsdir1)
      (help @askdir-help)
      (default @default-dest)
      )
   )

   (set iconspath
      (tackon
      iconspath
      iconsdirname
      )
   )

   (copyfiles
   (source 
      (select whichicons
      ""
      "MWBIcons/"
      "StandardIcons/"
      )
   )
   (dest iconspath)
   (all)
   (infos)
   )
   )
   (
   (set iconspath
      (askdir
      (prompt iconsdir2)
      (help @askdir-help)
      (default @default-dest)
      )
   )
   )
)
(complete 70)


(textfile
(dest "ENV:AddIconPath")
(append iconspath)
)

(textfile
(dest "ENVARC:AddIconPath")
(append iconspath)
)

(complete 90)

(if
(askbool
(prompt fmconfig)
(help @askbool-help)
(choices
yes
no
)
)
   (
   (copyfiles
   (source "fm.prefs")
   (dest "ENV:")
   )

   (copyfiles
   (source "fm.prefs")
   (dest "ENVARC:")
   )
   )
)
(working "And always remember:\nBLABLA - it means system friendly")
(run "SYS:Utilities/Multiview ram:AddIcon.guide")
(complete 100)
(exit)
