home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 18 / amigaformatcd18.iso / -readerstuff- / david_roberts / iopeditor / hdinstall next >
Text File  |  1997-07-18  |  2KB  |  74 lines

  1. ;
  2. ; Check whether the Imagine Assign is set. If it is use it as default base
  3. ; directory else use Work:
  4. ;
  5. (if (= (exists "Imagine:" (noreq)) 2)
  6.     (set @default-dest "Imagine:")
  7.     (set @default-dest "Work:")
  8. )
  9. (set @user-level 1)
  10. (set MagicWB (exists "ENV:MagicWB"))
  11. (set Source_dir (pathonly @icon))
  12.  
  13. ; Texts
  14.  
  15. (set #Intro-Text
  16. (cat "\nThis script installs the Imagine Object Path Editor on your Hard Disk. "
  17.      "Please ensure that you have at least 69K of free disk space."))
  18. (set #Path-Text
  19. (cat "Select the target directory. A directory IOPEditor will be created there."))
  20. (set #Path-Help
  21. (cat "\nThis section lets you choose the target directory to install IOPEditor."
  22.      "A directory IOPEditor will be created there if it does not already exist."
  23.      "\nThe default is @default-dest\n\n"
  24.      @askdir-help))
  25. (set #FileExists
  26. (cat "File IOPEditor already exists in this directory. You should either delete "
  27.      "the file and then re-install or re-install into a different directory."))
  28. (set #MagicWB-Help
  29. "Installs 8 Colour MagicWB Icons instead of Standard 4 colour ones.")
  30.  
  31. ; Main 
  32.  
  33. (complete 0)
  34.  
  35. (message #Intro-Text)
  36. (set target 
  37. (askdir (prompt #Path-Text) (help #Path-Help) (default @default-dest) (newpath)))
  38.  
  39. (if (= MagicWB 0)
  40.     (set MagicWB 
  41.          (askbool (prompt "\n\nDo you want to use the MagicWB Icons ? ")
  42.                   (help #MagicWB-Help)
  43.                   (default 1))))
  44.  
  45. ; Set up Destination Directory. Check that it does not already exist
  46.  
  47. (set @default-dest (tackon target "IOPEditor"))
  48. (if (= (exists @default-dest (noreq)) 1) 
  49.     (Abort #FileExists)
  50. )
  51. (if (= (exists @default-dest (noreq)) 0) 
  52.     (makedir @default-dest (infos))
  53. )
  54.  
  55. (copyfiles
  56.      (prompt "\nInstalling Program & Doc Files")
  57.      (source Source_Dir)
  58.      (choices "IOPEditor" "IOPEditor.Guide" "IOPEditor.txt")
  59.      (dest @default-dest))
  60.  
  61. (complete 50)
  62.  
  63. (if (= MagicWB 0)
  64.     (Set Icon_Source_Dir Source_Dir)
  65.     (Set Icon_Source_Dir (tackon Source_Dir "MagicWB"))
  66. )
  67.  
  68. (copyfiles
  69.      (prompt "\nInstalling Icon Files")
  70.      (source Icon_Source_Dir)
  71.      (choices "IOPEditor.Info" "IOPEditor.Guide.info" "IOPEditor.txt.info")
  72.      (dest @default-dest))
  73.  
  74. (complete 100)