home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / on-line / facts3.1_clocksync / install < prev    next >
Text File  |  2000-02-07  |  6KB  |  190 lines

  1. ; $VER: FACTS3Install 1.2 (07.02.00)
  2.  
  3. (set #inst-ver (/ @installer-version 65536))
  4. (if (< #inst-ver 43)
  5.     (abort "You are running an old version of Installer.\n\n"
  6.             "Please update to at least version 43, available on Aminet.")
  7. )
  8.  
  9. (welcome)
  10.  
  11. (set #ver-verstr (getversion "C:Version"))
  12. (set #ver-ver (/ #ver-verstr 65536))
  13.  
  14. ;(if (< #ver-ver 44)
  15. ;    (
  16. ;(message "The FACTS installation will start by updating your Version command.\n\n"
  17. ;            "Please read the following text before proceeding.\n\n"
  18. ;            "Note that if v40.3 if already installed, you will not be prompted to replace it..." (all))
  19. ;
  20. ;        (run "SYS:Utilities/Multiview Version_v40.3/Version_ReadMe")
  21. ;
  22. ;    (copylib
  23. ;        (prompt "If you have a version command older than v40.3, "
  24. ;                   "you may experience problems with dates in year 2000 and above.")
  25. ;        (help "Dates in version strings display incorrectly on WB 3.0 and 3.1 versions "
  26. ;                "of the Version command - please install this update.\n\n" @copylib-help)
  27. ;        (source "Version_v40.3/Version")
  28. ;        (dest "C:")
  29. ;        (confirm "expert")
  30. ;    )
  31. ;
  32. ;    )
  33. ;)
  34.  
  35. (set @default-dest
  36.     (askdir
  37.         (prompt "Where would you like to install FACTS?")
  38.         (help "It is recommended that FACTS be running all the time, so "
  39.         "WBStartUp is the logical place.\n\n" @askdir-help)
  40.         (default "SYS:WBStartUp")
  41.     )
  42. )
  43.  
  44. (startup "RexxMast"
  45.     (prompt "FACTS REQUIRES ARexx to be active when it starts up.  "
  46.     "To do this, the RexxMast command should be executed in your "
  47.     "user-startup script.\n\nDoes this need adding? (if you are not "
  48.     "sure, it is safe to proceed with this anyway)")
  49.     (help @startup-help)
  50.     (command "RexxMast >NIL:")
  51.     (confirm "expert")
  52. )
  53.  
  54. (set #already-installed (exists (tackon @default-dest "Facts.info")))
  55. (set #timeserver-var (exists "ENVARC:TIMESERVER"))
  56.  
  57. (if #already-installed
  58.     (
  59.         (set #facts-vernum (getversion (tackon @default-dest "Facts")))
  60.         (set #facts-ver (/ #facts-vernum 65536))
  61.         (copylib
  62.             (prompt "Please check the version of FACTS you are copying against "
  63.             "any which might already be installed.")
  64.             (help @copylib-help)
  65.             (source "Facts")
  66.             (dest @default-dest)
  67.             (optional "askuser" "force" "oknodelete")
  68.         )
  69.  
  70.         (if (< #facts-ver 3)
  71.             (
  72.                 (iconinfo
  73.                     (prompt "Updating TIMESERVER config file...")
  74.                     (help @iconinfo-help)
  75.                     (dest (tackon @default-dest "Facts"))
  76.                     (gettooltype "SERVICE" "#service")
  77.                     (gettooltype "TIMEOUT" "#timeout")
  78.                     (safe)
  79.                 )
  80.                 (set #timeserver (getenv "ENV:TIMESERVER"))
  81.                 (set #extra-config ("%s:%s:%s" #timeserver #service #timeout))
  82.                 (textfile
  83.                     (prompt "You appear to be updating from a pre-3.0 version of FACTS.\n"
  84.                                 "Do you want to update your TIMESERVER variable to the newer format?\n\n"
  85.                                 "NB: AutoDST settings have also changed - please check and update this manually "
  86.                                 "if necessary")
  87.                     (help "Although FACTS 3 will read FACTS 2.x TIMESERVER variables, "
  88.                             "this update procedure will ensure that all your previous prefs are kept "
  89.                             "intact.\n\n" @textfile-help)
  90.                     (dest "ENV:TIMESERVER")
  91.                     (append #extra-config)
  92.                     (confirm)
  93.                 )
  94.                 (copyfiles
  95.                     (prompt "Copying ENV: to ENVARC:...")
  96.                     (help @copyfiles-help)
  97.                     (source "ENV:TIMESERVER")
  98.                     (dest "ENVARC:")
  99.                 )
  100.             )
  101.         )
  102.     )
  103.  
  104.     (
  105.         (copylib
  106.             (prompt "Please check the version of FACTS you are copying against "
  107.             "any which might already be installed.")
  108.             (help @copylib-help)
  109.             (source "Facts")
  110.             (dest @default-dest)
  111.             (infos)
  112.         )
  113.  
  114.         (tooltype
  115.             (prompt "Do you want FACTS to run silently in the background?\n\n"
  116.             "If you would prefer it to show the GUI on startup, please skip "
  117.             "this part.")
  118.             (help @tooltype-help)
  119.             (dest (tackon @default-dest "Facts"))
  120.             (settooltype "CXPOPUP" "NO")
  121.             (confirm "expert")
  122.         )
  123.  
  124.     )
  125. )
  126.  
  127. (set #doc-dir
  128.     (copyfiles
  129.         (prompt "Do you want to copy the documentation?")
  130.         (help @copyfiles-help)
  131.         (source "Facts.guide")
  132.         (infos)
  133.         (dest "HELP:English")
  134.         (optional "askuser" "force")
  135.         (confirm "expert")
  136.     )
  137. )
  138.  
  139. (if (exists "libs:locale.library")
  140.     (copyfiles
  141.         (prompt "Select languages you wish to install (English is built in)")
  142.         (help "FACTS supports locale.library!\n\n" @copyfiles-help)
  143.         (source "catalogs")
  144.         (dest "LOCALE:catalogs")
  145.         (all)
  146.         (confirm "expert")
  147.     )
  148. )
  149.  
  150. (copyfiles
  151.     (prompt "Do you want to install the example ARexx scripts in REXX:?\n\n"
  152.     "See Facts docs for more details")
  153.     (help @copyfiles-help)
  154.     (source "Rexx")
  155.     (dest "REXX:")
  156.     (optional "askuser" "force")
  157.     (confirm "expert")
  158.     (all)
  159. )
  160.  
  161. (working "Starting ARexx...")
  162.  
  163. (run "RexxMast >NIL:")
  164.  
  165. (set #rexx-string ("install.rexx %s" (tackon @default-dest "Facts")))
  166.  
  167. (rexx #rexx-string
  168.     (prompt "I will now quit any old versions of FACTS, and "
  169.     "load the new one")
  170.     (help "Does what it says!  Needs ARexx to be running.")
  171. )
  172.  
  173. (run ("WBRun" (tackon @default-dest "Facts")))
  174.  
  175. (set #time (getenv "T:TIME"))
  176.  
  177. (if (> #inst-ver 43)
  178.     (
  179. ;    (openwbobject @default-dest (safe))
  180. ;    (showwbobject (tackon @default-dest "Facts"))
  181.     (openwbobject #doc-dir)
  182.     (showwbobject (tackon #doc-dir "Facts.guide"))
  183.     )
  184. )
  185.  
  186. (exit "Finished!\n\n\nThe current time is\n\n" #time
  187. "\n\n\nFACTS has been started, please ensure your timezone is set "
  188. "correctly and then save config." (quiet))
  189.  
  190.