;CCA2_Install Script v1.0 written by sOCIETY^rSE 2000

(effect "lower_right" "radial" $FFFFF0 $222222)

(set #language (getenv "Language"))

(set #Varez2pic "Varez2")

(showmedia 'Varez2pic' (tackon "Installdat/" #Varez2pic) 'upper_left' 'none' 1)
  
(set @user-level 2)

(working "System check...")
(set #wel "\n\n------------------------------------------------------\n\n· R · E · S · I · S · T · A · N · C · E ·\n\n------------------------------------------------------\n\nsOCIETY kicks your ass with Varez2 - Boards & More Database!")
(set #ds 450000)
(complete 0)
(if (< @installer-version 43) (abort "The Varez2 install script needs Installer V43+!"))
(complete 1)
(set #ex (getversion "exec.library" (resident)))
(complete 3)
(if (< (shiftright #ex 16) 37) (abort "Varez2 needs AmigaOS 2.04 (V37) or higher!"))
(complete 6)
(message #wel) (welcome)
(complete 16)
(set #dst (askdir (prompt "Select the destination directory.\nA new drawer called 'Varez2' will be created.")
                  (help "All files belongs to Varez2 will be copied to this directory.\nA new drawer called 'Varez2' will be automatically created.")
                  (default "WORK:")))

(complete 17)
(if (< (getdiskspace #dst) #ds) (abort ("There is not enough free disk space for Varez2.\nMin. %ld KB are required." (/ #ds 1024))))
(complete 18)
(set #dst (tackon #dst "Varez2"))
(complete 19)
(message ("\n\n\nInstalling Varez2 to '%s'?" #dst))
(complete 20)
(set #dstfnt (tackon #dst "Fonts:"))
(complete 24)
(set #cpuexe (database "cpu"))
(set #cpuexe (- #cpuexe 68000))
(set #cpuexe (/ #cpuexe 10))

(complete 26)

(complete 40)
(complete 43)
(complete 47)
(working "Installing Varez2...")
(copyfiles (prompt "Installing main files...")
           (help "n/a")
           (source "instdata/bin")
           (dest #dst)
           (nogauge)
           (all))
(complete 54)
(working "Installing Varez2...")
(copyfiles (prompt "Installing font files...")
           (help "n/a")
           (source "instdata/fonts")
           (dest #dstfnt)
           (nogauge)
           (all))
(complete 55)

(complete 65)

(complete 75)

(complete 100)
 
(closemedia Varez2pic)

(exit "\nVarez2 is now installed.\n\nFor bugreports/support/comments etc. please refer to the Resistance Homepage...\n\nGet your free keyfile via email me!" (quiet))
