;
; Installer-Script for ASCIITable 2.00
;
;	Author	: FLORAC Roland
;	Version : 1.0
;	Date	: 17.11.1999
;
;	$VER: Install 1.0 (17.11.1999)
;
;**************************************************

(set @user-level 1)

(if (= @language "français")
(
(set #askdir1 (cat "Dans quel tiroir voulez-vous installer ASCIITable ?\n"))
(set #askwbstartup (cat "Voulez-vous que le programme soit copié dans votre tiroir WBStartup ?"))
(set #confirmt (cat "Que voulez-vous installer ?"))
(set #installanguage (cat "Quel est le langage à installer ?"))
(set #copying ("Copie des fichiers..."))
(set #Yes "Oui")
(Set #No "Non")
)

(
(set #askdir1 (cat "In what drawer do-you want to install ASCIITable ?\n"))
(set #askwbstartup (cat "Shall I copy the Program to the WBStartup drawer ?"))
(set #confirmt (cat "What should I install?"))
(set #installanguage (cat "Which languages should I install?"))
(set #copying ("Copying files..."))
(set #Yes "Yes")
(Set #No "No")
))

;**************************************************

(complete 0)

;**************************************************

(set choice
	(askbool
		(prompt #askwbstartup)
		(help @askoptions-help)
		(choices #Yes #No)
		(default 1)
	)
)

(if (= 1 choice)
(
 (copyfiles
	(source "")
	(dest "SYS:WBStartup")
	(pattern "(ASCIITable#?)")
	(prompt #copying)
	(files)
 )
)
(
    (set #name
	(askdir
		(prompt #askdir1)
		(help @askdir-help)
		(default "SYS:Tools/Commodities")
	)
    )

    (copyfiles
	(source "")
	(dest #name)
	(pattern "ASCIITable#?")
	(prompt #confirmt)
	(help @confirm-help)
	(confirm)
    )
))

(complete 50)

;**************************************************

(if (= @language "français")
    (set #deflang 1) (set #deflang 2)
)

(if (exists "SYS:locale/catalogs")

    (set #lang (askoptions
	    (prompt #installanguage)
	    (help @askoptions-help)
	    (choices "Français" "English")
	    (default #deflang))
    )
)

(set #n 0)

(while
	(set #langage
		(select #n
			"Français"
			""
		)
	)
	(
	 (if (IN #lang #n)
		(
		 (set #catalog (tackon "Catalogs" (tackon #langage "ASCIITable.catalog")))
		 (set #destination (tackon "Locale:Catalogs/" #langage))
		 (copyfiles
			(source #catalog)
			(dest #destination)
			(prompt #confirmt)
			(help @confirm-help)
			(confirm))
		)
	 )
	 (set #n (+ #n 1))
	)
)

(complete 100)
