home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / blabla / memorans / install_memorans next >
Text File  |  1998-01-24  |  5KB  |  199 lines

  1. ;
  2. ; Memorans 1.2 installation script
  3. ; $VER: MemoransInstall 1.2 (18.10.97)
  4. ; © 1997 Szymon Pura, FREEWARE
  5. ;
  6.  
  7. (set #VERSION 1)
  8. (set #REVISION 2)
  9. (welcome)
  10.  
  11. ; let's greet the user..
  12.  
  13. (message ("About to install\nMemorans %ld.%ld\n" #VERSION #REVISION)
  14.          "\nThis installation script will create a new directory\n"
  15.          "and copy all necessary files.\n\n"
  16.          "You must have MUI 3.5 installed on your system.")
  17.  
  18. ; now let's check MUI...
  19.  
  20. (if (NOT (= (exists "MUI:" (noreq)) 2))
  21.     (abort "ERROR: Can't find MUI !! ")
  22. )
  23.  
  24. (if (< (/ (getversion "libs:muimaster.library") 65536) 16)
  25.     (abort "ERROR: You need MUI 3.5 or newer !!")
  26. )
  27.  
  28. ; let's install libs & classes
  29. ; perhaps (foreach) would be better here...
  30.  
  31. (copylib (source "libs/reqtools.library")
  32.          (dest "libs:")
  33.          (help @copylib-help)
  34.          (prompt "Installing reqtools.library...")
  35. )
  36.  
  37. (copylib (source "libs/wbstart.library")
  38.          (dest "libs:")
  39.          (help @copylib-help)
  40.          (prompt "Installing wbstart.library...")
  41. )
  42.  
  43. (copylib (source "libs/date.library")
  44.          (dest "libs:")
  45.          (help @copylib-help)
  46.          (prompt "Installing date.library...")
  47.  
  48. (copylib (source "libs/MUI/MonthNavigator.mcc")
  49.          (dest "MUI:Libs/MUI")
  50.          (help @copylib-help)
  51.          (prompt "Installing MonthNavigator.mcc...")
  52. )
  53.  
  54. (copylib (source "libs/MUI/MonthNavigator.mcp")
  55.          (dest "MUI:Libs/MUI")
  56.          (help @copylib-help)
  57.          (prompt "Installing MonthNavigator.mcp")
  58. )
  59.  
  60. (copylib (source "libs/MUI/Popposition.mcc")
  61.          (dest "MUI:Libs/MUI")
  62.          (help @copylib-help)
  63.          (prompt "Installing Popposition.mcc")
  64. )
  65.  
  66. (copylib (source "libs/MUI/Popxxx.mcp")
  67.          (dest "MUI:Libs/MUI")
  68.          (help @copylib-help)
  69.          (prompt "Installing Popxxx.mcp")
  70. )
  71.  
  72. (copylib (source "libs/MUI/Popdevice.mcc")
  73.          (dest "MUI:Libs/MUI")
  74.          (help @copylib-help)
  75.          (prompt "Installing Popdevice.mcc")
  76. )
  77.  
  78. (copylib (source "libs/MUI/Pophotkey.mcc")
  79.          (dest "MUI:Libs/MUI")
  80.          (help @copylib-help)
  81.          (prompt "Installing Pophotkey.mcc")
  82. )
  83.  
  84. (copylib (source "libs/MUI/Popport.mcc")
  85.          (dest "MUI:Libs/MUI")
  86.          (help @copylib-help)
  87.          (prompt "Installing Popport.mcc")
  88. )
  89.  
  90. (copylib (source "libs/MUI/Poptask.mcc")
  91.          (dest "MUI:Libs/MUI")
  92.          (help @copylib-help)
  93.          (prompt "Installing Poptask.mcc")
  94. )
  95.  
  96. (copylib (source "libs/MUI/TextInput.mcc")
  97.          (dest "MUI:Libs/MUI")
  98.          (help @copylib-help)
  99.          (prompt "Installing TextInput.mcc")
  100. )
  101.  
  102. (copylib (source "libs/MUI/Textinput.mcp")
  103.          (dest "MUI:Libs/MUI")
  104.          (help @copylib-help)
  105.          (prompt "Installing TextInput.mcp")
  106. )
  107.  
  108. (copylib (source "libs/MUI/Textinputscroll.mcc")
  109.          (dest "MUI:Libs/MUI")
  110.          (help @copylib-help)
  111.          (prompt "Installing TextInputScroll.mcc")
  112. )
  113.  
  114. ; now let's create a new drawer and install Memorans...
  115.  
  116. (set #dest (askdir (prompt "Where should I create a new drawer for Memorans?")
  117.                    (help @askdir-help)
  118.                    (default @default-dest)
  119.            )
  120. )
  121.  
  122. (set #dirname (askstring (prompt ("Creating a new directory in\n%s" #dest))
  123.                          (default "Memorans")
  124.                          (help @askstring-help)
  125.               )
  126. )
  127.  
  128. (set #dest (tackon #dest #dirname))
  129.  
  130. (makedir #dest)
  131.  
  132. (copyfiles (dest #dest)
  133.            (pattern "~(libs|WBStartup#?|Install#?|env)")
  134.            (infos)
  135.            (source "")
  136. )
  137.  
  138. (if (NOT (= (exists "ENV:Memorans/Default.calendar" (noreq)) 1))
  139.     (
  140.         (copyfiles (dest "ENV:")
  141.                    (source "env")
  142.                    (infos)
  143.                    (pattern "Memorans")
  144.         )
  145.     )
  146. )
  147. (if (NOT (= (exists "ENVARC:Memorans/Default.calendar" (noreq)) 1))
  148.     (
  149.         (copyfiles (dest "ENVARC:")
  150.                    (source "env")
  151.                    (infos)
  152.                    (pattern "Memorans")
  153.         )
  154.     )
  155. )
  156.  
  157. (makedir "ENVARC:Memorans")
  158.  
  159. ; let's ask about WBStartup
  160.  
  161. (set #choice (askchoice (choices "pWBStartup drawer"
  162.                          #dest
  163.                         )
  164.                         (default 0)
  165.                         (help "It's generally better to have Memorans in WBStartup\n\n" @askchoice-help)
  166.                         (prompt "Where should the Memorans commodity be installed?")
  167.              )
  168. )
  169.  
  170. (if (= #choice 0)
  171.    (
  172.       (set #memorans "SYS:WBStartup/Memorans")
  173.       (copyfiles (dest "SYS:WBStartup")
  174.                  (source "WBStartup/Memorans")
  175.                  (infos)
  176.       )
  177.       (tooltype (dest "SYS:WBStartup/Memorans")
  178.                 (settooltype "EDITOR" (tackon #dest "MemoransEditor"))
  179.                 (noposition)
  180.       )
  181.    )
  182.    (
  183.       (set #memorans (tackon #dest "WBStartup/Memorans"))
  184.       (copyfiles (dest #dest)
  185.                  (pattern "WBStartup")
  186.                  (source "")
  187.                  (infos)
  188.       )
  189.       (tooltype (dest (tackon #dest "WBStartup/Memorans"))
  190.                 (settooltype "EDITOR" (tackon #dest "Memoranseditor"))
  191.                 (noposition)
  192.       )
  193.    )
  194. )
  195.  
  196. (set @default-dest #dest)
  197.  
  198.  
  199.