(transcript "Installing CivManager...")

(message "Welcome To The Civilization Manager Installer\n\nThis script will add the Civilization Manager program to your CivAGA directory\n\nIt does not modify any of the original Civilization Files\n\nReqtools library is required, and this will be copied to LIBS: if the version supplied here is newer than your current version")

(if @pretend
    (
        (message "This is a pretend Install. All files will actually be installed in RAM:\n\nThe program will work, if you wish to test it, however to a permanent copy you must install it to your CivAGA directory, by selecting \"Install For Real\"\n\nDo not just copy the files from RAM: - This won't work.\n\nPlease select all directories as if you were doing a real installation")
	(makedir "ram:libs")
    )
)

(set #CivAGA 
    (askdir
        (prompt "Please select your CivAGA directory.") 
        (help @ask-dirhelp)
        (default @default-dest)
        (newpath)
    )
)


(complete 20)

(copylib
    (help @copylib-help)
    (prompt "Installing ReqTools.Library...")
    (source "Reqtools.library")
    (if @pretend
        (dest "ram:libs")
        (dest "libs:")
    )
    (confirm)
    (noposition)
)

(complete 40)


(copyfiles
    (help @copyfiles-help)
    (prompt "Installing CivManager")
    (source "CivManager")
    (noposition)
    (if @pretend
	(dest "RAM:")
        (dest #CivAGA)
    )
)

(complete 50)
(copyfiles
    (help @copyfiles-help)
    (prompt "Installing Default Icon")
    (source "DefSaveIcon.info")
    (if @pretend
	(dest "RAM:")
        (dest #CivAGA)
    )    
)

(complete 60)

(tooltype
    (prompt "Setting Default Save ToolTypes")
    (if @pretend
        (dest "RAM:DefSaveIcon")
        (dest (tackon #CivAGA "DefSaveIcon"))
    )
    (setdefaulttool (tackon #CivAGA "CivManager"))
    (noposition)
)

(complete 70)



(set #SaveDir 
    (askdir
        (prompt "Please select your the directory you wish the saved game fileselector to open in:") 
        (help @ask-dirhelp)
        (default #CivAGA)
        (newpath)
    )
)

(rename (tackon #CivAGA "CivilizationAGA.info") (tackon #CivAGA "CivManager.info"))

    

(tooltype
    (prompt "Setting ToolTypes")
    (if @pretend
	(dest "RAM:CivManager")
	(dest (tackon #CivAGA "CivManager"))
    )
    (settooltype "DIR" #SaveDir)
    (settooltype "CIV" #CivAGA)
    (settooltype "FONTS" (tackon #CivAGA "Fonts"))
    (noposition)
    (safe)
)


(complete 100)

(if @pretend    
    (exit "Civilization Manager Now Suvessfully Installed in RAM: - Double click it's icon to test it." (quiet))
    (exit "Civilization Manager Now Sucessfully Installed in your CivAGA directory - Double click the icon to run it." (quiet))
)
