home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / comm / Fido / MUIFFR / Install / Install_MUIFFR < prev   
Text File  |  1994-04-10  |  7KB  |  297 lines

  1. ;
  2. ; Install script for MUI Fido File Request
  3. ;
  4. ; $VER: Installation MUIFFR V1.2 (10.04.94)
  5. ;
  6.  
  7. (set @default-dest "")
  8.  
  9. ;=============================================================================
  10. ; English strings
  11.  
  12. (set default_lang 1)
  13.  
  14. (set #bad-kick "MUIFFR only runs under OS 2.04 or higher!\n")
  15.  
  16. (set #install-msg
  17.     (cat "\n\nMUI Fido File Request installation script.\n"
  18.          "This script installs MUIFFR on your Amiga.\n\n"
  19.          "Read the documentation for\n"
  20.          "further information on MUIFFR.\n\n"
  21.          "MUI Fido File Request © 1994 Martin Steppler\n"
  22.          "All rights reserved."
  23.     )
  24. )
  25.  
  26. (set #update-msg
  27.     (cat "\nIf this is an update from 1.1 to 1.2 you\n"
  28.          "may install 1.2 over 1.1. Your old 1.1 configuation\n"
  29.          "file will *NOT* be overwritten.\n\n"
  30.          "You only have to adapt your configuration to 1.2\n"
  31.          "after the installation, if you want to make use of\n"
  32.          "the new 1.2 features. (See ReadMe file)\n"
  33.     )
  34. )
  35.  
  36. (set #ask-destination
  37.     (cat "Enter the name of the destination-directory!"
  38.     )
  39. )
  40.  
  41. (set #ask-destination-msg
  42.     (cat "\nEnter the name of the directory, you wish to\n"
  43.          "install MUIFFR to. A directory called MUIFFR will\n"
  44.          "automatically be created in this directory\n"
  45.          "All other files will be stored in the directory MUIFFR.\n\n"
  46.          "This is why you do not have to create a directory\n"
  47.          "on your own.\n"
  48.     )
  49. )
  50.  
  51. (set #which-language
  52.     (cat "Which languages (incl. documentation) are to\n"
  53.          "be installed?\n"
  54.     )
  55. )
  56.  
  57. (set #ask-font
  58.     (cat "Do you want to install an IBM font, too?")
  59. )
  60.  
  61. (set #ask-dest_font
  62.     (cat "Where do you want to install the IBM font to?")
  63. )
  64.  
  65. (set #yes "Yes")
  66. (set #no "No")
  67.  
  68. ;=============================================================================
  69. ; German strings
  70.  
  71. (if (= @language "deutsch")
  72. (
  73.  
  74.     (set default_lang 2)
  75.  
  76.     (set #bad-kick "MUIFFR läuft nur unter OS 2.04 oder besser!\n")
  77.  
  78.     (set #install-msg
  79.         (cat "\n\nMUI Fido File Request Installationsskript.\n"
  80.              "Diese Befehlsdatei installiert MUIFFR auf Ihrem\n"
  81.              "Amiga. Lesen Sie die Dokumentation für\n"
  82.              "weitere Informationen über MUIFFR.\n\n"
  83.              "MUI Fido File Request © 1994 Martin Steppler\n"
  84.              "All rights reserved."
  85.         )
  86.     )
  87.  
  88.     (set #update-msg
  89.         (cat "\nIm Falle eines Updates von 1.1 auf 1.2, können\n"
  90.              "Sie 1.2 über 1.1 installieren. Ihre alte 1.1 Kon-\n"
  91.              "figuration wird *NICHT* überschrieben.\n\n"
  92.              "Sie müssen nur nach der Installation Ihre Konfigu-\n"
  93.              "ration auf 1.2 anpassen, wenn Sie von den neuen 1.2\n"
  94.              "Funktionen Gebrauch machen wollen. (Siehe LiesMich)\n"
  95.         )
  96.     )
  97.  
  98.     (set #ask-destination
  99.         (cat "Geben Sie das Zielverzeichnis an!"
  100.         )
  101.     )
  102.  
  103.     (set #ask-destination-msg
  104.         (cat "\nGeben Sie den Namen des Verzeichnisses an, wohin\n"
  105.              "MUIFFR installiert werden soll. In diesem\n"
  106.              "Verzeichnis wird automatisch ein Verzeichnis MUIFFR\n"
  107.              " erzeugt, in dem die weiteren Dateien abgelegt werden.\n\n"
  108.              "Sie brauchen also kein Verzeichnis selbst anlegen."
  109.         )
  110.     )
  111.  
  112.     (set #which-language
  113.         (cat "Welche Sprachen (inkl. Dokumentation) sollen\n"
  114.              "installiert werden?\n"
  115.         )
  116.     )
  117.  
  118.     (set #ask-font
  119.         (cat "Soll der IBM-Zeichensatz ebenfalls installiert werden?")
  120.     )
  121.  
  122.     (set #ask-dest_font
  123.         (cat "Wohin soll der IBM-Zeichensatz installiert werden?")
  124.     )
  125.  
  126.     (set #yes "Ja")
  127.     (set #no "Nein")
  128. ))
  129.  
  130. ;=============================================================================
  131. ;=============================================================================
  132. ; make sure we are running under a 2.04 ROM
  133.  
  134. (complete 0)
  135.  
  136. (if (< (/ (getversion) 65536) 37)
  137. (
  138.     (abort #bad-kick)
  139. ))
  140.  
  141. ;=============================================================================
  142.  
  143. (message #install-msg)
  144.  
  145. (complete 5)
  146.  
  147. (message #update-msg)
  148.  
  149. (complete 10)
  150.  
  151. (message #ask-destination-msg)
  152.  
  153. (complete 15)
  154.  
  155. ; ask user where to install MUIFFR to
  156. (set @default-dest
  157.     (tackon
  158.         (askdir
  159.             (prompt #ask-destination)
  160.             (help @askdir-help)
  161.             (default "Work:")
  162.         )
  163.         "MUIFFR"
  164.     )
  165. )
  166.  
  167. (complete 20)
  168.  
  169. ; ask user which languages are to be installed
  170. (set lang
  171.     (askoptions
  172.         (prompt #which-language)
  173.         (help @askoptions-help)
  174.         (choices "english"
  175.                  "deutsch"
  176.         )
  177.         (default default_lang)
  178.     )
  179. )
  180.  
  181. (complete 30)
  182.  
  183. (set inst_font
  184.     (askbool
  185.         (prompt #ask-font)
  186.         (help @askbool-help)
  187.         (choices #yes #no)
  188.     )
  189. )
  190.  
  191. (complete 35)
  192.  
  193. (if (= 1 inst_font)
  194. (
  195.     (set dest_font
  196.         (askdir
  197.             (prompt #ask-dest_font)
  198.             (help @askdir-help)
  199.             (default "Fonts:")
  200.         )
  201.     )
  202. ))
  203.  
  204. (complete 40)
  205.  
  206. ;-----------------------------------------------------------------------------
  207. ; copy all language non-specific files
  208.  
  209. (copyfiles
  210.     (source "/")
  211.     (dest @default-dest)
  212.     (pattern "(MUIFidoFileRequest|ReadMe.mui|List)#?")
  213.     (infos)
  214. )
  215.  
  216. (complete 50)
  217.  
  218. ; copy configuration file if it does not already exist
  219. (if (= 0 (exists (cat @default-dest "/muiffr.config") (noreq)))
  220. (
  221.     (copyfiles
  222.         (source "/muiffr.config")
  223.         (dest @default-dest)
  224.     )
  225. ))
  226.  
  227. (complete 60)
  228.  
  229. ; no catalogs, if only "deutsch" or nothing was specified
  230. ; do not create dir if dir already exists
  231. (set catalogsdir (cat @default-dest "/Catalogs"))
  232. (if (AND (<> 2 lang) (<> 0 lang))
  233. (
  234.     (if (= 0 (exists catalogsdir (noreq)))
  235.     (
  236.         (makedir catalogsdir)
  237.     ))
  238. ))
  239.  
  240. (complete 70)
  241.  
  242. ; copy all language specific files
  243. (set n 0)
  244. (while
  245.     (set language
  246.         (select n "english"
  247.                   "deutsch"
  248.                   ""
  249.         )
  250.     )
  251. (
  252.     (if (IN lang n)
  253.     (
  254.         ; copy Catalog files
  255.         (if (<> 1 n)
  256.         (
  257.             (copyfiles
  258.                 (source
  259.                     (cat "/Catalogs/" language)
  260.                 )
  261.                 (dest
  262.                     (cat @default-dest "/Catalogs/" language)
  263.                 )
  264.                 (all)
  265.             )
  266.         ))
  267.  
  268.         ; copy readme file
  269.         (copyfiles
  270.             (source
  271.                 (select n "/ReadMe"
  272.                           "/LiesMich"
  273.                 )
  274.             )
  275.             (dest @default-dest)
  276.             (infos)
  277.         )
  278.     ))
  279.     (set n (+ n 1))
  280. ))
  281.  
  282. (complete 90)
  283.  
  284. ; install IBM fonts
  285. (if (= 1 inst_font)
  286. (
  287.     (copyfiles
  288.         (source "/Fonts")
  289.         (dest dest_font)
  290.         (pattern "IBM")
  291.         (fonts)
  292.     )
  293. ))
  294.  
  295. ; so long and thanks for all the fish
  296. (complete 100)
  297.