home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / dcn-au35.lzh / AudioED25 / Install < prev    next >
Encoding:
Text File  |  1995-01-03  |  4.3 KB  |  202 lines

  1. ; $VER: AudioED V 2.5 (01.01.95)
  2. ;
  3. ; Installation script for the Commodore Installer (tm)
  4. ;
  5. ; Installs the program AudioED 2.5 by Frank Enderle to your
  6. ; harddisk partition.
  7.  
  8. ; startup message
  9.  
  10. (set old_level @user-level)
  11. (set sys_ver (/ (getversion "exec.library" (resident)) 65536))
  12.  
  13. (if (< sys_ver 37) (
  14.   (abort "AudioED requires at least Kickstart 2.04 !")
  15.   (exit (quiet))
  16. ))
  17.  
  18. (user 1)
  19. (message "This script installs the program\n\nAudioED\nVersion 2.5\nRelease 37.983\n\n"
  20.          "All files contained in this archive are Copyright © 1994 by Frank Enderle !" )
  21. (user old_level)
  22.  
  23. ; ask user where to install AudioED
  24.  
  25. (set drawer
  26.   (askdir
  27.     (prompt "Please select the directory where you would like to install "
  28.             "AudioED 2.5\nA drawer called 'AudioED' would be created !")
  29.     (help @askdir-help)
  30.     (default "SYS:")
  31.   )
  32. )
  33.  
  34. (set @default-dest drawer)
  35.  
  36. ; delete old installations
  37.  
  38. (user 1)
  39. (if (exists (tackon drawer "AudioED") (noreq)) (
  40.   (if (askbool
  41.     (prompt "There's already an AudioED-version installed !\n\nDelete it ?")
  42.     (help @askbool-help)) (
  43.     (if (askbool
  44.       (prompt "WARNING: All files in this drawer will be deleted !\n\nContinue ?")
  45.       (help @askbool-help)) (
  46.  
  47.       ; we use DOS commands: Installer is very 'unfriendly' for file deletion !
  48.  
  49.       (run (cat "delete \"" (tackon drawer "AudioED") "\" \""  (tackon drawer "AudioED.info") "\" all"))
  50.       (run "delete LOCALE:catalogs/#?/audioed.catalog")
  51.       (run "delete LIBS:idx.library")
  52.       (run "delete ENVARC:AudioED#?")
  53.     ))
  54.   ))
  55.  
  56.   (if (NOT (askbool
  57.     (prompt "Install now AudioED ?")
  58.     (help @askbool-help))) (
  59.     (exit)
  60.   ))
  61. ))
  62. (user old_level)
  63.  
  64. (complete 20)
  65.  
  66. ; install program & keyfile
  67.  
  68. (working "Installing AudioED 2.5 Program")
  69.  
  70. (copyfiles
  71.   (help @copyfiles-help)
  72.   (source "drawer_icon")
  73.   (dest drawer)
  74.   (newname "AudioED.info")
  75. )
  76.  
  77. (set drawer (tackon drawer "AudioED"))
  78. (makedir drawer)
  79.  
  80. (copyfiles
  81.   (help @copyfiles-help)
  82.   (source "AudioED")
  83.   (dest drawer)
  84.   (infos)
  85. )
  86.  
  87. (if (<> (getsum "Keyfile/AudioED.key") $B81AA1DC) (
  88.  
  89.   ; copy keyfile to archive
  90.  
  91.   (copyfiles
  92.     (help @copyfiles-help)
  93.     (source "Keyfile/AudioED.key")
  94.     (dest "ENVARC:")
  95.   )
  96.  
  97.   ; copy keyfile to environment
  98.  
  99.   (copyfiles
  100.     (help @copyfiles-help)
  101.     (source "Keyfile/AudioED.key")
  102.     (dest "ENV:")
  103.   )
  104. ) (
  105.   (user 1)
  106.   (message "Keyfile is missing.\n\n You're running the demoversion !\n\n"
  107.            "On how to register read the documentation.")
  108.   (user old_level)
  109. ))
  110.  
  111. (complete 40)
  112.  
  113. ; install library
  114.  
  115. (working "Installing required libraries")
  116.  
  117. (copylib
  118.   (help @copylib-help)
  119.   (source "libs/idx.library")
  120.   (dest "LIBS:")
  121. )
  122.  
  123. (complete 60)
  124.  
  125. ; install locales (only on > 37)
  126.  
  127. (if (> sys_ver 37) (
  128.   (working "Installing locale files")
  129.  
  130.   (set language (askoptions
  131.     (choices "English" "Deutsch")
  132.     (prompt "Select language-catalogs to install")
  133.     (help @askchoices-help)
  134.   ))
  135.  
  136.   (set ask_language 0)
  137.   (while (< ask_language 2) (
  138.     (set language_name (select ask_language "English" "Deutsch"))
  139.     (if (BITAND language (shiftleft 1 ask_language)) (
  140.       (if (> ask_language 0) (
  141.         (copyfiles
  142.           (help @copyfiles-help)
  143.           (source (tackon (tackon "locale/catalogs" language_name) "audioed.catalog"))
  144.           (dest (tackon "LOCALE:catalogs" language_name))
  145.         )
  146.       ))
  147.     ))
  148.     (set ask_language (+ ask_language 1))
  149.   ))
  150. ))
  151.  
  152. (complete 80)
  153.  
  154. ; install documentation
  155.  
  156. (working "Installing documentation files")
  157.  
  158. (set language (askchoice
  159.   (choices "English documentation" "Deutsche Dokumentation")
  160.   (prompt "Select documentation language to install")
  161.   (help @askchoices-help)
  162. ))
  163.  
  164. (set ask_language 0)
  165. (while (< ask_language 2) (
  166.   (set doc_name (select ask_language "docs/english/AudioED.guide" "docs/deutsch/AudioED.guide"))
  167.   (if (= language ask_language) (
  168.     (copyfiles
  169.       (help @copyfiles-help)
  170.       (source doc_name)
  171.       (dest drawer)
  172.       (infos)
  173.     )
  174.   ))
  175.   (set ask_language (+ ask_language 1))
  176. ))
  177.  
  178. (complete 90)
  179.  
  180. ; install programmer information
  181.  
  182. (working "Installing developer files")
  183.  
  184. (if (askbool
  185.   (help @askbool-help)
  186.   (prompt "This archive contains the catalog-description file and a "
  187.           "catalog-translation file for german.\n\nShall I install "
  188.           "them ?")) (
  189.     (copyfiles
  190.       (help @copyfiles-help)
  191.       (source "locale/developer")
  192.       (dest (tackon drawer "Developer"))
  193.       (infos)
  194.       (all)
  195.     )
  196.   )
  197. )
  198.  
  199. (complete 100)
  200.  
  201. (exit)
  202.