home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 August - Disc 3
/
chip_20018103_hu.iso
/
amiga
/
chiputil
/
ltools21_demo.lha
/
LangTools.install
< prev
next >
Wrap
Text File
|
2001-06-13
|
9KB
|
266 lines
;
; Install script for Language Tools 2.0
; (c) 2001 Blue Lion Software
; This script is based on v1.01 (c) 2000 Seahorse
;
;
; $VER : 2.1 (05-05-2000) ⌐2001 desco@freemail.hu
;
;=======================================================================
; Please ask before use part(s) of this script. :)
;=======================================================================
(SET #L_English 0 )
(SET #L_Franτais 1 )
(SET #L_Magyar 12 )
(SET #NomProg "LangTools")
(SET #NomRepert "LangTools")
;//+ **** -> English
(SET #Def_lang #L_English #Def_doc #L_English)
(SET #wrongOS "Sorry, but:\nOS 3.0 or newer is required!\n")
(SET #wrongMUI "Sorry, but:\nMUI 3.8 or newer is required!\n")
(set #Msg_dir "\nChoose your LangTools directory\n(A drawer called \"LangTools\" will be created!)")
(set #Msg_cat "\nWhich catalog file do you want to install?\n(English language is built-in)")
(set #Msg_doc "\nSelect language for documentation in AmigaGuide format")
(SET #Creer_dir "\nCreating \"%s\" directory...")
(SET #Help_dir (CAT "\nChoose where you wish to install LangTools.\n"
"Again a \"LangTools\" drawer will be created."))
(SET #Msg_Assign (CAT "LangTools must be assigned.\n"
"Do you want I add the assignation\n"
"`LTools:' inside `S:User-Startup' for you?"))
(SET #Pour "For ")
(SET #Help_Nil "")
(SET #Bad_Class (cat "\nWrong ½á%sá╗ version (%s).\n"
"Please install the %s version or newer."))
;+//
; -------------------------------------------------------------------
; //+ **** -> Franτais (1)
(IF (= @language "franτais")
(
(SET #Def_lang #L_Franτais #Def_doc #L_Franτais)
(SET #wrongCPU "Il vous faut au moins un 68020 !\n")
(SET #wrongOS "DΘsolΘ, mais :\nil vous faut au moins le systΦme 3.0 !\n")
(SET #wrongMUI "DΘsolΘ, mais :\nil vous faut au moins MUI 3.8 !\n")
(SET #Msg_dir "\nO∙ voulez-vous installer LangTools ?\n(Un rΘpertoire ½áLangToolsá╗ sera crΘe.)\n")
(SET #Msg_cat "\nQuel langage voulez-vous installer ?\nL'Anglais est en interne.\n")
(SET #Msg_doc "\nQuelle documentation voulez-vous installer ?\n")
(SET #Creer_dir "CrΘation du rΘpertoire \"%s\"...")
(SET #Help_dir (CAT "\nChoisissez l'endroit o∙ vous souhaitez installer LangTools.\n"
"Je vous rappel qu'un rΘpertoire ½áLangToolsá╗ sera crΘe."))
(SET #Msg_Assign (CAT "LangTools doit-Ωtre assignΘ.\n"
"Voulez-vous que j'ajoute l'assignation\n"
"½áLTools:á╗ dans ½áS:User-Startupá╗ pour vous ?"))
(SET #Pour "Pour ")
(SET #Bad_Class (cat "\nMauvaise version de ½á%sá╗ (%s).\n"
"Veuillez installer la version %s ou supΘrieure."))
)) ; +// Fin IF
; -------------------------------------------------------------------
; //+ **** -> Magyar (12)
(IF (= @language "magyar")
(
(SET #Def_lang #L_Magyar #Def_doc #L_Magyar)
;(SET #Def_lang #L_English #Def_doc #L_English) ; Current way
(SET #wrongOS "Sajnßlom, de:\nOS 3.0 vagy ·jabb szⁿksΘges!\n")
(SET #wrongMUI "Sajnßlom, de:\nMUI 3.8 vagy ·jabb szⁿksΘges!\n")
(set #Msg_dir (CAT "\nVßlaszd ki, hogy hova telepφtsem a programot!\n"
"(A \"LangTools\" nev√ fi≤kot aut≤matikusan lΘtrehozom!)"))
(set #Msg_cat "\nMely katal≤gusokat telepφtsem?\n(English az alapbeßllφtßs!)")
(set #Msg_doc "\nMely nyelv√ AmigaGuide dokumentßci≤t telepφtsem?")
(SET #Creer_dir "\nLΘtrehozom a(z) \"%s\" nev√ fi≤kot...")
(SET #Help_dir (CAT "\nVßlasz ki a LangTools telepφtΘsi ·tvonalßt!\n"
"┌jra! A \"LangTools\" fi≤kot automatikusan lΘtrehozom."))
(SET #Msg_Assign (CAT "A programnak szⁿksΘge van hozzßrendelΘsre!\n"
"Hozzßf√zzem az `Ltools:' hozzßrendelΘst\n"
"az `S:User-Startup' ßllomßnyhoz?"))
(SET #Pour "For ")
(SET #Help_Nil "")
(SET #Bad_Class (cat "\nNem megfelel⌡ a\(z|) ½á%sá╗ verzi≤ja (%s).\n"
"KΘrlek telepφtsd a %s verzi≤t vagy egy ·jabbat!"))
)) ; +// Fin IF
; -------------------------------------------------------------------
; ---- * ====================================================== * ----
;//+ ==== Procedures ====
; ---- * ======================================================== * ----
(PROCEDURE P_CheckClass #arg1 #arg2
(SET #MUI_class (getversion (TACKON "MUI:libs/mui/" #arg1)))
(SET #Vers (CAT(/ #MUI_Class 65536) "." (- #MUI_Class (* (/ #MUI_Class 65536) 65536))))
(if (< #Vers #arg2)
(Message (#Bad_Class #arg1 #Vers #arg2))
; (Message ("C'est ok. %s" #vers))
) ;if
) ;proc
; ---- * ======================================================== * ----
;+// ==== Fin des procΘdures ====
; ---- * ====================================================== * ----
;
; --------------------------------------------------------------------
; ======================== <* SCRIPT *> ==========================
; --------------------------------------------------------------------
; --*** VΘrifier l'environnement
(set Type_CPU (database "cpu"))
(if (< Type_CPU "68020") (abort #wrongCPU))
(set OS_ver (getversion "exec.library" (resident)))
(if (< OS_ver (* 39 65536)) (abort #wrongOS))
(set #MUI_ver (getversion "MUI:libs/muimaster.library"))
(if (AND (< #MUI_ver (* 19 65536)) (<> #MUI_ver 0)) (abort #wrongMUI))
; -- ** VΘrification de classes MUI
(P_CheckClass "texteditor.mcc" "15.9")
; --*** Choix du rΘpertoire de destination
(SET #Dest_dir
(askdir
(default @default-dest)
(prompt #Msg_dir)
(help #Help_dir) )
)
(SET #Dest_dir (TACKON #Dest_dir #NomRepert))
(SET @default-dest #Dest_dir)
; --*** Choix du catalogue
(SET #H_Langage (askchoice
(PROMPT #Msg_cat)
(HELP @askchoice-help)
(CHOICES
"English"
""
"" ""
"" ""
"" ""
"" ""
"" ""
"Magyar"
)
(DEFAULT #Def_lang)
)
)
(COMPLETE 10)
; -- Choix de la documentation (1 seulle)
(SET #H_Guide (askchoice
(PROMPT #Msg_doc)
(HELP @askchoice-help)
(CHOICES
"English"
""
""
""
""
""
""
""
""
""
""
""
"Magyar"
)
(DEFAULT #Def_doc)
)
)
(COMPLETE 20)
; --
; **** Installation (dir)
; --
(MAKEDIR #Dest_dir (PROMPT (#Creer_dir #NomRepert)) (INFOS))
(MAKEDIR (tackon #Dest_dir "Prefs"))
(MAKEDIR (tackon #Dest_dir "Arexx"))
(MAKEDIR (TackOn #Dest_dir "Dics"))
(MAKEDIR (TackOn #Dest_dir "Source"))
(MAKEDIR (TackOn #Dest_dir "Translated"))
(SET #Cat_dir (tackon #Dest_dir "Catalogs"))
(IF (NOT (EXISTS #Cat_dir)) (MAKEDIR #Cat_dir (PROMPT (#Creer_dir "Catalogs"))) )
(COMPLETE 30)
(SET #Prefs_dir (tackon #Dest_dir "Prefs"))
(if (= #H_langage #L_English)
(
(copyfiles (source "locale/english/lsdic.list") (dest (tackon #Dest_dir "Prefs")))
(copyfiles (source "locale/english/ltdic.list") (dest (tackon #Dest_dir "Prefs")))
(copyfiles (source "locale/english/agcom.prefs") (dest (tackon #Dest_dir "Prefs")))
))
(if (= #H_langage #L_Franτais)
(
(copyfiles (source "locale/franτais/langtools.catalog") (dest (tackon #Cat_dir "franτais")))
(copyfiles (source "locale/franτais/lsdic.list") (dest (tackon #Dest_dir "Prefs")))
(copyfiles (source "locale/franτais/ltdic.list") (dest (tackon #Dest_dir "Prefs")))
(copyfiles (source "locale/franτais/agcom.prefs") (dest (tackon #Dest_dir "Prefs")))
))
(if (= #H_langage #L_Magyar)
(
(copyfiles (source "locale/magyar/langtools.catalog") (dest (tackon #Cat_dir "magyar")))
(copyfiles (source "locale/magyar/lsdic.list") (dest (tackon #Dest_dir "Prefs")))
(copyfiles (source "locale/magyar/ltdic.list") (dest (tackon #Dest_dir "Prefs")))
(copyfiles (source "locale/magyar/agcom.prefs") (dest (tackon #Dest_dir "Prefs")))
))
(COMPLETE 40)
;
; -- SI 1 SEULLE DOCUMENTATION AU CHOIX !! (AskChoice)
;
(IF (= #H_Guide #L_English)
(
(copyfiles (source "locale/english/LangTools.guide") (dest #Dest_dir) (infos))
))
(IF (= #H_Guide #L_Franτais)
(
(copyfiles (source "locale/franτais/LangTools.guide") (dest #Dest_dir) (infos) (optional "nofail"))
))
(IF (= #H_Guide #L_Magyar)
(
(copyfiles (source "locale/magyar/LangTools.guide") (dest #Dest_dir) (infos))
))
(COMPLETE 50)
;
( copyfiles (source "LangTools") (dest #Dest_dir) (infos) )
( copyfiles (source "Langtools.key") (dest #Dest_dir)(optional "nofail") )
(COMPLETE 60)
(copyfiles (source "Arexx") (dest (Tackon #Dest_dir "Arexx")) (All) (optional "nofail"))
(COMPLETE 80)
(copyfiles (source "Userdic") (dest (Tackon #Dest_dir "Userdic")) (All) (optional "nofail"))
(copyfiles (source "Images") (dest (Tackon #Dest_dir "Images")) (All))
(COMPLETE 90)
(Startup " --******-- LangTools" (PROMPT #Msg_Assign)
(HELP @startup-help) (Confirm)
(Command (Cat "Assign LTools: " (CAT "\"" #Dest_Dir "\"")) ))
(MakeAssign "LTools" #Dest_Dir)
(COMPLETE 100)
(exit)
; -------------------------------------------------------------------
; -------------------------- FIN DE SCRIPT --------------------------
; -------------------------------------------------------------------