home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / internet-tools / amitcp / gpdial / install.gpdial < prev    next >
Encoding:
Text File  |  1995-06-05  |  5.5 KB  |  223 lines

  1. ; Installer script for GPDial
  2. ; $VER: Install.GPDial 1.0 (9.1.96)
  3.  
  4. ; No default destination
  5. (set @default-dest "")
  6.  
  7. (complete 0)
  8.  
  9. ; Test if user has at least Kickstart and Workbench 2.0
  10. (if (< (/ (getversion "LIBS:version.library") 65536) 37)
  11.     (set doabort 1)
  12. )
  13. (if (< (/ (getversion) 65536) 37)
  14.     (set doabort 1)
  15. )
  16. (if doabort
  17.     (abort "You need Kickstart and Workbench 2.0 or higher to use GPDial. Sorry.")
  18. )
  19. (user 2)
  20. (welcome)
  21. ;
  22. ; *** Install GPDial executable
  23. ;
  24. (set @default-dest "C:")
  25. (if (exists "INet:bin/" (noreq))
  26.     (set @default-dest "INet:bin/")
  27. )
  28. (if (exists "AmiTCP:bin/" (noreq))
  29.     (set @default-dest "AmiTCP:bin/")
  30. )
  31. (user 2)
  32. (set @default-dest
  33.     (askdir
  34.         (prompt "Where would you like GPDial to be installed")
  35.         (help "Select the directory where you would like to install the GPDial executable. It would normally be somewhere on your path. e.g. AmiTCP:bin/")
  36.         (default @default-dest)
  37.     )
  38. )
  39. (
  40.     (working "Installing GPDial")
  41.     (copyfiles
  42.         (prompt "Copying GPDial")
  43.         (help "")
  44.         (source "bin/GPDial")
  45.         (dest @default-dest)
  46.         (infos)
  47.     )
  48. )
  49. (complete 10)
  50. ;
  51. ; *** Install replace executable
  52. ;
  53. (set #dest "C:")
  54. (set #dest
  55.     (askdir
  56.         (prompt "Where would you like Replace to be installed")
  57.         (help "Select the directory where you would like to install the Replace executable. It would normally go in C:\nReplace is a Find and Replace dos command.\n I have included it because I use it in conjunction with GPDial and I thought someone else might want to.")
  58.         (default #dest)
  59.     )
  60. )
  61. (
  62.     (working "Installing Replace")
  63.     (copyfiles
  64.         (prompt "Copying Replace")
  65.         (help "")
  66.         (source "Replace")
  67.         (dest #dest)
  68.     )
  69. )
  70. (complete 20)
  71. ;
  72. ; *** Install GPDial config and phonebook
  73. ;
  74. (set #dest "S:")
  75. (if (exists "INet:db/" (noreq))
  76.     (set #dest "INet:db/")
  77. )
  78. (if (exists "AmiTCP:db/" (noreq))
  79.     (set #dest "AmiTCP:db/")
  80. )
  81. (set #ndest
  82.     (askdir
  83.         (prompt "Where would you like to Install the config files")
  84.         (help "Select the directory where you would like to install the GPDial config files.\nIt would normally go in AmiTCP:db/.")
  85.         (default #dest)
  86.     )
  87. )
  88. (
  89.     (working "Installing GPDial config files")
  90.     (copyfiles
  91.         (prompt "Copying config files")
  92.         (help "")
  93.         (source "files/")
  94.         (dest #ndest)
  95.         (all)
  96.     )
  97. )
  98. (user 0)
  99. (complete 40)
  100. (if (NOT (= #dest #ndest))
  101.     (if (exists "ENV:")
  102.         (textfile
  103.             (prompt "Creating \"ENV:GPD_CONFIG\"\n\nThis will tell GPDial where the config files are")
  104.             (help "The GPD_CONFIG environment variable is used by GPDial to find the config files.\n If it doesn't exist GPDial will chach in AmiTCP:db/ and INet:db/ if they exist.")
  105.             (dest "ENV:GPD_CONFIG")
  106.             (append #ndest)
  107.             (append "/")
  108.             (confirm)
  109.         )
  110.     )
  111. )
  112. (complete 50)
  113. (if (NOT (= #dest #ndest))
  114.     (if (exists "ENVARC:")
  115.         (textfile
  116.             (prompt "Creating \"ENVARC:GPD_CONFIG\"\n\nThis should be done so that ENV:GPD_CONFIG is created at boot time")
  117.             (help "This should be done so the GPD_CONFIG environment variable is created everytime the machine is booted.\nIf you skip this part you should add\nsetenv GPD_CONFIG <path>\nto your s:user-startup or s:startup-sequence")
  118.             (dest "ENVARC:GPD_CONFIG")
  119.             (append #ndest)
  120.             (append "/")
  121.             (confirm)
  122.         )
  123.     )
  124. )
  125. (user 2)
  126. (complete 60)
  127.  
  128. ;
  129. ; *** Install GPDial Scripts
  130. ;
  131. (set #dest "S:")
  132. (if (exists "INet:" (noreq))
  133.     (set #dest "INet:")
  134. )
  135. (if (exists "INet:Scripts/" (noreq))
  136.     (set #dest "INet:Scripts/")
  137. )
  138. (if (exists "AmiTCP:" (noreq))
  139.     (set #dest "AmiTCP:")
  140. )
  141. (if (exists "AmiTCP:Scripts/" (noreq))
  142.     (set #dest "AmiTCP:Scripts/")
  143. )
  144. (set #dest
  145.     (askdir
  146.         (prompt "Where would you like to Install the Script files")
  147.         (help "Select the directory where you would like to install the GPDial script files. It would normally go in AmiTCP:Scripts/. This directory probably wont exist so you should create it yourself.")
  148.         (default #dest)
  149.     )
  150. )
  151. (
  152.     (working "Installing GPDial script files")
  153.     (copyfiles
  154.         (prompt "Copying script files")
  155.         (help "")
  156.         (source "Scripts/")
  157.         (dest #dest)
  158.         (all)
  159.     )
  160. )
  161. (complete 80)
  162.  
  163. ;
  164. ; *** Install GPDial and Replace docs
  165. ;
  166. (set #mode
  167.      (askchoice
  168.          (prompt "Would you like to install \"GPDial\" and \"Replace\" documentation ?")
  169.          (choices "Yes" "No")
  170.          (help "Click on YES if you want to install \"GPDial\" and \"Replace\" documentation, otherwise click on NO")
  171.      )
  172. )
  173. ;(set #installdocs (IN #mode 0))
  174. (if (= 0 #mode)
  175.     (
  176.         (set #dest "")
  177.         (if (exists "INet:doc/" (noreq))
  178.             (set #dest "INet:doc/")
  179.         )
  180.         (if (exists "AmiTCP:doc/" (noreq))
  181.             (set #dest "AmiTCP:doc/")
  182.         )
  183.         ;
  184.         ; *** Install GPDial docs first
  185.         ;
  186.         (set #dest
  187.             (askdir
  188.                 (prompt "Where would you like to Install the GPDial documentation")
  189.                 (help "Select the directory where you would like to install the GPDial documentation file. It would normally go in AmiTCP:doc/\nThere are 4 iff files that GPDial.guide uses. These will also be copied so you might be better creating a new directory for them all")
  190.                 (default #dest)
  191.             )
  192.         )
  193.         (working "Installing GPDial doc file")
  194.         (copyfiles
  195.             (prompt "Copying GPDial doc file")
  196.             (help "")
  197.             (source "docs/")
  198.             (dest #dest)
  199.             (all)
  200.         )
  201.         ;
  202.         ; *** Install Replace docs next
  203.         ;
  204.         (set #dest
  205.             (askdir
  206.                 (prompt "Where would you like to Install the Replace documentation")
  207.                 (help "Select the directory where you would like to install the Replace documentation file.")
  208.                 (default #dest)
  209.             )
  210.         )
  211.         (working "Installing Replace doc file")
  212.         (copyfiles
  213.             (prompt "Copying Replace doc file")
  214.             (help "")
  215.             (source "Replace.doc")
  216.             (dest #dest)
  217.         )
  218.     )
  219. )
  220. (complete 100)
  221.  
  222. (exit "\"GPDial\" and \"Replace\" is now installed. You might have to reboot to pick up the config files.")
  223.