home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 12 / MA_Cover_12.iso / l / dnode-handler / install < prev    next >
Encoding:
Text File  |  1998-06-08  |  3.1 KB  |  162 lines

  1. ;
  2. ; $PROJECT: dnode-handler
  3. ;
  4. ; $VER: Install 40.1 (02.08.97)
  5. ;
  6. ; $AUTHOR: Stefan Ruppert , Windthorststrasse 5 , 65439 Floersheim , GERMANY
  7. ;
  8. ; $COPYRIGHT: (C) Copyright 1997 by Stefan Ruppert, All Rights Reserved!
  9. ;
  10. ; $EMAIL: ruppert@amigaworld.com
  11. ;
  12. ; $HISTORY:
  13. ;
  14. ; 02.08.97 : 040.001 : initial
  15. ;
  16.  
  17. ;
  18. ; customization section
  19. ;
  20.  
  21. (set #basename      "dnode-handler")
  22. (set #handler       "dnode-handler")
  23. (set #mountentry    "DNODE")
  24.  
  25. (set #procedure
  26.     "Please select the appropriate procedure:"
  27. )
  28.  
  29. (set #procedure-help
  30.     (cat
  31.     "You can here select the Install procedure to install "
  32.     "all nessecary files for the " @app-name ".\n"
  33.     "Or select Remove to remove all previously installed "
  34.     "files of the " @app-name " from your system.\n\n"
  35.     )
  36. )
  37. (set #txt-mountdir-prompt
  38.     "Should the handler be available directly after system start ?"
  39. )
  40. (set #txt-mountdir-help
  41.     (cat
  42.     "If the handler should be available directly after system start, "
  43.     "the mount entry is copies to Devs:DOSDrivers otherwise to "
  44.     "Sys:Storage/DOSDrivers.\n\n"
  45.     )
  46. )
  47.  
  48. (set #txt-copy-mount-entry-prompt
  49.     "Copying mount entry"
  50. )
  51. (set #txt-copy-handler-prompt
  52.     "Copying handler"
  53. )
  54.  
  55. ;
  56. ; independend Installer script
  57. ;
  58.  
  59. (welcome #welcome-help)
  60.  
  61. (set mode
  62.     (askchoice
  63.     (prompt #procedure)
  64.     (help (cat #procedure-help @askchoice-help))
  65.     (choices "Install" "Remove")
  66.     )
  67. )
  68.  
  69. (if mode
  70.     (set pmode "Remove")
  71.     (set pmode "Install")
  72. )
  73.  
  74. (if (= 0 (askchoice
  75.          (prompt #txt-mountdir-prompt)
  76.          (help (cat #txt-mountdir-help @askchoice-help))
  77.          (choices "Yes" "No"))
  78.     )
  79.     (
  80.     (set #mountdir "Devs:DOSDrivers")
  81.     ) ; else
  82.     (
  83.     (set #mountdir "Sys:Storage/DOSDrivers")
  84.     )
  85. )
  86.  
  87. (set #classdir
  88.     (askdir
  89.     (prompt "Where do the Classes belong?")
  90.     (help @askdir-help)
  91.     (default "Sys:Classes")
  92.     )
  93. )
  94.  
  95. ; now do install or remove
  96. (if mode
  97.     ; Remove
  98.     (
  99.     ; Show what we are doing
  100.     (working "Removing " @app-name)
  101.  
  102.     ; Remove the non-standard pieces
  103.     (delete (tackon #mountdir #mountentry))
  104.     (delete (tackon "L:" #handler))
  105.     (foreach (tackon #classdir "dnode") "#?"
  106.          (delete (tackon (tackon #classdir "dnode") @each-name))
  107.     )
  108.     (delete (tackon #classdir "dnode"))
  109.  
  110.     ; Don't want to use the confusing "Installation Complete" message
  111.     ; when what we really did was remove things...
  112.     (message "The \"" @app-name "\" components "
  113.          "that you specified have been successfully removed")
  114.     (exit (quiet))
  115.     )
  116.  
  117.     ; Install
  118.     (
  119.     (working "Installing " @app-name)
  120.  
  121.     (complete 0)
  122.  
  123.     ; Install the mount entry
  124.     (copyfiles
  125.               (prompt #txt-copy-mount-entry-prompt)
  126.               (help @copylib-help)
  127.               (source (tackon "Devs/DOSDrivers" #mountentry))
  128.               (dest #mountdir)
  129.               (confirm)
  130.     )
  131.  
  132.     (complete 33)
  133.  
  134.     ; Install the mount entry
  135.     (copyfiles
  136.               (prompt #txt-copy-handler-prompt)
  137.               (help @copylib-help)
  138.               (source (tackon "l" #handler))
  139.               (dest "L:")
  140.               (newname #handler)
  141.               (confirm)
  142.     )
  143.  
  144.     (complete 66)
  145.  
  146.     (foreach "classes/dnode" "#?"
  147.          (copylib
  148.          (prompt (cat "Copying " @each-name))
  149.          (help @copylib-help)
  150.          (source (tackon "classes/dnode" @each-name))
  151.          (dest (tackon #classdir "DNode"))
  152.          (confirm)
  153.          )
  154.     )
  155.  
  156.     (complete 100)
  157.     )
  158. )
  159.  
  160. (set @default-dest #mountdir)
  161.  
  162.