home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / on-line / amicomsys / install < prev    next >
Text File  |  2000-02-01  |  12KB  |  289 lines

  1. ; Install script for AmiComSys 68020+/Kick 3.0
  2. ;
  3. ; $VER: AmiComSys-install 1.40 (01.02.2000) Håkan Parting
  4.  
  5. ; set some texts
  6. (set #updatetheinstaller "This installer requires version 43.3+ of the installer program\nIt may be found on Aminet in\n/util/misc/Installer-43_3.lha")
  7.  
  8. ; Check the installer version
  9. (set vernum @installer-version)
  10. (set ver (/ vernum 65536))
  11. (set rev (- vernum (* ver 65536)))
  12. (set installerver (cat ver "." rev))
  13. (if (< installerver "43.3") (exit #updatetheinstaller) )
  14.  
  15. ; 68020 is the CPU we require
  16. (set highcpu 1)
  17.  
  18. ; ** set system variables **
  19. ; CPU
  20. (set cpu (database "cpu"))
  21. (if (> (exists ("libs:68060.library")) 0) (set #cpu 5) )
  22. (if (> (exists ("68060.library") (resident)) 0) (set #cpu 5) )
  23. (if (= cpu 68000) (set #cpu 0))
  24. (if (= cpu 68010) (set #cpu 1))
  25. (if (= cpu 68020) (set #cpu 2))
  26. (if (= cpu 68030) (set #cpu 3))
  27. (if (= cpu 68040) (set #cpu 4))
  28. (if (= cpu 68050) (set #cpu 5))
  29.  
  30. ; OS-version
  31. (set osver (/ (getversion) 65536))
  32.  
  33. ; Setpatch version
  34. (set vernum (getversion "c:setpatch"))
  35. (set ver (/ vernum 65536))
  36. (set rev (- vernum (* ver 65536)))
  37. (set setpatchver (cat ver "." rev))
  38.  
  39. ; Version of AmiComSys in the archive
  40. (set vernum (getversion "AmiComSys"))
  41. (set ver (/ vernum 65536))
  42. (set rev (- vernum (* ver 65536)))
  43. (set acsver (cat ver "." rev))
  44.  
  45. ; set texts
  46. (set #nonlist "AmiComSys requires the MUI-costum-class\nNList.mcc version 19+ by Gilles Masson\n\nIt must be installed before AmiComSys\nPlease, download it from Aminet:dev/mui/MCC_NList0.85.lha\nAnd install it with the included installer script\nThen try to install AmiComSys again ...")
  47. (set #nomui "AmiComSys requires Magic User Interface (MUI) 3.8!\n\nYou can find it on Aminet:dev/gui/mui38usr.lha")
  48. (set #wrongcpu0 "This archive does only include a version for 68020/kickstart 3.0 and\nhigher.\n\nYou may download a 68000 version from\nhttp://amicomsys.tibb.at\nAt the bottom of the page\n\nInstallation is aborted")
  49. (set #wrongcpu2 "This archive does only include a version for 68000/Kickstart 2.0 and\nhigher. A version for 68020 and higher is available\nat http://amicomsys.tibb.at\nor\nAminet:comm/net/AmiComSysMUI.lha")
  50. (set #seldocs "Select which documentation you want to install!")
  51. (set #selscr "Do you want to install the following Arexx-scripts?\nThey may be executed at different occasions.\nIf you already have a costum version of these you\nshould not check the checkboxes infront of the names.")
  52. (set #selscrhelp "The NotifyArexx.amicomsys may be executed when someone is\nconnecting or disconnecting. A simple example is included in this\narchive, but a more versatile one can be found at\nAminet:comm/net/ACS-Notify.lha and is written by Scott Beardwood\nThe MessageArexx.amicomsys script may be executed when someone\nmessage you. There is a simple example script in this archive.\nThese scripts does only work if you have registered AmiComSys.")
  53. (set #selimages "Do you want to use the 20 colour-(NewIcons-style)-graphics-buttons\nor the 8 colour-(MagicWB-style)-graphics-buttons?")
  54. (set #selimageshelp "This version of AmiComSys have graphics here and there.\nDo you want MagicWB style graphics or the NewIcons one?\nIf you have installed a replacement graphics-set, you'd better\nspecify that. If not it would be overwritten.\nIf you have screen size that is smaller than 640x512 then\nbetter choose the NewIcons graphics set, because the MagicWB one\nis to big.\nNote that the NewIcons 3/4 does not have to be installed\nto use the 20 colour-images!")
  55. (set #readmefile (cat "AmiComSys" acsver ".readme"))
  56. (set #notextinput "If you are using Amiga Kickstart 36, 37 or 38\nAmiComSys requires the costum MUI class\nTextinput.mcc.\nThis class couldn't be found in\nyour LIBS:/mui directory.\n\nPlease download it from\nftp://ftp.vapor.com/misc/textinpt_13.XX.lzx\nwhere XX is 34 or higher.");
  57. (set #stringtext "")
  58. (set #wrongos "This version of AmiComSys requires Kickstart 3.0+\nThere is Kickstart 2.0 version available at the\nhome page.")
  59. (set #updatethesetpatch "The installer didn't find version 40.16 or higher of c:setpatch\nAmiComSys needs it to work correctly.\nIf you have it in another location then c: then you could leave it there,\nbut please make sure it's version 40.16 or higher.")
  60. (if (> osver 38) (set #stringtext "BetterString.mcc © Allan Odgaard\n"))
  61. (if (= highcpu 0) (set #cputext "68000/OS2.0+ version\n"))
  62. (if (= highcpu 1) (set #cputext "68020+/OS3.0+ version\n"))
  63.  
  64. (message
  65.      (cat "Welcome to the AmiComSys " acsver " installer!\n\n")
  66.     "You may either use this for a first\n"
  67.     "time install or for updating a former\n"
  68.     "version of AmiComSys.\n\n"
  69.     "AmiComSys © Håkan Parting 1997-2000\n"
  70.     #cputext
  71.     "Requires:\n"
  72.     "MUI 3.8+ © Stefan Stuntz\n"
  73.     "AMarquee V49+ © Jeremy Friesner & Håkan Parting\n"
  74.     "NList.mcc 19+ © Gilles Masson\n"
  75.     "Toolbar.mcc 15.5+ © Benny Kjær Nielsen\n"
  76.     #stringtext    
  77. )
  78.  
  79. (message
  80.     "\n\n\nPlease make sure that no session of AmiComSys\nis running before you proceed with this\ninstallation."
  81. )
  82.  
  83. (if (< osver 39) (exit #wrongos))
  84.  
  85. (if (< setpatchver "40.16") (message #updatethesetpatch) )
  86.  
  87. (if (< (exists "MUI:") 2) (exit #nomui) )
  88. (if (exists "LIBS:muimaster.library") (
  89.     (set muiver (/(getversion "LIBS:muimaster.library") 65536))
  90. ))
  91. (if (< muiver 19) ( 
  92.     (exit #nomui)
  93. ))
  94.  
  95. (set muiver 0)
  96. (if (exists "LIBS:MUI/NList.mcc") (
  97.     (set muiver (/(getversion "MUI:libs/mui/NList.mcc") 65536))
  98. ))
  99. (if (< muiver 19) ( 
  100.     (exit #nonlist)
  101. ))
  102.  
  103. (welcome)
  104. (set cpuVal (askchoice (choices "68000" "68010" "68020" "68030"
  105.                          "68040" "68060"
  106.                     )
  107.                 (prompt "Please, select the processor your Amiga have")
  108.                 (help   "Recommended is to leave it as default")
  109.                   (default #cpu)
  110.           )
  111. )
  112.  
  113. (if (= highcpu 1) (if (< cpuVal 2) (exit #wrongcpu0) ))
  114. (if (= highcpu 0) (if (> cpuVal 1) (message #wrongcpu2) ))
  115.  
  116. (set DefDir (getassign "MIAMI")) 
  117. (if (= DefDir "") (set DefDir (getassign "AmiTCP")) )
  118. (if (= DefDir "") (set DefDir (getassign "Inet")) )
  119.  
  120. (set #target (askdir    (prompt "Where do you want to install AmiComSys?\nA directory named AmiComSys will be created.")
  121.                         (help "Select a directory, where you want to install AmiComSys!\nA directory named AmiComSys will be created there.")
  122.                         (default DefDir)
  123. ))
  124.  
  125. (set instdir (tackon #target "AmiComSys"))
  126. (set @default-dest instdir)
  127.  
  128. (makedir instdir (infos))
  129. (if (< (exists (tackon instdir "pictures")) 2) (makedir (tackon instdir "pictures")) )
  130.  
  131. (if (< (exists (tackon instdir "images")) 2) (makedir (tackon instdir "images")) )
  132.  
  133. ; check if another version of AmiComSys is already there
  134. ; if so, make a backup
  135.  
  136. (if (= 1 (exists (tackon instdir "AmiComSys") ) )
  137.     (
  138.         (set vernum (getversion (tackon instdir "AmiComSys")))
  139.         (set ver (/ vernum 65536))
  140.         (set rev (- vernum (* ver 65536)))
  141.         (set acsverold (cat ver "." rev))
  142.  
  143.         (message (cat "AmiComSys version " acsverold " was found in the install directory.\n\nIt will be backed up as AmiComSys" acsverold))        
  144.         (copyfiles (source (tackon instdir "AmiComSys"))
  145.                     (dest instdir)
  146.                     (infos)
  147.                     (newname (cat "AmiComSys" acsverold))
  148.         )
  149.     )
  150. )
  151.  
  152. ; copy over files
  153.  
  154. (copyfiles (source "AmiComSys") (dest instdir) )
  155.  
  156. (set copyovericon 0)
  157. (if (= (exists (tackon instdir "AmiComSys.info")) 1)
  158. (
  159.     (set copyovericon (askchoice (choices "Replace icon" "Keep my icon")
  160.                                 (prompt "Do you want to replace your AmiComSys.info icon with\nthe one in the archive?")
  161.                                 (help "")
  162.                                 (default 1)
  163.                         )
  164.     )
  165.  
  166.     (if (= copyovericon 1)
  167.         (
  168.             (makedir (tackon instdir "icons") (infos))
  169.             (copyfiles (source "AmiComSys.info") (dest (tackon instdir "icons")))
  170.             (message "The latest icon-file was copied to the icons directory of AmiComSys")
  171.         )
  172.     )
  173. )
  174. )
  175.  
  176. (if (= copyovericon 0))
  177.     (copyfiles (source "AmiComSys.info") (dest instdir))
  178.  
  179.  
  180. ;(tooltype (dest (tackon instdir "AmiComSys")) (settooltype "PROGDIR" instdir) )
  181.  
  182. (copyfiles (source "Register") (dest (tackon instdir "Register")) (all) (infos))
  183.  
  184. (set imag (askchoice (choices "NewIcons (20 colours)" "MagicWB - Andreas Kuerzinger '00 (8 colours)" "MagicWB - Mads 'Yedo' Jensen '98 (8 colours)" "I've installed a replacement\ngfx-set. If so, make sure it's done for ACS 1.25+!")
  185.                     (prompt #selimages)
  186.                     (help #selimageshelp)
  187.                     (default 0)
  188. ))
  189.  
  190. (if (= imag 0) (copyfiles (source "NIImages") (dest (tackon instdir "Images")) (all)))
  191. (if (= imag 1) (copyfiles (source "MWBImages") (dest (tackon instdir "Images")) (all)))
  192. (if (= imag 2) (copyfiles (source "MWBImages2") (dest (tackon instdir "Images")) (all)))
  193.  
  194. (copyfiles (source "Rexx") (pattern "~(NotifyArexx.amicomsys|MessageArexx.amicomsys)") (dest (tackon instdir "Rexx")))
  195.  
  196. (set arscrp (askoptions (choices "NotifyArexx.amicomsys" "MessageArexx.amicomsys")
  197.                     (prompt #selscr)
  198.                     (help #selscrhelp)
  199.                     (default 2)
  200. ))
  201.  
  202. (if (<> arscrp 0) (
  203.     (if (IN arscrp 0) (copyfiles (source "Rexx/NotifyArexx.amicomsys") (dest (tackon instdir "Rexx"))))
  204.     (if (IN arscrp 1) (copyfiles (source "Rexx/MessageArexx.amicomsys") (dest (tackon instdir "Rexx"))))
  205. ))
  206.  
  207. ; install docs
  208. (set docs (askoptions (choices "AmiComSys.guide" "AmiComSys.readme" "BetterString.readme" "Toolbar.guide" "Readme.mui")
  209.                 (prompt #seldocs)
  210.                 (help #seldocs)
  211.                 (default 31)
  212. ))
  213.  
  214. (if (<> docs 0) (
  215.     (if (IN docs 1) (copyfiles (source #readmefile) (dest instdir) (newname "AmiComSys.readme") (infos) ) )
  216.     (if (IN docs 0) (
  217.         (set #doctarget (askdir (prompt "Where do you want to install the guide?")
  218.                 (default instdir)
  219.                 (help "Select where to install the documentation.\nRecommended is the AmiComSys directory\nor your HELP: directory.")
  220.         ))
  221.         (copyfiles (source "AmiComSys.guide") (dest #doctarget) (infos))
  222.     ))
  223.     (if (IN docs 2) (
  224.         (copyfiles (source "mui/libs/mui/BetterString.doc") (dest instdir) (infos))
  225.     ))
  226.     (if (IN docs 3) (
  227.         (copyfiles (source "mui/libs/mui/Toolbar.guide") (dest instdir) (infos))
  228.     ))
  229.     (if (IN docs 4) (
  230.         (copyfiles (source "Readme.mui") (dest instdir) (infos))
  231.     ))
  232. ))
  233.  
  234. ( if(= (askbool (prompt "Do you want to copy the AmiComSys executable to\nyour SYS:WBStartup drawer?\nThe tooltype PROGDIR will be set to your AmiComSys\ndirectory, so the program is able to find common files.")
  235.     (help "If you answer Yes, AmiComSys and AmiComSys.info will be\ncopied to your WBStartup drawer.\nThen it will automatically start everytime your Amiga is booted")
  236.     (default 0)
  237.     ) 1) (
  238.         (copyfiles (source (tackon instdir "AmiComSys")) (dest "SYS:WBStartup") (all) (infos))
  239.         (tooltype (dest "SYS:WBStartup/AmiComSys") (settooltype "PROGDIR" instdir) )
  240.     )
  241. )
  242.  
  243. (if (> osver 38) (
  244. (copylib (prompt #prompt_copy "\n\nBetterString.mcc" )
  245.          (help @copylib-help)
  246.          (confirm "average")
  247.          (source "mui/libs/mui/BetterString.mcc")
  248.          (dest "MUI:libs/mui/")
  249.          (optional "oknodelete" "force")
  250. )
  251.  
  252. (copylib (prompt #prompt_copy "\n\nBetterString.mcp" )
  253.          (help @copylib-help)
  254.          (confirm "average")
  255.          (source "mui/libs/mui/BetterString.mcp")
  256.          (dest "MUI:libs/mui/")
  257.          (optional "oknodelete" "force")
  258. )
  259. (copylib (prompt #prompt_copy "\n\nToolbar.mcc" )
  260.          (help @copylib-help)
  261.          (confirm "average")
  262.          (source "mui/libs/mui/Toolbar.mcc")
  263.          (dest "MUI:libs/mui")
  264.          (optional "oknodelete" "force")
  265. )
  266.  
  267. (copylib (prompt #prompt_copy "\n\nToolbar.mcp" )
  268.          (help @copylib-help)
  269.          (confirm "average")
  270.          (source "mui/libs/mui/Toolbar.mcp")
  271.          (dest "MUI:libs/mui/")
  272.          (optional "oknodelete" "force")
  273. )
  274. ))
  275.  
  276. (copylib (prompt #prompt_copy "\n\nAMarquee.library" )
  277.          (help @copylib-help)
  278.          (confirm "average")
  279.          (source "libs/amarquee.library")
  280.          (dest "LIBS:")
  281.          (optional "oknodelete" "force")
  282. )
  283. (message "Thanks for using AmiComSys!\n\n"
  284.         "You should now start AmiComSys and configure it.\nMost important is that you enter a login name\nand your emailaddress.\nThe emailaddress is your unique name on server\nIt will not be visible for any other user.\n"
  285.         "\nPlease also read about the rules in the guide.\n"
  286.         "\nPlease support further development by registering. Read the guide for more info.\n"
  287.         "The current registration fee is:\n"
  288.         "120 SEK, 16 US DOLLAR, 10 POUNDS, or 30 D-MARK")
  289.