;MS-DOS For AmigaDOS,   Copyright 1995  Dave Lomax
;This Installer for $VER 3.0 (27.9.95)

(complete 0)

(set @DESTINATION
	(askdir
		(prompt "Where would you like MSDOS For AmigaDOS Installed?")
      		(help @askdir-help)
      		(default "SYS:System")
	)
)

(set @DEST ("%s%s" @DESTINATION "/MSDOS"))

(complete 5)

(makedir @DEST
	(prompt "\n\n\n\nCreating directory MSDOS")
	(help "\n\n\nI'm making a directory to bung all\n"
	      "of the MS-DOS commands in.\n\n"
              "If you move it, you MUST change the\n"
              "User-Startup [assign] accordingly")
	(infos)
	(confirm)
)

(complete 10)

(copyfiles
	(prompt "\n\n\n\n"
                "Installing MS-DOS Commands...\n\n"
                "This will copy across all the MS-DOS commands\n")
	(help @copyfiles-help)
	(source "DOS6")
	(dest @DEST)
	(all)
	(infos)
)

(complete 25)

(set @DESTHELP
        (askdir
                (prompt "Where would you like the Help Guide Installed?")
                (help @askdir-help)
                (default "HELP:")
        )
)

(complete 30)

(copyfiles
	(prompt "Copying MSDOS.Guide\n")
	(help "This will copy the MSDOS.Guide file\n"
	      "to where you have just selected\n")
	(source "MSDOS.Guide")
	(dest @DESTHELP)
	(infos)
	(confirm)
)

(complete 35)

(copyfiles
        (prompt "Copying Guide viewer\n")
        (help "This will copy PPGuide, to view the Guide\n")
        (source "AmigaGuide")
        (dest @DESTHELP)
	(confirm)
)

(complete 40)

(copylib
	(prompt "\n\n\n\nInstalling Help.Library")
	(help @copylib-help)
	(source "LIBS/HELP.Library")
	(dest "LIBS:")
	(confirm)
)

(complete 50)

(startup "[MSDOS For AmigaDOS     1995 Dave Lomax]"
	(prompt "\n\n\n\nAdding a line to\n\nS:User-Startup")
	(help "This will add a line to your\n\n"
	      "S:User-Startup file which simply\n\n"
	      "makes an ASSIGN to its path.\n")
	(command (cat "Assign Dos6: " @DEST))
)

(complete 55)

(execute "Add_To_Shell_Startup"
	(help "This will ADD a line\n\n"
	      "to your Shell-Startup\n\n"
	      "to activate MSDOS for AmigaDOS")
	(prompt "\n\n\n\nAdding a line to your\n\n"
		"S:Shell-Startup")
	(confirm)
)

(complete 60)

(if	(askbool
		(prompt "\n\n\nDo you want to Install a basic version\n"
	                "of Yak, so that you can use the UNIX\n"
	                "directory pipes . & .. and also the *\n")
		(help "\n\nYak, by Gal Marziou and Philippe Bastiani\n"
	              "allows you to use the following, at DOS:\n\n"
	              "  . represents Current Directory\n"
	              " .. represents Parent  Directory\n"
	              "  * represents all files, or #? in AmigaDOS\n\n"
	              "If you don't know what these are, or already\n"
                      "have Yak on your system, then you are advised\n"
                      "to skip Yak installation\n")
		(choices "Yep, install Yak" "Nope, skip this bit")
	)
	(
		(copyfiles
			(prompt "Copying Yak commodity")
			(help "You have chosen to install Yak.\n"
                              "It is a commodity, and usually goes\n"
                              "in the WBStartup drawer on your boot\n"
                              "partition\n"
			)
			(source "Yak/Yak")
			(dest "SYS:WBStartup")
			(infos)
			(confirm)
		)
		(complete 65)
		(copyfiles
			(prompt "Copying Yak instructions")
			(help "This copies the Guide file\n"
                              "for Yak, just like MSDOS.Guide.\n"
			      "you need OS2+ & AmigaGuide to\n"
			      "view it.  AmigaGuide supplied\n")
			(source "Yak/Yak.Guide")
			(dest @DESTHELP)
			(infos)
			(confirm)
		)
		(complete 70)
		(copyfiles
			(prompt "Copying Yak Prefs Editor")
			(help "This is an extra tool, which\n"
			      "usually goes in your SYS:Prefs\n"
			      "drawer.  It allows you to set\n"
			      "up Yak, exactly how you want it\n"
			)
			(source "Yak/Prefs/Yak")
			(dest "SYS:Prefs")
			(infos)
			(confirm)
		)
		(complete 75)
		(copyfiles
			(prompt "Copying default prefs")
			(help "This is just the default preferences file\n")
			(source "Yak/Prefs/EnvArc/Yak.Prefs")
			(dest "Envarc:")
		)
		(complete 80)
		(copyfiles
			(prompt "Copying an icon..")
			(help "This is just an innocent little\n"
			      "icon, that needs to be copied across..\n")
			(source "Yak/Prefs/EnvArc/Sys/def_Yak.info")
			(dest "Envarc:Sys")
		)
		(complete 85)
		(copyfiles
			(prompt "Copying Locale catalogs")
			(help "This copies across catalog files\n"
			      "which allow Yak to run in German\n"
			      "and French as well.")
			(source "Yak/Locale/Catalogs")
			(dest "Locale:Catalogs")
			(pattern "Yak.c#?")
			(confirm)
		)
		(complete 90)
		(copyfiles
			(prompt "Copying German Catalog")
			(help "This copies the Yak.catalog file\n"
			      "into the Locale/Deutsch drawer\n")
			(source "Yak/Locale/Catalogs/Deutsch/Yak.catalog")
			(dest "Locale:Catalogs/Deutsch")
			(confirm)
		)
		(complete 95)
                (copyfiles
                        (prompt "Copying French Catalog")
                        (help "This copies the Yak.catalog file\n"
                              "into the Locale/Franais drawer\n")
                        (source "Yak/Locale/Catalogs/Franais/Yak.catalog")
                        (dest "Locale:Catalogs/Franais")
                        (confirm)
                )
	)
)

(complete 100)

(message "\n\n\n\nInstallation complete\n\n"
         "You MUST Re-boot to make it\n"
         "effective")

(exit)
