home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / ftp.vapor.com / amirc / submissions / Phoenix1_21.lzx / Install_Phoenix < prev    next >
Encoding:
Text File  |  1997-02-05  |  5.7 KB  |  223 lines

  1. ; Install_Phoenix -- Installer script for PhoEniX-AmIRC
  2. ; $VER: Install_Phoenix 1.21 (05.02.96) by |Paladin|
  3. ;
  4. (set #ver "1.21"
  5.      #app-name (cat @app-name " v"#ver)
  6. )
  7. (complete 0)
  8. (welcome "\nWelcome to the "#app-name" installer.")
  9. (if (< 39 (/ 65536 (getversion "exec.library" (resident))))
  10.     (abort (#app-name" requires AmigaOS 3.0 (V39) or later."))
  11. )
  12. (message 
  13.         "-- WARNING --\n\n"
  14.          "Existing files will be over-written.  If you wish to make a backup"
  15.          " of any of your old Phoenix installation abort now and do so.\n\n\n"
  16.          "This script was designed for use with:\n\nInstaller 43.3 (04/30/96)"
  17. )
  18. (set
  19.     @copylib-help "Experts don't need help with this."
  20.     @copyfiles-help (@copylib-help)
  21.     #source-dir (if (= 1 (exists @icon)) (pathonly @icon) (@icon))
  22.     #default-dir (if (= 2 (exists "AmiTCP:" (noreq))) ("AmiTCP:") ("SYS:"))
  23.     @default-dest (askdir
  24.         (prompt "Where is AmIRC installed?")
  25.         (help "    Choose the directory where your existing install"
  26.               " of AmIRC is located.  This directory should contain"
  27.               " a rexx/ subdirectory where most of "@app-name"will "
  28.               "be installed."
  29.         )
  30.         (default #default-dir)
  31.     )
  32.     #dest-rexx (tackon @default-dest "rexx")
  33.     #dest-snd (tackon @default-dest "Sounds")
  34.     #dest-libs (if (= 2 @user-level)
  35.         (askdir
  36.             (prompt "Where should Libraries be installed?")
  37.             (help "    Choose a directory to install the libraries used"
  38.                   " by "@app-name".  Version numbers will be checked before"
  39.                   " overwriting existing files."
  40.             )
  41.             (default "LIBS:")
  42.         )
  43.         ("LIBS:")
  44.     )
  45.     #dest-rexxc (if (= 2 @user-level)
  46.         (askdir
  47.             (prompt "Where are your ARexx commands located?")
  48.             (help "    Choose a directory to install general ARexx commands"
  49.                   " used by RexxPlus and ARexx.  Version numbers will be checked before"
  50.                   " overwriting existing files."
  51.             )
  52.             (default "SYS:rexxc")
  53.         )
  54.         ("SYS:rexxc")
  55.     )
  56.     #dest-mui (if (= 2 (exists "MUI:" (noreq))) ("MUI:")
  57.         (askdir
  58.             (prompt "Where is MUI installed?")
  59.             (help "    Choose the root directory where MUI is installed."
  60.                   " Normally there should be an assigned MUI:, but it is"
  61.                   " not currently visible to this installer."
  62.             )
  63.             (default #default-dir)
  64.         )
  65.     )
  66. )
  67. (complete 5)
  68. (foreach "Libs" "#?"
  69.     (copylib
  70.         (source (cat "Libs/" @each-name))
  71.         (dest #dest-libs)
  72.         (if (= 2 @user-level)
  73.             (
  74.                 (prompt "Copying "@each-name"...")
  75.                 (help @copylib-help)
  76.                 (confirm)
  77.             )
  78.         )
  79.     )
  80. )
  81. (complete 10)
  82. (if (< 2 (exists #dest-snd (noreq)))
  83.     (set #dest-snd
  84.         (askdir
  85.             (prompt "Where are your Sounds installed?")
  86.             (help "    Select the same Sound directory that you have AmIRC"
  87.                   " configured to use.  If you don't have a Sounds/ directory"
  88.                   " then create one."
  89.             )
  90.             (default @default-dest)
  91.         )
  92.     )
  93. )
  94. (complete 20)
  95. (copyfiles
  96.     (source "bin/Sounds")
  97.     (dest #dest-snd)
  98.     (all)
  99. )
  100. (complete 30)
  101. (copyfiles
  102.     (source "bin/rexx")
  103.     (dest #dest-rexx)
  104.     (all)
  105. )
  106. (complete 40)
  107. (copyfiles
  108.     (source "RexxC")
  109.     (dest #dest-rexxc)
  110.     (all)
  111. )
  112. (complete 50)
  113. (if (= 1 (askbool
  114.         (prompt "Install documentation?")
  115.         (help "If you've never used "@app-name" before you'll be a typing"
  116.               " monkey without first reading the docs."
  117.         )
  118.     ) )
  119.     (copyfiles
  120.         (source #source-dir)
  121.         (dest @default-dest)
  122.         (pattern "Phoenix.#?")
  123.         (files)
  124.         (infos)
  125.         (noposition)
  126.     )
  127. )
  128. (complete 60)
  129. (copyfiles
  130.     (source "bin")
  131.     (dest @default-dest)
  132.     (pattern "#?")
  133.     (files)
  134.     (infos)
  135.     (noposition)
  136. )
  137. (complete 70)
  138. (copyfiles
  139.     (source "MUI")
  140.     (dest #dest-mui)
  141.     (all)
  142.     (if (= 2 @user-level)
  143.         (
  144.             (prompt "MUI utilities")
  145.             (help "    MUIRexx is required by "@app-name" for the "
  146.                   "/CONFIG plus other GUI commands and is highly recommended."
  147.             )
  148.             (confirm)
  149.         )
  150.     )
  151. )
  152. (complete 80)
  153. (copyfiles
  154.     (source "WBStartup")
  155.     (dest "SYS:WBStartup")
  156.     (all)
  157.     (infos)
  158.     (noposition)
  159.     (if (= 2 @user-level)
  160.         (
  161.             (prompt "Programs that need to start on bootup in WBStartup")
  162.             (help "    RPStart is the RexxMast of RexxPlus, it is"
  163.                   " required for "@app-name" to run."
  164.             )
  165.             (confirm)
  166.         )
  167.     )
  168. )
  169. (complete 90)
  170. (if (= 2 @user-level)
  171.     (
  172.         (set
  173.             #yes (askbool
  174.                 (prompt "Make changes to Phoenix.amirx? (RECOMMENDED)")
  175.                 (help "    This will overwrite the stock communication script"
  176.                       " with one that uses the same directories that you selected"
  177.                       " during this install."
  178.                 )
  179.             )
  180.         )
  181.     )
  182.     (set #yes 1)
  183. )
  184. (if (= 1 #yes)
  185.     (
  186.         (textfile
  187.             (dest (cat #dest-rexx "/Phoenix.amirx"))
  188.             (append
  189.                 (cat
  190.                     "/*\\\n"
  191.                     " * Phoenix.amirx -- AmIRC to Phoenix interface\n"
  192.                     " * Usage  : change your Event ANY/JOIN/KICK/MODE/INVITE settings to\n"
  193.                     " *        : \"phoenix.amirx %p\" & edit .phoenix.cfg to suit your needs.\n"
  194.                     " * $VER: PhoEniX.amirx "#ver" (01.02.97) by |Paladin|\n"
  195.                     "\\*/\n"
  196.                     "options results;parse arg line;p=address();parse var p .\'.\'p2\n"
  197.                     "tp=pragma(\'p\',0);pragma(\'p\',tp);n=\'PHOENIX.\'p2\n"
  198.                     "if ~show(\'P\',n) then do;address(n)\n"
  199.                     "p line\n"
  200.                     "exit;end\n"
  201.                     "else if getclip(\'phx_\'p2)~=p2 then do;pragma(\'p\',tp+2)\n"
  202.                     "if ~show(\'L\',\'rexxsupport.library\') then if ~addlib(\'rexxsupport.library\',0,-30,0) then do;"
  203.                     "\'echo P=\'phx\' \'d2c(2)\'FATAL ERROR:\'d2c(2)\' Unable to load rexxsupport.library.\'\n"
  204.                     "exit;end;forbid();address command;\'run >nil: "#dest-rexx"/Phoenix >>T:Phoenix.err \'p2\n"
  205.                     "\'waitforport \'n\n"
  206.                     "address;if ~show(\'P\',n) then \'echo P=\'d2c(27)\'b½PhoEniX╗ Unable to start Phoenix\'\n"
  207.                     "permit();end\n"
  208.                 )
  209.             )
  210.         )
  211.     )
  212. )
  213. (complete 100)
  214. (exit
  215.     "\nInstallation Complete!\n"
  216.     #app-name" may be found in your "@default-dest" directory (or partition).\n\n"
  217.     "Please read the docs for configuration instructions.\n\n"
  218.     "If this is your first install of "@app-name" or you are updating from "
  219.     "a pre-1.14 version, then a reboot will be required before "@app-name" "
  220.     "will run correctly."
  221.     (quiet)
  222. )
  223.