;
; CYBERGAMES installation script
; for hard-disk
;
; 1995 by Bjorn Fogelberg CPD
;
;---------------------------------------------------


(set @app-name "Cybergames")
(set @minuser expert)
(set @logfile "ram:cg_install.logfile")


; Now modify the user-startup with four assigns
;----------------------------------------------

(welcome
        "Welcome to the Cybergames installation\n"
        "for hard-disk!\n\n"
        "A directory will be created and all\n"
        "Cybergames files will be moved to it\n"
        "Four assigns will be added to your\n"
        "sys:s/user-startup\n\n\n"
)


; Ask where you want Cybergames on your HD
;-----------------------------------------

(set cg_objectdir
        (askdir
                (prompt "Please select where you wish to\n"
                        "install Cybergames.\n"
                        "A directory named Cybergames will\n"
                        "be automatically created.\n")
                (default "sys:")
                (help   "")
        )
)

(set cg_objectdir (tackon cg_objectdir "Cybergames"))


; Ask for cg1 directory
;----------------------

(set cg_sourcedir
        (askdir
                (prompt "Please select the drawer named cg1\n")
                (default "ram:")
                (help   "Select the unarced directory named cg1\n\n"
                        "This is so that the installer will\n"
                        "know where to look for the files.\n")
        )
)


; Copy files from cg1
;--------------------

(copyfiles
        (prompt "I will now copy files")
        (help @copy-files)
        (dest cg_objectdir)
        (source cg_sourcedir)
        (all)
)


; Ask for cg2 directory
;----------------------

(set cg_sourcedir
        (askdir
                (prompt "Please select the drawer named cg2\n")
                (default "ram:")
                (help   "Select the unarced directory named cg2\n\n"
                        "This is so that the installer will\n"
                        "know where to look for the files.\n")
        )
)


; Copy files from cg2
;--------------------

(copyfiles
        (prompt "I will now copy files")
        (help @copy-files)
        (dest cg_objectdir)
        (source cg_sourcedir)
        (all)
)


; Ask for cg3 directory
;----------------------

(set cg_sourcedir
        (askdir
                (prompt "Please select the drawer named cg3\n")
                (default "ram:")
                (help   "Select the unarced directory named cg3\n\n"
                        "This is so that the installer will\n"
                        "know where to look for the files.\n")
        )
)


; Copy files from cg3
;--------------------

(copyfiles
        (prompt "I will now copy files")
        (help @copy-files)
        (dest cg_objectdir)
        (source cg_sourcedir)
        (all)
)


; Now modify the user-startup with four assigns
;----------------------------------------------

(startup
        (@app-name)
        (prompt "I will now add four assign for\n"
                "Cybergames in your user-startup file.\n")
        (help   "The assigns are:\n\n"
                "Assign Cybergames1: " cg_objectdir "\n"
                "Assign Cybergames2: " cg_objectdir "\n"
                "Assign Cybergames3: " cg_objectdir "\n"
                "Assign Cybergames_savedisk: " cg_objectdir "\n")
        
        (command "\n"
                 "Assign Cybergames1: " cg_objectdir "\n"
                 "Assign Cybergames2: " cg_objectdir "\n"
                 "Assign Cybergames3: " cg_objectdir "\n"
                 "Assign Cybergames_savedisk: " cg_objectdir "\n"
                 "\n")
)