; $VER: AStart 1.21 (8.09.97)

; LANGUAGES

(procedure polish (
	(set language0 "Polski")
	(set MSG_WELCOME "\nWelcome to AStart V1.1\n\nthe ultimate alternate bootup maker\n\nAStart © 1997 Wojciech Kocjan\n\nAStart is mailware\n\n")
	(set MSG_ASKCMDDIR "Podaj ôcieûkë docelowâ dla komend")
	(set MSG_COPYCMD "Kopiowanie komendy uruchamiajâcej AStart")
	(set MSG_COPYASTARTUP "Kopiowanie skryptu alternate-startup")
	(set MSG_ASKENV "Czy chcesz uûywaê katalogu ENVArc: jako ENV:? (pomoc wyjaôni wszelkie problemy)")
	(set HLP_ASKENV "Opcja ta jest uûyteczna, gdy posiadasz wiëcej pamiëci (np. 10MB), a planujesz uûywaê AStart'u, aby nie uruchamiaê ûadnych nakîadek itp. Opcja ta jest bardziej kompatybilna z systemem Amigi, lecz zuûywa wiëcej pamiëci (w zaleûnoôci od objëtoôci katalogu ENVArc)\n\nJeûeli chcesz uûywaê AStart'u, aby oszczëdziê kaûdy bajt, wtedy powinieneô(aô) wîâczyê opcjë ENV->ENVArc. Opcja ta nie jest w peîni kompatybilna z systemem Amigi! Jednakûe wiëkszoôê programów dziaîa poprawnie.")
	(set MSG_ASK_YES "Tak")
	(set MSG_ASK_NO "Nie")
	(set MSG_ASKMODIFY "Czy mam modyfikowaê plik s:startup-sequence?")
	(set MSG_ASKMODIFY_YES "Modyfikuj")
	(set MSG_ASKMODIFY_NO "Nie modyfikuj")
	(set MSG_ASKBACKUP "Czy mam zrobiê kopië oryginalnego pliku s:startup-sequence?")
	(set MSG_ASKBACKUP_YES "Zrób kopië")
	(set MSG_ASKBACKUP_NO "Nie rób kopii")
	(set MSG_MODIFYSTARTUP0 "Modyfikowanie pliku startup-sequence")
	(set MSG_COPYSTARTUP "Kopiowanie zmodyfikowanego pliku startup-sequence")
	(set MSG_EXISTS "Plik juû istnieje! Czy chcesz wybraê inny katalog?")
	(set MSG_EXISTS_YES "Inny katalog")
	(set MSG_EXISTS_NO "Kontynuuj")
))

(procedure english (
	(set language0 "English")
	(set MSG_WELCOME "\nWelcome to AStart V1.1\n\nthe ultimate alternate bootup maker\n\nAStart © 1997 Wojciech Kocjan\n\nAStart is mailware\n\n")
	(set MSG_ASKCMDDIR "Enter path for commands")
	(set MSG_COPYCMD "Copying AStart running command")
	(set MSG_COPYASTARTUP "Copying alternate-startup script")
	(set MSG_ASKENV "Do you wish to use ENVArc: as ENV:? (help will tell you more info)")
	(set HLP_ASKENV "This option is very useful, when you have more RAM (ie. 10MB) and plan to use AStart not to start any patches/commodities. This option is more AmigaOS compatible, but uses more RAM (depends on ENVArc:'s size)\n\nIf you plan to use AStart to spare every byte of memory, then you should turn this option on. It's not fully AmigaOS compatible, but most of the programs work fine.")
	(set MSG_ASK_YES "Yes")
	(set MSG_ASK_NO "No")
	(set MSG_ASKMODIFY "Should I modify s:startup-sequence?")
	(set MSG_ASKMODIFY_YES "Modify")
	(set MSG_ASKMODIFY_NO "Don't modify")
	(set MSG_ASKBACKUP "Should I backup the original s:startup-sequence?")
	(set MSG_ASKBACKUP_YES "Backup")
	(set MSG_ASKBACKUP_NO "Don't backup")
	(set MSG_MODIFYSTARTUP0 "Modyfying s:startup-sequence")
	(set MSG_COPYSTARTUP "Copying modified startup-sequence")
	(set MSG_EXISTS "File already exists! Do you want to select another directory?")
	(set MSG_EXISTS_YES "Another directory")
	(set MSG_EXISTS_NO "Continue")
))

(set language0 "")
(if (= @language "english")  (english))
(if (= @language "polski")  (polish))
(if (= language0 "") (english))

(procedure modifystartup (
	(textfile (dest "T:startup-sequence")
	(append ("%s S:alternate-startup\nIF WARN\n  EndCLI >NIL:\nEndIF\n\n" pqpath)) (include "s:startup-sequence"))
	(copyfiles
		(prompt MSG_COPYSTARTUP)
		(help @copyfiles-help)
		(source "T:startup-sequence")
		(dest "S:")
		(files)
		(confirm)
	)	
))

(procedure askdestdir (
	(set dest_dir2 dest_dir)
	(set dest_dir
	   (askdir (prompt MSG_ASKCMDDIR)
	           (help @askdir-help)
	           (default dest_dir2))
	)
	(set pqpath (tackon dest_dir "AStart"))
	)
)

(welcome)

(message MSG_WELCOME)
(complete 0)

(set dest_dir "C:")
(askdestdir)
(set @default-dest dest_dir)

(set backup
	(askbool 
		(prompt MSG_ASKBACKUP)
		(help @askbool-help)
		(default 1)
		(choices MSG_ASKBACKUP_YES MSG_ASKBACKUP_NO))
)

(complete 15)

(set modify
	(askbool 
		(prompt MSG_ASKMODIFY)
		(help @askbool-help)
		(default 1)
		(choices MSG_ASKMODIFY_YES MSG_ASKMODIFY_NO))
)

(set envit
	(askbool 
		(prompt MSG_ASKENV)
		(help HLP_ASKENV)
		(default 0)
		(choices MSG_ASK_YES MSG_ASK_NO))
)

(if envit
	(set oldname "s/alternate-startupENV")
	(set oldname "s/alternate-startup")
)

(complete 10)

(copyfiles
	(prompt MSG_COPYCMD)
	(help @copyfiles-help)
	(source "C")
	(dest dest_dir)
	(choices "AStart" "Beep" "ConvertX")
	(confirm)
	(files)
)

(complete 25)

(copyfiles
	(prompt MSG_COPYASTARTUP)
	(help @copyfiles-help)
	(source (oldname))
	(dest "S:")
	(newname "alternate-startup")
	(confirm)
	(files)
)

(complete 50)

(if backup
	(copyfiles
		(prompt MSG_COPYCMD)
		(help @copyfiles-help)
		(source "S:startup-sequence")
		(dest "Sys:Storage")
		(newname "startup-sequence.bak")
	)
)

(complete 75)

(if modify 
	(modifystartup)
)

(complete 100)

(exit)
