home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Online / RexxNet / Install-RexxNet < prev    next >
Text File  |  1996-07-22  |  8KB  |  342 lines

  1. ;
  2. ;
  3. ;   Installation Script For RexxNet
  4. ;
  5. ;
  6. ;
  7.  
  8. ;
  9. ;   Initialize the variables
  10. ;   ------------------------
  11. (set @user-level 1)
  12. (set @default-dest "ram:")
  13. (set aos (getversion))
  14. (set aos (/ aos 65536))
  15.  
  16. (set ineta "")
  17. (set amia  "")
  18. (set tcpname "")
  19. (set dpath  "Work:")
  20. (set dcpath "Work:")
  21. (set dspath "Work:")
  22. (set sbpath "Binaries/AS225/")
  23. (set cpusuf ".000")
  24. (set rnstr "")
  25. (set rndstr "")
  26. (set rnstrinfo "")
  27. (set rndstrinfo "")
  28. (set msg1 "")
  29. (set msg2 "")
  30. (set servpath "")
  31. (set suopt 0)
  32.  
  33. ;
  34. ;   Determine the current CPU
  35. ;   -------------------------
  36. (set tcptype 0)
  37. (set cpu (database "cpu"))
  38. (if (> (exists ("sys:libs/68060.library")) 0) (set cpu "68060"))
  39. (if (= cpu "68000")
  40.     (
  41.     (set cpuid 0)
  42.     )
  43.     (
  44.     (set cpuid 1)
  45.     )
  46. )
  47.  
  48. ;
  49. ;   Determine the document viewer
  50. ;   -----------------------------
  51. (if (< aos 39)
  52.     (set docv "AmigaGuide")
  53.     (set docv "MultiView")
  54.  
  55. )
  56.  
  57. ;
  58. ;   Determine the current TCP/IP package
  59. ;   ------------------------------------
  60. (set amia (getassign "AmiTCP" "a"))
  61. (if amia
  62.     (
  63.     (set tcptype 1)
  64.     )
  65. )
  66.  
  67. (set ineta (getassign "inet" "a"))
  68. (if ineta
  69.     (
  70.     (set tcptype 0)
  71.     )
  72.  
  73. )
  74.  
  75. ;
  76. ;   Set the TCP/IP package to use with RexxNet
  77. ;   ------------------------------------------
  78. (set tcptype
  79.     (askchoice
  80.         (prompt "Which type of TCP/IP Package are you using?\n(Your current one has been auto-selected)")
  81.         (help "AS225 and AmiTCP are incompatible.\n\n"
  82.               "Choose AS225 if the package uses the\n"
  83.               "socket.library.\n\n"
  84.               "Choose AmiTCP if the package uses the\n"
  85.               "bsdsocket.library.")
  86.         (choices "AS225 (CPR,I-NET)" "AmiTCP")
  87.         (default tcptype)
  88.     )
  89. )
  90.  
  91. (if (= tcptype 0)
  92.     (
  93.         (if ineta
  94.             (
  95.             (set dpath  "inet:")
  96.             (set dcpath "inet:c")
  97.             (set dspath "inet:serv")
  98.             )
  99.         )
  100.         (set sbpath "Binaries/AS225/")
  101.         (set tcpname "_as225")
  102.     )
  103. )
  104.  
  105. (if (= tcptype 1)
  106.     (
  107.         (if amia
  108.             (
  109.             (set dpath  "AmiTCP:")
  110.             (set dcpath "AmiTCP:bin")
  111.             (set dspath "AmiTCP:serv")
  112.             )
  113.         )
  114.         (set sbpath "Binaries/AmiTCP/")
  115.         (set tcpname "_amitcp")
  116.     )
  117. )
  118.  
  119.  
  120. ;
  121. ;   Set the CPU type of RexxNet
  122. ;   ---------------------------
  123. (set cpuid
  124.     (askchoice
  125.         (prompt "Which CPU are using in this Amiga?\n(Your current CPU has been auto-selected)")
  126.         (help "Select 68000 for a stock 500, 600, 2000 or any\n"
  127.               "other Amiga that uses the 68000 CPU chip.\n\n"
  128.               "Select 68020+ for an Amiga that uses a\n"
  129.               "68020, 68030, 68040 or a 68060 CPU chip.")
  130.         (choices "68000" "68020+")
  131.         (default cpuid)
  132.     )
  133. )
  134.  
  135. (if (= cpuid 0)
  136.     (
  137.     (set cpusuf ".000")
  138.     )
  139.     (
  140.     (set cpusuf ".020")
  141.     )
  142. )
  143.  
  144. ;
  145. ;   Create the source path to the binaries
  146. ;   --------------------------------------
  147. (set rnstr
  148.     (cat sbpath "rexxnet"  tcpname cpusuf)
  149. )
  150. (set rnstrinfo
  151.     (cat sbpath "rexxnet.info")
  152. )
  153. (set rndstr
  154.     (cat sbpath "rexxnetd" tcpname cpusuf)
  155. )
  156. (set rndstrinfo
  157.     (cat sbpath "rexxnetd.info")
  158. )
  159.  
  160. ;
  161. ;   Copy the Client: rexxnet
  162. ;   ------------------------
  163. (set rn (askdir
  164.         (prompt "Where do you want the rexxnet copied to?\n(This is the 'Client' software)")
  165.         (help "Where do you want to execute the 'Client' from?")
  166.         (default dcpath)
  167.         )
  168. )
  169. (if rn
  170.     (
  171.         (copyfiles
  172.             (source rnstr)
  173.             (newname "rexxnet")
  174.             (dest rn)
  175.         )
  176.         (copyfiles
  177.             (source rnstrinfo)
  178.             (dest rn)
  179.         )
  180.     )
  181. )
  182.  
  183. ;
  184. ;   Copy the Server: rexxnetd
  185. ;   -------------------------
  186. (set rnd (askdir
  187.         (prompt "Where do you want rexxnetd copied to?\n(This is the 'Server' software)")
  188.         (help "Where do you want to execute the 'Server' from?")
  189.         (default dspath)
  190.         )
  191. )
  192. (if rnd
  193.     (
  194.         (copyfiles
  195.             (source rndstr)
  196.             (newname "rexxnetd")
  197.             (dest rnd)
  198.         )
  199.         (copyfiles
  200.             (source rndstrinfo)
  201.             (dest rnd)
  202.         )
  203.     )
  204. )
  205.  
  206. ;
  207. ;   Modify the Services file?
  208. ;   -------------------------
  209. (set servpath
  210.     (cat dpath "db/services")
  211. )
  212. (set msg1
  213.     (cat "Modify your " servpath " file?\n\nThis is required in order to run RexxNet.\n\nDon't modify this file more than once.\nIf you are re-installing RexxNet or taking\nan upgrade, just 'Skip This Part'. ")
  214. )
  215. (set msg2
  216.     (cat "This will modify your " servpath "\n")
  217. )
  218.  
  219. (textfile
  220.     (prompt msg1)
  221.     (dest servpath)
  222.     (include servpath)
  223.     (append "rexxnetd   2001/tcp\n")
  224.     (confirm)
  225.     (help msg2
  226.           "file to contain an entry for rexxnetd.\n"
  227.           "\n"
  228.           "This line will be added to the end of the table:\n"
  229.           "\n"
  230.           "'rexxnetd   2001/tcp'\n\n"
  231.           "If RexxNet has been previously installed, don't do this again."
  232.           " It will add the entry again at the bottom of your file and you will"
  233.           "have to manually remove it."
  234.     )
  235. )
  236.  
  237.  
  238. ;
  239. ;   See if the user wants to automatically start rexxnetd
  240. ;   -----------------------------------------------------
  241. (set suopt
  242.     (askchoice
  243.         (prompt "Would you like to aways startup the Server\n'rexxnetd' during bootup?")
  244.         (help "This allows you to have the Server running whenever\n"
  245.               "you boot up.\n\n"
  246.               "If you choose an option, make sure it occurs after\n"
  247.               "your TCP/IP startup has occured.")
  248.         (choices "Don't auto startup 'rexxnetd'" "Auto startup through user-startup" "Auto startup through WBStartup")
  249.         (default 0)
  250.     )
  251. )
  252.  
  253. (if (= suopt 1)
  254.     (
  255.         (set servpath
  256.             (cat "run <>nil: " rnd "/rexxnetd\n")
  257.         )
  258.         (startup "RexxNet"
  259.             (prompt "Adding lines to user-startup to automatically start rexxnetd")
  260.             (help "This will modify your s:user-startup file")
  261.             (command servpath)
  262.         )
  263.     )
  264. )
  265.  
  266. (if (= suopt 2)
  267.     (
  268.     (set servpath
  269.         (cat rnd "/rexxnetd")
  270.     )
  271.     (copyfiles
  272.             (source "Binaries/AS225/rexxnetd.project.info")
  273.             (newname "rexxnetd.info")
  274.             (dest "Sys:WBStartup")
  275.         )
  276.     (tooltype
  277.         (dest "Sys:WBStartup/rexxnetd")
  278.         (prompt "Modifying the path to the default tool")
  279.         (setdefaulttool servpath)
  280.         (help "This sets the path to rexxnetd")
  281.         (noposition)
  282.     )
  283.     )
  284. )
  285.  
  286.  
  287. ;
  288. ;   Copy the AmigaGuide Documentation?
  289. ;   ----------------------------------
  290. (set doit
  291.     (
  292.     askbool
  293.         (prompt "Do you want the RexxNet.guide file copied to your system?")
  294.         (help "This AmigaGuide document describes all about RexxNet.")
  295.         (choices "Yes" "No")
  296.  
  297.     )
  298. )
  299. (if doit
  300.     (
  301.         (set nr (askdir
  302.                 (prompt "Where do you want RexxNet.guide copied to?")
  303.                 (help "Choose a directory to copy the file to...")
  304.                 (default "help:")
  305.                 )
  306.         )
  307.         (if nr
  308.             (copyfiles
  309.                 (source "Documentation/RexxNet.guide")
  310.                 (dest nr)
  311.                 (infos)
  312.             )
  313.         )
  314.         (tooltype
  315.             (dest (tackon nr "RexxNet.guide"))
  316.             (prompt "Modifying the default viewer")
  317.             (setdefaulttool docv)
  318.             (help "This sets the default viewer for the AmigaGuide documentation")
  319.             (noposition)
  320.         )
  321.     )
  322. )
  323.  
  324. ;
  325. ;   Force Viewing the AmigaGuide Documentation
  326. ;   ------------------------------------------
  327. (copyfiles
  328.     (source "Documentation/RexxNet.guide")
  329.     (dest "ram:")
  330.     (nogauge)
  331. )
  332. (set cmd (cat "Sys:Utilities/" docv))
  333. (cat cmd " ram:RexxNet.guide")
  334.  
  335. (run "system:utilities/AmigaGuide ram:RexxNet.guide"
  336.     (help "RexxNet FAQ")
  337.     (prompt "This displays the AmigaGuide Documenation?")
  338. )
  339.  
  340. (delete "ram:RexxNet.guide")
  341.  
  342.