home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / bazy / intuidex / install_intuidex < prev    next >
Text File  |  1995-07-19  |  7KB  |  169 lines

  1. ; THIS IS THE INTUIDEX 2.0 INSTALLER SCRIPT.
  2. ; INTUIDEX IS COPYRIGHT 1995, JEFFERY C. MAY
  3. ;
  4. ; THIS VERSION CREATED: JAN 31, 1995
  5. ;
  6. ; ALTHOUGH THE COMMODORE INSTALLER USES SCRIPTS THAT VERY MUCH RESEMBLE
  7. ; LISP, I HAVE ENDEVORED TO MAKE THEM LOOK AS MUCH LIKE C AS POSSIBLE.
  8. ; MAYBE THAT WAY I'LL REMEMBER HOW IT WORKS...
  9.  
  10.  
  11. ; SETUP SOME ERROR AND OTHER MESSAGES SO THAT THE CODE WILL BE A LITTLE
  12. ; EASIER TO READ...
  13. (
  14.     (set target-dir             "DH1:")
  15.     (set multiview              "sys:utilities/multiview")
  16.     (set amigaguide             "sys:utilities/amgiaguide")
  17.  
  18.     (set OtherAnnounce   (cat   "You are about to be asked to provide a "
  19.                                 "path to where you want IntuiDex to be "
  20.                                 "installed to.  If you wish to create a "
  21.                                 "drawer to put IntuiDex in, you must create "
  22.                                 "it with the \"Make New Drawer\" gadget.  "
  23.                                 "All neccessary subdirectories that are "
  24.                                 "needed will be created automatically."))
  25.  
  26.     (set AnnounceHelp    (cat   "   I need to know where you want IntuiDex "
  27.                                 "to be installed to.  The next window will "
  28.                                 "have in it a file requester in which you "
  29.                                 "can specify the location that you want "
  30.                                 "IntuiDex.\n"
  31.                                 "   I recommend that you put IntuiDex into the "
  32.                                 "same area of your hard disk that you put "
  33.                                 "your other applications, and NOT in the "
  34.                                 "system area. Grouping software like "
  35.                                 "this will make it easier to find it "
  36.                                 "later."))
  37.  
  38.     (set intuitionNeeded (cat   "IntuiDex requires at least version 37 of "
  39.                                 "the Intuition Library.  If your system does "
  40.                                 "not have at least release 2.04 of the Amiga "
  41.                                 "operating system, IntuiDex will not operate."))
  42.  
  43.     (set gadtoolsNeeded (cat "  IntuiDex requires at least version 37 of "
  44.                                 "the GadTools Library.  If your system does "
  45.                                 "not have at least release 2.04 of the Amiga "
  46.                                 "operating system, IntuiDex will not operate."))
  47.  
  48.     (set aslNeeded       (cat   "IntuiDex requires at least version 37 of "
  49.                                 "the ASL Library.  If your system does "
  50.                                 "not have at least release 2.04 of the Amiga "
  51.                                 "operating system, IntuiDex will not operate."))
  52.  
  53.     (set graphicsNeeded (cat    "IntuiDex requires at least version 37 of "
  54.                                 "the Graphics Library.  If your system does "
  55.                                 "not have at least release 2.04 of the Amiga "
  56.                                 "operating system, IntuiDex will not operate."))
  57.  
  58.     (set utilityNeeded   (cat   "IntuiDex requires at least version 37 of "
  59.                                 "the Utility Library.  If your system does "
  60.                                 "not have at least release 2.04 of the Amiga "
  61.                                 "operating system, IntuiDex will not operate."))
  62.  
  63.     (set iconNeeded      (cat   "IntuiDex requires at least version 37 of "
  64.                                 "the Icon Library.  If your system does "
  65.                                 "not have at least release 2.04 of the Amiga "
  66.                                 "operating system, IntuiDex will not operate."))
  67.  
  68.     (set amigaguideNeeded (cat  "IntuiDex requires at least version 34 of "
  69.                                 "the AmigaGuide Library.  Your system does "
  70.                                 "not have the AmigaGuide Library, which was "
  71.                                 "included with release 3.0 and above of the Amiga "
  72.                                 "operating system.  "
  73.                                 "Note that the AmigaGuide system can be obtained "
  74.                                 "from Aminet, or any other source of PD and shareware "
  75.                                 "software."))
  76. )
  77.  
  78.  
  79. ; MAKE SURE THAT THEY'RE USING THE PROPER OPERATING SYSTEM...
  80. ; INTUIDEX ONLY WORKS WITH SYSTEMS THAT HAVE AT LEAST RELEASE 2.04
  81. ; (VERSION 37) OF THE AMIGA OS.
  82. (
  83.     (
  84.         (set IXEmulVer
  85.             (/ (getversion "libs:ixemul.library") 65536))
  86.  
  87.         (set intuitionVer
  88.             (/ (getversion "intuition.library" (resident)) 65536))
  89.  
  90.         (set gadtoolsVer
  91.             (/ (getversion "gadtools.library" (resident)) 65536))
  92.  
  93.         (set aslVer
  94.             (/ (getversion "asl.library" (resident)) 65536))
  95.  
  96.         (set graphicsVer
  97.             (/ (getversion "graphics.library" (resident)) 65536))
  98.  
  99.         (set utilityVer
  100.             (/ (getversion "libs:utility.library" (resident)) 65536))
  101.  
  102.         (set iconVer
  103.             (/ (getversion "icon.library" (resident)) 65536))
  104.  
  105.         (set amigaguideVer
  106.             (/ (getversion "libs:amigaguide.library") 65536))
  107.     )
  108. )
  109.  
  110.  
  111. ; NOW WE HAVE THE VERSION NUMBERS FOR ALL THE REQUIRED LIBRARIES.
  112. ; MAKE SURE THAT THEY'RE NEW ENOUGH TO WORK.
  113. (
  114.     (if (< intuitionVer 37)     ((message    intutionNeeded) (exit (quiet))))
  115.     (if (< gadtoolsVer 37)      ((message    gadtoolsNeeded) (exit (quiet))))
  116.     (if (< aslVer 37)           ((message    aslNeeded) (exit (quiet))))
  117.     (if (< graphicsVer 37)      ((message    graphicsNeeded) (exit (quiet))))
  118.     (if (< utilityVer 3)7       ((message    utilityNeeded) (exit (quiet))))
  119.     (if (< iconVer 37)          ((message    iconNeeded) (exit (quiet))))
  120.     (if (< amigaguideVer 34)    ((message    amigaguideNeeded) (exit (quiet))))
  121. )
  122.  
  123.  
  124.  
  125. ; GET THE LOCATION FROM THE USER WHERE TO PUT INTUIDEX
  126. ; NOTE THAT IF THE USER SELECTED "NOVICE" AS HIS USER LEVEL, THEN WE NEED
  127. ; TO SKIP THIS, AND JUST INSTALL INTUIDEX TO THE DH1: (WORK) PARTITION
  128. (
  129.     (if (> @user-level 0)
  130.         (
  131.             (message OtherAnnounce (help AnnounceHelp))
  132.             (set @default-dest  target-dir)
  133.             (set target-dir
  134.             (askdir     (prompt     "Where should I put IntuiDex?")
  135.                         (help       @askdir-help)
  136.                         (default    @default-dest)
  137.                         (newpath)
  138.                         (disk))
  139.             )
  140.         )
  141.     )
  142. )
  143.  
  144.  
  145. ; NOW WE'LL COPY THE FILES...
  146. ; THE VARIABLE @default-dest NOW HOLDS THE DIRECTORY WHERE WE'RE GOING
  147. ; TO BE PLACING ALL THE FILES.  NOW WE CAN COPY STUFF...
  148. (set  src (pathonly @icon))
  149. (copyfiles  (source src)
  150.             (dest   target-dir)
  151.             (all)
  152. )
  153.  
  154.  
  155.  
  156. ; NOW, SET THE @default-dest VARIABLE TO POINT TO WHERE WE PUT THE STUFF
  157. ; SO THAT THE COMPLETION MESSAGE WILL BE RIGHT.
  158. (if (> @user-level 0) (set    @default-dest   target-dir))
  159.  
  160.  
  161. ; AT THE END NOW- LET'S BE NICE AND AUTOMATICALLY START THE ON-LINE HELP
  162. ; AMIGAGUIDE FILE IF WE CAN.  WE NEED TO CHECK AND SEE IF MULTIVIEW IS
  163. ; PRESENT IN THE SYS:UTILITIES DRAWER FIRST.
  164. (if (= (exists multiview (noreq)) 1)
  165.     (
  166.         (set AGCommand (cat multiview " \"" (tackon target-dir "help/IntuiDex.guide") "\""))
  167.         (run AGCommand)
  168.     )
  169. )