; GMPGUI Installation File
; Version 1.3
; by Andrea Fiorito
; 12/02/97

(set @askdir-help "Select a directory where to store GMPlayGUI!")
(set @docs-help "You can choice between standard and/or amigaguide doc files in English and/or Italian language")
(set @fonts-help "GMPlayGUI uses the (topaz 8 and) Topaz 11 font, so you are asked to install it or not")

(user 2)
(set GMPGdestdir
    (askdir
        (prompt "      Where would you like GMPlayGUI installed?      "
        "The 'GMPGUI' directory will be automatically created!")
        (help @askdir-help)
        (default "SYS:")
    )
)
(complete 10)
(set GGdestdir
    ("%s/GMPGUI" GMPGdestdir)
)
(makedir 
    (GGdestdir)
)
(complete 20)
(copyfiles 
    (prompt "Copying drawer icon...")
    (source "/GMPGUI.info")
    (dest GMPGdestdir)
)
(complete 30)
(copyfiles 
    (prompt "Copying GMPlayGUI program...")
    (source "GMPGUI")
    (dest GGdestdir)
)
(complete 40)
(copyfiles
    (prompt "Copying GMPlayGUI icon...")
    (source "GMPGUI.info")
    (dest GGdestdir)
)
(complete 50)
(copyfiles
    (prompt "Copying GMPlayGUI doc files...")
    (source "")
    (choices ("GMPGUI-Eng.doc") ("GMPGUI-Ita.doc") ("GMPGUI-Eng.guide") ("GMPGUI-Ita.guide"))
    (help @docs-help)
    (dest GGdestdir)
    (files)
    (confirm)
)
(complete 65)
(copyfiles
    (prompt "Copying GMPlayGUI doc '.info' files...")
    (source "")
    (pattern "GMPGUI-#?.info")
    (dest GGdestdir)
)
(complete 75)
(if (<> (exists (tackon GGdestdir "GMPGUI-Eng.doc")) 1)
      (delete (tackon GGdestdir "GMPGUI-Eng.doc.info"))
)
(if (<> (exists (tackon GGdestdir "GMPGUI-Ita.doc")) 1)
      (delete (tackon GGdestdir "GMPGUI-Ita.doc.info"))
)
(if (<> (exists (tackon GGdestdir "GMPGUI-Eng.guide")) 1)
      (delete (tackon GGdestdir "GMPGUI-Eng.guide.info"))
)
(if (<> (exists (tackon GGdestdir "GMPGUI-Ita.guide")) 1)
      (delete (tackon GGdestdir "GMPGUI-Ita.guide.info"))
)
(complete 85)
(set ggfonts
    (askbool
        (prompt "Do you want to install GMPlayGUI needed fonts?")
        (help @fonts-help)
    )
)
(if (= ggfonts 1)
    (
     (if (<> (exists "FONTS:Topaz") 2)
	(makedir "FONTS:Topaz")
     )
     (copyfiles
         (source "fonts/Topaz/11")
         (dest "FONTS:Topaz")
     )
     (copyfiles
         (source "fonts/Topaz.font")
         (dest "FONTS:")
     )
    )
)
(complete 100)
(set @default-dest GGdestdir)
(set endmess
    (cat
         "The GMPlayGUI documentation can be found in the "
         "\n"
         GGdestdir
         " drawer (or partition). Enjoy!"
         "\n"
         "\n"
         " Please mail any bugs or suggestions at"
         " s180676@pentium.cdc.unict.it (see documentation)."
         endmess
    )
)
(exit endmess)
