; install ScriptFTP v1.2

(SET @default-dest "Work:")
(SET default_lang 0)

; ***** english texts *****

(SET #needKick (CAT "\nScriptFTP need Kickstart Version 39 at least." ) )

(SET #startMsg (CAT "\nScriptFTP 1.2\n\n"
                    "(c)1995/1996 Mathias 'HCL' Delantes\n\n"
                     "ScriptFTP uses MUI, version 3.1 a least.\n\n"
                     "If you were using a previous version of\n"
                     "ScriptFTP then Read the documentation\n"
                     "in order to update your data or you will lost them"))

(SET #destPrompt ( CAT "Please choose the destination directory for ScriptFTP.\n"
                       "No extra directory will be created." ) )

(SET #copyPFiles "Copying program files")

(SET #langPrompt "Select the languages you wish to use with ScriptFTP.")

(SET #DocPrompt "Select the directory for the documentation file.")

(SET #copyScriptFTP "Copying ScriptFTP...")

(SET #langPromptGuide "Select the language you wish for the documentation.")

; ***** francais texts *****

(IF (= @language "français")
(
(SET default_lang 1)

(SET #needKick ( CAT "\nScriptFTP a besoin du Kickstart version 39 au moins." ) )

(SET #startMsg (CAT "\nScriptFTP 1.2\n\n"
                    "(c)1995/1996 Mathias 'HCL' Delantes\n\n"
                    "ScriptFTP utilise MUI, version 3.1 au moins.\n\n"
                    "Si vous utilisez une version anterieur\n"
                    "de ScriptFTP alors Lisez la documentation\n"
                    "afin de mettre a jour vos fichiers ou vous\n"
                    "risquez de les perdre!\n\n"))

(SET #destPrompt (CAT "Choissisez un repertoire pour ScriptFTP.\n"
                      "Aucun repertoire ne sera creer pour lui.") )

(SET #copyPFiles "Copie des fichiers du programme")

(SET #langPrompt "Selectionnez le langage que vous desirez.")

(SET #DocPrompt "Selectionnez un repertoire pour la documentation.")

(SET #copyScriptFTP "Copie de ScriptFTP...")

(Set #langPromptGuide "Selectionnez la langue pour la la documentation.")

)
)

; ***** start installation *****

(if (< (/ (GETVERSION) 65536) 39)
    (ABORT #needKick)
)

(MESSAGE #startMsg)

; ***** get dest dir for ScriptFTP *****

(SET @default-dest
    (ASKDIR (PROMPT  #destPrompt)
            (HELP    askdir-help)
            (DEFAULT @default-dest)
            (NEWPATH)
    )
)

	(set prozess (database "cpu"))
		(if (< "68010" prozess)
			(set ScriptFTP-source "ScriptFTP020")
			(set ScriptFTP-source "ScriptFTP")
		)
	(set prozess (database "cpu"))
		(if (< "68010" prozess)
			(set ScriptFTPinfo-source "ScriptFTP020.info")
			(set ScriptFTPinfo-source "ScriptFTP.info")
		)
		(copyfiles
			(prompt #copy-ScriptFTP)
			(source ScriptFTP-source)
			(newname "ScriptFTP")
			(dest @default-dest)
			(files)
		)
		(copyfiles
			(prompt #copy-ScriptFTP)
			(source ScriptFTPinfo-source)
			(newname "ScriptFTP.info")
			(dest @default-dest)
			(files)
		)

; ***** install some languages *****

(SET sprachen (ASKOPTIONS (PROMPT #langPrompt)
                          (HELP   askoptions-help)
                          (CHOICES "english"
                                   "français"
                          )
                          (DEFAULT (+ default_lang 1) )
              )
)

(if (IN sprachen 1)
    (COPYFILES (SOURCE "Locale/français/ScriptFTP.catalog")
               (DEST "Locale:Catalogs/français") )
)


; ***** get dest for doc files *****

(SET @DocDir
    (ASKDIR (PROMPT  #DocPrompt)
            (HELP    askdir-help)
            (DEFAULT @default-dest)
            (NEWPATH)
    )
)

; ***** install doc files *****

(SET sprachen (ASKOPTIONS (PROMPT #langPromptGuide)
                          (HELP   askoptions-help)
                          (CHOICES "english"
                                   "français"
                          )
                          (DEFAULT (+ default_lang 1) )
              )
)

(if (IN sprachen 0)
    (COPYFILES (SOURCE "Docs/english/ScriptFTP.guide")
               (DEST @DocDir ))
)

(if (IN sprachen 1)
    (COPYFILES (SOURCE "Docs/français/ScriptFTP.guide")
               (DEST @DocDir ))
)




(if (IN sprachen 0)
    (COPYFILES (SOURCE "Docs/english/ScriptFTP.guide.info")
               (DEST @DocDir ))
)

(if (IN sprachen 1)
    (COPYFILES (SOURCE "Docs/français/ScriptFTP.guide.info")
               (DEST @DocDir ))
)


(EXIT #exitMsg )


