 ; Install Script for Flowers! From Drifters! By Zinko (Je Suis Lent! ;)

(COMPLETE 0)
(message "\nDFT\n"
         "INVITES YOU TO\n\n"
         "FLOWERS!\n\n"
         "This installer will create a drawer in your chosen\n"
         "destination directory called DFT-Flowers.")

   (set @default-dest "Drifters:")
   (set dest1
      (askdir
         (prompt "\nSelect the location to install Flowers.\n")
           (help "Choose a destination partition or directory"
                 " to install Flowers. The Installer will"
                 " create a directory called 'DFT-Flowers' in the"
                 " location directory you choose and then install"
                 " Flowers to it."
(default @default-dest))))
  
(set @default-dest (tackon dest1 "DFT-Flowers"))
(set datadest (tackon dest1 "DFT-Flowers/"))

(makedir @default-dest (safe) (infos))

(complete 10)


(makeassign "Paradisko" datadest)



(makedir datadest (safe))

(working "Copying unarchiver to RAM...")
(copyfiles (source "C")
           (dest "Ram:")
           (pattern "lha")
           (nogauge)
           (optional "force")
           (safe))
(copyfiles (source "C")
           (dest "Ram:")
           (pattern "Join")
           (nogauge)
           (optional "force")
           (safe))
(copyfiles (source "C")
           (dest "Ram:")
           (pattern "Assign")
           (nogauge)
           (optional "force")
           (safe))

(if (= serverMode FALSE)
    (askdisk (prompt "\nPlease make sure the 1st disk is inserted correctly.\nThe install procedure is about to continue.")
             (help @askdisk-help)
	         (dest "Flowers-1")))

(working "Unpacking 1st archive to " datadest" ...")
(run ("RAM:lha x Flowers-1:DFT-FLO1.lha Paradisko:"))

(delete "Paradisko:file_id.diz" (optional "force") (safe))
(delete "Paradisko:Flowers!/DriftersShow.txt" (optional "force") (safe))

(complete 25)

(if (= serverMode FALSE)
    (askdisk (prompt "\nPlease make sure the 2nd disk is inserted correctly.\nThe install procedure is about to continue.")
             (help @askdisk-help)
	         (dest "Flowers-2")))

(working "Unpacking 2nd archive to " datadest" ...")
(run ("RAM:lha x Flowers-2:DFT-FLO2.lha Paradisko:"))

(delete "Paradisko:file_id.diz" (optional "force") (safe))
(delete "Paradisko:Flowers!/DriftersShow.txt" (optional "force") (safe))
(delete "Paradisko:Flowers!/installer" (optional "force") (safe))

(complete 50)

(if (= serverMode FALSE)
    (askdisk (prompt "\nPlease make sure the 3rd disk is inserted correctly.\nThe install procedure is about to continue.")
             (help @askdisk-help)
	         (dest "Flowers-3")))

(working "Unpacking 3rd archive to " datadest" ...")
(run ("RAM:lha x Flowers-3:DFT-FLO3.lha Paradisko:"))

(complete 75)

(delete "Paradisko:Flowers!/DFT-Install" (optional "force") (safe))
(delete "Paradisko:Flowers!/DFT-Install.info" (optional "force") (safe))


(working "Joining The Demo-Files...")
(run "ram:join Paradisko:Flowers!/Flowers.000 Paradisko:Flowers!/Flowers.001 Paradisko:Flowers!/Flowers.002 to Paradisko:Flowers.exe") 

(delete "Paradisko:Flowers!/Flowers.000" (optional "force") (safe))
(delete "Paradisko:Flowers!/Flowers.001" (optional "force") (safe))
(delete "Paradisko:Flowers!/Flowers.002" (optional "force") (safe))

(copyfiles (source "Paradisko:Flowers!/")
           (dest "Paradisko:")
           (all)
           (nogauge)
           (optional "force")
           (safe))

(Delete "Paradisko:Flowers!/#?" (optional "force") (safe))

(rename "Paradisko:Flowers.icon" "Paradisko:Flowers.info")

(Delete "Paradisko:Flowers!" (optional "force") (safe))
(Delete "Paradisko:Flowers!.info" (optional "force") (safe))
               
(complete 90)

(working "Deleting unarchiver from RAM...")


(run "ram:assign Paradisko: remove")

(working "Deleting unarchiver from RAM...")
(delete "Ram:lha" (optional "force") (safe))
(delete "Ram:join" (optional "force") (safe))
(delete "Ram:assign" (optional "force") (safe))

(complete 100)

(exit "\n The Installation was successful.\n\nYou can find Flowers\nin " datadest"\n\nNow go and enjoy the party!"
      (quiet))
