home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Netzwerk / DI_PA32A.LHA / PBench32a / pb32a.lha / ParBench.Setup.V3.2a < prev    next >
Encoding:
Text File  |  1993-11-23  |  16.8 KB  |  392 lines

  1. ;Opening Header                      ;Credits & Info
  2.     ;/********************************************************************/
  3.     ;/*                                                                  */
  4.     ;/*  This script was authored with FLOW from New Horizons Software   */
  5.     ;/*  An incredible Outline/Thought Processor great for programming!  */
  6.     ;/*                                                                  */
  7.     ;/* Special Thanks to Randy Brooks of New Horizons for the updates.  */
  8.     ;/*                                                                  */
  9.     ;/*                    Started 8/25/93 @ 1:00pm                      */
  10.     ;/*                  Last Update: 11/23/93 4:24 PM                   */
  11.     ;/*                                                                  */
  12.     ;/*              ©1993 Vernon Graner All Rights Reserved             */
  13.     ;/*                                                                  */
  14.     ;/********************************************************************/
  15.  
  16. (Welcome                             ;Welcome Message
  17.     (message "\nParBENCH Version V3.2\n©1992-93 Vernon Graner\n\nReleased November 23, 1993\n\n\n---===>>> PARBENCH IS NOW SHAREWARE! <<<===---\n\n\nPlease read the\nREADME.FIRST!\nfile for details before proceeding.")
  18.     )
  19. (PROCEDURE SetUp                     ;Define Variables and set defaults
  20.     (
  21.     (set CPU (database "cpu")) ;discover what the CPU type is
  22.     (set User_Dest     "None") ;Set a flag for size check
  23.     (set @default-dest "SYS:") ;Make the system the default destination
  24.     (set NET_Size       13123) ;Space required by the ParNET Files
  25.     (set Amiga_Size     17223) ;Space required by the Amiga-Amiga scripts
  26.     (set CDTV_Size      16282) ;Space required by the Amiga-CDTV Scripts
  27.     (set DOCS_Size      83778) ;Space required by the ParBENCH docs
  28.     (set Guide_Size    105789) ;Space required by the AmigaGuide Files
  29.     (set Sys_Needed     83150) ;Space required by the SYS files
  30.     (transcript "ParBENCH installation on "@default-dest)
  31.     ))
  32. (PROCEDURE Options                   ;Ask all the questions
  33.     (                          
  34.     (set Install                ;Ask user Install or Uninstall
  35.         (AskChoice (Prompt "Do you want to INSTALL or UNINSTALL packages on your system?\n (For Addtional Information hit HELP!)")
  36.             (help "\nOne of my Pet Peaves is when a software author provides a way to install the myraid of files into all the little cubbyholes on your system but then does NOT provide a simple way to remove those well hidden files from the deep dark bowels of your computer. The UNINSTALL choice will allow you to remove any one or ALL of the files that were installed by ParBENCH from your system. Install will, of course place the needed files onto your system. ")
  37.             (choices "INSTALL" "UNINSTALL")
  38.             (default 0 )
  39.             )
  40.             )
  41.     (If (= install 0)           ;Set "The_Word_x"s
  42.         (;then
  43.             (Set The_Word_1 ("install"))
  44.             (Set The_Word_2 ("to")) 
  45.         )
  46.         (;else
  47.             (Set The_Word_1 ("remove"))
  48.             (Set The_Word_2 ("from"))
  49.         )
  50.         )
  51.     (set Package                ;Ask user what package(s) to work with
  52.         (AskOptions (Prompt ("Choose the packages to %s:" The_Word_1))
  53.             (help "\n  Amiga<->CDTV is just the files for connecting an Amiga to a CDTV. This allows reading CDROM's like the Hypermedia Concepts Fred Fish collection. This choice deals only with files used by ParNET to communicate with a CDTV.\n\n  Amiga<->Amiga is the needed files to communicate between two Amiga Computers. \n\n  ")
  54.             (choices "Amiga<->CDTV ParNET" "Amiga<->Amiga ParNET" "ParBENCH Documentation" "AmigaGuide®")
  55.             (default -1)
  56.             )
  57.             )
  58.     (IF (= install 0)           ;Ask if the user wants 680x0 device
  59.         (IF (or (in package 0) (in package 1))
  60.             (
  61.             (set Turbo
  62.             (askchoice (Prompt ("Do you want to %s the 680x0 parnet.device? (Hit HELP for details!)" The_Word_1))
  63.                 (help "\nThe Tulsa Amiga Users Group provided this file and claims it is a 68040/030/020 optimized version of the parnet.device.\n\n  Some users claim it greatly enhances the speed of the NET: handling when installed on a machine with the correct processor.\n\nPlease note that this is an EXPERIMENTAL file and has not been tested, nor approved for use, by the Software Distillery or the authors of ParNET. (Yet!) :) It is provided here as a 'Power User' option.")
  64.                 (choices "Normal parnet.device" "680x0  parnet.device")
  65.                 (IF (> CPU 68000) (default 1) (default 0) )
  66.                 )
  67.                 )
  68.                 )
  69.                 )
  70.                 )
  71.     (IF (OR                     ;Ask user for Destination
  72.         (in package 0) (in package 1) (in package 2)) (
  73.         (set User_Dest 
  74.         (askdir 
  75.             (prompt ("Select the location to %s the ParNET Drawer %s."The_Word_1 The_Word_2))
  76.             (help "\n  ParBENCH relies on there being a Drawer called 'ParNET' in order for it to install properly. This drawer must exist in order for the remainder of this script to function.")
  77.             (default @default-dest)
  78.             );end askdir
  79.             );end set
  80.             );end or
  81.             (set User_Dest "None")
  82.             )
  83.     (If (NOT                    ;Add "ParNET" to the chosen destination
  84.         (= User_Dest "None"))
  85.         (set @default-dest (TackOn (User_Dest) ("ParNET")) )
  86.         )
  87.     ))                          ;End Procedure
  88. (PROCEDURE Size_Check                ;Check the source & destination sizes
  89.     (
  90.     (If (or (in package 0) (in package1)) (set User_Dest_Needed (+ User_Dest_Needed Net_Size)))
  91.     (If (= (in package 0)) (set User_Dest_Needed (+ User_Dest_Needed CDTV_Size)))
  92.     (If (= (in package 1)) (set User_Dest_Needed (+ User_Dest_Needed AMIGA_Size)))
  93.     (If (= (in package 2)) (set User_Dest_Needed (+ User_Dest_Needed DOCS_Size)))
  94.     (If (= (in package 3)) (set User_Dest_Needed (+ User_Dest_Needed Guide_Size)))
  95.     
  96.     (set SYS_Avail (getdiskspace "SYS:"))
  97.     (set User_Dest_Avail (getdiskspace User_Dest))
  98.     (set Install_Anyway 1)
  99.     (if (= (expandpath "SYS:") (expandpath User_Dest))
  100.         (set same_dest "true")
  101.         (set same_dest "false")
  102.         )
  103.     (if (<= SYS_Avail SYS_Needed)
  104.         (
  105.         (set Install_Anyway 
  106.         (askbool (Prompt 
  107.         ("\nThere is only %ld bytes available disk space on your SYS: partition.\n\n" SYS_Avail)
  108.         ("You need an addtional %ld bytes of space to install all needed files.\n\n" (- SYS_Needed SYS_Avail))
  109.         ("Attempt to install anyway?")
  110.         (help "The install script has determined that you do not have enough space on your SYS: partition for the ParNET packages you chose to be installed. You must clear some space on the SYS: partition before proceeding.")
  111.         (default 0)
  112.         ))))
  113.         (if (= Install_Anyway 0)
  114.          (Abort "Not enough room on destination drive!")
  115.         ))
  116.     (if (= Same_Dest "True")
  117.         (set User_Dest_Avail (- User_Dest_Avail SYS_Needed))
  118.         )
  119.     (if (OR
  120.         (in package 0) (in package 1) (in package 2)) (
  121.         (if (<= User_Dest_Avail User_Dest_Needed)
  122.             (
  123.             (set Install_Anyway 
  124.             (askbool (Prompt 
  125.             ("There is only %ld bytes available disk space on your chosen partition.\n\n" User_Dest_Avail)
  126.             ("You need an addtional %ld bytes of space to install all needed files.\n\n" (- User_Dest_Needed User_Dest_Avail))
  127.             ("Attempt to install anyway?")
  128.             (help "The install script has determined that you do not have enough space on your SYS: partition for the ParNET packages you chose to be installed. You must clear some space on the SYS: partition before proceeding.")
  129.             (default 0)
  130.             ))))
  131.             (if (= Install_Anyway 0)
  132.             (Abort "Not enough room on destination drive!")
  133.             ))
  134.         ))
  135.         
  136.     
  137.     
  138.     ))
  139.  
  140. (PROCEDURE Install_ExitMsg           ;Closing message after install 
  141.     (
  142.     (run "ParBENCH:S/Sounds/SuperPlay ParBENCH:S/Sounds/install.complete")
  143.     (exit "ParBENCH is Copyright ©1992-93 Vernon Graner\nGraner Sound Multimedia Studios\n7002b Oak Meadow Circle Austin, Texas 78736\nVoice#(512)-288-2515\n\n\nParBENCH IS NOW SHAREWARE! Please read the important Shareware notice!")
  144.     ))
  145. (PROCEDURE Remove_ExitMsg            ;Closing message after remove
  146.     (
  147.     (run "ParBENCH:S/Sounds/SuperPlay ParBENCH:S/Sounds/remove.complete")
  148.     (exit "ParBENCH is Copyright ©1992-93 Vernon Graner\nGraner Sound Multimedia Studios\n7002b Oak Meadow Circle Austin, Texas 78736\nVoice#(512)-288-2515\n\nPlease try and Support Shareware Authors! :)")
  149.     ))
  150.  
  151. (PROCEDURE Install_CDTV              ;Install scripts needed for CDTV
  152.     (
  153.     (copyfiles (Prompt "For Addtional Information on this file hit HELP.")
  154.         (help "\n  These scripts are used to make it easier to connect with CDTV via ParNET. It is the same as Boot.HOST except that it has additional code to sense the Hypermedia Concepts Fred Fish Collection CDROM V1.5+ and add PNET.Keys capabilities as well as assigning logical CD0: to NET:CD0, allowing the CD_SAMPLER to operate.")
  155.         (source "ParBENCH:ParNET")
  156.         (dest @default-dest)
  157.         (files)
  158.         (infos)
  159.         (noposition)
  160.         (pattern "CDTV.#?")
  161.         (confirm)
  162.         )
  163.     ))
  164. (PROCEDURE Install_Amiga             ;Install scripts for Amiga
  165.     (
  166.     (copyfiles(Prompt "For Addtional Information on these files hit HELP.")
  167.         (help "\n  These scripts are used to launch the network between two Amigas. You really only need one of each type on each machine IE: Boot.HOST on machine 1, Boot.CLIENT on machine 2. If you want maximum versatility you may install both, as that is the default condition.")
  168.         (source "ParBENCH:ParNET")
  169.         (dest @default-dest)
  170.         (files)
  171.         (infos)
  172.         (noposition)
  173.         (pattern "Boot.#?")
  174.         (confirm)
  175.         )
  176.     ))
  177. (PROCEDURE Install_DOCS              ;Install ParBENCH.Guide docs
  178.     (
  179.     (copyfiles (Prompt "ParBENCH.Guide (For Addtional Information on this file hit HELP.)")
  180.         (help "\n  The ParBENCH.Guide is an 80k text file for use with Commodore's AmigaGuide hypertext system. It is reccomended that it be kept in the ParNET drawer for quick and easy reference but if you are short on space you could omit it and just refere to it on disk.")
  181.         (source "ParBENCH:Utilities")
  182.         (dest @default-dest)
  183.         (files)
  184.         (infos)
  185.         (noposition)
  186.         (pattern "ParBENCH.GUIDE")
  187.         (confirm)
  188.         )
  189.     ))
  190. (PROCEDURE Install_Guide             ;Install the CBM AmigaGuide
  191.     (
  192.     (CopyLib (Prompt "Copying amigaguide.library to your SYS:Libs directory")
  193.         (help "\n ")
  194.         (source "ParBENCH:LIBS/amigaguide.library")
  195.         (dest   "Libs:")
  196.         (confirm)
  197.         )
  198.     (CopyLib (Prompt "Copying WDisplay to your SYS:Utilities directory")
  199.         (help "\n  ")
  200.         (source "ParBENCH:Utilities/WDisplay")
  201.         (dest "SYS:Utilities")
  202.         (confirm)
  203.         (infos)
  204.         (noposition)
  205.         )
  206.     (CopyLib (Prompt "Copying AmigaGUIDE to your SYS:Utilities directory")
  207.         (help "\n  ")
  208.         (source "ParBENCH:Utilities/AmigaGuide")
  209.         (dest "SYS:Utilities")
  210.         (confirm)
  211.         (infos)
  212.         (noposition)
  213.         )
  214.     (CopyLib (Prompt "Copying HELP.GUIDE to your SYS:S directory")
  215.         (help "\n  ")
  216.         (source "ParBENCH:S/HELP.GUIDE")
  217.         (dest "SYS:S")
  218.         (confirm)
  219.         (infos)
  220.         (noposition)
  221.         )
  222.     ))
  223. (PROCEDURE Install_NET               ;Install ParNET support files
  224.     (
  225.     (CopyFiles (Prompt "Copying ParNET Utilities")
  226.         (help "\nRun.NETCHAT--The icon to launch the 2 way NetChat program\nRun.NETKEYS--See ParBENCH.GUIDE for Details\nRun.NETSTAT--See ParBENCH.GUIDE for Details ")
  227.         (source "ParBENCH:ParNET")
  228.         (dest @default-dest)
  229.         (infos)
  230.         (noposition)
  231.         (pattern "#?net#?")
  232.         (confirm)
  233.         )
  234.     (CopyFiles (Prompt "Copying MoveSYS Command")
  235.         (help "\n  MoveSYS is a public domain utility used to change the system directory from the disk an Amiga booted from, to an alternate device. This utility allows you to assign all system files over the network.\n\n  A typical application would be an A500 with no hard drive being assigned to use an A2000's hard drive over the network.")
  236.         (source "ParBENCH:Parnet")
  237.         (dest @default-dest)
  238.         (infos)
  239.         (noposition)
  240.         (pattern "MoveSYS")
  241.         (confirm)
  242.         )
  243.     (CopyFiles (Prompt "Copying Default ParNET Icons")
  244.         (help "\n  This file is the Default Icon file ParBENCH uses for drives that would otherwise not appear. This file may be created by you or changed to taste.")
  245.         (source "ParBENCH:Parnet")
  246.         (dest @default-dest)
  247.         (pattern "node.rinfo")
  248.         (confirm)
  249.         )
  250.     (CopyFiles (Prompt "Files to be copied to your C: directory.")
  251.         (help "\n\n NetPNet-Server is required for ParNET to operate. ParBENCH relies on it being in the C: directory.\n\n  NetSTAT is a utility used by the Monitor.NET script to give a graphic display of network activity. It is not required for ParNET to operate.\n\n  PNetKeys is used by the NetKEYS script to allow control of the remote machine's mouse & keyboard. It is not required for ParNET to operate.")
  252.         (source "ParBENCH:C/")
  253.         (dest "C:")
  254.         (Files)
  255.         (pattern "#?")
  256.         (Confirm)
  257.         )
  258.     (CopyFiles (Prompt "Files to be copied to your L: directory.")
  259.         (help "See the ParBENCH.Guide for details on these files.")
  260.         (source "ParBENCH:L/")
  261.         (dest "L:")
  262.         (pattern "#?")
  263.         (confirm)
  264.         )
  265.     (copyfiles (Prompt "Files to be copied to your DEVS: directory.")
  266.         (help "See the ParBENCH.Guide for details on these files.")
  267.         (source "ParBENCH:Devs/")
  268.         (dest "DEVS:")
  269.         (pattern "Mountlist.Parnet.#?")
  270.         (Files)
  271.         (confirm)
  272.         )
  273.     (if (= Turbo 0)    ;copy normal parnet.device to devs:
  274.         (copylib (prompt "Copying ParNET.device to your DEVS: directory.")
  275.             (help "See the ParBENCH.Guide for details on this file.")
  276.             (source "ParBENCH:devs/parnet.device")
  277.             (dest "SYS:DEVS")
  278.             (confirm)
  279.             ))
  280.     (if (= Turbo 1)    ;copy turbo parnet.device to devs:
  281.         (CopyLib (prompt "Copying ParNET.device to your DEVS: directory.")
  282.             (help "See the ParBENCH.Guide for details on this file.")
  283.             (source "ParBENCH:devs/030/parnet.device")
  284.             (dest "SYS:DEVS")
  285.             (confirm)
  286.             ))
  287.     ))
  288.  
  289. (PROCEDURE Remove_CDTV               ;Remove the CDTV scripts
  290.     (
  291.     (working ("Removing CDTV Network Scripts." ) )
  292.     (delete ("%s/CDTV.extras"       @default-dest) )
  293.     (delete ("%s/CDTV.extras.info"  @default-dest) )
  294.     (delete ("%s/CDTV.connect"      @default-dest) )
  295.     (delete ("%s/CDTV.connect.info" @default-dest) )
  296.     ))
  297. (PROCEDURE Remove_Amiga              ;Remove Amiga scripts
  298.     (
  299.     (working ("Removing Amiga Network Scripts." ) )
  300.     (delete ("%s/boot.host"          @default-dest) )
  301.     (delete ("%s/boot.host.info"     @default-dest) )
  302.     (delete ("%s/boot.client"        @default-dest) )
  303.     (delete ("%s/boot.client.info"   @default-dest) )
  304.     ))
  305. (PROCEDURE Remove_DOCS               ;Remove ParBENCH.Guide docs
  306.     (
  307.     (working ("Removing ParBENCH Documentation." ) )
  308.     (delete ("%s/ParBENCH.Guide"          @default-dest) )
  309.     (delete ("%s/ParBENCH.Guide.info"     @default-dest) )
  310.     ))
  311. (PROCEDURE Remove_Guide              ;Remove CBM AmigaGuide files
  312.     (
  313.     (working ("Removing AmigaGuide files" ) )
  314.     (delete ("LIBS:amigaguide.library") )
  315.     (delete ("SYS:Utilities/WDisplay") )
  316.     (delete ("SYS:Utilities/WDisplay.info") )
  317.     (delete ("SYS:AmigaGuide") )
  318.     (delete ("SYS:AmigaGuide.info") )
  319.     (delete ("S:Help.guide") )
  320.     ))
  321. (PROCEDURE Remove_NET                ;Remove ParNET support files
  322.     (
  323.     ;Remove from default-dest
  324.         (working ("Removing files from %s" @default-dest) )
  325.         (delete ("%s/Run.NETKEYS"          @default-dest) )
  326.         (delete ("%s/Run.NETKEYS.info"     @default-dest) )
  327.         (delete ("%s/Run.NETSTAT"          @default-dest) )
  328.         (delete ("%s/Run.NETSTAT.info"     @default-dest) )
  329.         (delete ("%s/Run.NetCHAT"          @default-dest) )
  330.         (delete ("%s/Run.NetCHAT.info"     @default-dest) )
  331.         (delete ("%s/MoveSYS"              @default-dest) )
  332.         (delete ("%s/MoveSYS.info"         @default-dest) )
  333.         (delete ("%s/node.rinfo"           @default-dest) )
  334.         (delete ("%s/MoveSYS"              @default-dest) )
  335.     ;Remove from C:
  336.         (working ("removing files from C:"))
  337.         (delete ("C:Inform") )
  338.         (delete ("C:NetPatch") )
  339.         (delete ("C:NetSTAT") )
  340.         (delete ("C:ReBoot") )
  341.         (delete ("C:Send") )
  342.         (delete ("C:LInfo") )
  343.         (delete ("C:NetCMD") )
  344.         (delete ("C:NetPNet-Server") )
  345.         (delete ("C:PNetKeys") )
  346.         (delete ("C:Receive") )
  347.     ;Remove from L:
  348.         (working ("removing files from L:"))
  349.         (delete ("L:mouse-handler") )
  350.         (delete ("L:netpnet-handler") )
  351.     ;Remove from DEVS:
  352.         (working ("Removing files from DEVS:"))
  353.         (delete ("DEVS:MountList.ParNET.Client") )
  354.         (delete ("DEVS:MountList.ParNET.Host") )
  355.         (delete ("DEVS:MountList.ParNET.Mouse") )
  356.         (delete ("DEVS:parnet.device") )
  357.     ;Remove Drawer
  358.         (working ("Removing ParNET Drawer from %s" User_Dest))
  359.         (delete  ("%sParNET"                   User_Dest) )
  360.         (delete  ("%s/ParNET"                   User_Dest) )
  361.         (delete  ("%sParNET.info"              User_Dest) )
  362.         (delete  ("%s/ParNET.info"              User_Dest) )
  363.     ))
  364.     
  365.  
  366. ;Main                                ;The actual Program! :)
  367.     (
  368.     (SetUp)
  369.     (Options)
  370.     (IF (= install 0)       ;Install or Remove?
  371.     (                       ;Then
  372.     (Size_Check)
  373.     (If (in Package 0)                     (Install_CDTV)   )
  374.     (If (in Package 1)                     (Install_Amiga)  )
  375.     (If (in Package 2)                     (Install_DOCS)   )
  376.     (If (in Package 3)                     (Install_Guide)  )
  377.     (If (or (in Package 0) (in package 1)) (Install_NET)    )
  378.     (Install_ExitMsg)
  379.     )
  380.     (                        ;Else Remove
  381.     (run "ParBENCH:S/Sounds/SuperPlay ParBENCH:S/Sounds/warning.sample")
  382.     (message "\n!!!!-=>WARNING<=-!!!!\n\nYou have chosen to DELETE files from your system!\n\nHit proceed to DELETE files\n\n Hit ABORT to exit without deletion")
  383.     (If (in Package 0)                      (Remove_CDTV)   )
  384.     (If (in Package 1)                      (Remove_Amiga)  )
  385.     (If (in Package 2)                      (Remove_DOCS)   )
  386.     (If (in Package 3)                      (Remove_Guide)  )
  387.     (If (or (in Package 0) (in package 1))  (Remove_NET)    )
  388.     (Remove_ExitMsg)
  389.     )
  390.     ))
  391.     
  392.