home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / Virtualworlds.LHA / VW_UnArchived / InstallVW < prev    next >
Encoding:
Text File  |  1994-10-30  |  12.0 KB  |  409 lines

  1. ; Install VW
  2. ; For V1.012 of Virtual Worlds
  3.  
  4. (delopts "oknodelete" "force" "askuser")
  5. (complete 0)
  6. (set update 0)
  7. (set HD (askchoice
  8.    (prompt (cat "\n"
  9.       " Welcome to the Virtual Worlds install utility. "
  10.       " Please select whether you wish to install Virtual"
  11.       " Worlds to a floppy disk or to a hard disk drive.\n"
  12.    ))
  13.    (default 0)
  14.    (choices
  15.       "Hard disk Installation"
  16.       "Floppy disk Installation"
  17.    )
  18.    (help (cat "\n"
  19.       " Virtual Worlds may be installed to either your hard"
  20.       " disk (if you have one), or to a bootable floppy disk.\n"
  21.    ))
  22. ))
  23. (if (= HD 0) (
  24. ;-------------------- Hard disk install routine.
  25. (if (exists "VW:" (noreq))
  26.    (set update (askchoice
  27.       (prompt (cat "\n"
  28.          "           VW: assign detected!         \n"
  29.          " It would appear that Virtual Worlds is \n"
  30.          " already installed - do you wish to :-  \n"
  31.       ))
  32.       (default 1)
  33.       (choices
  34.          "Install new"
  35.          "Update existing"
  36.          "Remove"
  37.       )
  38.       (help (cat "\n"
  39.          " The assign VW: has been detected.  If you wish to"
  40.          " completely reinstall Virtual Worlds select Install"
  41.          " new.  If you just wish to update a previous version"
  42.          " then select Update existing.  If you wish to remove"
  43.          " Virtual Worlds then select the Remove option.  This"
  44.          " will attempt to remove all files originally"
  45.          " installed by Virtual Worlds.  However, some files,"
  46.          " such as the asl.library will not be removed as they"
  47.          " may be used by other applications.\n"
  48.       ))
  49.    ))
  50. )
  51.  
  52. (if (= update 2) (
  53.    (if (exists "VW:" (noreq))
  54.       (
  55.          (run "delete >NIL: S:VW.Config quiet force")
  56.          (run "delete >NIL: S:VWProject.info quiet force")
  57.          (run "delete >NIL: VW: all quiet force")
  58.          (run "assign >NIL: VW: remove")
  59.          (startup
  60.             "Virtual Worlds"
  61.             (prompt "\n Do you wish to remove the 'VW:' assign?\n")
  62.             (command ";(removed)")
  63.             (help (cat "\n"
  64.               " The user-startup contains an assign to VW: \n"
  65.               " This script will remove this for you.      \n"
  66.             ))
  67.          )
  68.       )
  69.    )
  70.    (exit (quiet))
  71. ))
  72. (if (= update 1)
  73.    (set target "VW:/")
  74. ;else
  75.    (set target (askdir
  76.       (prompt "\n Where do you want Virtual Worlds installed? \n")
  77.       (help (cat "\n"
  78.          " A new directory called Virtual Worlds will be made"
  79.          " in the directory that you specify.\n"
  80.       ))
  81.       (default "Work:")
  82.    ))
  83. )
  84. (set @default-dest target)
  85. (complete 10)
  86.  
  87. (set ts (getdiskspace target))
  88. (if (< ts 1000000)
  89.    (if (<> (getdevice target) "RAM")
  90.       (abort (cat "\n"
  91.          "   Not enough free disk space!!!  \n"
  92.          " Virtual Worlds requires at least \n"
  93.          "    1 Meg of hard disk space.     \n"
  94.       ))
  95.    )
  96. )
  97.  
  98. (complete 20)
  99. (copyfiles
  100.    (source "VW")
  101.    (dest (tackon target "VirtualWorlds"))
  102.    (infos)
  103.    (all)
  104. )
  105.  
  106. (complete 50)
  107. (if (= update 0) (
  108.    (run (cat "Assign VW: " (tackon target "VirtualWorlds")))
  109.    (startup
  110.       "Virtual Worlds"
  111.       (prompt "\n Add 'VW:' assign to 's:user-startup' ? \n")
  112.       (command ("ASSIGN >NIL: VW: %s " (tackon target "VirtualWorlds")))
  113.       (help (cat "\n"
  114.          " This script will add an entry to the user-startup file"
  115.          " so that the assign VW: is made to the correct directory"
  116.          " on startup.\n"
  117.       ))
  118.    )
  119. ))
  120.  
  121. (complete 60)
  122. (if (= update 0) (
  123.    (set version (askchoice
  124.       (prompt "\n What version of asl.library? \n")
  125.       (default 1)
  126.       (choices
  127.          "Workbench 1.3"
  128.          "Workbench 2.0+"
  129.          "Dont bother!"
  130.       )
  131.       (help (cat "\n"
  132.          " The correct version of asl.library must be present in"
  133.          " your LIBS: drawer for Virtual Worlds to run correctly."
  134.          " This process will not overwrite a newer library (higher"
  135.          " version number).\n"
  136.       ))
  137.    ))
  138.    (if (= version 0)
  139.       (copylib (source "ASL/asl13.library") (dest "libs:") (newname "asl.library"))
  140.    )
  141.    (if (= version 1)
  142.       (copylib (source "ASL/asl204.library") (dest "libs:") (newname "asl.library"))
  143.    )
  144. ))
  145. (complete 70)
  146. (if (= update 0) (
  147.    (set font (askchoice
  148.       (prompt "\n Do you wish to install the Times font? \n")
  149.       (default 0)
  150.       (choices
  151.          "Yup - go ahead!"
  152.          "No way!  Leave my fonts alone!"
  153.       )
  154.       (help (cat "\n"
  155.          " Virtual Worlds requires the Times font in order to function"
  156.          " correctly.  If you already have a Times font then you can"
  157.          " decide not to install this version and test Virtual Worlds. "
  158.          " If it appears that your font does not perform as required,"
  159.          " then you may decide to reinstall Virtual Worlds.  In this"
  160.          " case, you should select Install New, and then opt to install"
  161.          " the Times font provided.  Your old font will be renamed to"
  162.          " TimesOld, and the new font will be installed as Times.\n"
  163.       ))
  164.    ))
  165.    (if (= font 0)
  166.       ((if (exists "FONTS:Times.font")
  167.          ((run "rename FONTS:Times.font FONTS:TimesOld.font")
  168.          (run "rename FONTS:Times FONTS:TimesOld"))
  169.       )
  170.       (copyfiles
  171.          (source "Fonts")
  172.          (dest "FONTS:")
  173.          (nogauge)
  174.          (all)
  175.       ))
  176.    )
  177. ))
  178. (complete 90)
  179. (If (= update 0) (
  180.     (set icontype (askchoice
  181.         (prompt "\n Which icons do you want?\n")
  182.         (default 0)
  183.         (choices
  184.             "Standard icons"
  185.             "MagicWB icons"
  186.         )
  187.         (help (cat "\n"
  188.             " There is an icon provided for those people who use"
  189.             " MagicWB.  If you do not use this then Select the"
  190.             " standard icons. \n"
  191.             (cat "copy icons/VW_MWB.info " (tackon target "VirtualWorlds/VirtualWorlds.info >NIL:"))
  192.         ))
  193.     ))
  194.     (If (= icontype 0)(
  195.         (run (cat "copy icons/VW_NORM.info " (tackon target "VirtualWorlds/VirtualWorlds.info >NIL:")))
  196.         )
  197.         (
  198.         (run (cat "copy icons/VW_MWB.info " (tackon target "VirtualWorlds/VirtualWorlds.info >NIL:")))
  199.         (run (cat "copy icons/VWDOC_MWB.info " (tackon target "VirtualWorlds/VirtualSoftware.DOC.info >NIL:")))
  200.         (run (cat "copy icons/VWDOC_MWB.info " (tackon target "VirtualWorlds/VW.Guide.info >NIL:")))
  201.         )
  202.     ))
  203. )
  204. (complete 95)
  205. (if (= update 0) (
  206.    (set icon (askchoice
  207.       (prompt "\n Do you wish to have icons for saved World files?\n")
  208.       (default 0)
  209.       (choices
  210.          "Ooooh!  Yes please!"
  211.          "Errr.  No thanks."
  212.       )
  213.       (help (cat "\n"
  214.          " If you want to have nice little icons for your files then"
  215.          " select as such here.  This will copy the default icon to"
  216.          " your S: directory.  If you wish to disable this feature"
  217.          " then merely remove the icon from your S: drawer.\n"
  218.       ))
  219.    ))
  220.    (if (= icon 0) (
  221.       (If (= icontype 0) (
  222.          (run "copy icons/VWProject_NORM.info S:VWProject.info >NIL:")
  223.          )(
  224.          (run "copy icons/VWProject_MWB.info S:VWProject.info >NIL:")
  225.          ))
  226.       )
  227.    ))
  228. )
  229. (complete 100)
  230. )
  231. ; -------------------------- Floppy disk install bit
  232. (
  233.    (complete 0)
  234.    (set form (askchoice (
  235.       (prompt (cat
  236.          " For this install to work, there are a few conditions that MUST"
  237.          " be met. "
  238.          " The Virtual Worlds archive has been dearchived onto a"
  239.          " floppy disk that is NOT called VW. "
  240.          " You need to boot from your normal boot disk - ie a copy"
  241.          " of your Workbench disk. "
  242.          " You need a blank disk called VW to make into an auto-"
  243.          "booting Virtual Worlds disk. "
  244.          " This script can perform the third part for you, but you"
  245.          " must see to the other parts yourself.  Select Abort Install"
  246.          " if you need to reboot/find a disk."
  247.       ))
  248.       (default 0)
  249.       (choices
  250.          "Go on then - format me a disk as well."
  251.          "Ive got a disk called VW here for you!"
  252.       )
  253.       (help (cat "\n"
  254.          " You need a blank disk called VW for this install"
  255.          " to work, and you must boot from a normal Workbench"
  256.          " disk.  This script can create the disk for you"
  257.          " but you'll have to reboot yourself!\n"
  258.       )))
  259.    ))
  260.    (if (= form 0) (
  261.       (run "copy sys:c/install RAM: >NIL:")
  262.       (run "copy sys:system/format RAM: >NIL:")
  263.       (run "copy sys:c/delete RAM: >NIL:")
  264.       (run "copy sys:c/copy RAM: >NIL:")
  265.       (message "\n Please insert a blank disk into DF0: \n")
  266.       (working "\n Please wait -> Formatting disk in DF0: \n\n This will take approximately 1.5 minutes. \n")
  267.       (run "ram:format DEVICE=DF0: NAME VW")
  268.       (run "ram:install df0: >NIL:")
  269.       (run "ram:delete RAM:installl >NIL:")
  270.       (run "ram:delete RAM:format >NIL:")
  271.    ))
  272.    (complete 20)
  273.    (message (cat "\n"
  274.       " Please re-insert your system disk. \n"
  275.    ))
  276.    (
  277.       (working "\n Please wait -> copying files to RAM: \n")
  278.       (run "makedir RAM:c >NIL:")
  279.       (complete 21)
  280.       (run "makedir RAM:libs >NIL:")
  281.       (complete 22)
  282.       (run "makedir RAM:devs >NIL:")
  283.       (complete 23)
  284.       (run "makedir RAM:fonts >NIL:")
  285.       (run "makedir RAM:fonts/topaz >NIL:")
  286.       (complete 24)
  287.       (run "makedir RAM:s >NIL:")
  288.       (complete 25)
  289.       (run "copy c:delete ram:c >NIL:")
  290.       (complete 27)
  291.       (run "copy c:assign ram:c >NIL:")
  292.       (complete 29)
  293.       (run "copy c:copy ram:c >NIL:")
  294.       (complete 30)
  295.       (run "copy c:endcli ram:c >NIL:")
  296.       (complete 32)
  297.       (run "copy c:execute ram:c >NIL:")
  298.       (complete 34)
  299.       (run "copy c:LoadWB ram:c >NIL:")
  300.       (complete 36)
  301.       (run "copy c:path ram:c >NIL:")
  302.       (complete 38)
  303.       (run "ram:copy FONTS:Topaz#? RAM:Fonts/Topaz >NIL:")
  304.       (complete 42)
  305.       (run "ram:copy FONTS:topaz.font ram:fonts >NIL:")
  306.       (complete 43)
  307.       (run "copy libs:amigaguide.library ram:libs >NIL:")
  308.       (complete 44)
  309.       (run "copy libs:diskfont.library ram:libs >nil:")
  310.       (complete 45)
  311.       (run "copy libs:icon.library ram:libs >nil:")
  312.       (complete 46)
  313.       (run "copy libs:info.library ram:libs >nil:")
  314.       (complete 47)
  315.       (run "copy libs:math#? ram:libs >nil:")
  316.       (complete 49)
  317.       (run "copy libs:version.library ram:libs >nil:")
  318.       (complete 50)
  319.    )
  320.    (message (cat "\n"
  321.       " Ok - Now insert the disk which contains the unarchived"
  322.       " Virtual Worlds stuff.\n")
  323.    )
  324.    (set version (askchoice
  325.       (prompt "\n What version of asl.library? \n")
  326.       (default 1)
  327.       (choices
  328.          "Workbench 1.3"
  329.          "Workbench 2.0+"
  330.       )
  331.       (help (cat "\n"
  332.          " The correct version of asl.library must be present in"
  333.          " your LIBS: drawer for Virtual Worlds to run correctly."
  334.          " This process will not overwrite a newer library (higher"
  335.          " version number).\n"
  336.       ))
  337.    ))
  338.    (working "\n Please wait -> Copying VW files to RAM: \n")
  339.    (if (= version 0)
  340.       (run "ram:copy ASL/asl13.library ram:libs/asl.library")
  341.    )
  342.    (if (= version 1)
  343.       (run "ram:copy ASL/asl204.library ram:libs/asl.library")
  344.    )
  345.    (complete 55)
  346.    (copyfiles
  347.       (source "FONTS/Times")
  348.       (dest "RAM:fonts/Times")
  349.       (all)
  350.       (nogauge)
  351.    )
  352.    (complete 60)
  353.    (run "ram:copy FONTS/times.font ram:fonts >NIL:")
  354.    (complete 61)
  355.    (copyfiles
  356.       (source "VW")
  357.       (dest "ram:VW")
  358.       (all)
  359.       (infos)
  360.       (nogauge)
  361.    )
  362.    (complete 67)
  363.    (run "ram:copy S/Startup-Sequence ram:s >NIL:")
  364.    (complete 69)
  365.    (run "ram:copy S/VWProject.info ram:s >NIL:")
  366.    (complete 70)
  367. ;copy files from >copyfrom< to df1:
  368.    (message "\n Please insert disk to install VW on. \n")
  369.    (working "\n Please wait -> Copying files to disk. \n")
  370.    (copyfiles
  371.       (source "RAM:c")
  372.       (dest "VW:c")
  373.       (all)
  374.       (nogauge)
  375.    )
  376.    (complete 75)
  377.    (copyfiles
  378.       (source "RAM:s")
  379.       (dest "VW:s")
  380.       (all)
  381.       (infos)
  382.       (nogauge)
  383.    )
  384.    (complete 80)
  385.    (copyfiles 
  386.       (source "RAM:libs")
  387.       (dest "VW:libs")
  388.       (all)
  389.       (nogauge)
  390.    )
  391.    (complete 85)
  392.    (copyfiles
  393.       (source "RAM:fonts")
  394.       (dest "VW:fonts")
  395.       (all)
  396.       (nogauge)
  397.    )
  398.    (complete 90)
  399.    (copyfiles 
  400.       (source "RAM:VW")
  401.       (dest "VW:")
  402.       (all)
  403.       (infos)
  404.       (nogauge)
  405.    )
  406.    (complete 100)
  407. )
  408. )
  409.