home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Utilities / FWCalendar / Install < prev    next >
Text File  |  1999-12-06  |  10KB  |  239 lines

  1. (if (= 2 (exists "REXX:" (noreq)))
  2.   (set #defdir "REXX:")
  3.   (set #defdir "S:")
  4. )
  5. (set #destmsg$ "")
  6. ;=============================================================================
  7. ; English (default) strings
  8.  
  9. (set #welcome$ (cat "Welcome to the FWCalendar installation program.\n"
  10.                     "Select the application(s) you will be using with FWCalendar."))
  11. (set #doabort$ "You did not select an application. Would you like to abort the installation?")
  12. (set #doaborthelp$ "You must select an application to continue.")
  13. (set #seldir$ "Select the destination drawer for the ARexx scripts. A new directory will NOT be created.")
  14. (set #FWdestmsg$ " (The recommended location is the FinalWriter/Macros directory)")
  15. (set #bothdestmsg$ " (The recommended location is a common directory of ARexx scripts)")
  16. (set #selLanguage$ (cat "Select which country's preference file "
  17.                         "(containing translation strings and holidays) should be used. "
  18.                         "Existing preference files will NOT be overwritten."))
  19. (set #docDestMsg$ (cat "The documentation is in HTML format. Where should they be installed? "
  20.                        "An \"FWCDocs\" directory WILL BE created if it doesn't already exist."))
  21. (set #CopyMacrosMsg$ "The following macros will be copied to ")
  22. (set #CopyPrefsMsg$ "The following preference file will be copied to ")
  23. (set #copyDocsMsg$ "The document directory will be copied to ")
  24. (set #CreatingDiffMsg$ (cat "Analyzing existing and new preference files; \"FWCalendar.diff\" will be created if necessary."
  25.                             "\n\nThis could take up to a minute."))
  26. (set #FoundFile$ (cat "\"FWCalendar.prefs\" exists ... \"FWCalendar.diff\" will be created if necessary."
  27.                       "\n\nThis could take up to a minute."))
  28. (set #MakeDifHelp$ (cat "An existing copy of \"FWCalendar.prefs\" has been found. "
  29.                         "This step will compare the existing copy with the copy included as "
  30.                         "part of this archive. Variables that have been added "
  31.                         "(that is, exist in the archive copy but not in the existing copy) "
  32.                         "will be copied to a file called \"FWCalendar.diff\" in the destination "
  33.                         "directory. This file can then be incorporated into your existing "
  34.                         "\"FWCalendar.prefs\" file with a text editor to ensure your preferences "
  35.                         "file is kept up to date."))
  36. (set #DifMadeMsg$ (cat "An existing copy of \"FWCalendar.prefs\" has been found. "
  37.                        "Variables that have been added in this version of the macros "
  38.                        "have been copied to a file called \"FWCalendar.diff\" in the destination "
  39.                        "directory. This file can be incorporated into your existing "
  40.                        "\"FWCalendar.prefs\" file with a text editor to ensure your preferences "
  41.                        "file is kept up to date."))
  42. (set #ViewDocsMsg$ "Would you like to view the documents?")
  43. (set #Yes$ "Yes")
  44. (set #Skip$ "Skip this part")
  45. (set #Proceed$ "Proceed")
  46. (set #ViewDocsHelp$ (cat "If you would like to view the docs, press \"" #Yes$ "\", otherwise press \"" #Skip$ "\"."))
  47. ;=============================================================================
  48. ; Spanish strings (29.11.99) by Dámaso D. Estévez <amidde@arrakis.es>
  49. (if (= @language "español")
  50.   (
  51.     (set #welcome$ (cat "Bienvenido al programa de instalación de `FWCalendar':\n"
  52.                         "elija la(s) aplicación(es) que usarán dicho guión ARexx."))
  53.     (set #doabort$ "No ha seleccionado ninguna aplicación.  ¿Desea abortar la instalación?")
  54.     (set #doaborthelp$ "Ha de seleccionar obligatoriamente una aplicación para continuar.")
  55.     (set #seldir$ "Elija el cajón de destino para los guiones ARexx (NO se creará ningún nuevo directorio).")
  56.     (set #FWdestmsg$ " (Se recomienda el directorio FinalWriter/Macros)")
  57.     (set #bothdestmsg$ " (Se recomienda un directorio común para los guiones ARexx)")
  58.     (set #selLanguage$ (cat "Elija el fichero de preferencias a utilizar según su país "
  59.                             "(contiene los mensajes traducidos y los días festivos). "
  60.                             "Los ficheros de preferencias preexistentes NO serán sobreescritos."))
  61.     (set #docDestMsg$ (cat "La documentación se encuentra en formato HTML. ¿Dónde desea instalarla? "
  62.                            "Un directorio \"FWCDocs\" SE CREARÁ si aún no existe."))
  63.     (set #CopyMacrosMsg$ "Las siguientes macros se copiarán en ")
  64.     (set #CopyPrefsMsg$ "El siguiente fichero de preferencias se copiará en ")
  65.     (set #copyDocsMsg$ "El directorio de documentación se copiará en ")
  66.     (set #CreatingDiffMsg$ (cat "Analizando los fichero de preferencias preexistente y nuevo; se creará el fichero \"FWCalendar.diff\" si es necesario."
  67.                                 "\n\nEste proceso podría tardar un minuto."))
  68.     (set #FoundFile$ (cat "\"FWCalendar.prefs\" ya existe... \"FWCalendar.diff\" se creará si es necesario."
  69.                           "\n\nEste proceso podría tardar un minuto."))
  70.     (set #MakeDifHelp$ (cat "Se ha encontrado una copia de \"FWCalendar.prefs\". "
  71.                             "En esta fase se comparará la copia preexistente con la copia incluida "
  72.                             "como parte del paquete de distribución.  Las variables que han sido "
  73.                             "añadidas (o sea, que existen en la copia del paquete de distribución "
  74.                             "pero no en el copia ya existente en su equipo) serán copiadas en un "
  75.                             "fichero llamado \"FWCalendar.diff\" en el directorio de destino. "
  76.                             "Usted puede incorporar este fichero en su fichero ya existente "
  77.                             "\"FWCalendar.prefs\" con un editor de texto para asegurarse de que "
  78.                             "su fichero de preferencias permanece actualizado."))
  79.     (set #DifMadeMsg$ (cat "Se ha encontrado una copia de \"FWCalendar.prefs\". "
  80.                            "Las variables que han sido añadidas a esta versión "
  81.                            "de las macros se copiarán en un fichero llamado "
  82.                            "\"FWCalendar.diff\" en el directorio destino."
  83.                            "Este fichero puede ser incorporado a su fichero "
  84.                            "ya existente \"FWCalendar.prefs\" con un editor "
  85.                            "de texto para asegurarse de que su fichero de "
  86.                            "preferencias permanece actualizado."))
  87.     (set #ViewDocsMsg$ "¿Le gustaría ver la documentación?")
  88.     (set #Yes$ "Sí")
  89.     (set #Skip$ "Saltar esta parte")
  90.     (set #Proceed$ "Proceder")
  91.     (set #ViewDocsHelp$ (cat "Si desea ver la documentación, presione \"" #Yes$ "\".  En caso contrario presione \"" #Skip$ "\"."))
  92.   )
  93. )
  94. ;=============================================================================
  95. (until (> #AppChoice 0)
  96.   (set #AppChoice
  97.     (askoptions
  98.       (prompt #welcome$)
  99.       (help @askoptions-help)
  100.       (choices "Final Writer" "PageStream")
  101.       (default 0)
  102.     )
  103.   )
  104.  
  105.   (if (= #AppChoice 0)
  106.     (
  107.       (set #choice
  108.         (askbool
  109.           (prompt #doabort$)
  110.           (help #soaborthelp$)
  111.         )
  112.       )
  113.       (if (= #choice 1)
  114.         (exit (quiet))
  115.       )
  116.     )
  117.   )
  118. );end until
  119.  
  120. (if (= #AppChoice 1)
  121.   ;Application = Final Writer
  122.   (
  123.     (set #destmsg$ #FWdestmsg$)
  124.   )
  125.   (if (= #AppChoice 2)
  126.     ;Application = PageStream
  127.     (
  128.       (if (= 2 (exists "PageStream4:Scripts" (noreq)))
  129.         (set #defdir "PageStream4:Scripts/")
  130.         (if (= 2 (exists "PageStream3:Scripts" (noreq)))
  131.           (set #defdir "PageStream3:Scripts/")
  132.           (if (= 2 (exists "PageStream:Scripts" (noreq)))
  133.             (set #defdir "PageStream:Scripts/")
  134.           )
  135.         )
  136.       )
  137.     )
  138.     ;Application = Both
  139.     (
  140.       (set #destmsg$ #bothdestmsg$)
  141.     )
  142.   )
  143. )
  144.  
  145. (set @default-dest
  146.   (askdir
  147.     (prompt (cat #seldir$ #destmsg$))
  148.     (help @askdir-help)
  149.     (default #defdir)
  150.   )
  151. )
  152.  
  153. (set #language
  154.   (askchoice
  155.     (prompt #selLanguage$)
  156.     (choices "American" "Deutsch" "English" "Español" "Français" "Irish" "Italiano" "Norsk" "Português" "Scottish" "Svenska")
  157.     (help @askchoice-help)
  158.   )
  159. )
  160.  
  161. (set #PrefsFile (cat (select #language "American" "Deutsch" "English" "Español" "Français" "Irish" "Italiano" "Norsk" "Português" "Scottish" "Svenska") "/FWCalendar.prefs"))
  162.  
  163. (set #docDir
  164.   (askdir
  165.     (prompt #docDestMsg$)
  166.     (help @askdir-help)
  167.     (default @default-dest)
  168.   )
  169. )
  170.  
  171. (copyfiles
  172.   (prompt #copyMacrosMsg$ @default-dest)
  173.   (help @copyfiles-help)
  174.   (source (pathonly @icon))
  175.   (dest @default-dest)
  176.   (choices "FWCalendar.rexx" "FWCAddEvent.rexx")
  177.   (files)
  178.   (confirm)
  179. )
  180.  
  181. (if (= (exists (tackon @default-dest "FWCalendar.prefs") (noreq)) 1)
  182.   (
  183.     (working #CreatingDiffMsg$)
  184.     (set #rexxcmd (tackon (pathonly @icon) "FindNewData.rexx"))
  185.     (rexx #rexxcmd (tackon @default-dest "FWCalendar.prefs") (tackon (pathonly @icon) #PrefsFile)
  186.       (prompt #FoundFile$)
  187.       (help #MakeDifHelp$)
  188.       (confirm)
  189.     )
  190.   )
  191.   (copyfiles
  192.     (prompt #copyPrefsMsg$ @default-dest)
  193.     (help @copyfiles-help)
  194.     (source (pathonly @icon))
  195.     (dest @default-dest)
  196.     (choices #PrefsFile)
  197.     (files)
  198.     (confirm)
  199.   )
  200. )
  201.  
  202. (if (exists (tackon @default-dest "FWCalendar.diff"))
  203.   (askbool
  204.     (prompt #DifMadeMsg$)
  205.     (choices #Proceed$ #Proceed$)
  206.     (help #DifMadeMsg$)
  207.   )
  208. )
  209.  
  210. (copyfiles
  211.   (prompt #copyDocsMsg$ #docDir)
  212.   (help @copyfiles-help)
  213.   (source (pathonly @icon))
  214.   (dest #docDir)
  215.   (choices "FWCDocs")
  216.   (confirm)
  217. )
  218.  
  219. (if
  220.   (set #choice
  221.     (askbool
  222.       (prompt #ViewDocsMsg$)
  223.       (choices "Yes" "Skip this part")
  224.       (default 1)
  225.       (help #ViewDocsHelp$)
  226.     )
  227.   )
  228.   (
  229.     (set #IndexCmd (tackon #docDir (cat "FWCDocs" "/SendToBrowser.rexx")))
  230.     (rexx #IndexCmd
  231.       (prompt #ShowDocsMsg$)
  232.       (help #ShowDocsHelp$)
  233.       (confirm)
  234.     )
  235.   )
  236. )
  237.  
  238. (exit)
  239.